/* =============================================================
   DESIGN TOKENS — dark (default)
   ============================================================= */
:root {
  --bg:       #0B0B0C;
  --bg-2:     #08080A;
  --surface:  #141416;
  --text:     #F4EFE7;
  --muted:    #9A9A9A;
  --accent:   #C7CBD0;
  --hairline: rgba(199,203,208,0.14);

  --radius: 14px;

  --sp-1:   8px;
  --sp-2:  16px;
  --sp-3:  24px;
  --sp-4:  40px;
  --sp-5:  64px;
  --sp-6:  96px;

  --container: 620px;
  --px: 24px;

  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-body: 'Inter', system-ui, sans-serif;
}

/* Light theme */
[data-theme="light"] {
  --bg:       #F6F3ED;
  --bg-2:     #EDE9E0;
  --surface:  #ECEAE3;
  --text:     #0F0F10;
  --muted:    #7A7A7A;
  --accent:   #C7CBD0;
  --hairline: rgba(15,15,16,0.1);
}

/* =============================================================
   RESET / BASE
   ============================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

/* Smooth theme transition */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition:
    background-color 0.28s ease,
    color 0.28s ease,
    border-color 0.28s ease !important;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* =============================================================
   REDUCED MOTION
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; translate: none !important; }
}

/* =============================================================
   UTILITY
   ============================================================= */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* =============================================================
   LAYOUT
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--px);
}

/* =============================================================
   TYPOGRAPHY
   ============================================================= */
h1, h2, h3 { font-family: var(--font-mono); color: var(--text); }

h1 {
  font-size: clamp(1.875rem, 6vw, 3.125rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: var(--sp-2);
}

p { color: var(--text); }

.wordmark {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: var(--sp-2);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: var(--sp-4);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-2);
}

.section-heading {
  font-size: clamp(1.25rem, 3.5vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--sp-3);
}

.section-sub {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: var(--sp-3);
  max-width: 480px;
}

.overview-intro {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: var(--sp-4);
}

/* =============================================================
   DIVIDERS
   ============================================================= */
.divider {
  display: none;
}

/* =============================================================
   BUTTONS
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  /* scale is an individual transform property — doesn't conflict with
     the hero-entrance animation which uses the separate translate property */
  transition: filter 0.18s ease, scale 0.18s ease, border-color 0.18s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background-color: #1C1C1E;
  color: var(--text);
  border-color: rgba(199,203,208,0.18);
}

/* Light theme: adapts to environment — warm surface, dark text */
[data-theme="light"] .btn-primary {
  background-color: var(--surface);
  color: var(--text);
  border-color: rgba(15,15,16,0.18);
}

.btn-primary:hover {
  filter: brightness(1.18);
  scale: 1.02;
  border-color: rgba(199,203,208,0.45);
}

[data-theme="light"] .btn-primary:hover {
  border-color: rgba(15,15,16,0.35);
  filter: brightness(0.95);
}

/* "tomorrow" — readable but secondary */
.btn-muted {
  position: relative;
  opacity: 0.45;
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* Animated strikethrough — slides in on parent button hover */
.btn-muted::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1.5px;
  background: currentColor;
  transform: translateY(-50%);
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover .btn-muted::after,
.btn-muted.strike-active::after {
  width: 100%;
}

/* "Start" and "TODAY" — bold, full brightness */
.btn-strong {
  font-weight: 700;
  letter-spacing: 0.1em;
}

/* =============================================================
   THEME TOGGLE — pill with sliding thumb
   ============================================================= */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 56px;
  height: 28px;
  padding: 4px 7px;
  border-radius: 999px;
  /* Left half (sun) lighter, right half (moon) darker — boosts sun contrast in dark mode */
  background: linear-gradient(90deg, #3C3C40 0 50%, var(--surface) 50% 100%);
  border: 1px solid var(--hairline);
  cursor: pointer;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
  transition: border-color 0.2s ease;
}

.theme-toggle:hover { border-color: rgba(199,203,208,0.4); }
[data-theme="light"] .theme-toggle { background: var(--surface); }
[data-theme="light"] .theme-toggle:hover { border-color: rgba(15,15,16,0.22); }

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Sliding thumb */
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  /* Spring bounce on slide */
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.28s ease;
}

/* Light mode: thumb slides right and goes dark */
[data-theme="light"] .toggle-thumb {
  transform: translateX(28px);
  background: #4A4A4E;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* Icons */
.toggle-icon {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, color 0.22s ease;
}

/* Dark mode: moon lit, sun visible against lighter pill half */
.toggle-sun  { opacity: 0.85; color: #1A1A1C; }
.toggle-moon { opacity: 1;    color: var(--accent); }

/* Light mode: sun lit (left), moon dim (right) */
[data-theme="light"] .toggle-sun  { opacity: 1;    color: #0F0F10; }
[data-theme="light"] .toggle-moon { opacity: 1;    color: #FFFFFF; }

/* =============================================================
   HERO
   ============================================================= */
/* Uses CSS individual transform 'translate' so that the btn hover
   'scale' property operates independently — no transform conflict. */
@keyframes hero-entrance {
  from { opacity: 0; translate: 0 16px; }
  to   { opacity: 1; translate: 0 0;    }
}

@keyframes texture-drift {
  0%   { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

.hero {
  position: relative;
  padding-top: var(--sp-5);
  padding-bottom: var(--sp-6);
  overflow: hidden;
  background: linear-gradient(to bottom, var(--bg-2) 0%, var(--bg) 100%);
}

/* Brushed-metal diagonal texture */
.hero-texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(199,203,208,0.15) 0px,
    rgba(199,203,208,0.15) 1px,
    transparent 1px,
    transparent 14px
  );
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, rgba(0,0,0,0.9) 20%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, rgba(0,0,0,0.9) 20%, transparent 100%);
  animation: texture-drift 10s linear infinite;
  z-index: 0;
}

/* Light mode: dark lines on warm background */
[data-theme="light"] .hero-texture {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(15,15,16,0.1) 0px,
    rgba(15,15,16,0.1) 1px,
    transparent 1px,
    transparent 14px
  );
}

.hero .container { position: relative; z-index: 1; }

/* Staggered entrance */
.hero .container > .wordmark     { animation: hero-entrance 0.75s ease both; animation-delay: 0.00s; }
.hero .container > .hero-eyebrow { animation: hero-entrance 0.75s ease both; animation-delay: 0.08s; }
.hero .container > h1            { animation: hero-entrance 0.75s ease both; animation-delay: 0.16s; }
.hero .container > .hero-sub     { animation: hero-entrance 0.75s ease both; animation-delay: 0.28s; }
.hero .container > .btn          { animation: hero-entrance 0.75s ease both; animation-delay: 0.40s; }

.hero h1 { margin-bottom: var(--sp-3); }

.hero-sub {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: var(--sp-4);
  line-height: 1.75;
}

/* =============================================================
   SECTIONS
   ============================================================= */
.section {
  padding-top: 110px;
  padding-bottom: 110px;
}

/* Scroll reveal — uses individual 'translate' property */
.reveal {
  opacity: 0;
  translate: 0 48px;
  scale: 0.97;
  transition:
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    translate 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    scale 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}

/* =============================================================
   SERVICES — CARDS
   ============================================================= */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}

@media (min-width: 560px) {
  .cards { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-top: 1px solid rgba(199,203,208,0.3);
  border-radius: var(--radius);
  padding: var(--sp-3);
  transition: translate 0.18s ease;
}

.card:hover { translate: 0 -2px; }

[data-theme="light"] .card { border-top-color: rgba(15,15,16,0.18); }

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--sp-2);
}

.card h3 { color: var(--text); margin-bottom: var(--sp-2); }
.card p  { color: var(--muted); font-size: 0.9375rem; line-height: 1.7; }

/* =============================================================
   FAQ ACCORDION
   ============================================================= */
.faq       { border-top: 1px solid var(--hairline); }
.faq-item  { border-bottom: 1px solid var(--hairline); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  min-height: 44px;
  transition: color 0.15s ease;
}

.faq-question:hover { color: var(--accent); }
[data-theme="light"] .faq-question:hover { color: var(--text); opacity: 0.7; }

.faq-question:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.faq-icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  position: relative;
  color: var(--muted);
  transition: color 0.15s ease;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.faq-icon::before {
  width: 12px; height: 1.5px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  width: 1.5px; height: 12px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.faq-question[aria-expanded="true"] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq-question[aria-expanded="true"] .faq-icon { color: var(--accent); }

.faq-answer { padding-bottom: var(--sp-3); }
.faq-answer p { color: var(--muted); font-size: 0.9375rem; line-height: 1.78; }

/* =============================================================
   EMAIL CAPTURE
   ============================================================= */
.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

@media (min-width: 480px) {
  .form-row { flex-direction: row; }
  .form-row input[type="email"] { flex: 1; }
}

input[type="email"] {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  outline: none;
  width: 100%;
  transition: border-color 0.15s ease;
}

input[type="email"]::placeholder { color: var(--muted); opacity: 0.6; }
input[type="email"]:focus { border-color: rgba(199,203,208,0.35); }
[data-theme="light"] input[type="email"]:focus { border-color: rgba(15,15,16,0.3); }

input[type="email"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-status {
  margin-top: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  min-height: 1.2em;
  letter-spacing: 0.02em;
}

.form-status.success { color: #6aab7e; }
.form-status.error   { color: #c96060; }

/* =============================================================
   CONNECT
   ============================================================= */
.cta-secondary {
  display: inline-flex;
  margin-bottom: var(--sp-4);
}

.social-icons {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: var(--muted);
  border-radius: 50%;
  border: 1px solid var(--hairline);
  transition: color 0.15s ease, border-color 0.15s ease, scale 0.15s ease;
}

.social-icon:hover {
  color: var(--accent);
  border-color: rgba(199,203,208,0.38);
  scale: 1.08;
}

[data-theme="light"] .social-icon:hover {
  color: var(--text);
  border-color: rgba(15,15,16,0.25);
}

.social-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* =============================================================
   FOOTER
   ============================================================= */
.footer {
  padding-top: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-top: 1px solid var(--hairline);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.12em;
}
