/* Presentation layer. All colors derive from the existing brand tokens. */
:root {
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --edge-light: color-mix(in srgb, var(--lime) 20%, transparent);
  --wash: color-mix(in srgb, var(--lime) 2%, transparent);
  --quiet-surface: color-mix(in srgb, var(--bg) 65%, var(--surface));
  --quiet-lime: color-mix(in srgb, var(--lime) 82%, var(--bg));
}

/* Static textures: no animated filters, background positions or shadows. */
body {
  background-image: radial-gradient(ellipse at 90% 4%, var(--wash), transparent 35%);
}
.hero, .section, .contact-inner { position: relative; isolation: isolate; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23ffffff' filter='url(%23grain)' opacity='.65' d='M0 0h160v160H0z'/%3E%3C/svg%3E");
}
.approach {
  border: 0;
  background-color: var(--quiet-surface);
  background-image: radial-gradient(circle, color-mix(in srgb, var(--lime) 4%, transparent) .7px, transparent .8px),
    radial-gradient(ellipse at 15% 0%, var(--wash), transparent 60%);
  background-size: 24px 24px, 100% 100%;
}
.header, .hero-bottom, .ticker, .contact-inner { border-color: transparent; }
.header { position: relative; isolation: isolate; z-index: 10; }
.header::after, .hero-bottom::before, .approach::before, .approach::after,
.contact-inner::before, .ticker::before {
  content: "";
  position: absolute;
  height: 1px;
  inset: 0 0 auto;
  background: linear-gradient(90deg, transparent, var(--edge-light), var(--line), transparent);
  pointer-events: none;
}
.header::after { top: auto; bottom: 0; }
.hero-bottom, .ticker { position: relative; }
.approach::after { top: auto; bottom: 0; }
.contact-inner { background: radial-gradient(ellipse at 85% 30%, var(--wash), transparent 65%); }
.ticker { background-color: var(--quiet-surface); }
.accent, .contact h2 > span:not(.contact-arrow) { color: var(--quiet-lime); }
.contact-arrow { opacity: .55; }
.core-visual img { opacity: .82; }
.contact-form input, .contact-form textarea { background: var(--quiet-surface); }

/* More legible body copy; tight display rhythm without shrinking labels. */
h1 { font-weight: 500; letter-spacing: -.06em; line-height: 1.06; }
h2 { font-weight: 500; letter-spacing: -.045em; line-height: 1.15; }
.hero-line { display: inline-block; }
.hero-copy p { font-size: 1rem; line-height: 1.85; max-width: 36rem; }
.section-heading > p, .service p, .work-card p, .steps p,
.studio-copy p, .contact-info p { font-size: 1rem; line-height: 1.8; }
.service h3, .work-card h3 { font-size: 1.625rem; font-weight: 500; }
.steps h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
.eyebrow, .edition, .visual-coordinate, .service-number,
.work-tag, .tags span, .hero-bottom, .footer > span { font-size: .75rem; }
.hero-bottom { letter-spacing: .075em; }
.hero-bottom > div { gap: 12px; }
.header nav a, .text-link, .back-top, .work-note, .studio-values,
.form-status, .nav-cta { font-size: .875rem; }
.brand-sub { font-size: .75rem; }
.header .brand { font-size: 2rem; gap: 15px; flex-shrink: 0; }
.header .brand-mark { grid-template-columns: repeat(2, 18px); gap: 5px; }
.header .brand-mark i { height: 18px; }
.header .brand-sub { font-size: .875rem; letter-spacing: .4em; margin-top: 8px; }
.footer .brand { font-size: 1.625rem; gap: 13px; }
.footer .brand-mark { grid-template-columns: repeat(2, 14px); gap: 4px; }
.footer .brand-mark i { height: 14px; }
.service-number, .edition { color: var(--muted); }
.section-heading { margin-bottom: 3.25rem; }

/* Discrete panels have room to lift without clipped outlines. */
.services { border: 0; border-radius: 0; overflow: visible; gap: 20px; }
.service, .service + .service, .work-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(150deg, var(--quiet-surface), var(--bg));
  transition: transform 420ms var(--ease-out), opacity 520ms var(--ease-out);
}
.service:hover, .work-card:hover { background: linear-gradient(150deg, var(--quiet-surface), var(--bg)); border-color: var(--line); }
.service::before, .work-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border: 1px solid var(--edge-light);
  border-radius: inherit;
  background: radial-gradient(ellipse at 15% 0%, var(--wash), transparent 65%);
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease-out;
}
.service:focus-within::before, .work-card:focus-within::before { opacity: 1; }
.work-card { display: flex; flex-direction: column; }
.work-card .tags { margin-top: auto; padding-top: 24px; }
.service-icon { transition: transform 350ms var(--ease-out); }
.step-num { border-image: linear-gradient(90deg, var(--edge-light), var(--line)) 1; }
.studio-symbol { text-shadow: none; opacity: .7; }
.core-glow {
  inset: 12% -5%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--lime) 4%, transparent), transparent 62%);
  transform: translate3d(var(--glow-x, 0px), var(--glow-y, 0px), 0);
  pointer-events: none;
  transition: transform 700ms var(--ease-out);
}

/* Shared reveal transform composes with pointer tilt instead of fighting it. */
.reveal, .service, .work-card {
  transform: perspective(900px) translate3d(0, var(--reveal-y, 0px), 0)
    translateY(var(--lift, 0px)) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 550ms var(--ease-out), opacity 550ms var(--ease-out);
}
.reveal-pending { --reveal-y: 20px; opacity: 0; }
.reveal-enter { transition-delay: var(--reveal-delay, 0ms); }
.reveal:focus-within { --reveal-y: 0px; opacity: 1; transition-delay: 0ms; }

/* Native cursor stays intact; stable hit areas surround the magnetic face. */
.button {
  position: relative;
  isolation: isolate;
  min-height: 48px;
  transition: transform 250ms var(--ease-out), opacity 180ms ease-out;
}
.button.primary, .button.primary:hover { background: transparent; }
.button.primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--quiet-lime);
  box-shadow: none;
  transform: translate3d(var(--magnet-x, 0px), var(--magnet-y, 0px), 0);
  transition: transform 350ms var(--ease-out);
  pointer-events: none;
}
.button:hover { transform: none; }
.button > span, .nav-cta > span, .back-top > span { transition: transform 250ms var(--ease-out); }
.button:focus-visible > span, .nav-cta:focus-visible > span { transform: translate(2px, -2px); }
.button:disabled { --magnet-x: 0px !important; --magnet-y: 0px !important; }
.header nav a, .text-link, .back-top { min-height: 44px; display: inline-flex; align-items: center; }
.nav-cta { min-height: 44px; }
.contact-form input, .contact-form textarea { font-size: 1rem; min-height: 48px; }
.contact-form textarea { min-height: 138px; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted); }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline-offset: 4px; }

/* Non-blocking introduction: the page is always usable, including without JS. */
@media (prefers-reduced-motion: no-preference) {
  .header::before {
    content: "";
    position: absolute;
    inset: auto 6% 0;
    height: 1px;
    background: var(--lime);
    transform-origin: left;
    pointer-events: none;
    animation: entry-line 650ms var(--ease-out) both;
  }
  .header .brand-mark i { animation: assemble 420ms var(--ease-out) both; }
  .header .brand-mark i:nth-child(2) { animation-delay: 40ms; }
  .header .brand-mark i:nth-child(3) { animation-delay: 80ms; }
  .header .brand-mark i:nth-child(4) { animation-delay: 120ms; }
  .hero-line { animation: hero-enter 650ms var(--ease-out) 100ms both; }
  .hero-line:last-child { animation-delay: 190ms; }
  .hero-copy > p { animation: hero-enter 600ms var(--ease-out) 240ms both; }
  .hero-copy > a { animation: hero-enter 550ms var(--ease-out) 290ms both; }
}
@keyframes entry-line {
  0% { transform: scaleX(0); opacity: .8; }
  65% { transform: scaleX(1); opacity: .8; }
  100% { transform: scaleX(1); opacity: 0; }
}
@keyframes assemble { from { opacity: 0; transform: translateY(-7px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes hero-enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Existing continuous accents are paused unless their section is visible. */
.core-visual img, .ticker > div, .studio-symbol { animation-play-state: paused; }
.ambient-active .core-visual img, .ticker.ambient-active > div,
.studio.ambient-active .studio-symbol { animation-play-state: running; }
html.page-hidden .core-visual img, html.page-hidden .ticker > div,
html.page-hidden .studio-symbol { animation-play-state: paused; }

@media (hover: hover) and (pointer: fine) and (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .service:hover, .work-card:hover { --lift: -5px; }
  .service:hover::before, .work-card:hover::before { opacity: 1; }
  .service:hover .service-icon { transform: translateY(-3px); }
  .button:hover > span, .nav-cta:hover > span { transform: translate(2px, -2px); }
  .back-top:hover > span { transform: translateY(-3px); }
}
@media (max-width: 1100px) {
  .hero-bottom { flex-wrap: wrap; padding-block: 18px; gap: 16px; }
  .services { gap: 14px; }
  .service { padding: 24px; }
  .header nav { gap: 20px; }
}
@media (max-width: 900px) {
  .header { gap: 14px; }
  .header .brand { font-size: 1.75rem; }
  .header nav {
    display: none;
    position: absolute;
    z-index: 5;
    top: 109px;
    left: 0;
    right: 0;
    gap: 13px;
    padding: 24px 6%;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
  }
  .header nav.open { display: flex; }
  .header nav a { font-size: 1rem; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; width: 44px; height: 44px; flex: 0 0 44px; background: none; border: 0; color: var(--text); }
  .menu-toggle span { width: 23px; height: 1px; background: currentColor; }
  .nav-cta { margin-left: auto; }
  .services { grid-template-columns: 1fr; }
  .service p { max-width: none; }
  .core-visual img, .ticker > div, .studio-symbol { animation: none; }
  .reveal { transition-duration: 320ms; }
  .reveal-pending { --reveal-y: 12px; }
}
@media (max-width: 700px) {
  .header { gap: 8px; }
  .header nav { top: 84px; }
  .header nav a { font-size: 1rem; }
  .menu-toggle { width: 44px; height: 44px; align-items: center; flex: 0 0 44px; }
  .nav-cta { font-size: .875rem; gap: 10px; }
  .header .brand { font-size: 1.5rem; gap: 10px; }
  .header .brand-mark { grid-template-columns: repeat(2, 14px); gap: 4px; }
  .header .brand-mark i { height: 14px; }
  .header .brand-sub { font-size: .8125rem; letter-spacing: .3em; margin-top: 7px; }
  .brand-sub { font-size: .75rem; letter-spacing: .3em; }
  .hero-copy { padding-bottom: 325px; }
  .hero-copy p { font-size: 1rem; }
  .desktop-break { display: none; }
  .hero-copy .text-link { display: flex; width: max-content; margin: 12px 0 0; font-size: .875rem; }
  .core-visual { height: 310px; bottom: 0; }
  .hero-bottom { flex-wrap: nowrap; }
  .hero-bottom > div { flex-wrap: wrap; gap: 8px; font-size: .75rem; }
  .hero-bottom > a { width: 44px; min-height: 44px; justify-content: center; flex-shrink: 0; }
  .section-heading { margin-bottom: 2rem; }
  .contact h2 { font-size: clamp(2.625rem, 10vw, 4rem); }
  .contact-arrow { font-size: 48px; }
  .section-heading > p, .steps p, .studio-copy p { font-size: 1rem; }
  .footer > span { font-size: .75rem; }
  .hero-line, .hero-copy > p, .hero-copy > a { animation-duration: 350ms; animation-delay: 0ms; }
}
@media (max-width: 380px) {
  .header .brand { font-size: 1.375rem; gap: 8px; }
  .header .nav-cta { font-size: .75rem; padding-inline: 10px; }
  .header .nav-cta > span { display: none; }
}
@media (hover: none), (pointer: coarse) {
  .core-visual img, .ticker > div, .studio-symbol { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .reveal-pending { opacity: 1; transform: none; }
  .core-glow, .button.primary::before { transform: none; }
}
@media print {
  .reveal, .reveal-pending { opacity: 1; transform: none; }
}
