/*
  bnfldt — style.css
  ─────────────────────────────────────────────────────────────────────────────
  1.  Custom properties
  2.  Reset & base
  3.  Utilities
  4.  Site logo (fixed, JS-animated)
  5.  Site header (glass bg + nav only)
  6.  Hero section
  7.  Container & section base
  8.  Services section
  9.  Work section
  9b. Preview / "Your site next?" section
  10. Approach section
  11. CTA section
  12. Site footer
  13. Keyframe animations
  14. Reduced motion
  15. Print
*/


/* ─── 1. Custom properties ─────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  /* Brand palette */
  --brand-dark:  #1D1D1D;
  --brand-smoke: #E7EDEB;
  --brand-bone:  #FCFAF8;

  /* Theme tokens — dark default */
  --color-bg:           #0a0a0a;
  --color-bg-section:   #0e0e0e;
  --color-bg-elevated:  #141414;
  --color-canvas-bg:    #0a0a0a;
  --color-text:         #E7EDEB;
  --color-text-muted:   rgba(231, 237, 235, 0.65);
  --color-text-faint:   rgba(231, 237, 235, 0.44);
  --color-border:       rgba(231, 237, 235, 0.08);
  --color-border-hover: rgba(231, 237, 235, 0.22);
  --color-header-bg:    rgba(10, 10, 10, 0.78);
  --color-footer-bg:    #080808;

  /* Typography */
  --font-display: 'Hubot Sans', sans-serif;
  --font-body:    'Geist', sans-serif;

  /* Spacing */
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;
  --space-2xl: 12rem;

  /* Easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);

  /* Header dimensions — used by JS for logo landing position */
  --header-pad-x: 2.5rem;   /* 40px at 16px base */
  --header-pad-y: 1.25rem;  /* 20px at 16px base */
}

/* Light mode override — dark is the primary theme */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light dark;
    --color-bg:           #FCFAF8;
    --color-bg-section:   #F4F2F0;
    --color-bg-elevated:  #FFFFFF;
    --color-canvas-bg:    #FCFAF8;
    --color-text:         #1D1D1D;
    --color-text-muted:   rgba(29, 29, 29, 0.68);
    --color-text-faint:   rgba(29, 29, 29, 0.48);
    --color-border:       rgba(29, 29, 29, 0.10);
    --color-border-hover: rgba(29, 29, 29, 0.30);
    --color-header-bg:    rgba(252, 250, 248, 0.88);
    --color-footer-bg:    #ECEAE6;
  }
}

/* Manual theme overrides — set via data-theme attribute on <html> */
html[data-theme="dark"] {
  color-scheme: dark;
  --color-bg:           #0a0a0a;
  --color-bg-section:   #0e0e0e;
  --color-bg-elevated:  #141414;
  --color-canvas-bg:    #0a0a0a;
  --color-text:         #E7EDEB;
  --color-text-muted:   rgba(231, 237, 235, 0.65);
  --color-text-faint:   rgba(231, 237, 235, 0.44);
  --color-border:       rgba(231, 237, 235, 0.08);
  --color-border-hover: rgba(231, 237, 235, 0.22);
  --color-header-bg:    rgba(10, 10, 10, 0.78);
  --color-footer-bg:    #080808;
}

html[data-theme="light"] {
  color-scheme: light dark;
  --color-bg:           #FCFAF8;
  --color-bg-section:   #F4F2F0;
  --color-bg-elevated:  #FFFFFF;
  --color-canvas-bg:    #FCFAF8;
  --color-text:         #1D1D1D;
  --color-text-muted:   rgba(29, 29, 29, 0.68);
  --color-text-faint:   rgba(29, 29, 29, 0.48);
  --color-border:       rgba(29, 29, 29, 0.10);
  --color-border-hover: rgba(29, 29, 29, 0.30);
  --color-header-bg:    rgba(252, 250, 248, 0.88);
  --color-footer-bg:    #ECEAE6;
}


/* ─── 2. Reset & base ──────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: #E7EDEB;
  color: #1D1D1D;
}

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

ul { list-style: none; }
a  { color: inherit; text-decoration: none; }


/* ─── 3. Utilities ─────────────────────────────────────────────────────────── */

.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: 0.85rem;
  font-family: var(--font-body);
  border-radius: 0 0 4px 4px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; outline: none; }


/* ─── 4. Site logo — fixed, CSS-transition animated ───────────────────────── */
/*
  Always position:fixed anchored at left:0; top:0.
  JS measures both states once (after fonts load) and injects a <style> block
  with the computed translate/scale values. A CSS class toggle then triggers
  the transition — which runs entirely on the GPU compositor (no JS per frame).

  Width is set once as an inline style on .logo-img (never changes during
  animation). Only `transform` and `opacity` are transitioned — zero layout cost.
*/

.site-logo {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  display: block;
  color: var(--color-text);
  text-decoration: none;
  user-select: none;
  pointer-events: none;
  transform-origin: 0 0;           /* scale from top-left corner */
  will-change: transform, opacity; /* promote to compositor layer */
  mix-blend-mode: difference;

  opacity: 0;
  /* Initial + scrolled transforms are injected by JS */
  transition:
    transform 0.82s cubic-bezier(0.16, 1, 0.3, 1),
    opacity   0.7s  ease 0.15s;
}

.site-logo .logo-img {
  display: block;
  height: auto;
  /* width is set once by JS after fonts.ready */
}

/* Light mode: invert bone-white logo for footer (site-logo uses mix-blend-mode instead) */
@media (prefers-color-scheme: light) {
  .footer-logo img { filter: brightness(0); }
}
html[data-theme="light"] .footer-logo img { filter: brightness(0); }

.site-logo.logo-ready    { opacity: 1; }
.site-logo.logo-scrolled { pointer-events: auto; }

.site-logo:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
}


/* ─── 5. Site header — glass + nav only ───────────────────────────────────── */
/*
  No logo in the DOM — .site-logo floats over the left side.
  All state changes driven by body.site-scrolled class (toggled by JS).
*/

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--header-pad-y) var(--header-pad-x);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  background: var(--color-header-bg);
  border-bottom: 1px solid var(--color-border);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out-expo);
}

body.site-scrolled .site-header {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.4s var(--ease-out-expo) 0.28s;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.site-scrolled .header-nav {
  opacity: 1;
  transition: opacity 0.3s ease 0.55s;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2rem;
}

.nav-links li { display: flex; align-items: center; }

.nav-links a {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--color-text); }
.nav-links a[aria-current="page"] { color: var(--color-text); }

.nav-links a:focus-visible {
  outline: 1px solid var(--color-text);
  outline-offset: 3px;
}

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

/* ── Theme toggle ── */
.theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  width: 40px;
  height: 22px;
  padding: 0 3px;
  border: 1px solid var(--color-border-hover);
  border-radius: 2rem;
  background: transparent;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--color-text-muted); }
.theme-toggle:focus-visible {
  outline: 1px solid var(--color-text);
  outline-offset: 3px;
}

.tt-thumb {
  position: absolute;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-text-muted);
  transition: transform 0.3s var(--ease-out-expo), background 0.2s ease;
}

.tt-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  transition: opacity 0.2s ease;
}
.tt-moon { margin-left: auto; }
.tt-sun  { margin-right: auto; display: none; }

html[data-theme="light"] .tt-thumb { transform: translateX(18px); }
html[data-theme="light"] .tt-moon  { display: none; }
html[data-theme="light"] .tt-sun   { display: flex; }

@media (prefers-color-scheme: light) {
  html:not([data-theme]) .tt-thumb { transform: translateX(18px); }
  html:not([data-theme]) .tt-moon  { display: none; }
  html:not([data-theme]) .tt-sun   { display: flex; }
}

/* ── Nav CTA ── */
.nav-cta {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--color-bg);
  background: var(--color-text);
  padding: 0.35rem 0.9rem;
  border-radius: 2rem;
  border: 1px solid transparent;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.nav-cta:hover  { opacity: 0.82; transform: scale(0.97); }
.nav-cta:active { transform: scale(0.94); }
.nav-cta:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

/* ── Burger ── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
}
.nav-burger:focus-visible {
  outline: 1px solid var(--color-text);
  outline-offset: 3px;
  border-radius: 3px;
}
.burger-bar {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--color-text-muted);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(2) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-burger { display: flex; }
  .nav-links,
  .nav-cta    { display: none; }
}


/* ─── 5b. Mobile sheet ─────────────────────────────────────────────────────── */
/*
  Lives outside <header> to escape backdrop-filter containment.
  Slides up from the bottom half of the viewport.
*/

.mobile-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  padding: 2rem 2rem 2.5rem;
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  border-radius: 1rem 1rem 0 0;
  transform: translateY(100%);
  visibility: hidden;
  transition:
    transform 0.4s var(--ease-out-expo),
    visibility 0s linear 0.4s;
}

.mobile-sheet.is-open {
  transform: translateY(0);
  visibility: visible;
  transition:
    transform 0.4s var(--ease-out-expo),
    visibility 0s linear 0s;
}

.mobile-sheet ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.5rem;
}

.mobile-sheet ul li { border-bottom: 1px solid var(--color-border); }
.mobile-sheet ul li:first-child { border-top: 1px solid var(--color-border); }

.mobile-sheet ul a {
  display: block;
  padding: 1rem 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
  transition: color 0.2s ease, transform 0.2s ease;
}
.mobile-sheet ul a:hover {
  color: var(--color-text-muted);
  transform: translateX(4px);
}

.sheet-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sheet-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  transition: color 0.2s ease;
}
.sheet-social a:hover { color: var(--color-text); }
.sheet-social a svg { width: 16px; height: 16px; }

.sheet-social .mail-pill {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-hover);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.sheet-social .mail-pill:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}


/* ─── 6. Hero section ──────────────────────────────────────────────────────── */

.hero {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg);
}

/* Animated gradient canvas — full-bleed behind everything */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Film grain overlay */
.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 192px 192px;
}

/* Slightly stronger grain on light background for tactile depth */
@media (prefers-color-scheme: light) {
  .hero-grain { opacity: 0.045; }
}
html[data-theme="light"] .hero-grain { opacity: 0.045; }

/* Main content block — ghost + tagline stacked */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  mix-blend-mode: difference;
}

/*
  Ghost placeholder: invisible clone of the SVG logo at hero size.
  Holds space so the tagline sits naturally below the fixed logo.
  Matches the JS heroW clamp exactly.
*/
.hero-logo-ghost {
  display: block;
  width: clamp(200px, 45vw, 520px);
  aspect-ratio: 982 / 294;
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}
.hero-logo-ghost img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hero subheading — "Laser sharp designs" */
.hero-subheading {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  letter-spacing: -0.01em;
  color: white;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity   0.7s ease 0.6s,
    transform 0.7s var(--ease-out-expo) 0.6s;
}

.hero-subheading.tagline-ready {
  opacity: 1;
  transform: translateY(0);
}

/* Hero tagline */
.hero-tagline {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.8rem, 1.6vw, 1rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: white;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity   0.7s ease 0.7s,
    transform 0.7s var(--ease-out-expo) 0.7s;
}

.hero-tagline.tagline-ready {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-text-faint);
  pointer-events: none;
}

.scroll-label {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-indicator svg {
  animation: scrollBounce 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-indicator { opacity: 1; }
}


/* ─── 7. Container & section base ──────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--header-pad-x);
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
}

section + section {
  border-top: 1px solid var(--color-border);
}

.section-label {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-text);
}


/* ─── 8. Services section ──────────────────────────────────────────────────── */

.section-services {
  background: var(--color-bg-section);
  padding: var(--space-xl) 0;
}

.services-intro {
  margin-bottom: var(--space-lg);
}

.services-list {
  display: flex;
  flex-direction: column;
}

.service-item {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  gap: 0 2rem;
  align-items: start;
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border);
  transition: background 0.2s ease;
}

.service-item:last-child { border-bottom: 1px solid var(--color-border); }

.service-num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
  padding-top: 0.2rem;
  user-select: none;
}

.service-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.service-desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 52ch;
}

.service-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  padding-top: 0.2rem;
  list-style: none;
}

.service-tags li {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .service-item {
    grid-template-columns: 2.5rem 1fr;
    grid-template-rows: auto auto;
    gap: 0 1.25rem;
  }
  .service-tags {
    grid-column: 2;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 1rem;
    gap: 0.35rem;
  }
  .service-tags li {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
  }
}

@media (max-width: 480px) {
  .service-item { grid-template-columns: 2rem 1fr; gap: 0 1rem; }
}


/* ─── 9. Work section — sticky stacked cards ───────────────────────────────── */

.section-work {
  background: var(--color-bg);
  padding: var(--space-xl) 0;
}

.section-work .section-title {
  margin-bottom: var(--space-lg);
}

/* Scroll container — gives the sticky cards room to play */
.work-stacked {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 65vh;
  padding-top: 5vh;
}

/* Each slot is a sticky anchor — holds one card at the top */
.work-sticky-slot {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--header-pad-x);
}

/* The card itself — offset downward by index to create the fan stack */
.work-sticky-card {
  position: relative;
  top: calc(-5vh + calc(var(--card-i, 0) * 14px + 180px));
  display: block;
  width: min(560px, 90vw);
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  transform-origin: top center;
  will-change: transform;
  text-decoration: none;
  color: inherit;
  box-shadow:
    0 2px 8px  rgba(0, 0, 0, 0.28),
    0 12px 32px rgba(0, 0, 0, 0.22),
    0 32px 56px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.35s ease;
}

.work-sticky-card:hover {
  box-shadow:
    0 4px 14px  rgba(0, 0, 0, 0.36),
    0 20px 48px rgba(0, 0, 0, 0.30),
    0 48px 72px rgba(0, 0, 0, 0.16);
}

.work-sticky-card:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 4px;
}

.work-sticky-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out-expo);
}

.work-sticky-card:hover img {
  transform: scale(1.03);
}

/* Gradient overlay with project metadata */
.work-sticky-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
}

.work-sticky-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: -0.015em;
  color: #FCFAF8;
  display: block;
}

.work-sticky-type {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(252, 250, 248, 0.65);
  display: block;
  margin-top: 0.15rem;
}

.work-sticky-year {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(252, 250, 248, 0.45);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .work-sticky-card {
    top: calc(-3vh + calc(var(--card-i, 0) * 10px + 130px));
  }
  .work-stacked { padding-bottom: 50vh; }
}


/* ─── 9b. Preview / "Your site next?" section ─────────────────────────────── */

.section-preview {
  background: var(--color-bg-section);
  overflow: hidden;
}

.preview-scene {
  padding: var(--space-xl) 0 var(--space-2xl);
}

.preview-text {
  text-align: center;
  margin-bottom: var(--space-lg);
  will-change: transform;
}

.preview-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 5.5rem);
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: var(--color-text);
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}

.preview-sub {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}

/* perspective() lives in the transform, not on the parent, to avoid being
   flattened by any ancestor stacking context (e.g. overflow:hidden) */
.preview-stage {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--header-pad-x);
}

.preview-device {
  width: 100%;
  background: #181818;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  will-change: transform;
  transform-origin: 50% 50%;
  /* Initial tilted state — JS animates this; perspective() in transform avoids flattening */
  transform: perspective(900px) rotateX(20deg) scale(1.05);
  box-shadow:
    0 9px 20px rgba(0, 0, 0, 0.42),
    0 37px 37px rgba(0, 0, 0, 0.30),
    0 84px 50px rgba(0, 0, 0, 0.16),
    0 149px 60px rgba(0, 0, 0, 0.05);
}

/* Browser chrome bar */
.preview-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #101010;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.preview-screen {
  overflow: hidden;
  background: #000;
  line-height: 0;
}

.preview-screen img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 540px;
  object-position: top;
}

@media (max-width: 768px) {
  .preview-stage { padding: 0 1.25rem; }
  .preview-screen img { max-height: 320px; }
}

@media (max-width: 480px) {
  .preview-screen img { max-height: 220px; }
}


/* ─── 10. Approach / Thinking section ──────────────────────────────────────── */

.section-thinking {
  background: var(--color-bg-section);
  padding: var(--space-xl) 0;
}

.thinking-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.thinking-meta {
  position: sticky;
  top: 7rem;
}

.thinking-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--color-text);
  margin-top: 0.5rem;
}

.thinking-content {
  padding-top: 0.25rem;
}

.thinking-thesis {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--color-text);
  margin-bottom: 1.75rem;
}

.thinking-paras {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.thinking-paras p {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--color-text-muted);
}

/* Principles — three contrasting value pairs */
.thinking-principles {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  column-gap: 0.6rem;
  row-gap: 0.55rem;
  margin-bottom: 2.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.tp-a {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  letter-spacing: -0.015em;
  color: var(--color-text);
  white-space: nowrap;
}

.tp-over {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.tp-b {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  letter-spacing: 0.01em;
  color: var(--color-text-muted);
}

.thinking-close {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-text-faint);
  font-style: italic;
}

@media (max-width: 860px) {
  .thinking-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .thinking-meta { position: static; }
}

@media (max-width: 480px) {
  .thinking-principles {
    grid-template-columns: auto auto 1fr;
    column-gap: 0.5rem;
  }
}


/* ─── 11. CTA section ──────────────────────────────────────────────────────── */

.section-cta {
  background: var(--color-bg);
  padding: var(--space-2xl) 0;
  text-align: center;
}

/* Cycling headline */
.cta-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 1.75rem;
}

/* Inline slot that clips the cycling word vertically */
.cta-cycle-outer {
  display: inline-block;
  position: relative;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.1;
}

/* Inner — moves words in/out via transform */
#cta-cycle-inner {
  display: inline-block;
  position: relative;
}

.cta-word {
  display: inline-block;
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.5s var(--ease-out-expo),
    opacity   0.3s ease;
}

/* First word is visible on load — no pointer-events trick */
.cta-word.is-active {
  position: relative;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cta-word.is-exiting {
  position: absolute;
  transform: translateY(-110%);
  opacity: 0;
  transition:
    transform 0.35s var(--ease-in-out),
    opacity   0.12s ease;
}

/* Force 3-row layout on mobile: "Got something" / [word] / "to build?" */
@media (max-width: 640px) {
  .cta-title > span[aria-hidden] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.05em;
  }
}

.cta-body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--color-text-muted);
  max-width: 44ch;
  margin: 0 auto 2.5rem;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.75rem;
  border-radius: 2rem;
  border: 1px solid var(--color-border-hover);
  color: var(--color-text-muted);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.cta-button:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
  transform: translateY(-1px);
}

.cta-button:active { transform: translateY(0); }

.cta-button:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

.cta-button--filled {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.cta-button--filled:hover {
  color: var(--color-bg);
  opacity: 0.86;
  border-color: transparent;
}


/* ─── 12. Site footer ──────────────────────────────────────────────────────── */

.site-footer {
  background: var(--color-footer-bg);
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 0;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  opacity: 0.9;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}
.footer-logo:hover { opacity: 1; }
.footer-logo:focus-visible {
  outline: 1px solid var(--color-text);
  outline-offset: 4px;
  border-radius: 2px;
}
.footer-logo img {
  height: 18px;
  width: auto;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Live location tag */
.location-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: none;
  border: none;
  cursor: default;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.78rem;
  color: var(--color-text-faint);
  transition: color 0.2s ease;
}

.lt-pulse {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}

.lt-pulse-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5a8a6a;
}

.lt-pulse-ring {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #5a8a6a;
  opacity: 0;
  animation: pulseRing 2.4s ease-out infinite;
}

.lt-text-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lt-location,
.lt-time {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.lt-time { color: var(--color-text-faint); }

.footer-pill {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
  border: 1px solid var(--color-border);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-pill:hover {
  color: var(--color-text);
  border-color: var(--color-border-hover);
}
.footer-pill:focus-visible {
  outline: 1px solid var(--color-text);
  outline-offset: 3px;
}

.footer-copy {
  width: 100%;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--color-text-faint);
}

@media (max-width: 680px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .footer-copy  { order: 3; }
}


/* ─── Email toast ───────────────────────────────────────────────────────────── */

.email-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  z-index: 9999;
  padding: 0.5rem 1.25rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  border-radius: 2rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity   0.25s ease,
    transform 0.35s var(--ease-out-expo);
}
.email-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ─── 13. Keyframe animations ──────────────────────────────────────────────── */

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

@keyframes pulseRing {
  0%   { opacity: 0.7; transform: scale(1);   }
  100% { opacity: 0;   transform: scale(2.2); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}


/* ─── 14. Reduced motion ───────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .site-logo {
    transition: opacity 0.3s ease;
  }

  .hero-tagline,
  .hero-subheading,
  .site-header,
  .header-nav,
  .mobile-sheet,
  .cta-word,
  .email-toast {
    transition: none;
  }

  .scroll-indicator svg,
  .lt-pulse-ring {
    animation: none;
  }

  .work-sticky-card img { transition: none; }
  .work-sticky-card     { transition: none; }

  /* Preview section — skip the 3D animation, show device flat */
  .preview-device { transform: perspective(900px) rotateX(0deg) scale(1) !important; }
  .preview-text   { transform: none !important; }
}


/* ─── 15. Print ────────────────────────────────────────────────────────────── */

@media print {
  .site-header,
  .site-logo,
  .mobile-sheet,
  .hero-canvas,
  .hero-grain,
  .scroll-indicator,
  .section-preview,
  .section-cta,
  .site-footer,
  .nav-cta,
  .theme-toggle { display: none !important; }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .hero { min-height: auto; padding: 2rem 0; }
  .hero-subheading { color: #000; opacity: 1 !important; }
  .hero-tagline { color: #000; opacity: 1 !important; }

  .section-services,
  .section-work,
  .section-thinking {
    background: #fff;
    padding: 2rem 0;
  }

  .service-name,
  .work-sticky-name,
  .thinking-heading { color: #000; }

  .service-desc,
  .thinking-paras p,
  .work-sticky-type { color: #333; }

  a[href]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #666; }

  .work-sticky-card img { break-inside: avoid; }
  .service-item        { break-inside: avoid; }
}
