/* ============================================================
   Indus Development Group — "Strata" design system
   Editorial, warm, type-led. Award-tier register (Clay / Apollo).
   Serif display (Fraunces) on warm ivory; terracotta + teal,
   drawn from the land and the river of the Indus corridor.
   ============================================================ */

:root {
  /* light / warm paper */
  --paper: #f7f4ec;
  --paper-2: #f0ebe0;
  --ink: #1b1712;
  --muted: #6d655a;
  --hairline: #e2dbcd;
  /* dark / espresso */
  --coal: #17120e;
  --coal-2: #1e1811;
  --coal-ink: #f4eee3;
  --muted-dark: #a79d8d;
  --hairline-dark: #33291f;
  /* signature */
  --accent: #a8421c;          /* terracotta — land / brick / energy, on light */
  --accent-bright: #e08a52;   /* on dark */
  --accent-2: #0f5b57;        /* teal — the river, on light */
  --accent-2-bright: #4bb3a6; /* on dark */

  --font-display: "Fraunces", "Georgia", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1300px;
  --pad: clamp(20px, 4.5vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible, .dark :focus-visible, .site-footer :focus-visible { outline-color: var(--accent-bright); }

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

/* ---------- typography ---------- */

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.02;
}

.display-xl { font-size: clamp(2.9rem, 8.4vw, 7rem); font-weight: 500; letter-spacing: -0.028em; }
.display-l  { font-size: clamp(2.1rem, 5vw, 4.3rem); letter-spacing: -0.022em; line-height: 1.03; }
.display-m  { font-size: clamp(1.7rem, 3.2vw, 2.9rem); letter-spacing: -0.018em; line-height: 1.06; }
.display-s  { font-size: clamp(1.25rem, 1.9vw, 1.6rem); letter-spacing: -0.01em; line-height: 1.2; font-weight: 500; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.6rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.55; }
.dark .eyebrow, .on-dark .eyebrow { color: var(--accent-bright); }

.lede {
  font-size: clamp(1.08rem, 1.5vw, 1.34rem);
  line-height: 1.58;
  color: var(--muted);
  max-width: 40em;
}
.dark .lede { color: var(--muted-dark); }

.num {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.dark .num { color: var(--accent-bright); }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(247, 244, 236, 0.85);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease);
}
.site-header.on-dark {
  background: rgba(23, 18, 14, 0.78);
  background: color-mix(in srgb, var(--coal) 72%, transparent);
  border-bottom-color: var(--hairline-dark);
  color: var(--coal-ink);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }

.wordmark { display: flex; align-items: center; gap: 12px; font-family: var(--font-body); }
.wordmark .glyph { flex: none; display: block; color: var(--accent); transition: transform 0.4s var(--ease); }
.wordmark:hover .glyph { transform: translateY(-1px); }
.on-dark .wordmark .glyph { color: var(--accent-bright); }
.wordmark .mark { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.wordmark .full {
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.on-dark .wordmark .full { color: var(--muted-dark); }

.site-nav { display: flex; gap: clamp(18px, 2.6vw, 42px); align-items: center; }
.site-nav a { font-size: 0.93rem; font-weight: 500; position: relative; padding: 4px 0; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1.5px; background: var(--accent); transition: right 0.3s var(--ease);
}
.on-dark .site-nav a::after { background: var(--accent-bright); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }
.nav-toggle { display: none; }

/* ---------- sections ---------- */

section { padding: clamp(78px, 11vw, 168px) 0; }
.dark { background: var(--coal); color: var(--coal-ink); }

.hero {
  min-height: 94vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 168px;
  padding-bottom: clamp(64px, 8vw, 120px);
}
.hero h1 { max-width: 13em; }
.hero .lede { margin-top: 2.1rem; }
.hero-meta {
  display: flex; gap: clamp(24px, 4vw, 68px);
  margin-top: clamp(44px, 5.5vw, 80px); padding-top: 30px;
  border-top: 1px solid var(--hairline-dark); flex-wrap: wrap;
}
.hero-meta div span {
  display: block; font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-dark); margin-bottom: 8px;
}
.hero-meta div strong { font-family: var(--font-display); font-weight: 500; font-size: 1.12rem; letter-spacing: -0.01em; }

.section-head { max-width: 22em; margin-bottom: clamp(44px, 5vw, 80px); }
.section-head.reveal, .section-head { max-width: 62em; }
.section-head .lede { margin-top: 1.5rem; }

/* ---------- grids & cards ---------- */

.grid { display: grid; gap: clamp(28px, 3vw, 52px); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card { border-top: 1px solid var(--hairline); padding-top: 28px; position: relative; }
.card::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 0; height: 2px;
  background: var(--accent); transition: width 0.45s var(--ease);
}
.card:hover::before { width: 54px; }
.dark .card { border-top-color: var(--hairline-dark); }
.dark .card::before { background: var(--accent-bright); }
.card .num { display: block; margin-bottom: 2.4rem; }
.card h3 { margin-bottom: 0.85rem; }
.card p { color: var(--muted); font-size: 1rem; }
.dark .card p { color: var(--muted-dark); }
.card .fail { margin-top: 1.15rem; font-size: 0.9rem; color: var(--accent); font-weight: 500; }
.dark .card .fail { color: var(--accent-bright); }

/* split — sticky label left, content right */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
.split .sticky { position: sticky; top: 118px; }

/* step list */
.steps { display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: 96px minmax(0, 260px) 1fr;
  gap: clamp(16px, 3vw, 52px); padding: clamp(30px, 3.6vw, 48px) 0;
  border-top: 1px solid var(--hairline); align-items: baseline;
  transition: background 0.4s var(--ease);
}
.step:last-child { border-bottom: 1px solid var(--hairline); }
.dark .step, .dark .step:last-child { border-color: var(--hairline-dark); }
.step h3 { font-size: clamp(1.35rem, 2vw, 1.85rem); font-weight: 500; }
.step p { color: var(--muted); max-width: 46em; }
.dark .step p { color: var(--muted-dark); }

/* statement band */
.statement blockquote {
  font-family: var(--font-display); font-weight: 400; font-style: italic;
  letter-spacing: -0.02em; line-height: 1.14;
  font-size: clamp(1.9rem, 3.9vw, 3.5rem); max-width: 20em;
}
.statement cite {
  display: block; font-style: normal; font-family: var(--font-body);
  font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin-top: 2.2rem;
}
.dark .statement cite { color: var(--muted-dark); }

/* project cards */
.project {
  border: 1px solid var(--hairline); border-radius: 4px;
  padding: clamp(30px, 3.5vw, 52px); display: flex; flex-direction: column;
  min-height: 400px; background: var(--paper);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.project:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 24px 50px -30px rgba(27, 23, 18, 0.4); }
.dark .project { border-color: var(--hairline-dark); background: var(--coal-2); }
.dark .project:hover { border-color: var(--accent-bright); box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.6); }
.project .tag {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: auto;
}
.project .tag::before { content: ""; width: 20px; height: 1px; background: currentColor; opacity: 0.55; }
.dark .project .tag { color: var(--accent-bright); }
.project h3 { margin-top: 3.4rem; margin-bottom: 1.1rem; }
.project p { color: var(--muted); font-size: 1rem; }
.dark .project p { color: var(--muted-dark); }
.project .status {
  margin-top: 2.2rem; padding-top: 1.3rem; border-top: 1px solid var(--hairline);
  font-size: 0.86rem; color: var(--muted);
}
.dark .project .status { border-top-color: var(--hairline-dark); color: var(--muted-dark); }

/* definition rows */
.rows { border-top: 1px solid var(--hairline); }
.dark .rows { border-top-color: var(--hairline-dark); }
.row {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(16px, 3vw, 52px); padding: 24px 0; border-bottom: 1px solid var(--hairline);
  transition: padding-left 0.35s var(--ease);
}
.row:hover { padding-left: 12px; }
.dark .row { border-bottom-color: var(--hairline-dark); }
.row dt { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; }
.row dd { color: var(--muted); font-size: 0.98rem; }
.dark .row dd { color: var(--muted-dark); }
.row .badge {
  display: inline-block; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600; color: var(--accent-2); margin-left: 10px;
}
.dark .row .badge { color: var(--accent-2-bright); }

/* arrows / links */
.arrow-link {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  color: var(--accent); margin-top: 2.4rem;
  border-bottom: 1.5px solid transparent; padding-bottom: 2px; transition: border-color 0.3s var(--ease);
}
.dark .arrow-link, .site-footer .arrow-link { color: var(--accent-bright); }
.arrow-link:hover { border-bottom-color: currentColor; }
.arrow-link .a { transition: transform 0.3s var(--ease); display: inline-block; }
.arrow-link:hover .a { transform: translateX(7px); }

.cta-row { display: flex; gap: 28px; flex-wrap: wrap; }

/* candor block */
.candor { border: 1px solid var(--hairline); border-radius: 4px; padding: clamp(28px, 3vw, 46px); background: var(--paper-2); }
.dark .candor { border-color: var(--hairline-dark); background: var(--coal-2); }
.candor h3 { margin-bottom: 1.1rem; }
.candor p { color: var(--muted); font-size: 0.97rem; max-width: 56em; }
.dark .candor p { color: var(--muted-dark); }
.candor p + p { margin-top: 0.85rem; }

/* ---------- atmospheric backdrops (warm; dark bands only) ---------- */
.hero, section.dark, .site-footer { position: relative; isolation: isolate; overflow: hidden; }
.hero > .wrap, section.dark > .wrap, .site-footer > .wrap { position: relative; z-index: 2; width: 100%; }

.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    url("/assets/vision.svg") center bottom / cover no-repeat,
    linear-gradient(178deg, #14100c 0%, #17120e 55%, #1b1610 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(20, 16, 12, 0.42) 0%, rgba(20, 16, 12, 0.04) 34%, rgba(20, 16, 12, 0.5) 76%, rgba(20, 16, 12, 0.92) 100%),
    radial-gradient(120% 82% at 15% 115%, rgba(224, 138, 82, 0.16), rgba(224, 138, 82, 0) 55%);
}
section.dark:not(.hero)::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(90% 120% at 88% 0%, rgba(224, 138, 82, 0.10), rgba(224, 138, 82, 0) 55%),
    radial-gradient(80% 110% at 4% 100%, rgba(75, 179, 166, 0.06), rgba(75, 179, 166, 0) 52%);
}
section.dark:not(.hero)::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: url("/assets/atmosphere.svg") center bottom / cover no-repeat;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0) 40%, #000 100%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,0) 40%, #000 100%);
}
.site-footer::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(70% 120% at 90% 0%, rgba(224, 138, 82, 0.08), rgba(224, 138, 82, 0) 55%);
}

/* ---------- footer ---------- */
.site-footer { background: var(--coal); color: var(--coal-ink); padding: clamp(72px, 8vw, 120px) 0 44px; }
.footer-top {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr);
  gap: clamp(32px, 4vw, 68px); padding-bottom: clamp(52px, 6vw, 88px);
}
.footer-top .display-m { max-width: 12em; }
.footer-mark { display: block; margin-bottom: 2rem; color: var(--accent-bright); }
.footer-col h4 {
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted-dark); margin-bottom: 1.3rem; font-weight: 600;
}
.footer-col li { margin-bottom: 0.65rem; }
.footer-col a { font-size: 0.95rem; color: var(--coal-ink); transition: color 0.25s var(--ease); }
.footer-col a:hover { color: var(--accent-bright); }
.footer-legal { border-top: 1px solid var(--hairline-dark); padding-top: 30px; display: grid; gap: 18px; }
.footer-legal .disclosure { font-size: 0.8rem; line-height: 1.65; color: var(--muted-dark); max-width: 76em; }
.footer-legal .fine { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted-dark); }

/* ---------- motion ---------- */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.grid .reveal:nth-child(2), .steps .reveal:nth-child(2), .rows .reveal:nth-child(2) { transition-delay: 0.07s; }
.grid .reveal:nth-child(3), .steps .reveal:nth-child(3), .rows .reveal:nth-child(3) { transition-delay: 0.14s; }
.grid .reveal:nth-child(4), .steps .reveal:nth-child(4), .rows .reveal:nth-child(4) { transition-delay: 0.21s; }
.rows .reveal:nth-child(5) { transition-delay: 0.28s; }
.rows .reveal:nth-child(6) { transition-delay: 0.35s; }

/* hero entrance */
.hero .eyebrow, .hero h1, .hero .lede, .hero-meta { opacity: 0; transform: translateY(22px); animation: rise 1s var(--ease) forwards; }
.hero h1 { animation-delay: 0.08s; }
.hero .lede { animation-delay: 0.18s; }
.hero-meta { animation-delay: 0.28s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .eyebrow, .hero h1, .hero .lede, .hero-meta { opacity: 1; transform: none; animation: none; }
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split .sticky { position: static; }
  .step { grid-template-columns: 60px 1fr; }
  .step p { grid-column: 2; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .footer-top { grid-template-columns: 1fr; }
  .hero { min-height: 82vh; }
  .display-xl { font-size: clamp(2.3rem, 11vw, 3.6rem); }
  .display-l { font-size: clamp(1.9rem, 8vw, 2.8rem); }

  .site-nav {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: flex-start;
    gap: 0; background: var(--coal); color: var(--coal-ink); padding: 8px var(--pad) 28px; display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 15px 0; font-size: 1.2rem; width: 100%; border-bottom: 1px solid var(--hairline-dark); }
  .nav-toggle {
    display: block; background: none; border: none; font: inherit;
    font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; cursor: pointer; color: inherit;
  }
}
