/* ============ Font ============ */
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============ Tokens ============ */
:root {
  --paper: #ffffff;
  --ink: #0e0e0e;
  --muted: #6f6f6f;
  --line: #e7e7e7;
  --dark: #101010;
  --dark-soft: #1c1c1c;
  --dark-muted: #a3a3a3;
  --dark-line: #2c2c2c;
  --strip: #2e58ff;
  --status-on: #55e861;
  --status-off: #ff2321;
  --font: "Geist", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --pad: 32px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--paper); }

/* Blue strip across the very top, above everything */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--strip);
  z-index: 120;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.proof :focus-visible, .cta :focus-visible, .contact-overlay :focus-visible { outline-color: var(--paper); }

/* ============ Shared type ============ */
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow-dark { color: var(--dark-muted); }

.section-title {
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section-head { padding: 0 var(--pad); margin-bottom: clamp(40px, 6vw, 80px); }

main > section { padding-top: clamp(90px, 12vw, 180px); }

/* ============ Preloader ============ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--dark);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.85s var(--ease-out);
}
.preloader.is-done { transform: translateY(-100%); }
.preloader.is-removed { display: none; }
.preloader-word {
  display: flex;
  align-items: center;
  gap: 0.35em;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.01em;
}
.preloader-dot {
  width: 0.22em; height: 0.22em;
  background: currentColor;
  border-radius: 50%;
  flex: none;
}

/* ============ Header ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--pad);
  pointer-events: none;
  /* Invert effect: header flips against whatever scrolls under it */
  mix-blend-mode: difference;
  color: #fff;
}
.site-header a, .site-header button { pointer-events: auto; }

.identity { display: flex; align-items: center; gap: 12px; }
.identity-avatar-slot { width: 40px; height: 40px; flex: none; }
.identity-avatar {
  /* fixed outside the blended header so it stays solid; will hold the real photo */
  position: fixed;
  top: 20px; left: var(--pad);
  z-index: 51;
  pointer-events: none;
  width: 40px; height: 40px;
  background: url("img/amer-avatar.webp") center / cover no-repeat;
  mix-blend-mode: difference;
}
.identity-text { display: flex; flex-direction: column; gap: 4px; }
.identity-name { font-weight: 500; font-size: 1rem; line-height: 20px; }
.identity-role { font-size: 0.875rem; line-height: 16px; }

.fab-reach {
  position: fixed;
  bottom: 26px;
  left: 50%;
  translate: -50% 16px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 16px;
  font-size: 0.875rem;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
  /* hidden until the visitor scrolls past the work samples */
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--ease-out), background 0.3s, color 0.3s,
    opacity 0.35s var(--ease-out), translate 0.35s var(--ease-out);
}
.fab-reach.is-shown {
  translate: -50% 0;
  opacity: 1;
  pointer-events: auto;
}
.fab-reach.on-dark { background: var(--paper); color: var(--ink); box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45); }
body.overlay-open .fab-reach { opacity: 0; pointer-events: none; }

.clock {
  font-size: 0.875rem;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}

/* Availability status. The text is its own fixed element carrying the invert
   blend (so it flips against the page like the header); the dot is a separate
   fixed element that keeps its true green/red colour. JS positions the dot
   just left of the text. */
.status {
  position: fixed;
  top: 20px;
  right: var(--pad);
  z-index: 51;
  height: 40px;
  display: flex;
  align-items: center;
  pointer-events: none;
  font-size: 0.875rem;
  color: #fff;
  mix-blend-mode: difference;
}
.status-dot {
  position: fixed;
  top: 34px; /* centres the 12px dot in the 40px status row */
  z-index: 51;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--status-on);
  pointer-events: none;
}
.status-dot.is-off { background: var(--status-off); }

/* ============ Hero ============ */
.hero {
  /* 80px top = 20px avatar top + 40px avatar + 20px gap */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 80px var(--pad) 30px;
}

.hero-headline {
  /* 40px on mobile → 54px/64 line-height on desktop */
  font-size: clamp(40px, 32px + 1.8vw, 54px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.185;
  max-width: 624px;
}



.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: clamp(32px, 5vw, 48px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 16px;
  font-size: 0.875rem;
}
.btn-invert { background: var(--paper); color: var(--ink); }

/* Arrow hidden by default; expands horizontally on hover */
.btn-primary .btn-arrow, .fab-reach .btn-arrow {
  display: inline-block;
  width: 0;
  margin-left: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: width 0.35s var(--ease-out), margin-left 0.35s var(--ease-out), opacity 0.25s ease;
}
.btn-primary:hover .btn-arrow, .btn-primary:focus-visible .btn-arrow,
.fab-reach:hover .btn-arrow, .fab-reach:focus-visible .btn-arrow {
  width: 1.1em;
  margin-left: 8px;
  opacity: 1;
}

.btn-ghost { font-size: 1rem; color: var(--muted); }
.btn-ghost u { color: var(--ink); text-underline-offset: 3px; }
.btn-ghost-dark { color: var(--dark-muted); }
.btn-ghost-dark u { color: var(--paper); }

/* ============ Tickers (shared) ============ */
.ticker { overflow: hidden; width: 100%; }
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll var(--speed, 40s) linear infinite;
}
.ticker.is-paused .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; align-items: center; flex: none; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============ Trust strip ============ */
.trust {
  padding: 8px var(--pad);
}

/* Split-flap logo carousel: 4 fixed slots, logos swap in place */
.logo-flip {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  max-width: 560px;
}
.flip-slot {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 56px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.flip-slot.is-mounted { opacity: 1; transform: none; }
.flip-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flip-logo svg {
  height: 26px;
  max-width: 92%;
  width: auto;
}
.flip-logo.flip-in {
  animation: flip-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes flip-in {
  from { transform: translateY(35%); opacity: 0; filter: blur(6px); }
  to   { transform: none; opacity: 1; filter: none; }
}
.flip-logo.flip-out {
  transition: transform 0.3s ease-in, opacity 0.3s ease-in, filter 0.3s ease-in;
  transform: translateY(-35%);
  opacity: 0;
  filter: blur(6px);
}

/* ============ Featured work ============ */
/* tightened top spacing above the work ticker */
.work { padding-top: clamp(65px, 8.6vw, 130px); }
.work-ticker {
  --speed: 65s;
  cursor: grab;
  touch-action: pan-y;
}
.work-ticker.is-dragging { cursor: grabbing; }
.work-ticker .work-card {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.work-visual img { -webkit-user-drag: none; }

.work-card {
  display: block;
  flex: none;
  margin-right: 8px;
}

/* fixed height; width follows each image's aspect ratio */
.work-visual {
  position: relative;
  height: 600px;
  border-radius: 6px;
  overflow: hidden;
}
.work-visual img {
  display: block;
  height: 100%;
  width: auto;
}

.work-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 14px;
  font-size: 0.875rem;
  color: #fff;
  /* Apple-style vibrancy: the patch is pure blur; only the label text
     blends, deriving its color from the image (white on dark, dark on light) */
  border-radius: 6px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.work-tag > span {
  mix-blend-mode: difference;
}

/* ============ Services ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin: 0 var(--pad);
}
.service-card {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(26px, 3.4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.35s;
}
.service-card:hover { background: #fafafa; }
.service-card h3 {
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.service-problem { color: var(--ink); }
.service-deliverable { color: var(--muted); }
.service-fit {
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============ Process ============ */
.process-list {
  list-style: none;
  margin: 0 var(--pad);
  border-top: 1px solid var(--line);
}
.process-step {
  display: grid;
  grid-template-columns: 32px 0.3fr 2fr;
  gap: 8px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.process-num { font-size: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.process-step h3 { font-size: 16px; font-weight: 400; letter-spacing: -0.01em; }
.process-step p { font-size: 16px; color: var(--muted); }

/* ============ About ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 0 var(--pad);
  align-items: start;
}

/* words tint from grey to ink as the visitor scrolls */
.about-scroll-text {
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.about-scroll-text .w {
  color: #c9c9c9;
  transition: color 0.2s linear;
}
.about-scroll-text .w.on { color: var(--ink); }

/* ============ Social proof ============ */
.proof {
  background: var(--dark);
  color: var(--paper);
  margin-top: clamp(90px, 12vw, 180px);
  padding: clamp(120px, 15vw, 200px) var(--pad) !important;
}
.proof-inner { max-width: 600px; margin: 0 auto; }

.proof-progress { display: flex; gap: 10px; margin-bottom: clamp(30px, 4vw, 50px); }
.proof-bar {
  flex: 1;
  max-width: 90px;
  height: 2px;
  background: var(--dark-line);
  position: relative;
  overflow: hidden;
}
.proof-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: scaleX(0);
  transform-origin: left;
}
.proof-bar.is-active::after { animation: bar-fill var(--quote-time, 6s) linear forwards; }
.proof-bar.is-done::after { transform: scaleX(1); }
@keyframes bar-fill { to { transform: scaleX(1); } }

.proof-quotes { position: relative; min-height: 300px; }
.proof-quote {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  pointer-events: none;
}
.proof-quote.is-active { opacity: 1; transform: none; pointer-events: auto; }
.proof-quote blockquote {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.proof-quote figcaption {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(26px, 4vw, 46px);
  font-size: 0.9375rem;
  color: var(--dark-muted);
}
.proof-quote figcaption b { color: var(--paper); font-weight: 500; }
.proof-avatar {
  width: 44px; height: 44px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--dark-soft);
}
.proof-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============ FAQ ============ */
.faq { padding-left: var(--pad); padding-right: var(--pad); }
.faq .section-head { padding: 0; }
.faq-list { max-width: 600px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  list-style: none;
  cursor: pointer;
  padding: clamp(20px, 2.4vw, 16px) 4px;
  font-size: clamp(1.125rem, 1.8vw, 1.5rem);
  letter-spacing: -0.01em;
  transition: color 0.25s;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--muted); }

.faq-icon {
  position: relative;
  width: 16px; height: 16px;
  flex: none;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform 0.35s var(--ease-out);
}
.faq-icon::before { left: 0; top: 7px; width: 16px; height: 2px; }
.faq-icon::after { left: 7px; top: 0; width: 2px; height: 16px; }
details[open] .faq-icon::after { transform: scaleY(0); }

.faq-list details p {
  padding: 0 4px clamp(22px, 2.6vw, 32px);
  color: var(--muted);
  max-width: 46em;
}
.faq-list details p + p { padding-top: 0; margin-top: -0.6em; }
.faq-list details a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ============ CTA ============ */
.cta {
  background: var(--dark);
  color: var(--paper);
  margin-top: clamp(90px, 12vw, 180px);
  padding: clamp(110px, 15vw, 200px) var(--pad) clamp(110px, 15vw, 200px) !important;
  text-align: center;
}
.cta-headline {
  font-size: clamp(40px, 6.5vw, 96px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: clamp(34px, 5vw, 60px);
}

/* ============ Footer ============ */
/* Cloned from the character.studio footer: small brand, large lede,
   three link columns, and a signature gradient strip at the very bottom */
.site-footer {
  position: relative;
  background: var(--dark);
  color: var(--paper);
  padding: clamp(60px, 8vw, 110px) var(--pad) 34px;
}
.footer-lede {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 400px;
  margin: 0 0 clamp(50px, 7vw, 100px);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 30px;
}
.footer-col { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-label { font-size: 0.8125rem; color: var(--dark-muted); margin-bottom: 4px; }
.footer-col a {
  font-size: 0.9375rem;
  color: var(--paper);
  opacity: 0.9;
  transition: opacity 0.25s;
}
.footer-col a:hover { opacity: 0.6; }
.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: clamp(50px, 7vw, 90px);
  font-size: 0.8125rem;
  color: var(--dark-muted);
}
.footer-clock { color: var(--dark-muted); }

/* ============ Contact overlay ============ */
.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--dark);
  color: var(--paper);
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.65s var(--ease-out);
}
.contact-overlay.is-open { transform: none; }
.contact-inner {
  min-height: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(90px, 12vh, 140px) var(--pad) 80px;
  display: flex;
  flex-direction: column;
}
.contact-close {
  position: absolute;
  top: 24px; right: var(--pad);
  width: 46px; height: 46px;
  border: 1px solid var(--dark-line);
  font-size: 1rem;
  transition: transform 0.3s var(--ease-out), background 0.3s;
}
.contact-close:hover { background: var(--dark-soft); transform: rotate(90deg); }
.contact-headline {
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.contact-sub { color: var(--dark-muted); max-width: 34em; margin-top: 22px; }
.contact-links { margin-top: clamp(36px, 6vh, 64px); border-top: 1px solid var(--dark-line); }
.contact-link {
  display: flex;
  align-items: baseline;
  gap: 22px;
  padding: 26px 4px;
  border-bottom: 1px solid var(--dark-line);
  transition: padding-left 0.35s var(--ease-out);
}
.contact-link:hover { padding-left: 16px; }
.contact-link-label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dark-muted);
  width: 60px;
  flex: none;
}
.contact-link-value { font-size: clamp(18px, 2.2vw, 26px); letter-spacing: -0.01em; flex: 1; }
.contact-link-arrow { transition: transform 0.35s var(--ease-out); }
.contact-link:hover .contact-link-arrow { transform: translateX(6px); }
.contact-note { margin-top: 34px; font-size: 0.875rem; color: var(--dark-muted); }

body.overlay-open { overflow: hidden; }

/* ============ Reveal on scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Hero entrance */
.hero-headline {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
body.is-loaded .hero-headline { opacity: 1; transform: none; }

.hero-actions { opacity: 0; transition: opacity 0.9s ease 0.5s; }
body.is-loaded .hero-actions { opacity: 1; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  :root { --pad: 24px; }
  .services-grid { grid-template-columns: 1fr; }
  .process-step { grid-template-columns: 56px 1fr; }
  .process-step p { grid-column: 2; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  :root { --pad: 15px; }
  .section-title { font-size: 36px; }
  .logo-flip { gap: 14px; }
  .flip-slot { height: 44px; }
  .flip-logo svg { height: 22px; }
  .work-visual { height: 560px; }
  .proof-quotes { min-height: 380px; }
  .contact-close { right: var(--pad); }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .preloader { display: none; }
  .ticker-track { animation: none; flex-wrap: wrap; width: 100%; }
  .ticker-group { flex-wrap: wrap; }
  .ticker-group + .ticker-group { display: none; }
  .reveal, .hero-actions, .hero-headline { opacity: 1; transform: none; transition: none; }
  .flip-slot { opacity: 1; transform: none; transition: none; }
  .about-scroll-text .w { color: var(--ink); transition: none; }
  .flip-logo.flip-in { animation: none; }
  .flip-logo.flip-out { transition: none; display: none; }
  .proof-quote, .contact-overlay, .btn-primary, .nav-cta, .work-visual { transition: none; }
  .proof-bar.is-active::after { animation: none; transform: scaleX(1); }
}
