/* Neon Media — agency site additions (extends shared.css) */

/* Override topbar nav to support marketing site */
.topbar .cta {
  font: inherit; font-family: var(--font-display); font-weight: 600;
  font-size: 13.5px; padding: 9px 16px; border-radius: 999px;
  border: 0; background: var(--fg); color: var(--bg); cursor: pointer;
  text-decoration: none; letter-spacing: -0.01em;
}
.topbar .cta:hover { background: var(--accent); color: var(--accent-ink); }

/* Topbar action group (theme toggle + CTA) */
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
  cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.theme-toggle:hover { border-color: var(--fg); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .moon { display: none; }
[data-mode="dark"] .theme-toggle .sun { display: none; }
[data-mode="dark"] .theme-toggle .moon { display: block; }

/* Page transitions — smooth, eased fade + glide. The ENTER is gated so content
   can never strand hidden (JS hard-reveals after the transition window). */
@media (prefers-reduced-motion: no-preference) {
  main { will-change: opacity, transform; }
  main.is-entering { opacity: 0; transform: translateY(20px); }
  main.is-entering.is-entered {
    opacity: 1; transform: none;
    transition: opacity .72s cubic-bezier(.16,1,.3,1), transform .72s cubic-bezier(.16,1,.3,1);
  }
  body.is-leaving main {
    opacity: 0; transform: translateY(-12px);
    transition: opacity .36s cubic-bezier(.4,0,.2,1), transform .36s cubic-bezier(.4,0,.2,1);
  }
}

/* Smooth, one-shot theme cross-fade applied only while toggling (so it doesn't
   permanently transition every element or fight other animations). */
.theme-anim, .theme-anim *,
.theme-anim *::before, .theme-anim *::after {
  transition: background-color .42s ease, border-color .42s ease,
              color .42s ease, fill .42s ease, stroke .42s ease,
              box-shadow .42s ease !important;
}

/* Hero */
.hero {
  min-height: calc(100svh - 74px);
  padding: 112px var(--gutter) 124px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
section.page[style*="padding-top: 0"] {
  padding-top: 104px !important;
}
section.page[style*="padding-bottom: 0"] {
  padding-bottom: 104px !important;
}
.hero .kicker {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
}
.hero .kicker .pulse {
  width: 8px; height: 8px; border-radius: 999px; background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 70%, transparent); }
  70% { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(56px, 8.5vw, 132px); line-height: 0.94;
  letter-spacing: -0.035em; margin: 22px 0 0; text-wrap: balance;
}
.hero h1 em {
  font-style: normal; position: relative; white-space: nowrap;
}
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.08em;
  height: 0.08em; background: var(--accent);
}
.hero .sub {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px;
  margin-top: 60px; align-items: start;
}
@media (max-width: 860px) { .hero .sub { grid-template-columns: 1fr; } }
.hero .sub p {
  font-size: clamp(15px, 1.2vw, 18px); color: var(--muted); max-width: 46ch;
  margin: 0; text-wrap: pretty;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  font: inherit; font-family: var(--font-display); font-weight: 600;
  font-size: 15px; padding: 14px 22px; border-radius: 999px; border: 1px solid var(--fg);
  background: var(--fg); color: var(--bg); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible,
.theme-toggle:focus-visible,
.topbar a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn.ghost { background: transparent; color: var(--fg); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Marquee strip */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 24px 0; overflow: hidden;
}
.marquee-inner {
  display: flex; gap: 64px; white-space: nowrap; animation: scroll 40s linear infinite;
  font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.01em;
  color: var(--fg);
}
.marquee-inner span.sep { color: var(--muted); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Service card */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (max-width: 860px) { .services-grid { grid-template-columns: 1fr; } }
.service {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 56px; display: flex; flex-direction: column; gap: 24px; min-height: 360px;
  background: var(--bg); transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.service:hover { background: var(--subtle); transform: translateY(-2px); }
.service.full { grid-column: 1 / -1; }
.service .no {
  display: none;
}
.split .eyebrow,
.service-block .idx,
.body-col .idx,
.beliefs .n {
  display: none !important;
}
.service h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 30px; line-height: 1.08; letter-spacing: -0.02em; margin: 0;
}
.service p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.service .tags { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.service .tag {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
  white-space: nowrap;
}

/* Work tiles */
.work-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px;
}
@media (max-width: 860px) { .work-grid { grid-template-columns: 1fr; } }
.work-tile {
  grid-column: span 3; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px; min-height: 360px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  background: var(--bg); transition: transform .2s ease, border-color .2s ease, background .2s ease;
  text-decoration: none; color: inherit;
}
.work-tile:hover { transform: translateY(-3px); border-color: var(--fg); background: var(--subtle); }
.work-tile.wide { grid-column: span 4; }
.work-tile.tall { grid-column: span 2; }
.work-tile .meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.work-tile h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 1.08;
  letter-spacing: -0.02em; margin: 0; text-wrap: balance;
}
.work-tile .stats {
  display: flex; gap: 24px; margin-top: 8px;
}
.work-tile .stat .num {
  font-family: var(--font-display); font-weight: 600; font-size: 32px; letter-spacing: -0.02em;
  line-height: 1;
}
.work-tile .stat .lab {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-top: 6px;
}

/* Placeholder art for tiles */
.ph {
  border-radius: var(--radius); min-height: 120px; position: relative; overflow: hidden;
  background: repeating-linear-gradient(45deg, var(--subtle) 0 12px, var(--bg) 12px 24px);
  border: 1px solid var(--line);
}
.ph.dark { background: repeating-linear-gradient(45deg, #1a1a1a 0 12px, #0a0a0a 12px 24px); border-color: #1f1f1f; }
.ph .label {
  position: absolute; bottom: 10px; left: 12px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
  background: var(--bg); padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px;
}
.ph.dark .label { background: #0a0a0a; color: #9a9a9a; border-color: #1f1f1f; }

/* Process steps */
.process {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
@media (max-width: 860px) { .process { grid-template-columns: 1fr 1fr; } }
.process .step {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 44px; min-height: 260px;
  display: flex; flex-direction: column; gap: 14px;
  transition: background .2s ease;
}
.process .step:hover { background: var(--subtle); }
.process .step .n {
  display: none;
}
.process .step h4 {
  font-family: var(--font-display); font-weight: 600; font-size: 20px; margin: 0;
  letter-spacing: -0.015em;
}
.process .step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* Big stat */
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
@media (max-width: 860px) { .stat-row { grid-template-columns: 1fr 1fr; } }
.stat-row .c {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 44px;
}
.stat-row .c .num {
  font-family: var(--font-display); font-weight: 600; font-size: 64px;
  letter-spacing: -0.035em; line-height: 1;
}
.stat-row .c .lab {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-top: 12px;
}
.stat-row .c p { margin: 12px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* Testimonial */
.quote {
  padding: 92px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.quote blockquote {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(28px, 3vw, 42px); line-height: 1.18; letter-spacing: -0.02em;
  margin: 0; width: 75%; max-width: 980px; text-wrap: balance;
}
.quote cite {
  display: block; margin-top: 28px; font-style: normal;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}

/* Big footer CTA */
.cta-block {
  max-width: none;
  width: 100%;
  min-height: 78svh;
  margin-top: 132px;
  padding: 120px var(--gutter) !important;
  border-top: 0;
  background: #ffffff;
  color: #0a0a0a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.cta-block h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(58px, 8vw, 128px); line-height: 0.94; letter-spacing: -0.035em;
  margin: 0 0 42px; text-wrap: balance; max-width: 12ch;
}
.cta-block .hero-actions {
  justify-content: center;
}
.cta-block .btn {
  background: #0a0a0a;
  color: #ffffff;
  border-color: #0a0a0a;
}
.cta-block .btn.ghost {
  background: transparent;
  color: #0a0a0a;
  border-color: #0a0a0a;
}

/* Scroll reveals and restrained interaction polish */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition:
      opacity .72s cubic-bezier(.16,1,.3,1) var(--reveal-delay, 0ms),
      transform .72s cubic-bezier(.16,1,.3,1) var(--reveal-delay, 0ms);
  }
  [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
  .service .tag,
  .work-tile .stat,
  .post-row .read,
  .filter-bar button {
    transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
  }
  .service:hover .tag,
  .work-tile:hover .stat,
  .post-row:hover .read {
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
  .marquee-inner { animation: none; }
  .hero .kicker .pulse { animation: none; }
}

/* Page header (non-home) */
.page-head { padding: 92px var(--gutter) 112px; border-bottom: 1px solid var(--line); }
.page-head .eyebrow { margin-bottom: 18px; }
.page-head h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(56px, 9vw, 128px); line-height: 0.96; letter-spacing: -0.035em;
  margin: 0; text-wrap: balance;
}
.page-head .sub {
  font-size: clamp(17px, 1.3vw, 21px); color: var(--muted);
  max-width: 58ch; margin: 28px 0 0; text-wrap: pretty;
}

/* Inline arrow */
.arrow { display: inline-block; transition: transform .15s ease; }
.work-tile:hover .arrow, .service:hover .arrow { transform: translateX(4px); }

/* Form */
.form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
@media (max-width: 860px) { .form { grid-template-columns: 1fr; } }
.form .field {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 24px;
}
.form .field.full { grid-column: 1 / -1; }
.form label {
  display: block; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.form input, .form textarea, .form select {
  width: 100%; font: inherit; font-family: var(--font-display); font-size: 20px;
  letter-spacing: -0.01em; border: 0; background: transparent; color: var(--fg);
  outline: none; padding: 6px 0; resize: vertical;
}
.form input::placeholder, .form textarea::placeholder { color: color-mix(in oklab, var(--muted) 65%, transparent); }
.form .choices-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.form .choices-inline label {
  margin: 0; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; cursor: pointer;
  color: var(--fg); text-transform: uppercase; transition: background .15s ease;
}
.form .choices-inline input[type="checkbox"] { display: none; }
.form .choices-inline input:checked + span { }
.form .choices-inline label:has(input:checked) { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Section with heading + body side-by-side */
.split {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start;
  padding: 104px var(--gutter); border-top: 1px solid var(--line);
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 24px; } }
.split h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(32px, 4vw, 56px); line-height: 1; letter-spacing: -0.028em;
  margin: 0; text-wrap: balance;
}
.split .body p {
  font-size: 18px; color: var(--fg); line-height: 1.55; max-width: 60ch;
}
.split .body p + p { margin-top: 16px; }
.split .eyebrow { margin-bottom: 18px; display: inline-flex; }

/* Faq */
.faq details {
  border-bottom: 1px solid var(--line); padding: 24px 0;
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 600;
  font-size: 22px; letter-spacing: -0.015em;
  display: flex; justify-content: space-between; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--font-mono); font-weight: 400; color: var(--muted);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 70ch; }

/* Top-right nav wrap tweaks for long nav */
@media (min-width: 641px) and (max-width: 1000px) {
  .topbar nav a { padding: 6px 10px; font-size: 13px; }
}

@media (max-width: 640px) {
  .theme-toggle {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .theme-toggle:hover {
    border-color: transparent;
  }
  .hero {
    padding-top: 44px !important;
    padding-bottom: 68px !important;
    min-height: calc(100svh - 112px);
  }
  section.page[style*="padding-top: 0"] {
    padding-top: 56px !important;
  }
  section.page[style*="padding-bottom: 0"] {
    padding-bottom: 56px !important;
  }
  .hero .kicker {
    font-size: 10.5px;
    letter-spacing: .12em;
    line-height: 1.5;
  }
  .hero h1 {
    font-size: clamp(46px, 16vw, 72px);
    line-height: .98;
    letter-spacing: -0.03em;
  }
  .hero .sub {
    margin-top: 30px;
    gap: 24px;
  }
  .hero .sub p,
  .page-head .sub {
    font-size: 17px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    width: 100%;
    justify-content: center;
    padding: 13px 16px;
  }
  .marquee { padding: 18px 0; }
  .marquee-inner {
    gap: 34px;
    font-size: 18px;
  }

  .service,
  .work-tile,
  .process .step,
  .stat-row .c {
    padding: 28px;
    min-height: auto;
  }
  .service h3,
  .work-tile h3 {
    font-size: 25px;
  }
  .service .tag,
  .work-tile .stat .lab {
    white-space: normal;
  }
  .work-tile.wide,
  .work-tile.tall {
    grid-column: auto;
  }
  .work-tile .meta,
  .work-tile .stats {
    flex-direction: column;
    gap: 12px;
  }
  .process,
  .stat-row {
    grid-template-columns: 1fr;
  }
  .stat-row .c .num,
  .process .step .n {
    font-size: 48px;
  }

  .quote {
    padding: 44px 0;
  }
  .quote blockquote {
    font-size: clamp(26px, 9vw, 34px);
    width: 100%;
  }
  .cta-block {
    min-height: 74svh;
    margin-top: 84px;
    padding: 84px var(--gutter) !important;
  }
  .cta-block h2 {
    font-size: clamp(48px, 15vw, 76px);
    max-width: 10ch;
  }
  .page-head {
    padding: 42px var(--gutter) 54px;
  }
  .page-head h1 {
    font-size: clamp(42px, 14vw, 68px);
    line-height: .99;
  }

  .form .field {
    padding: 20px;
  }
  .form input,
  .form textarea,
  .form select {
    font-size: 18px;
  }
  .form .choices-inline label {
    width: 100%;
    text-align: center;
  }
  .field.full[style*="display: flex"] {
    flex-direction: column;
    align-items: stretch !important;
  }

  .split {
    padding: 52px var(--gutter);
  }
  .split .body p {
    font-size: 16.5px;
  }

  .deliverables li,
  .size-row,
  .scale-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .deliverables .when {
    text-align: left;
  }
  .service-block {
    padding: 56px 0 !important;
    gap: 24px !important;
  }
  .service-block h2 {
    font-size: clamp(34px, 11vw, 48px) !important;
  }
  .pricing .p {
    padding: 24px !important;
    min-height: auto !important;
  }

  .case-meta,
  .result-grid,
  .timeline {
    grid-template-columns: 1fr !important;
  }
  .hero-ph {
    min-height: 260px !important;
    border-radius: var(--radius) !important;
  }
  .body-col {
    padding: 44px 0 !important;
  }

  .scale {
    grid-template-columns: repeat(5, 1fr) !important;
  }
  .ratio-pair {
    height: auto !important;
    flex-direction: column;
  }
  .ratio-pair > div {
    min-height: 56px;
  }
  .specimen .sample {
    font-size: clamp(82px, 30vw, 140px) !important;
  }
  .specimen .meta-grid {
    grid-template-columns: 1fr !important;
  }
  .clearspace {
    padding: 44px 20px !important;
    min-height: 240px !important;
  }
  .logo-stage {
    padding: 36px 20px !important;
    min-height: 220px !important;
  }
}
