/* Valor Cricket, design tokens. Revision 3, 8 Oct 2026, from Avinash's Figma "Website work" (pulled 8 Oct).
   White ground, ink text, one warm grey ramp, brand blue on primary actions only. A warm willow ground for the visual breaks.
   Type, from his file: Plus Jakarta Sans (OFL, variable 200 to 800, roman and italic) for every heading and all body text;
   Montserrat SemiBold Italic (OFL, variable) uppercase for buttons, nav, text links and the Menu button. Omkar accepted both on
   8 Oct, replacing the 23 Sep Poppins override. Both self-hosted and subset with the rupee glyph. Light is the default;
   [data-theme="dark"] overrides the same names. */

@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/jakarta.woff2") format("woff2-variations"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/jakarta-italic.woff2") format("woff2-variations"); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-italic.woff2") format("woff2-variations"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Michroma"; src: url("../fonts/michroma.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  /* colour */
  --paper: #FAFAF8;
  --white: #FFFFFF;
  --ink: #101828;
  --ink-2: #3D4457;
  --ink-3: #6B7185;
  --line: #E4E4DF;
  --slot: #ECECE7;
  --slot-2: #E2E2DC;
  --blue: #444CE7;
  --blue-down: #3538CD;

  /* type */
  --display: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --text: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --series: "Michroma", "Plus Jakarta Sans", sans-serif;
  --condensed: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;   /* headings: Plus Jakarta Sans ExtraBold (his file) */
  --head-w: 800;
  --head-track: -0.03em;
  --hand: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --ui: "Montserrat", "Plus Jakarta Sans", Arial, sans-serif;           /* buttons, nav, links: Montserrat SemiBold Italic (his file) */
  --tint: #E9EBFC;
  --tint-2: #D9DCF9;
  --warm: #F1E8D6;      /* warm English willow, the trust fold */
  --warm-2: #E4D6BA;
  --glass: color-mix(in srgb, var(--paper) 78%, transparent);
  --glass-strong: color-mix(in srgb, var(--paper) 90%, transparent);
  --rail: 300px;
  --wide: 118;      /* headline width axis */
  --wide-2: 112;    /* large lines */

  /* the scale, ten steps; the display end grows with the viewport */
  --t-12: 0.75rem;
  --t-14: 0.875rem;
  --t-17: 1.0625rem;
  --t-20: 1.25rem;
  --t-24: 1.5rem;
  --t-28: 1.75rem;
  --t-32: 2rem;
  --t-44: 2.25rem;                       /* 36 on phones, 48 from 700, 56 from 1024 */
  --t-64: clamp(2.5rem, 6vw, 4.5rem);   /* statement lines */
  --t-hero: clamp(3.25rem, 9.2vw, 8.5rem); /* the one Valentine moment, spent once */
  --t-num: clamp(3.5rem, 8vw, 7rem);    /* the big numbers */

  /* space */
  --gut: 20px;
  --rhythm: 64px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  /* chrome */
  --header-h: 56px;
  --z-header: 60;
  --z-drawer: 80;
  --max: 1440px;
}
@media (min-width: 700px) {
  :root { --t-44: 3rem; --rhythm: 96px; --header-h: 64px; }
}
@media (min-width: 1024px) {
  :root { --t-44: 3.5rem; --rhythm: 120px; }
}
@media (min-width: 1024px) {
  :root { --gut: 48px; }
}

/* dark mode, agreed on the 18 Sep call: the same names, lifted so the blue stays readable; light stays the default */
[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0C0F22;
  --white: #151935;
  --ink: #EDEFF7;
  --ink-2: #C5C9DE;
  --ink-3: #9CA2BF;
  --line: #262B4D;
  --slot: #1A1E3A;
  --slot-2: #232850;
  --blue: #5A61F0;
  --blue-down: #8288FF;
  --tint: #1A1F45;
  --tint-2: #252B5E;
  --warm: #1F1C27;
  --warm-2: #2B2734;
}
:root { color-scheme: light; }

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--t-17);
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* never hidden: sticky descendants must survive */
}
img, svg, picture { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--blue); color: var(--white); }

/* type roles */
.display { font-family: var(--display); font-weight: 700; line-height: 0.98; letter-spacing: -0.02em; }
.display-2 { font-family: var(--display); font-weight: 600; line-height: 1.04; letter-spacing: -0.012em; }
.h2 { font-family: var(--display); font-weight: 600; line-height: 1.02; letter-spacing: -0.015em; font-size: var(--t-44); }
.statement { font-family: var(--display); font-weight: 600; line-height: 0.98; letter-spacing: -0.02em; font-size: var(--t-64); }
.bignum { font-family: var(--display); font-weight: 700; line-height: 0.9; letter-spacing: -0.03em; font-size: var(--t-num); font-variant-numeric: tabular-nums lining-nums; }
.serif-xl { font-family: var(--condensed); font-weight: 500; font-size: clamp(1.75rem, 3.6vw, 3rem); line-height: 1.18; letter-spacing: -0.01em; }
.ui { font-family: var(--display); font-weight: 500; }
.label { font-family: var(--display); font-weight: 600; font-size: var(--t-12); letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.2; }
.caption { font-family: var(--display); font-weight: 400; font-size: var(--t-14); color: var(--ink-3); line-height: 1.4; }
.series { font-family: var(--series); font-size: var(--t-12); letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.2; }
.num { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.01em; }
.lead { font-size: var(--t-20); line-height: 1.45; color: var(--ink-2); }
.small { font-size: var(--t-14); }
.muted { color: var(--ink-2); }
.quiet { color: var(--ink-3); }

/* the sharp button contract: 12 px uppercase, 1 px border on every variant, radius 0, fixed height, inversions on hover */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: 48px; padding: 0 var(--s5);
  font-family: var(--display); font-weight: 600; font-size: var(--t-12); letter-spacing: 0.08em; text-transform: uppercase; line-height: 1;
  border: 1px solid var(--ink); border-radius: 0; background: var(--white); color: var(--ink);
  transition: background-color 120ms linear, color 120ms linear, border-color 120ms linear;
  white-space: nowrap; text-align: center;
}
.btn--primary { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn--tall { height: 56px; }
.btn--block { display: flex; width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { background: var(--slot-2); border-color: var(--slot-2); color: var(--white); cursor: not-allowed; }
@media (hover: hover) {
  .btn:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
  .btn--primary:hover { background: var(--blue-down); border-color: var(--blue-down); color: var(--white); }
}
.btn:active { background: var(--ink); color: var(--white); }
.btn--primary:active { background: var(--blue-down); }

/* text button: label plus a full-width rule that shrinks to 30 % on hover */
.tbtn { position: relative; display: inline-block; padding-bottom: 6px; font-family: var(--display); font-weight: 600; font-size: var(--t-12); letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.2; }
.tbtn::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%; background: currentColor; transition: width 160ms ease; }
@media (hover: hover) { .tbtn:hover::after { width: 30%; } }

/* layout */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.section { padding-top: var(--rhythm); padding-bottom: var(--rhythm); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s5); }
main [id] { scroll-margin-top: calc(var(--header-h) + 8px); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.rule--ink { border-top-color: var(--ink); }

/* flush cells: shared hairlines, no padding on the wrapper, cells carry their own */
.cells { display: grid; border: 1px solid var(--line); background: var(--white); }
.cells > * { padding: var(--s5); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cells > *:last-child { border-right: 0; }
@media (min-width: 700px) { .cells > * { padding: var(--s6); } }

/* photo and data slots: greyboxes at their final ratio, labelled with the shot */
.slot { position: relative; display: block; background: var(--slot); border: 1px solid var(--line); overflow: hidden; }
.slot::before { content: ""; display: block; padding-top: calc(100% / var(--ratio, 1)); }
.slot > .slot__label { position: absolute; left: var(--s3); bottom: var(--s3); right: var(--s3); font-family: var(--display); font-weight: 500; font-size: var(--t-12); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); line-height: 1.3; }
.slot--4x5 { --ratio: 0.8; }
.slot--4x3 { --ratio: 1.3333; }
.slot--3x2 { --ratio: 1.5; }
.slot--1x1 { --ratio: 1; }
.slot--16x9 { --ratio: 1.7778; }
.dslot { display: inline-block; min-width: 3.2em; height: 1em; vertical-align: -0.1em; background: var(--slot-2); border-radius: 0; }

/* photos: a frame with an aspect ratio, the image filling it; a clip reveal on view, images only, once */
.ph { position: relative; display: block; overflow: hidden; background: var(--slot); }
.ph::before { content: ""; display: block; padding-top: calc(100% / var(--ratio, 1)); }
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.ph--4x5 { --ratio: 0.8; } .ph--4x3 { --ratio: 1.3333; } .ph--3x2 { --ratio: 1.5; } .ph--1x1 { --ratio: 1; } .ph--16x9 { --ratio: 1.7778; } .ph--21x9 { --ratio: 2.3333; } .ph--3x1 { --ratio: 3; }
/* the clip lives on the image, not the frame: Chrome's IntersectionObserver honours the target's clip-path, so a fully clipped frame never intersects */
.reveal > img { clip-path: inset(0 0 100% 0); transition: clip-path 900ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-in > img { clip-path: inset(0 0 0 0); }
.reveal--left > img { clip-path: inset(0 100% 0 0); }
.reveal--left.is-in > img { clip-path: inset(0); }
@media (prefers-reduced-motion: reduce) { .reveal > img { clip-path: none; transition: none; } }
.no-js .reveal > img { clip-path: none; }
@media (hover: hover) { a .ph > img { transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1); } a:hover .ph > img { transform: scale(1.03); } }

/* ink annotation strokes: drawn once when in view */
.ink { position: absolute; pointer-events: none; color: var(--ink); overflow: visible; }
.ink path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); }
.ink.is-in path { animation: draw 700ms cubic-bezier(0.3, 0, 0.2, 1) forwards; }
.ink.is-in path:nth-child(2) { animation-delay: 300ms; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .ink path { stroke-dashoffset: 0; animation: none; } }
.no-js .ink path { stroke-dashoffset: 0; }
.hand { font-family: var(--display); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: var(--t-12); }

/* the one blue tape band and the symbol */
.tape { height: 6px; background: url("../brand/tape-blue.svg") repeat-x left center / auto 100%; }

/* skip link and visually hidden */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gut); top: -80px; z-index: 100; background: var(--ink); color: var(--white); padding: var(--s3) var(--s4); }
.skip:focus { top: var(--s3); }
