/* ============================================================
   MAJOR//minor Design — global stylesheet
   ============================================================ */

:root {
  /* Light theme (default) */
  --bg: #fafaf7;
  --bg-elev: #ffffff;
  --bg-soft: #f1f1ec;
  --ink: #14171c;
  --ink-soft: #4d545e;
  --ink-faint: #878e99;
  --line: #e3e3dc;
  --accent: #00a87e;
  --accent-strong: #008765;
  --accent-soft: rgba(0, 168, 126, 0.1);
  --shadow: 0 24px 60px -24px rgba(20, 23, 28, 0.18);

  --font-display: "Archivo", "Helvetica Neue", sans-serif;
  --font-body: "Inter", "Helvetica Neue", sans-serif;

  --container: 1200px;
  --pad: clamp(20px, 5vw, 48px);
  --radius: 18px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  /* Medium-dark, never pitch black */
  --bg: #20242b;
  --bg-elev: #272c34;
  --bg-soft: #2b313a;
  --ink: #eceef0;
  --ink-soft: #aab2bd;
  --ink-faint: #79828e;
  --line: #363d47;
  --accent: #2fd6a8;
  --accent-strong: #5ce4bd;
  --accent-soft: rgba(47, 214, 168, 0.12);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.5);
}

/* ---------- Reset / base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease, color 0.35s ease;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Typography ---------- */

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.4em;
}

/* Sized so the longest hero line ("Nothing in between." ≈ 9.1em)
   fills the copy column without wrapping at any 2-col width. */
.display {
  font-size: clamp(3rem, 5.85vw, 4.4rem);
  font-weight: 700;
}

.headline {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.4rem;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 56ch;
}

.accent {
  color: var(--accent);
}

/* The brand wordplay, reused across pages */
.major {
  font-family: var(--font-display);
  font-weight: 800;
}

.minor {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}

.logo {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo .major {
  font-weight: 800;
}

.logo .slashes {
  color: var(--accent);
  font-weight: 800;
  margin: 0 1px;
}

.logo .minor {
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 38px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  transform: rotate(15deg);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background-color 0.25s ease,
    color 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

[data-theme="dark"] .btn-primary {
  color: #14171c;
}

.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn .arrow {
  transition: transform 0.3s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(70px, 12vh, 140px) 0 clamp(60px, 9vh, 110px);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.72fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.hero h1 {
  margin-bottom: 0.5em;
}

.hero .lede {
  margin-bottom: 2.4rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-orb {
  position: absolute;
  top: -120px;
  right: -160px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 35%,
    var(--accent-soft),
    color-mix(in srgb, var(--accent-soft) 40%, transparent) 45%,
    transparent 72%
  );
  pointer-events: none;
}

/* ---------- Marquee ---------- */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: marquee 28s linear infinite;
}

.marquee span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.marquee span.tick {
  color: var(--accent);
}

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

/* ---------- Sections ---------- */

.section {
  padding: clamp(70px, 10vh, 130px) 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(36px, 5vh, 64px);
}

.section-head .more {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  white-space: nowrap;
  padding-bottom: 8px;
}

.section-head .more:hover {
  color: var(--accent-strong);
}

/* ---------- Work grid ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 36px);
}

.work-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease),
    border-color 0.3s ease;
}

.work-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.work-thumb {
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.work-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 22px;
}

.work-meta h3 {
  font-size: 1.15rem;
  margin: 0;
}

.work-meta .tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* ---------- Services preview / lists ---------- */

.service-rows {
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(22px, 3.5vh, 34px) 4px;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.35s var(--ease);
}

.service-row:hover {
  padding-left: 16px;
}

.service-row .num {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-faint);
}

.service-row h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  margin: 0;
}

.service-row .arrow-icon {
  color: var(--ink-faint);
  transition: transform 0.35s var(--ease), color 0.25s ease;
}

.service-row:hover .arrow-icon {
  transform: translateX(6px);
  color: var(--accent);
}

/* Full service blocks (services page) */

.service-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(44px, 7vh, 80px) 0;
  border-bottom: 1px solid var(--line);
}

.service-block:last-of-type {
  border-bottom: none;
}

.service-block .service-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 20px;
}

.service-block h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.service-block .service-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.service-block p {
  color: var(--ink-soft);
  margin-top: 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chip {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
}

.stat {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 40px);
}

.stat .value {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat .label {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--ink);
  color: var(--bg);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(48px, 8vh, 90px) clamp(28px, 5vw, 80px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .cta-band {
  background: var(--bg-soft);
  color: var(--ink);
  border: 1px solid var(--line);
}

.cta-band h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin-bottom: 0.5em;
}

.cta-band p {
  color: color-mix(in srgb, currentColor 65%, transparent);
  max-width: 48ch;
  margin: 0 auto 2.2rem;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 70%;
  background: radial-gradient(
    ellipse at center,
    var(--accent-soft),
    color-mix(in srgb, var(--accent-soft) 40%, transparent) 45%,
    transparent 75%
  );
  pointer-events: none;
}

/* ---------- About page ---------- */

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}

.story-grid p {
  color: var(--ink-soft);
  margin-top: 0;
}

.story-art {
  position: sticky;
  top: 110px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.founders {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 36px);
}

.founder-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.founder-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.founder-card .portrait {
  aspect-ratio: 4 / 3;
}

.founder-card .bio {
  padding: 24px 26px 28px;
}

.founder-card h3 {
  margin: 0 0 2px;
  font-size: 1.25rem;
}

.founder-card .role {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.founder-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.mission {
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.mission blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
}

.value-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
  background: var(--bg-elev);
}

.value-card .value-num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
  font-size: 1rem;
}

.value-card h3 {
  font-size: 1.2rem;
  margin: 12px 0 8px;
}

.value-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Contact page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}

.contact-info .info-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 500;
  transition: color 0.25s ease, padding-left 0.3s var(--ease);
}

.contact-info .info-row:hover {
  color: var(--accent);
  padding-left: 8px;
}

.contact-info .info-row svg {
  flex: none;
  color: var(--accent);
}

.contact-form {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(26px, 4vw, 44px);
}

.form-field {
  margin-bottom: 22px;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-note {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-top: 16px;
}

.form-status {
  display: none;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 500;
  font-size: 0.92rem;
}

.form-status.visible {
  display: block;
}

/* What-happens-next rail (balances the form column) */

.contact-note {
  color: var(--ink-soft);
  margin: 28px 0 0;
}

.next-label {
  margin-top: 44px;
}

.next-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.next-steps li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.next-steps .step-num {
  flex: none;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--accent);
}

.next-steps li strong {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
}

.next-steps li p {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ---------- Page hero (interior pages) ---------- */

.page-hero {
  padding: clamp(60px, 9vh, 110px) 0 clamp(40px, 6vh, 70px);
}

/* The min() term tracks the real column width once the container
   padding bottoms out at 20px (viewports under ~400px). */
.page-hero h1 {
  font-size: clamp(1.4rem, min(7.75vw, calc((100vw - 40px) / 11.6)), 4.2rem);
  font-weight: 700;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(48px, 7vh, 80px) 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  margin-bottom: 48px;
}

.footer-brand .logo {
  font-size: 1.5rem;
}

.footer-brand p {
  color: var(--ink-soft);
  max-width: 36ch;
  margin-top: 14px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 18px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.footer-col a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.25s ease;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.85rem;
}

.social-row {
  display: flex;
  gap: 12px;
}

.social-row a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.3s var(--ease);
}

.social-row a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .marquee-track {
    animation: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .work-grid,
  .founders {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  /* Single column: the headline gets the full container width */
  .display {
    font-size: clamp(1.9rem, 9.5vw, 5.4rem);
  }


  .page-hero-art {
    display: none;
  }

  .story-grid,
  .contact-grid,
  .service-block {
    grid-template-columns: 1fr;
  }

  .story-art {
    position: static;
    order: -1;
  }

  .stats,
  .values {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 12px var(--pad) 20px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1.05rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   Motion & flair
   ============================================================ */

/* ---------- Masked line reveal (heroes) ---------- */

.line {
  display: block;
  overflow: hidden;
  padding-block-end: 0.12em;
  margin-block-end: -0.12em;
}

.line-inner {
  display: block;
  transform: translateY(120%);
  animation: line-up 1s var(--ease) forwards;
}

.line:nth-child(1) .line-inner { animation-delay: 0.05s; }
.line:nth-child(2) .line-inner { animation-delay: 0.18s; }
.line:nth-child(3) .line-inner { animation-delay: 0.31s; }

.display .line {
  width: max-content;
  max-width: none;
  overflow: visible;
}

.display .line-inner {
  white-space: nowrap;
}

@keyframes line-up {
  to { transform: translateY(0); }
}

/* ---------- Hero visual (generative particle sphere) ---------- */

.hero-visual {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  justify-self: end;
}

.hero-visual canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Hero orb drift ---------- */

.hero-orb {
  animation: orb-drift 16s ease-in-out infinite alternate;
}

@keyframes orb-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-70px, 50px) scale(1.18); }
}

/* ---------- Page-hero decoration (interior pages) ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
}

.page-hero-art {
  position: absolute;
  right: clamp(20px, 7vw, 110px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(140px, 16vw, 210px);
  aspect-ratio: 1 / 1;
  pointer-events: none;
}

.page-hero-art svg {
  width: 100%;
  height: 100%;
  animation: spin-slow 32s linear infinite;
}

.page-hero-art .glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 3.4vw, 3rem);
  color: var(--accent);
}

/* ---------- Header hide-on-scroll ---------- */

.site-header {
  transition: transform 0.45s var(--ease), background-color 0.35s ease,
    border-color 0.35s ease;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

/* ---------- Marquee: pause on hover ---------- */

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

/* ---------- Card tilt ---------- */

.work-grid,
.founders {
  perspective: 1400px;
}

.work-card,
.founder-card {
  transform-style: preserve-3d;
}

/* ---------- Custom cursor ---------- */

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button {
  cursor: none;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--accent);
  opacity: 0.55;
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
    opacity 0.25s ease;
}

.cursor-ring.is-hover {
  width: 58px;
  height: 58px;
  opacity: 0.95;
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .line-inner {
    transform: none;
    animation: none;
  }
  .page-hero-art svg,
  .hero-orb {
    animation: none;
  }
}

/* ---------- Work card shine sweep ---------- */

.work-thumb {
  position: relative;
}

.work-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 42%,
    rgba(255, 255, 255, 0.16) 50%,
    transparent 58%
  );
  transform: translateX(-130%);
  pointer-events: none;
}

.work-card:hover .work-thumb::after {
  transition: transform 0.85s var(--ease);
  transform: translateX(130%);
}

/* ---------- Marquee (JS-driven velocity) ---------- */

.marquee-track {
  will-change: transform;
}

/* ---------- Page transition wipe ---------- */

.page-wipe {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
}

.page-wipe::before,
.page-wipe::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: scaleY(0);
  transform-origin: bottom;
}

.page-wipe::before {
  background: var(--accent);
  transition: transform 0.42s var(--ease);
}

.page-wipe::after {
  background: var(--ink);
  transition: transform 0.42s var(--ease) 0.06s;
}

.page-wipe.wipe-in::before,
.page-wipe.wipe-in::after {
  transform: scaleY(1);
}

.page-wipe.wipe-out::before,
.page-wipe.wipe-out::after {
  transform-origin: top;
  transform: scaleY(0);
}

.page-wipe.no-anim::before,
.page-wipe.no-anim::after {
  transition: none;
}


/* ---------- Mobile hero: sphere behind the copy, dimmed ----------
   Must come after the base .hero-visual rules to win the cascade. */

@media (max-width: 900px) {
  .hero-visual {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -54%);
    width: min(120vw, 540px);
    max-width: none;
    opacity: 0.14;
    z-index: -1;
    pointer-events: none;
  }

  /* Dark mode tolerates (and benefits from) a stronger presence */
  [data-theme="dark"] .hero-visual {
    opacity: 0.33;
  }

  .hero-copy {
    position: relative;
    z-index: 1;
  }
}

/* ============================================================
   Production pass: a11y, photos, social proof, FAQ
   ============================================================ */

/* ---------- Accessibility ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 14px;
  z-index: 10001;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 22px;
  border-radius: 999px;
}

.skip-link:focus {
  left: 16px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Nav CTA ---------- */

.btn-sm {
  padding: 10px 20px;
  font-size: 0.88rem;
}

@media (max-width: 760px) {
  .nav-cta {
    display: none;
  }
}

/* ---------- Photography treatment ----------
   Placeholders are unified by a grayscale + accent-tint pass;
   color is revealed on hover. Swap images freely — the treatment
   keeps any set looking art-directed. */

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(0.98);
  transition: filter 0.6s var(--ease), transform 0.6s var(--ease);
}

.work-card:hover .work-thumb img {
  filter: none;
  transform: scale(1.04);
}

.work-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0.14;
  mix-blend-mode: multiply;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

[data-theme="dark"] .work-thumb::before {
  mix-blend-mode: screen;
  opacity: 0.1;
}

.work-card:hover .work-thumb::before {
  opacity: 0;
}

.work-thumb::after {
  z-index: 2;
}

.work-meta .year {
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-weight: 500;
}

/* ---------- Client marks strip ---------- */

.clients {
  padding: clamp(36px, 5vh, 56px) 0;
  border-bottom: 1px solid var(--line);
}

.clients-label {
  text-align: center;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 26px;
}

.clients-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: clamp(28px, 5vw, 64px);
}

.client-mark {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-faint);
  opacity: 0.75;
  transition: color 0.3s ease, opacity 0.3s ease;
  cursor: default;
}

.client-mark:hover {
  color: var(--ink);
  opacity: 1;
}

.client-mark.cm-bold { font-weight: 800; letter-spacing: 0.02em; }
.client-mark.cm-italic { font-style: italic; font-weight: 300; }
.client-mark.cm-caps { font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.95em; }
.client-mark.cm-serifish { font-weight: 500; letter-spacing: -0.03em; }

/* ---------- Testimonials ---------- */

.quotes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 36px);
}

.quote-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(26px, 3.5vw, 42px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.quote-card .qmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1;
}

.quote-card blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  flex: 1;
}

.quote-person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.quote-person img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.quote-person .who strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

.quote-person .who span {
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* ---------- Photo portraits & story image ----------
   Same grayscale + accent-tint pass as the work grid, so every
   photo on the site reads as one art-directed set. */

.founder-card .portrait img,
.story-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.05) brightness(0.98);
  transition: filter 0.6s var(--ease), transform 0.7s var(--ease);
}

.founder-card .portrait,
.story-art {
  position: relative;
}

.founder-card .portrait::before,
.story-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0.14;
  mix-blend-mode: multiply;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

[data-theme="dark"] .founder-card .portrait::before,
[data-theme="dark"] .story-art::before {
  mix-blend-mode: screen;
  opacity: 0.1;
}

.founder-card:hover .portrait img,
.story-art:hover img {
  filter: none;
}

.founder-card:hover .portrait::before,
.story-art:hover::before {
  opacity: 0;
}

.quote-person img {
  filter: grayscale(1);
}

.story-art {
  aspect-ratio: 9 / 11;
}

.story-art:hover img {
  transform: scale(1.03);
}

/* ---------- FAQ (contact) ---------- */

.faq {
  max-width: 820px;
  margin: 0 auto;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  transition: color 0.25s ease;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--accent);
}

.faq summary .faq-icon {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-weight: 400;
  font-size: 1rem;
  color: var(--accent);
  transition: transform 0.3s var(--ease), background-color 0.25s ease;
}

.faq details[open] summary .faq-icon {
  transform: rotate(45deg);
  background: var(--accent-soft);
}

.faq details p {
  margin: 0;
  padding: 0 4px 26px;
  color: var(--ink-soft);
  max-width: 64ch;
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(60px, 10vh, 120px) 0;
}

.notfound .code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 18vw, 11rem);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.04em;
}

.notfound p {
  color: var(--ink-soft);
  max-width: 44ch;
  margin: 18px auto 32px;
}

/* ---------- Responsive ---------- */

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