/* ============================================================
   DOMOBUILT — site layout & components
   Editorial grid system in the Moolala idiom: paper surface,
   charcoal ink, hairline borders, single goldenrod accent,
   deep-navy dark colorway. Type roles come from
   colors_and_type.css; this file owns layout + components.
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: clamp(24px, 5vw, 64px);
  padding-right: clamp(24px, 5vw, 64px);
}
.section { padding-block: clamp(72px, 9vw, 128px); }
.section--tight { padding-block: clamp(56px, 6vw, 88px); }
.hairline-top { border-top: 1px solid var(--hairline); }

/* ---------- Eyebrow w/ accent tick ---------- */
.eyebrow-row { display: flex; align-items: center; gap: 12px; }
.eyebrow-tick { display: none; }
.eyebrow {
  font-family: var(--font-sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap;
}

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 15px 28px; border-radius: var(--r-md);
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
  text-decoration: none; transition: background var(--dur-fast) var(--ease-quiet),
    color var(--dur-fast) var(--ease-quiet), border-color var(--dur-fast) var(--ease-quiet);
}
.btn-dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-dark:hover { background: var(--moolala-ink-soft); }
.btn-accent { background: var(--accent-on-dark); color: var(--domo-dark); border-color: var(--accent-on-dark); }
.btn-accent:hover { filter: brightness(1.06); }
.btn-outline-light { background: transparent; color: var(--on-dark); border-color: var(--domo-dark-line); }
.btn-outline-light:hover { border-color: var(--on-dark); }

.link-underline {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink);
  text-decoration: none; padding-bottom: 3px; white-space: nowrap;
  border-bottom: 1px solid var(--ink); width: fit-content;
  transition: gap var(--dur-fast) var(--ease-quiet);
}
.link-underline:hover { gap: 14px; }
.link-underline .arr { transition: transform var(--dur-fast) var(--ease-quiet); }
.link-underline:hover .arr { transform: translateX(3px); }
.link-underline.on-dark { color: var(--on-dark); border-color: var(--accent-on-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.wordmark {
  font-family: 'Archivo', sans-serif; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.32em; word-spacing: 0.18em;
  color: var(--ink); text-decoration: none; line-height: 1; white-space: nowrap;
}
.wordmark--header { font-size: 16px; }
.wordmark .wm-1 { font-weight: 700; }
.wordmark .wm-2 { font-weight: 700; }
.wordmark--header .logo-img { display: block; height: 30px; width: auto; }
.nav { display: flex; gap: clamp(20px, 3vw, 44px); align-items: center; }
.nav a {
  font-family: var(--font-sans); font-size: 12px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted);
  text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease-quiet);
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Hero (shared) ---------- */
.hero-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(32px, 4.4vw, 56px); line-height: 1.02;
  letter-spacing: -0.01em; color: var(--ink); margin: 0;
  text-wrap: balance;
}
.hero-statement .hero-title { font-size: clamp(44px, 6.4vw, 104px); }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-detail {
  font-family: var(--font-sans); font-weight: 500; font-size: 12px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--on-dark-muted); margin: 0;
}
.hero-support {
  font-family: var(--font-sans); font-size: var(--fs-lg); line-height: 1.6;
  color: var(--on-dark-muted); margin: 0; max-width: 46ch;
}
.hero-cta { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* Direction A — split */
.hero-split .grid {
  display: grid; grid-template-columns: 1.06fr 0.94fr; min-height: min(86vh, 800px);
}
.hero-split .left {
  display: flex; flex-direction: column; gap: 28px; justify-content: center;
  padding: clamp(56px, 7vw, 104px) clamp(24px, 5vw, 64px);
  background: var(--domo-dark); color: var(--on-dark);
}
.hero-split .left .eyebrow { color: var(--on-dark-muted); }
.hero-split .left .hero-title { color: var(--on-dark); }
.hero-split .right { position: relative; background: var(--bg-alt); }
.hero-split .right img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Direction B — statement */
.hero-statement { background: var(--domo-dark); color: var(--on-dark); }
.hero-statement .eyebrow { color: var(--on-dark-muted); }
.hero-statement .hero-title { color: var(--on-dark); }
.hero-statement .inner {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 26px; padding-block: clamp(72px, 9vw, 128px) clamp(48px, 6vw, 80px);
}
.hero-statement .hero-title { max-width: 16ch; }
.hero-statement .hero-support { max-width: 56ch; }
.hero-statement .hero-cta { justify-content: center; }
.hero-band { width: 100%; border-top: 1px solid var(--domo-dark-line); }
.hero-band img { display: block; width: 100%; height: clamp(280px, 42vw, 560px); object-fit: cover; }

/* ---------- What we build (cards) ---------- */
.build-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-bottom: clamp(36px, 4vw, 56px); flex-wrap: wrap;
}
.cards { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.card {
  display: flex; flex-direction: column; gap: 16px;
  padding: clamp(28px, 2.4vw, 40px) clamp(24px, 2vw, 34px) clamp(28px, 2.4vw, 36px);
  border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  min-height: 320px; background: var(--bg);
  transition: background var(--dur-base) var(--ease-quiet);
}
.cards .card:last-child { border-right: 1px solid var(--hairline); }
.card:hover { background: var(--surface); }
.card .num {
  font-family: var(--font-serif); font-size: 14px; font-weight: 500; color: var(--accent);
}
.card .cat {
  font-family: var(--font-sans); font-size: 10px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-muted);
}
.card h3 {
  font-family: var(--font-serif); font-weight: 400; font-size: clamp(28px, 2.4vw, 36px);
  line-height: 1.02; letter-spacing: -0.01em; color: var(--ink); margin: 4px 0 0;
}
.card p { font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1.6; color: var(--ink-muted); margin: 0; }
.card .foot { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--hairline); }

/* ---------- Born from experience ---------- */
.story-grid {
  display: grid; grid-template-columns: 0.82fr 1.18fr; gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.story-head { display: flex; flex-direction: column; gap: 14px; }
.story-head img.story-photo { display: block; width: 100%; max-width: 210px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; margin-top: 10px; }
.story-head .story-sig {
  font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-muted); margin-top: 4px;
}
.story-body { display: flex; flex-direction: column; gap: 22px; max-width: 60ch; }
.story-head h2,
.story-body h2 {
  font-family: var(--font-serif); font-weight: 400; font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.04; letter-spacing: -0.01em; color: var(--ink); margin: 8px 0 8px;
}
.story-body p { font-family: var(--font-sans); font-size: 16px; line-height: 1.7; color: var(--ink); margin: 0; }
.story-body p.muted { color: var(--ink-muted); }
.story-body p.italic { font-family: var(--font-serif); font-style: normal; font-size: 19px; color: var(--ink); }

/* Story — navy variant */
.story-dark { background: var(--domo-dark); color: var(--on-dark); border-top-color: var(--domo-dark-line); }
.story-dark .eyebrow { color: var(--on-dark-muted); }
.story-dark .eyebrow-tick { background: var(--accent-on-dark); }
.story-dark .story-head h2,
.story-dark .story-body p,
.story-dark .story-body p.italic { color: var(--on-dark); }
.story-dark .story-sig,
.story-dark .story-body p.muted { color: #C7CED6; }

/* ---------- Featured projects ---------- */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 80px);
  align-items: center; padding-block: clamp(44px, 5vw, 72px);
  border-top: 1px solid var(--hairline);
}
.feature-row .media img { display: block; width: 100%; aspect-ratio: 27 / 10; object-fit: cover; }
.feature-row.flip .media { order: 2; }
.feature-row .copy { display: flex; flex-direction: column; gap: 18px; }
.feature-row .copy h3 {
  font-family: var(--font-serif); font-weight: 400; font-size: clamp(34px, 4vw, 52px);
  line-height: 1.0; letter-spacing: -0.01em; color: var(--ink); margin: 6px 0 0;
}
.feature-row .copy p { font-family: var(--font-sans); font-size: 16px; line-height: 1.65; color: var(--ink-muted); margin: 0; max-width: 42ch; }

/* ---------- Dark block (closing + footer) ---------- */
.dark-block { background: var(--domo-dark); color: var(--on-dark); }
.closing { text-align: left; padding-block: clamp(80px, 10vw, 144px); }
.closing .eyebrow { color: var(--on-dark-muted); }
.closing-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(32px, 5vw, 72px); align-items: end; }
.closing h2 {
  font-family: var(--font-serif); font-weight: 400; font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.0; letter-spacing: -0.015em; color: var(--on-dark); margin: 18px 0 0;
}
.closing h2 em { font-style: normal; color: var(--accent-on-dark); }
.closing p { font-family: var(--font-sans); font-size: var(--fs-lg); line-height: 1.6; color: var(--on-dark-muted); margin: 0 0 28px; max-width: 40ch; }

.site-footer { border-top: 1px solid var(--domo-dark-line); padding-block: clamp(56px, 6vw, 80px) 36px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: clamp(32px, 4vw, 56px);
  padding-bottom: 52px; border-bottom: 1px solid var(--domo-dark-line);
}
.footer-brand .wordmark { color: var(--on-dark); font-size: 19px; }
.footer-brand .wordmark .logo-img { display: block; height: 38px; width: auto; }
.footer-brand .tag { font-family: var(--font-serif); font-style: normal; font-size: 15px; color: var(--on-dark-muted); margin-top: 12px; max-width: 30ch; line-height: 1.5; }
.footer-col .eyebrow { color: var(--accent-on-dark); margin-bottom: 16px; display: block; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-family: var(--font-sans); font-size: 14px; color: var(--on-dark); text-decoration: none; transition: color var(--dur-fast) var(--ease-quiet); }
.footer-col a:hover { color: var(--on-dark-muted); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; flex-wrap: wrap; gap: 16px; }
.footer-bottom .copy { font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-dark-muted); }
.footer-bottom .socials { display: flex; gap: 28px; }
.footer-bottom .socials a { font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-dark); text-decoration: none; }
.footer-bottom .socials a:hover { color: var(--on-dark-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-split .grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-split .left { padding-block: clamp(48px, 7vw, 88px); }
  .hero-split .right { min-height: 360px; }
}
@media (max-width: 640px) {
  .hero-split .left { gap: 18px; }
  .hero-statement .inner { gap: 16px; }
  .hero-support { font-size: var(--fs-body); line-height: 1.5; max-width: 34ch; }
  .hero-detail { font-size: 11px; letter-spacing: 0.18em; }
}
@media (max-width: 1180px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .cards { grid-template-columns: 1fr; }
  .card { border-right: 1px solid var(--hairline) !important; }
  .story-grid { grid-template-columns: 1fr; gap: 24px; }
  .feature-row { grid-template-columns: 1fr; gap: 24px; }
  .feature-row.flip .media { order: 0; }
  .closing-grid { grid-template-columns: 1fr; gap: 28px; align-items: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .nav { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
