/* VAN flagship site, shared design system. 22 Nov 2026.
   Used by index.html (landing), research.html and tools.html.
   Palette from Tahir's brief: limestone, canal clay, deep loam, harvest amber, crop emerald. */

:root {
  --canvas: #F7F4EE;       /* sun-bleached cotton, warm limestone */
  --clay: #EBE4D8;         /* silt loam, canal clay */
  --deep: #171A16;         /* Indus deep loam */
  --ink: #171A16;
  --ink-soft: #4B5148;
  --amber: #C88A2E;        /* mustard bloom, harvest amber */
  --amber-deep: #855610;   /* amber dark enough for small text on limestone */
  --amber-lit: #E7B866;
  --emerald: #2D5A3C;      /* irrigated crop emerald */
  --emerald-lit: #7FB08A;
  --soil: #8A6B4A;
  --lime: #EDE6D3;
  --sulfur: #E6BE3C;
  --on-deep: #F7F4EE;
  --on-deep-soft: rgba(247, 244, 238, 0.74);
  --hair: rgba(23, 26, 22, 0.16);
  --hair-light: rgba(247, 244, 238, 0.2);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;
  --gutter: clamp(20px, 5vw, 72px);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
/* Scroll anchoring is off, because it fights the pinned sections on a jump scroll. */
html { -webkit-text-size-adjust: 100%; overflow-anchor: none; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.is-loading { overflow: hidden; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber-deep); outline-offset: 4px; border-radius: 4px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--deep); color: var(--canvas); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 16px; }

/* Paper grain */
.grain { position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>"); }

/* Preloader (landing page only) */
.preloader { position: fixed; inset: 0; z-index: 120; background: var(--deep); color: var(--on-deep); display: grid; place-items: end start; padding: var(--gutter); transition: transform 1.1s var(--ease), border-radius 1.1s var(--ease); will-change: transform; }
.preloader__inner { display: flex; width: 100%; justify-content: space-between; align-items: flex-end; }
.preloader__name { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-deep-soft); }
.preloader__count { font-family: var(--serif); font-size: clamp(64px, 12vw, 168px); line-height: 0.85; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.preloader.is-done { transform: translateY(-104%); border-radius: 0 0 50% 50% / 0 0 18% 18%; }
.calm .preloader { display: none; }

/* Cursor */
.cursor { display: none; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor input, .has-cursor select, .has-cursor label { cursor: none; }
.has-cursor .cursor { display: block; position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; }
.cursor__dot, .cursor__ring { position: fixed; left: 0; top: 0; border-radius: 999px; transform: translate(-50%, -50%); }
.cursor__dot { width: 6px; height: 6px; background: var(--amber); }
.cursor__ring { min-width: 38px; height: 38px; border: 1px solid var(--ink); display: grid; place-items: center; white-space: nowrap; transition: min-width 0.35s var(--ease), height 0.35s var(--ease), padding 0.35s var(--ease), background-color 0.35s, border-color 0.35s; }
.cursor__label { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--canvas); max-width: 0; overflow: hidden; opacity: 0; transition: opacity 0.2s, max-width 0.35s var(--ease); }
.cursor.is-active .cursor__ring { height: 46px; padding: 0 20px; background: var(--deep); border-color: var(--deep); }
.cursor.is-active .cursor__label { opacity: 1; max-width: 160px; }
.cursor.is-active .cursor__dot { opacity: 0; }
.cursor.on-deep .cursor__ring { border-color: var(--on-deep); }
.cursor.on-deep.is-active .cursor__ring { background: var(--amber-lit); border-color: var(--amber-lit); }
.cursor.on-deep.is-active .cursor__label { color: var(--deep); }

/* Nav: a floating frosted pill. It hides on the way down and over the dark footer. */
.nav { position: fixed; left: 0; right: 0; top: 0; z-index: 60; padding: 14px var(--gutter) 0; pointer-events: none; transition: transform 0.6s var(--ease), opacity 0.4s; }
.nav.is-hidden { transform: translateY(-130%); opacity: 0; }
.nav__pill { pointer-events: auto; max-width: 1220px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 8px 8px 8px 22px; border-radius: 999px; background: rgba(247, 244, 238, 0.74); -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3); border: 1px solid rgba(23, 26, 22, 0.12); box-shadow: 0 12px 34px -20px rgba(23, 26, 22, 0.5); }
.nav__brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.nav__mark { font-family: var(--serif); font-size: 30px; letter-spacing: -0.01em; line-height: 1; }
.nav__name { font-size: 11.5px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-soft); }
.nav__links { display: flex; gap: 26px; }
.nav__links a { font-size: 15px; text-decoration: none; position: relative; padding: 6px 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.nav__links a:hover::after, .nav__links a:focus-visible::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 28px; border-radius: 999px; background: var(--deep); color: var(--canvas); font-size: 16px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; transition: background-color 0.3s, color 0.3s; will-change: transform; }
.btn span { display: inline-block; pointer-events: none; }
.btn:hover { background: var(--emerald); }
.btn--small { min-height: 42px; padding: 0 20px; font-size: 14px; }
.btn--amber { background: var(--amber-lit); color: var(--deep); }
.btn--amber:hover { background: var(--on-deep); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn--ghost:hover { background: var(--deep); color: var(--canvas); }
.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.link-arrow::after { content: " →"; }

/* Type */
.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-deep); font-weight: 600; }
.eyebrow--light { color: var(--amber-lit); }
.display { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; line-height: 0.98; }
.h-xl { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 5.6vw, 96px); line-height: 1.02; letter-spacing: -0.025em; }
.h-lg { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.8vw, 60px); line-height: 1.06; letter-spacing: -0.02em; }
.h-md { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.4vw, 36px); line-height: 1.12; letter-spacing: -0.015em; }
.lead { color: var(--ink-soft); font-size: 18px; max-width: 52ch; }
.fig { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.urdu { font-family: var(--urdu); direction: rtl; line-height: 2.1; }
.note { font-size: 13px; color: var(--ink-soft); }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.wi { display: inline-block; }

section, .footer { position: relative; z-index: 2; }
.band { padding: clamp(56px, 8vh, 96px) var(--gutter); }
.band--clay { background: var(--clay); }
.band--deep { background: var(--deep); color: var(--on-deep); }
.band--deep .lead, .band--deep .note { color: var(--on-deep-soft); }
.band__head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 5vw, 80px); align-items: end; margin-bottom: clamp(28px, 4vh, 48px); }
.band__head .eyebrow { display: block; margin-bottom: 16px; }

/* Hairlines that draw themselves */
.rule { display: block; height: 1px; width: 100%; background: var(--hair); transform-origin: left center; }
.rule--light { background: var(--hair-light); }
.motion .rule[data-reveal] { opacity: 1; transform: scaleX(0); }
.motion .rule[data-reveal].is-in { transform: scaleX(1); transition: transform 1.5s var(--ease); }

/* Illustration frames. Every generated image carries a caption that says it is an illustration. */
.plate { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--clay); }
.plate img, .plate video { width: 100%; height: 100%; object-fit: cover; }
.plate__cap { position: absolute; left: 12px; bottom: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; padding: 5px 10px; border-radius: 999px; background: rgba(23, 26, 22, 0.62); color: var(--on-deep); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* Footer */
.footer { background: var(--deep); color: var(--on-deep); padding: clamp(64px, 10vh, 120px) var(--gutter) 32px; overflow-x: clip; }
.footer__curve { position: absolute; left: -8%; right: -8%; top: 0; height: 18vh; background: var(--deep); border-radius: 50% 50% 0 0 / 100% 100% 0 0; transform: translateY(-58%); transform-origin: 50% 100%; z-index: -1; }
.footer__title { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6.4vw, 112px); line-height: 1; letter-spacing: -0.02em; margin: 18px 0 26px; max-width: 13ch; }
.footer__lead { color: var(--on-deep-soft); max-width: 56ch; font-size: 19px; margin-bottom: 34px; }
.footer .rule { margin-top: clamp(64px, 11vh, 120px); }
.footer__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-top: 34px; }
.footer__h { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-lit); margin-bottom: 14px; font-weight: 500; }
.footer__grid p { color: var(--on-deep-soft); font-size: 15.5px; margin-bottom: 6px; }
.footer__grid a { text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.3s, color 0.3s; }
.footer__grid a:hover { color: var(--on-deep); border-color: var(--on-deep); }
.footer__legal { margin-top: 48px; font-size: 13px; color: var(--on-deep-soft); }
.motion-link { background: none; border: 0; padding: 0; margin-left: 16px; color: inherit; text-decoration: underline; cursor: pointer; }

/* Notice for a device that asks for reduced motion */
.calm-note { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 999px; font-size: 13.5px; background: rgba(247, 244, 238, 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--hair); box-shadow: 0 12px 30px -18px rgba(23, 26, 22, 0.5); }
.calm-note[hidden] { display: none; }
.calm-note button { font-weight: 600; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--deep); color: var(--canvas); cursor: pointer; }

/* Reveal states. They apply only when the motion script is running. */
.motion [data-reveal] { opacity: 0; transform: translateY(32px); }
.motion [data-reveal].is-in { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1.1s var(--ease); }

@media (max-width: 1000px) {
  .nav__name { display: none; }
  /* Narrow screens: the menu becomes a second row inside the pill, so every page stays 1 tap away. */
  .nav__pill { flex-wrap: wrap; row-gap: 4px; border-radius: 26px; }
  .nav__links { order: 3; flex: 0 0 100%; gap: 20px; padding: 4px 10px 6px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid rgba(23, 26, 22, 0.1); }
  .nav__links::-webkit-scrollbar { display: none; }
  .nav__links { justify-content: space-between; gap: 6px; padding-left: 2px; padding-right: 2px; }
  .nav__links a { font-size: 12.5px; white-space: nowrap; padding: 8px 0; }
  main { padding-top: 40px; }
  .band__head { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav .btn { padding: 0 16px; font-size: 13px; }
  .footer__grid { grid-template-columns: 1fr; }
  .calm-note { left: 16px; justify-content: space-between; }
}

/* Calm mode: no looping animation and no timed transitions. Scroll still drives the page.
   "transition: none" is required. A very short transition makes the scroll library mis-measure pinned sections. */
.calm *, .calm *::before, .calm *::after { animation: none !important; transition: none !important; }

/* VAN logo (web copies of the master logo, 26 Nov 2026) */
.nav__brand { align-items: center; }
.nav__logo { display: block; height: 38px; width: auto; }
.nav__brand .nav__name { padding-left: 12px; border-left: 1px solid var(--hair); }
.footer__logo { display: block; width: clamp(200px, 22vw, 300px); height: auto; margin-bottom: 28px; }
@media (max-width: 1000px) { .nav__logo { height: 32px; } .nav__brand .nav__name { display: none; } }
