/* Aadi Capital · "Warm Masonry"
   Editorial, gallery-like layout on warm paper. One accent: brick. */

:root {
  --paper: #f5f0e6;
  --paper-2: #ede5d6;
  --paper-3: #e4d9c6;
  --ink: #1c1917;
  --ink-2: #44403c;
  --muted: #78716c;
  --faint: #a29a90;
  --hair: rgba(28, 25, 23, .14);
  --brick: #a24f2d;
  --clay: #c27a52;
  --sand: #d9c7a7;
  --stone: #b2a696;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gut: clamp(16px, 2.2vw, 32px);
  --max: 1440px;
  --sec: clamp(96px, 13vw, 200px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 15px/1.55 var(--sans); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* paper grain: a whisper of texture so the cream never reads as flat #fff-ish */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 1.5px solid var(--brick); outline-offset: 3px; }
em { font-style: italic; }

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

/* Typographic primitives */
.label {
  font: 500 .68rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0;
}
.h2 {
  font: 400 clamp(2.1rem, 3.6vw, 3.4rem)/1.02 var(--serif); letter-spacing: -.015em; margin: .9rem 0 0; color: var(--ink);
}
.h2 em, .statement em, h1 em { color: var(--brick); }
.lede { font-size: 1.02rem; line-height: 1.65; color: var(--ink-2); max-width: 46ch; margin: 1.4rem 0 0; }
.fine { font-size: .74rem; color: var(--faint); margin: 1.2rem 0 0; max-width: 60ch; line-height: 1.55; }
.cap { font: 400 .78rem var(--mono); color: var(--muted); }

/* Floating header panel (nods to an index card) */
.panel {
  position: fixed; top: 14px; left: 14px; z-index: 50;
  display: grid; grid-template-columns: auto auto; align-items: stretch;
  background: rgba(245, 240, 230, .82); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--hair); border-radius: 2px;
  transition: box-shadow .4s var(--ease);
}
.panel.scrolled { box-shadow: 0 10px 30px -18px rgba(28, 25, 23, .35); }
.brand { display: flex; gap: 12px; align-items: center; padding: 12px 18px 12px 14px; border-right: 1px solid var(--hair); }
.mark { width: 34px; color: var(--ink); display: block; }
.mark svg, .foot-mark svg { width: 100%; height: auto; display: block; }
.brand-txt { font: 500 .8rem/1.1 var(--sans); letter-spacing: .01em; }
.brand-txt small { display: block; font: 400 .62rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav { display: grid; grid-template-columns: auto auto; gap: 2px 22px; padding: 10px 18px; align-content: center; }
.nav a { font-size: .76rem; color: var(--ink-2); position: relative; width: max-content; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

/* Hero */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; background: #b9ada0; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%;
  transform: scale(1.04); animation: settle 2.4s var(--ease) forwards; }
@keyframes settle { to { transform: scale(1); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(40, 32, 26, .22), rgba(40, 32, 26, 0) 55%); pointer-events: none; }
.hero-copy { position: absolute; left: var(--gut); bottom: clamp(56px, 11vh, 120px); z-index: 2; max-width: 820px; color: #fbf7ef; }
.hero-copy .label { color: rgba(251, 247, 239, .78); }
h1 { font: 400 clamp(3.4rem, 9.4vw, 9.6rem)/.9 var(--serif); letter-spacing: -.03em; margin: 1.2rem 0 0; }
h1 span { display: inline-block; }
h1 em { color: #f1d9c3; }
.hero-sub { font-size: clamp(1rem, 1.25vw, 1.15rem); line-height: 1.55; max-width: 40ch; margin: 1.6rem 0 0; color: rgba(251, 247, 239, .9); }
.hero-foot { position: absolute; right: var(--gut); bottom: 22px; color: rgba(251, 247, 239, .7); z-index: 2; }

/* 01 Stance */
.stance { display: grid; grid-template-columns: 1fr 3fr; gap: var(--gut); padding-top: var(--sec); padding-bottom: calc(var(--sec) * .6); }
.idx { padding-top: .55rem; }
.statement { font: 400 clamp(2rem, 3.9vw, 3.9rem)/1.06 var(--serif); letter-spacing: -.018em; margin: 0; max-width: 22ch; text-wrap: balance; }
.tenets { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gut); margin: clamp(56px, 7vw, 100px) 0 0; }
.tenets div { border-top: 1px solid var(--ink); padding-top: 16px; }
.tenets dt { font-weight: 500; font-size: .95rem; margin-bottom: 8px; }
.tenets dd { margin: 0; color: var(--ink-2); font-size: .9rem; line-height: 1.6; max-width: 36ch; }

/* 02 Mechanics: asymmetric editorial set */
.mechanics { padding: calc(var(--sec) * .5) 0 var(--sec); }
.mech-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); row-gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.mech-index { grid-column: 1 / span 3; position: sticky; top: 120px; }
.mech-list { list-style: none; padding: 0; margin: 2rem 0 0; font-size: .92rem; }
.mech-list li { padding: 9px 0; border-top: 1px solid var(--hair); color: var(--ink-2); }
.mech-list li:last-child { border-bottom: 1px solid var(--hair); }
.mech-list b { font: 500 .8rem var(--mono); color: var(--brick); margin-right: 8px; }
.note { font-size: .82rem; color: var(--muted); margin: 1.2rem 0 0; max-width: 28ch; }
.mech { margin: 0; position: relative; }
.mech .cap { position: absolute; left: -2.6em; top: 0; }
.mech figcaption { margin-top: 18px; max-width: 42ch; }
.mech h3, .nots h3, .rules h3, .card h3 { font: 400 1.55rem/1.1 var(--serif); letter-spacing: -.01em; margin: 0 0 8px; }
.mech p { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.62; }
.mech-a { grid-column: 5 / span 4; }
.mech-b { grid-column: 10 / span 3; margin-top: 34%; }
.mech-c { grid-column: 6 / span 5; }
.mech img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper-3); }

/* 03 Wall */
.wall-sec { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); align-items: end;
  padding-top: var(--sec); padding-bottom: var(--sec); border-top: 1px solid var(--hair); }
.dials { display: grid; gap: 22px; margin-top: 2.4rem; max-width: 440px; }
.dial-top { display: flex; justify-content: space-between; font-size: .82rem; color: var(--ink-2); margin-bottom: 10px; }
.dial output { font: 500 .85rem var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 1px; background: var(--ink); }
input[type=range]::-moz-range-track { height: 1px; background: var(--ink); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 11px; margin-top: -5px; background: var(--brick); border: 0; border-radius: 1px; box-shadow: 0 1px 0 rgba(0,0,0,.2); }
input[type=range]::-moz-range-thumb { width: 22px; height: 11px; background: var(--brick); border: 0; border-radius: 1px; }
.readout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gut); margin-top: 2.4rem; max-width: 440px; }
.readout > div { border-top: 1px solid var(--ink); padding-top: 12px; }
.readout .num { display: block; font: 400 clamp(2.6rem, 4vw, 3.6rem)/1 var(--serif); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.wall-fig { margin: 0; }
#wall { width: 100%; height: auto; display: block; overflow: visible; }
#wall .b { transition: opacity .5s var(--ease), transform .6s var(--ease); }
#wall .b.in { opacity: 0; transform: translateY(-14px); }
#wall .tick { font: 400 10px var(--mono); fill: var(--muted); letter-spacing: .04em; transition: opacity .4s var(--ease); }
#wall .tick-line { stroke: var(--hair); stroke-width: 1; }
.legend { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px; font: 400 .7rem var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 18px; height: 8px; display: inline-block; border-radius: 1px; }
.sw-base { background: var(--ink); } .sw-early { background: var(--brick); } .sw-late { background: var(--sand); }

/* 04 Durable (full-bleed) */
.durable { position: relative; min-height: 88svh; overflow: hidden; display: grid; align-items: end; background: #d59a73; }
.durable img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 60%; }
.durable-copy { position: relative; z-index: 2; margin: 0 auto clamp(56px, 10vh, 110px) var(--gut); width: min(560px, calc(100% - 2 * var(--gut))); color: #2a1d15; }
.durable-copy .label { color: rgba(42, 29, 21, .7); }
.quote { font: 400 clamp(2.4rem, 4.6vw, 4.4rem)/1 var(--serif); letter-spacing: -.02em; margin: 1rem 0 1.4rem; text-wrap: balance; }
.durable-copy p:last-child { font-size: 1rem; line-height: 1.65; max-width: 44ch; margin: 0; color: #3b2a20; }

/* 05 Discipline */
.discipline { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); padding-top: var(--sec); padding-bottom: calc(var(--sec) * .7); align-items: start; }
.disc-img { grid-column: 1 / span 4; margin: 0; position: relative; }
.disc-img .cap { display: block; margin-bottom: 8px; }
.disc-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.disc-copy { grid-column: 6 / span 7; padding-top: clamp(0px, 8vw, 140px); }
.nots, .rules { list-style: none; padding: 0; margin: 2.6rem 0 0; }
.nots li, .rules li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 22px 0; border-top: 1px solid var(--hair); }
.nots li:last-child, .rules li:last-child { border-bottom: 1px solid var(--hair); }
.n { font: 400 .8rem var(--mono); color: var(--brick); padding-top: .45rem; }
.nots p, .rules p { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.62; max-width: 52ch; }
.nots h3 { text-decoration: line-through; text-decoration-color: var(--brick); text-decoration-thickness: 1px; }

/* 06 Underwrite */
.underwrite { background: var(--paper-2); padding: var(--sec) 0; }
.uw-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gut); align-items: start; }
.uw-head { grid-column: 1 / span 5; position: sticky; top: 120px; }
.uw-img { margin: 2.6rem 0 0; max-width: 360px; }
.uw-img img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.rules { grid-column: 7 / span 6; margin-top: 0; }

/* 07 Research */
.research { padding-top: var(--sec); padding-bottom: var(--sec); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); align-items: end; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gut); }
.card { display: grid; grid-template-rows: auto 1fr auto auto auto; gap: 14px; min-height: 300px; padding: 22px; background: #fbf8f2; border: 1px solid var(--hair);
  transition: transform .5s var(--ease), background .5s var(--ease), box-shadow .5s var(--ease); }
.card h3 { font-size: 2.2rem; margin: 0; grid-row: 3; }
.card p { grid-row: 4; min-height: 4.8em; }
.card .go { grid-row: 5; }
.card p { margin: 0; color: var(--ink-2); font-size: .9rem; line-height: 1.6; }
.card .go { font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--brick); }
.card:hover { transform: translateY(-4px); background: #fffdf8; box-shadow: 0 24px 40px -30px rgba(90, 50, 25, .45); }
.research .fine { grid-column: 1 / -1; }

/* Footer */
.foot { background: var(--ink); color: #e9e2d5; padding: clamp(72px, 9vw, 130px) 0 28px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gut) clamp(32px, 5vw, 96px); }
.foot-mark { width: min(340px, 70%); color: #efe7d9; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gut); align-self: end; }
.foot .label { color: #a8a095; margin-bottom: 14px; }
.foot-line { font: 400 1.6rem/1.15 var(--serif); margin: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; font-size: .86rem; line-height: 1.9; }
.foot a:hover { color: #fff; }
.disclaimer { grid-column: 1 / -1; font-size: .74rem; line-height: 1.65; color: #a8a095; max-width: 110ch; margin: 48px 0 0; padding-top: 22px; border-top: 1px solid rgba(233, 226, 213, .16); }
.colophon { grid-column: 1 / -1; font: 400 .68rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #8a8278; margin: 8px 0 0; }

/* Reveal on scroll (only when JS is running, so no-JS readers see everything) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.on { opacity: 1; transform: none; }
.js .hero .reveal { transition-duration: 1.2s; }
.js .hero .reveal:nth-child(2) { transition-delay: .15s; }
.js .hero .reveal:nth-child(3) { transition-delay: .35s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero img { animation: none; transform: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  #wall .b { transition: none; }
}

/* Tablet */
@media (max-width: 1024px) {
  .stance { grid-template-columns: 1fr; }
  .tenets { grid-template-columns: 1fr; gap: 28px; }
  .mech-index { grid-column: 1 / -1; position: static; }
  .mech-a { grid-column: 1 / span 6; }
  .mech-b { grid-column: 8 / span 5; margin-top: 30%; }
  .mech-c { grid-column: 3 / span 8; }
  .mech .cap { position: static; display: block; margin-bottom: 8px; }
  .wall-sec, .research, .foot-grid { grid-template-columns: 1fr; }
  .disc-img { grid-column: 1 / span 5; }
  .disc-copy { grid-column: 7 / span 6; padding-top: 0; }
  .uw-head { grid-column: 1 / -1; position: static; }
  .uw-img { display: none; }
  .rules { grid-column: 1 / -1; margin-top: 2.4rem; }
}

/* Phone */
@media (max-width: 680px) {
  .panel { left: 10px; right: 10px; top: 10px; grid-template-columns: 1fr; }
  .brand { border-right: 0; }
  .nav { display: none; }
  .hero { min-height: 560px; }
  .hero img { object-position: 78% 50%; }
  .hero::after { background: linear-gradient(0deg, rgba(40, 32, 26, .55), rgba(40, 32, 26, 0) 60%); }
  .mech-a, .mech-b, .mech-c { grid-column: 1 / -1; margin-top: 0; }
  .disc-img, .disc-copy { grid-column: 1 / -1; }
  .disc-copy { margin-top: 48px; }
  .nots li, .rules li { grid-template-columns: 44px 1fr; }
  .durable { min-height: 0; display: block; }
  .durable img { position: static; aspect-ratio: 4 / 3; object-position: 30% 50%; }
  .durable-copy { margin: 0; width: auto; padding: 40px var(--gut) 56px; background: #d8a17b; }
  .cards, .foot-cols { grid-template-columns: 1fr; }
  .card { min-height: 220px; }
}
