/* ==========================================================================
   Sevren Studios — Design tokens (OKLCH, single source of truth)
   ========================================================================== */
:root {
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  --background: oklch(15.5% 0.004 60);
  --foreground: oklch(96.5% 0.004 80);
  --surface: oklch(19.6% 0.005 60);
  --surface-raised: oklch(24.3% 0.006 60);
  --hairline: oklch(100% 0 0 / 0.09);
  --border: oklch(100% 0 0 / 0.1);

  --ember: oklch(66.5% 0.184 38);
  --ember-soft: oklch(78% 0.13 55);
  --ember-foreground: oklch(15% 0.01 40);

  --muted-foreground: oklch(70.5% 0.008 70);
  --success: oklch(72% 0.15 150);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --max-width: 92rem;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 90px; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p { margin: 0 0 1em; color: var(--muted-foreground); }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.balance { text-wrap: balance; }

/* ==========================================================================
   Type system
   ========================================================================== */
.label-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  font-size: 0.6875rem;
  margin: 0;
}
.display-xl {
  font-family: var(--font-display);
  letter-spacing: -0.045em;
  font-size: clamp(2.5rem, 8vw, 6.5rem);
  font-weight: 700;
  line-height: 0.98;
  margin: 0.6em 0 0;
  color: var(--foreground);
}
.display-md {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.05;
  margin: 0.5em 0 0;
  color: var(--foreground);
}
.display-lede {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  color: var(--foreground);
}
.ember-text { color: var(--ember); }

/* ==========================================================================
   Scroll-driven reveal — IntersectionObserver + CSS transition.
   Content is visible by default (opacity: 1) at all times: JS only ever
   ADDS a temporary "not yet revealed" state via .fx-armed right before
   animating in, so a page never depends on JS/observers succeeding to
   show its own content. This fixed a real bug where content stayed
   invisible in any render path where the observer never fired.
   ========================================================================== */
.rise, .sd-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.rise.fx-armed, .sd-in.fx-armed {
  opacity: 0;
  transform: translateY(24px);
}
.rise.is-visible, .sd-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.sd-bar {
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.sd-bar.fx-armed { transform: scaleX(0); }
.sd-bar.is-visible { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .rise, .sd-in, .sd-bar { transition: none; opacity: 1; transform: none; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--ember); color: var(--ember-foreground); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary .arrow { transition: transform 0.2s ease; }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--foreground); border-color: var(--hairline); }
.btn-ghost:hover { background: var(--surface); }
.btn-outline { background: transparent; color: var(--ember); border-color: var(--ember); width: 100%; }
.btn-outline:hover { background: oklch(66.5% 0.184 38 / 0.1); }
.btn-block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px clamp(20px, 4vw, 40px);
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark-badge {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--ember);
  color: var(--ember-foreground);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
}
.logo-mark { font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: -0.01em; }
.logo-sub { color: var(--muted-foreground); font-weight: 500; }

.main-nav {
  display: none;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 6px;
  background: oklch(19.6% 0.005 60 / 0.4);
  backdrop-filter: blur(20px);
}
.nav-link {
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  color: var(--muted-foreground);
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover { color: var(--foreground); }
.nav-link.active { color: var(--foreground); background: var(--surface-raised); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-cta {
  display: none;
  border-radius: 999px;
  background: var(--ember);
  color: var(--ember-foreground);
  padding: 11px 22px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.15s ease;
}
.nav-cta:hover { transform: translateY(-2px); }
.nav-toggle {
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: oklch(19.6% 0.005 60 / 0.6);
  backdrop-filter: blur(20px);
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 10px 18px;
  cursor: pointer;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 140px 0 100px;
}
.hairline-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image:
    linear-gradient(to right, var(--hairline) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hairline) 1px, transparent 1px);
  background-size: 64px 64px;
}
.glow {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(120px);
}
.glow-a {
  top: -160px;
  right: -10%;
  width: 34rem;
  height: 34rem;
  background: oklch(66.5% 0.184 38 / 0.2);
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  transition: transform 0.4s ease-out;
}
.glow-b {
  bottom: -14rem;
  left: -8%;
  width: 24rem;
  height: 24rem;
  background: oklch(78% 0.13 55 / 0.1);
}
.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  max-width: 34ch;
  margin-top: 28px;
  line-height: 1.55;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
}

/* ==========================================================================
   Page hero — smaller header used on Pricing / FAQ / Contact
   ========================================================================== */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 160px 0 70px;
}
.page-hero .hero-sub { margin-top: 18px; }

/* ==========================================================================
   The short version (stat lines)
   ========================================================================== */
.stat-lines { padding: 90px 0; }
.stat-list { margin-top: 44px; display: flex; flex-direction: column; gap: 36px; }
.stat-row {
  border-top: 1px solid var(--hairline);
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat-label { margin: 0; }

/* ==========================================================================
   Marquee
   ========================================================================== */
.marquee-mask {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 22px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8% 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8% 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 40px;
  animation: marquee 32s linear infinite;
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 40px;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  color: var(--muted-foreground);
  white-space: nowrap;
}
.marquee-dot { color: var(--ember); margin-left: 40px; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ==========================================================================
   Services / Process — sticky label column + scrolling numbered list
   ========================================================================== */
.services, .process { padding: 100px 0; }
.services-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  display: grid;
  gap: 48px;
  grid-template-columns: 1fr;
}
.services-sticky { padding-top: 20px; }
.services-lede { max-width: 32ch; margin-top: 24px; }
.services-list { display: flex; flex-direction: column; }
.service-item { padding: 28px 0; border-top: 1px solid var(--hairline); }
.service-item:last-child { border-bottom: 1px solid var(--hairline); }
.service-num, .process-num {
  font-family: var(--font-mono);
  color: var(--ember);
  font-size: 0.8rem;
  display: block;
}
.service-bar { height: 1px; background: oklch(66.5% 0.184 38 / 0.6); margin-top: 16px; transform-origin: left; }
.service-item h3, .process .service-item h3 { margin-top: 24px; max-width: 30ch; }
.service-item p { margin-top: 14px; max-width: 46ch; font-size: 1.02rem; }
.process .process-num { font-family: var(--font-display); font-size: 2.6rem; color: oklch(66.5% 0.184 38 / 0.6); font-weight: 700; }

/* ==========================================================================
   The difference (before / after)
   ========================================================================== */
.difference { padding: 110px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: oklch(19.6% 0.005 60 / 0.3); }
.diff-list { margin-top: 60px; display: flex; flex-direction: column; gap: 44px; }
.diff-row {
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.diff-old {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--muted-foreground);
  text-decoration: line-through;
  text-decoration-color: oklch(70.5% 0.008 70 / 0.4);
  margin: 0;
}
.diff-num { font-family: var(--font-mono); font-size: 0.75rem; text-decoration: none; margin-top: 3px; }
.diff-new { margin: 0; }

/* ==========================================================================
   Pricing
   ========================================================================== */
.pricing { padding: 100px 0; }
.section-head { max-width: 640px; }
.section-sub { font-size: 1.05rem; }

.pricing-toolbar { display: flex; margin: 32px 0 48px; }
.currency-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--hairline);
}
.currency-pill {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.currency-pill:hover { color: var(--foreground); }
.currency-pill[aria-pressed="true"] { background: var(--ember); color: var(--ember-foreground); }

.pricing-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; align-items: stretch; }
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.price-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), oklch(66.5% 0.184 38 / 0.16), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.price-card:hover::before { opacity: 1; }
.price-card:hover { border-color: oklch(66.5% 0.184 38 / 0.4); transform: translateY(-3px); }
.price-card.featured { border-color: var(--ember); }
.price-card > * { position: relative; z-index: 1; }
.badge {
  position: absolute;
  top: -13px;
  left: 24px;
  background: var(--ember);
  color: var(--ember-foreground);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  margin: 0;
}
.price-card h3 { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 6px; color: var(--foreground); }
.price-desc { font-size: 0.88rem; min-height: 52px; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 24px; }
.price .amount { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--foreground); }
.price .period { font-size: 0.88rem; color: var(--muted-foreground); }
.price-features { flex: 1; display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.price-features li { position: relative; padding-left: 22px; font-size: 0.88rem; color: var(--muted-foreground); }
.price-features li::before { content: '\2713'; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.pricing-footnote { text-align: center; margin-top: 40px; font-size: 0.9rem; }
.pricing-footnote a { color: var(--ember); font-weight: 600; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { padding: 100px 0; }
.faq-list { max-width: 720px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 6px 24px;
  overflow: hidden;
  transition: border-color 0.25s ease;
}
.faq-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), oklch(66.5% 0.184 38 / 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.faq-item:hover::before { opacity: 1; }
.faq-item:hover { border-color: oklch(66.5% 0.184 38 / 0.3); }
.faq-item summary, .faq-item p { position: relative; z-index: 1; }
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 18px 0;
  color: var(--foreground);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--ember); transition: transform 0.2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 20px; margin: 0; font-size: 0.95rem; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { padding: 90px 0 110px; }
.contact-page { padding-top: 20px; }
.contact-panel {
  position: relative;
  overflow: hidden;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(66.5% 0.184 38 / 0.3);
  background: var(--surface);
}
.contact-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), oklch(66.5% 0.184 38 / 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.contact-panel:hover::after { opacity: 1; }
.contact-panel .display-md { max-width: 32ch; }
.contact-form { display: flex; flex-direction: column; gap: 18px; margin-top: 40px; max-width: 520px; position: relative; z-index: 1; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 0.9rem; font-weight: 600; color: var(--foreground); }
.form-row input, .form-row textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--hairline);
  background: var(--background);
  color: var(--foreground);
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--ember); }
.hidden-field { display: none; }
.form-status { min-height: 1.2em; font-size: 0.9rem; font-weight: 600; text-align: center; }
.form-status.success { color: var(--success); }
.form-status.error { color: oklch(60% 0.21 25); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--hairline); padding: 70px 0 30px; }
.footer-inner { display: flex; flex-direction: column; gap: 40px; }
.footer-headline { font-family: var(--font-display); font-size: 1.7rem; margin: 14px 0 0; max-width: 20ch; color: var(--foreground); }
.footer-email { display: inline-block; margin-top: 20px; border-bottom: 1px solid var(--ember); padding-bottom: 3px; font-size: 0.92rem; color: var(--foreground); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer-nav a { font-size: 0.9rem; color: var(--muted-foreground); transition: color 0.15s ease; }
.footer-nav a:hover { color: var(--foreground); }
.footer-bottom { border-top: 1px solid var(--hairline); margin-top: 44px; padding-top: 22px; font-size: 0.82rem; color: var(--muted-foreground); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (min-width: 860px) {
  .main-nav { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .services-grid { grid-template-columns: 0.8fr 1.2fr; }
  .services-sticky { position: sticky; top: 140px; height: fit-content; }
  .diff-row { grid-template-columns: 1fr 1fr; gap: 40px; align-items: baseline; }
  .pricing-grid { grid-template-columns: repeat(5, 1fr); }
  .footer-inner { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}

@media (max-width: 859px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .price-card.featured { transform: none; }
}

@media (max-width: 640px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 859px) {
  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: clamp(20px, 4vw, 40px);
    right: clamp(20px, 4vw, 40px);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border-radius: var(--radius-md);
    background: var(--surface-raised);
    border: 1px solid var(--hairline);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .main-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-link { padding: 12px 14px; border-radius: var(--radius-sm); }
  .nav-link.active { background: var(--surface); }
}
