/* ==========================================================================
   Texora10XGlobal — Design System
   Navy + gold pulled from the brand mark. Editorial, technical, no gloss.
   ========================================================================== */

:root {
  --navy-950: #04102b;
  --navy-900: #071c42;
  --navy-800: #0a2557;
  --navy-700: #0d2f6b;
  --navy-600: #133a80;
  --gold-500: #f5b400;
  --gold-400: #fdcc17;
  --gold-300: #ffdd66;
  --paper: #f7f7f4;
  --paper-dim: #eeede7;
  --ink: #14181f;
  --ink-soft: #4b5361;
  --line: #dcdbd3;
  --line-dark: rgba(255, 255, 255, 0.14);
  --white: #ffffff;

  --font-head: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --container: 1180px;
  --header-h: 78px;
  --gutter: clamp(18px, 5vw, 28px);
  --radius: 3px;
  --shadow-card: 0 18px 40px -24px rgba(4, 16, 43, 0.35);

  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snappy: cubic-bezier(0.25, 1, 0.5, 1);
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy-900);
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.4vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 1.8vw, 1.6rem); }

p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-500);
  font-weight: 600;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold-500);
}

section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }

.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark {
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900) 60%, var(--navy-800));
  color: var(--paper);
}
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: rgba(247, 247, 244, 0.72); }
.section-dark .eyebrow { color: var(--gold-400); }

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease-snappy), background 0.25s var(--ease-snappy), color 0.25s var(--ease-snappy), border-color 0.25s var(--ease-snappy);
}
.btn-primary { background: var(--gold-400); color: var(--navy-950); }
.btn-primary:hover { background: var(--gold-500); transform: translateY(-2px); }
.btn-ghost { border-color: rgba(255,255,255,0.35); color: var(--white); }
.btn-ghost:hover { border-color: var(--gold-400); color: var(--gold-400); }
.btn-outline { border-color: var(--navy-900); color: var(--navy-900); }
.btn-outline:hover { background: var(--navy-900); color: var(--white); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease-cinematic), border-color 0.3s var(--ease-cinematic), box-shadow 0.3s var(--ease-cinematic);
}
.site-header.is-scrolled {
  background: rgba(4, 16, 43, 0.94);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom-color: rgba(255,255,255,0.08);
  box-shadow: 0 12px 30px -20px rgba(0, 0, 0, 0.6);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 46px; width: auto; }
.brand-name { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--paper); text-transform: uppercase; display: none; }

.main-nav { display: flex; align-items: center; gap: 2px; position: relative; }
.main-nav a {
  padding: 10px 14px;
  font-size: 0.86rem;
  color: rgba(247,247,244,0.78);
  font-weight: 500;
  border-radius: var(--radius);
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.nav-indicator {
  position: absolute;
  bottom: 2px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--gold-400);
  border-radius: 2px;
  opacity: 0;
  transform: translateX(0);
  transition: transform 0.35s var(--ease-cinematic), width 0.35s var(--ease-cinematic), opacity 0.2s var(--ease-cinematic);
  pointer-events: none;
}
@media (max-width: 1180px) { .nav-indicator { display: none; } }
.main-nav a:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.main-nav a.active { color: var(--gold-400); }
.nav-cta {
  margin-left: 8px;
  padding: 10px 18px;
  background: var(--gold-400);
  color: var(--navy-950) !important;
  border-radius: var(--radius);
  font-weight: 700;
}
.nav-cta:hover { background: var(--gold-500); }

.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.6rem; cursor: pointer; }

/* Dropdown (Capabilities) */
.has-drop { position: relative; }
.drop-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--navy-950);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.6);
}
.has-drop:hover .drop-panel, .has-drop:focus-within .drop-panel { display: block; }
.drop-panel a { display: block; padding: 10px 12px; border-radius: 3px; font-size: 0.86rem; }
.drop-panel a:hover { background: rgba(255,255,255,0.06); }
@media (max-width: 1180px) {
  .drop-panel { position: static; display: block; background: none; border: none; padding: 0 0 0 14px; box-shadow: none; }
  .has-drop:hover .drop-panel { display: block; }
}


@media (max-width: 1180px) {
  .brand-name { display: none; }
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    background: var(--navy-950);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 40px;
    gap: 4px;
    transform: translateX(100%);
    /* Hidden rather than merely off-screen, so the closed drawer's links are
       not reachable by keyboard or screen readers. Visibility is delayed so
       the slide-out animation still plays. */
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
    overflow-y: auto;
    z-index: 200;
  }
  .main-nav.open { transform: translateX(0); visibility: visible; transition-delay: 0s, 0s; }
  body.nav-open { overflow: hidden; }
  .main-nav a { padding: 14px 6px; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .nav-cta { text-align: center; margin: 12px 6px 0; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900) 55%, var(--navy-800));
  color: var(--white);
  padding: calc(var(--header-h) + 96px) 0 88px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -10%;
  top: -20%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(245,180,0,0.16), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  position: relative;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { color: var(--white); }
.hero .lede { color: rgba(247,247,244,0.78); max-width: 54ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-stat { background: rgba(4,16,43,0.55); padding: 22px 20px; }
.hero-stat .num { font-family: var(--font-head); font-size: 2rem; color: var(--gold-400); display: block; }
.hero-stat .lbl { display: block; font-size: 0.78rem; color: rgba(247,247,244,0.7); margin-top: 4px; }

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: 26px; }
.grid > *, .hero-grid > *, .two-col > *, .contact-grid > *, .footer-grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.35s var(--ease-cinematic), box-shadow 0.35s ease, border-color 0.35s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card-num {
  font-family: var(--font-mono);
  color: var(--gold-500);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  display: block;
}

.stat-tile {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 26px 22px;
  border-radius: var(--radius);
  text-align: left;
  transition: transform 0.35s var(--ease-cinematic), box-shadow 0.35s ease;
}
.stat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.stat-tile .num { font-family: var(--font-head); font-size: 2.3rem; color: var(--navy-900); display: block; }
.stat-tile .lbl { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-top: 6px; }
.stat-tile .ctx { display: block; font-size: 0.76rem; color: var(--ink-soft); opacity: 0.75; margin-top: 4px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-top: 50px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 130px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
@media (max-width: 780px) { .timeline::before { left: 18px; } }

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 36px;
  padding-bottom: 52px;
}
@media (max-width: 780px) { .tl-item { grid-template-columns: 1fr; padding-left: 40px; gap: 8px; } }

.tl-item:last-child { padding-bottom: 0; }
.tl-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--navy-800);
  font-weight: 700;
  text-align: right;
  padding-top: 4px;
}
@media (max-width: 780px) { .tl-year { text-align: left; } }

.tl-dot {
  position: absolute;
  left: 124px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-400);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 2px var(--navy-900);
}
@media (max-width: 780px) { .tl-dot { left: 12px; } }

.tl-content {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.tl-content .tl-place { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-500); font-weight: 700; }
.tl-content h3 { margin: 6px 0 4px; }
.tl-content .tl-role { font-size: 0.9rem; color: var(--navy-800); font-weight: 600; margin-bottom: 10px; }
.tl-metrics { display: flex; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.tl-metrics div { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); }
.tl-metrics b { color: var(--navy-900); font-size: 1.05rem; display: block; font-family: var(--font-head); }

/* ---------- Project / case cards ---------- */
.proj-card {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.35s var(--ease-cinematic), box-shadow 0.35s ease;
}
.proj-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.proj-brand { display: flex; align-items: center; gap: 12px; }
.proj-brand .proj-logo {
  height: 34px;
  max-width: 118px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.proj-brand h3 { margin: 0; }
.client-logo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin: 18px 0 22px; }
.client-logo-row img { height: 30px; max-width: 110px; width: auto; object-fit: contain; opacity: 0.85; transition: opacity 0.25s ease; }
.client-logo-row img:hover { opacity: 1; }

/* ---------- Brand pedigree (career exposure, not Texora10XGlobal clients) ---------- */
.brand-pedigree { margin-top: 28px; }
.brand-pedigree-row { display: flex; flex-wrap: wrap; gap: 14px; }
.brand-pedigree-row .logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 24px;
  height: 68px;
  box-sizing: border-box;
  transition: transform 0.35s var(--ease-cinematic), box-shadow 0.35s ease, border-color 0.25s ease;
}
.brand-pedigree-row .logo-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--gold-400); }
.brand-pedigree-row .logo-tile img { height: 32px; width: auto; max-width: 108px; object-fit: contain; }
.brand-pedigree-note { font-size: 0.76rem; color: var(--ink-soft); opacity: 0.8; margin-top: 14px; }
.section-dark .brand-pedigree-row .logo-tile { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.14); }
.section-dark .brand-pedigree-row .logo-tile:hover { border-color: var(--gold-400); }
.section-dark .brand-pedigree-row .logo-tile img { filter: brightness(0) invert(1); opacity: 0.92; }
.section-dark .brand-pedigree-note { opacity: 0.65; }
.proj-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 2px;
  width: fit-content;
  font-weight: 700;
}
.tag-founder { background: rgba(2,31,87,0.08); color: var(--navy-800); }
.tag-texora { background: rgba(245,180,0,0.15); color: #8a6100; }
.proj-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.8rem; color: var(--ink-soft); font-family: var(--font-mono); }
.proj-focus { font-size: 0.85rem; color: var(--navy-800); font-weight: 600; }

.proj-progress { margin-top: 6px; }
.proj-progress .bar-bg { height: 6px; background: var(--paper-dim); border-radius: 4px; overflow: hidden; }
.proj-progress .bar { height: 100%; background: var(--gold-400); }
.proj-progress .pct { font-family: var(--font-mono); font-size: 0.78rem; color: var(--navy-800); margin-top: 6px; display: block; }
.proj-note { font-size: 0.76rem; color: var(--ink-soft); opacity: 0.8; margin-top: -6px; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item { border: 1px solid var(--line); background: var(--white); overflow: hidden; border-radius: var(--radius); }
.gallery-item img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-cap { padding: 14px 16px; }
.gallery-cap .g-group { font-family: var(--font-mono); font-size: 0.68rem; color: var(--gold-500); text-transform: uppercase; letter-spacing: 0.06em; }
.gallery-cap .g-title { font-size: 0.92rem; color: var(--navy-900); font-weight: 600; margin-top: 4px; }

/* ---------- Process flow ---------- */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.85rem; }
.flow span.step { background: var(--navy-900); color: var(--white); padding: 8px 14px; border-radius: 3px; max-width: 100%; }
.flow span.arrow { color: var(--gold-500); font-weight: 700; }

.numbered-list { display: grid; gap: 18px; }
.numbered-list .row { display: grid; grid-template-columns: 46px 1fr; gap: 18px; align-items: start; }
.numbered-list .idx { font-family: var(--font-head); font-size: 1.4rem; color: var(--gold-500); }
.numbered-list h4 { margin: 0 0 4px; font-size: 1rem; color: var(--navy-900); }
.numbered-list p { margin: 0; font-size: 0.92rem; }

/* ---------- Quote ---------- */
.pull-quote {
  border-left: 3px solid var(--gold-400);
  padding: 4px 0 4px 26px;
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--navy-900);
  font-style: italic;
  margin: 30px 0;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: rgba(247,247,244,0.65); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.footer-grid h4 { color: var(--white); font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-grid a { display: block; color: rgba(247,247,244,0.65); padding: 6px 0; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--gold-400); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; }
.footer-logo { height: 40px; margin-bottom: 14px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--navy-900); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--white);
  color: var(--ink);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.contact-detail { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-detail .k { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; color: var(--ink-soft); width: 110px; flex-shrink: 0; padding-top: 2px; }
.contact-detail .v { font-weight: 600; color: var(--navy-900); }
.form-note { font-size: 0.78rem; color: var(--ink-soft); margin-top: 10px; }
#form-status { font-size: 0.85rem; font-weight: 600; padding: 10px 14px; border-radius: 3px; border: 1px solid transparent; }
#form-status.form-status-ok { color: #1e6b45; background: #e5f0e9; border-color: #bfe0cc; }
#form-status.form-status-error { color: #a13d2e; background: #f6e6e2; border-color: #e8c3b8; }

/* ---------- Page hero (secondary pages) ---------- */
.page-hero { padding: calc(var(--header-h) + 68px) 0 56px; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
.page-hero .lede { max-width: 68ch; }
.breadcrumb { font-family: var(--font-mono); font-size: 0.75rem; color: var(--gold-400); margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.05em; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.badge { font-family: var(--font-mono); font-size: 0.72rem; padding: 6px 12px; border: 1px solid var(--line); border-radius: 20px; color: var(--navy-800); }
.section-dark .badge, .hero .badge { border-color: rgba(255,255,255,0.3); color: rgba(247,247,244,0.9); }

.cta-band { background: var(--navy-900); color: var(--white); padding: 64px 0; text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band .lede { margin: 0 auto 26px; color: rgba(247,247,244,0.75); }

.divider { height: 1px; background: var(--line); margin: 60px 0; }

/* ==========================================================================
   Responsive refinements
   The layout grids above handle the coarse breakpoints. This layer covers
   what they don't: long unbreakable strings, oversized type and controls on
   small phones, touch-target sizing, and landscape/motion preferences.
   ========================================================================== */

/* Stop iOS inflating text when the phone is rotated to landscape. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Long emails, URLs and compound terms must not push the page sideways. */
h1, h2, h3, h4, p, li, .tl-content, .card, .proj-card { overflow-wrap: break-word; }
.contact-detail .v, .footer-grid a { overflow-wrap: anywhere; }

/* .btn-outline is navy-on-navy when placed on a dark band; give it the
   light treatment there (visible once buttons stack full-width on phones). */
.hero .btn-outline, .section-dark .btn-outline, .cta-band .btn-outline {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}
.hero .btn-outline:hover, .section-dark .btn-outline:hover, .cta-band .btn-outline:hover {
  background: transparent;
  border-color: var(--gold-400);
  color: var(--gold-400);
}

/* Media never exceeds its column, whatever intrinsic size it carries. */
img, svg, video, iframe { max-width: 100%; height: auto; }

/* ---------- Inline nav, tight range ---------- */
@media (min-width: 1181px) and (max-width: 1340px) {
  .main-nav a { padding: 10px 9px; font-size: 0.82rem; }
  .nav-cta { padding: 10px 14px; margin-left: 4px; }
  .brand img { height: 40px; }
}

/* ---------- Tablet / small laptop ---------- */
@media (max-width: 1180px) {
  /* Drawer links are the primary nav at this size: give them real targets
     and stop the sticky header scrolling away under them. */
  .main-nav a { min-height: 44px; display: flex; align-items: center; }
  .main-nav .nav-cta { justify-content: center; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; line-height: 1; }
  .drop-panel a { min-height: 40px; }
}

/* ---------- Tablet portrait ---------- */
@media (max-width: 860px) {
  .hero { padding: calc(var(--header-h) + 72px) 0 64px; }
  .page-hero { padding: calc(var(--header-h) + 52px) 0 44px; }
  .card { padding: 26px; }
  .proj-card { padding: 24px; }
}

/* ---------- Phone ---------- */
@media (max-width: 620px) {
  :root { --header-h: 64px; }
  .brand img { height: 36px; }

  section { padding: 56px 0; }
  .hero { padding: calc(var(--header-h) + 56px) 0 52px; }
  .cta-band { padding: 48px 0; }
  .site-footer { padding: 48px 0 24px; }
  .divider { margin: 44px 0; }

  /* Headlines: the clamp floor is still too large below ~400px. */
  h1 { font-size: clamp(1.85rem, 8vw, 2.4rem); }
  h2 { font-size: clamp(1.5rem, 6vw, 1.9rem); }

  /* CTA labels here run to ~36 characters — as inline-flex buttons they
     overflow a 320px screen, so let them fill the column and wrap. */
  .hero-actions, .cta-band .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .btn {
    justify-content: center;
    text-align: center;
    padding: 14px 20px;
    white-space: normal;
  }

  /* A 110px fixed label column leaves too little room for the email. */
  .contact-detail { flex-direction: column; gap: 4px; }
  .contact-detail .k { width: auto; }

  .card { padding: 22px; }
  .proj-card { padding: 22px; }
  .stat-tile { padding: 22px 18px; }
  .hero-stat { padding: 18px 16px; }
  .tl-content { padding: 20px; }

  .numbered-list .row { grid-template-columns: 34px 1fr; gap: 12px; }
  .pull-quote { padding-left: 18px; margin: 24px 0; }
  .footer-bottom { justify-content: flex-start; }

  /* The decorative hero glow is sized for desktop; keep it off the edges. */
  .hero::after { width: 320px; height: 320px; }
}

/* ---------- Narrow phone ---------- */
@media (max-width: 400px) {
  /* Two stat columns leave ~120px each — too tight for these labels. */
  .hero-stats { grid-template-columns: 1fr; }
  .flow { font-size: 0.78rem; gap: 8px; }
  .badge { font-size: 0.68rem; padding: 5px 10px; }
}

/* ---------- Short landscape (phones held sideways) ---------- */
@media (max-width: 1180px) and (max-height: 460px) and (orientation: landscape) {
  /* The drawer is taller than the viewport here, so it must scroll. */
  .main-nav { padding-bottom: 24px; }
  .hero { padding: calc(var(--header-h) + 48px) 0 48px; }
}

/* ---------- Editorial motion system ---------- */

/* Scroll reveal: elements fade + slide up once, the moment they enter view.
   [data-reveal-i] carries a per-container sibling index (set by main.js) so
   grouped items — cards, stats, list rows — cascade in rather than popping
   together. Opacity/transform only: compositor-only, no repaint cost. */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-cinematic), transform 0.5s var(--ease-cinematic);
  transition-delay: calc(var(--reveal-i, 0) * 70ms);
  will-change: opacity, transform;
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Page transition: fade the whole document in on load, and out just before
   an internal link navigates. Opacity-only: a transform here (even
   translateY(0)) would create a containing block on body, which breaks
   .site-header's position:fixed (it would fix to body, not the viewport,
   and scroll away). */
html.is-animated body {
  opacity: 0;
  transition: opacity 0.3s var(--ease-cinematic);
}
html.is-animated body.page-ready { opacity: 1; }
html.is-animated body.page-leaving { opacity: 0; }

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .gallery-item:hover img { transform: none; }
  .card:hover, .stat-tile:hover, .proj-card:hover { transform: none; }
  [data-reveal] { transform: none; }
  html.is-animated body,
  html.is-animated body.page-leaving { opacity: 1; }
}
