/* ============================================
   Tresta Consulting AB — Main Styles
   Dark tech-consultant aesthetic (Vercel / Linear / Stripe)
   ============================================ */

/* CSS Reset & Box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* CSS Variables */
:root {
  --primary: #0066ff;
  --primary-hover: #0052cc;
  --dark: #0a0a0a;
  --surface: #111111;
  --surface-2: #1a1a1a;
  --light: #f5f5f5;
  --text: #e8e8e8;
  --muted: #888888;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

ul {
  list-style: none;
}

/* Layout */
.container {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 6rem 0;
}

.section.alt {
  background: var(--surface);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  transition: background 0.2s, backdrop-filter 0.2s;
}

.site-header.scrolled {
  background: rgba(10, 10, 10, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
}

.brand:hover {
  color: white;
}

.brand-logo {
  height: 90px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-weight: 600;
  font-size: 1rem;
  color: white;
}

.brand-tag {
  font-size: 0.7rem;
  color: var(--muted);
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}

.nav a:hover {
  color: white;
}

.nav .nav-cta {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-weight: 500;
  transition: background 0.2s;
}

.nav .nav-cta:hover {
  background: var(--primary-hover);
  color: white;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: white;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: white;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  background: var(--dark);
}

.mobile-nav[hidden] {
  display: none !important;
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.mobile-nav a:hover {
  color: white;
}

/* Hero */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: white;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.muted {
  color: var(--muted);
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.button.primary {
  background: var(--primary);
  color: white;
  border: none;
}

.button.primary:hover {
  background: var(--primary-hover);
}

.button.secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: white;
}

.button.secondary:hover {
  border-color: white;
}

.trust-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.pill {
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

/* Hero card */
.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: white;
}

.checklist {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checklist li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
}

.card-links {
  margin-top: 1.25rem;
}

.card-links a {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.card-links a:hover {
  color: #3385ff;
}

/* Section head */
.section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.section-head h2 {
  margin-bottom: 0.5rem;
}

.section-head .muted {
  font-size: 1.05rem;
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: rgba(0, 102, 255, 0.3);
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* How I work */
.how {
  margin-top: 2.5rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.how h3 {
  margin-bottom: 1rem;
}

.bullets {
  list-style: none;
  padding: 0;
}

.bullets li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
}

/* About grid */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2.5rem;
  align-items: start;
}

.about-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 1.25rem 0;
}

/* Contact grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}

/* Contact form */
.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  margin-top: 1.5rem;
}

.form-message {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.form-message.success {
  color: #34d399;
}

.form-message.error {
  color: #f87171;
}

.contact-grid .muted a {
  color: var(--primary);
}

.contact-grid .muted a:hover {
  color: #3385ff;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner p {
  margin: 0;
}

.site-footer .muted {
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--primary);
}

.site-footer a:hover {
  color: #3385ff;
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .mobile-nav {
    display: flex;
  }
  .section {
    padding: 4rem 0;
  }
  .hero {
    min-height: auto;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .cards {
    grid-template-columns: 1fr;
  }
}
