/* Modus website. Tokens come from the Modus Design System (tokens.json); web-only additions are marked.
   Type follows the DS's three roles. Label (Anek Latin): only titles, headlines, eyebrows, format badges and the
   primary button, plus the camera's own labels. Readout (Chivo Mono): only camera values, written the way the
   camera shows them (1/125s, ISO 800, 5600K, +0.3 EV). Body (the system font, SF Pro on Apple devices): the rest.
   Teal means manual, gold is the exposure reticle, blue is selection and the primary action. Photographs carry the color. */

@font-face {
  font-family: "Anek Latin";
  src: url("/assets/fonts/AnekLatin-Variable.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "Chivo Mono";
  src: url("/assets/fonts/ChivoMono-Variable.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
}

:root {
  /* Design system colors */
  --ink: #0b0b0b;              /* viewBackground */
  --ink-deep: #050506;         /* web: behind photographs */
  --ink-2: #111113;            /* web: raised surface */
  --ink-3: #161616;            /* sectionBackground */
  --ink-4: #232323;            /* cameraBackground */
  --fg: #ffffff;               /* onMedia */
  --fg-2: #d3d3d3;             /* text */
  --fg-3: #9ba2ad;             /* toggle */
  --fg-4: rgba(255, 255, 255, 0.46);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --teal: #00c2a8;             /* pointer: manual only */
  --accent: #38aaff;           /* selection, eyebrows */
  --accent-fill: #1e88e5;      /* web: primary button fill. White on accent is 2.5:1; this deeper fill, which the DS suggests, is 3.7:1 */
  --accent-ink: #0861ba;       /* web: accent text on paper, 5:1 */
  --focus: #00baff;            /* focus reticle */
  --exposure: #ffae00;         /* exposure reticle */
  --off: #ff5757;
  --gold: #f7c04a;             /* proGold */

  /* Web: paper for the light sections (the bracketing prints) */
  --paper: #ebe8e1;
  --paper-2: #f6f4ef;
  --paper-ink: #121212;
  --paper-ink-2: #57544d;
  --paper-ink-3: #8a867c;
  --paper-line: rgba(18, 18, 18, 0.12);

  --font-label: "Anek Latin", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-readout: "Chivo Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;

  --shell: 1320px;
  --gutter: clamp(20px, 5vw, 72px);
  --band: clamp(96px, 13vw, 184px);
  --header: 64px;

  --ease: cubic-bezier(0.2, 0.7, 0, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--header); }
html, body { margin: 0; background: var(--ink); color: var(--fg-2); }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(56, 170, 255, 0.35); color: #fff; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px;
  background: #fff; color: var(--ink); font-weight: 600; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Type ---------- */
/* Headlines: the DS display style, Anek Latin bold at its normal width */
.t-hero, .t-h2, .t-h3, .t-display {
  font-family: var(--font-label);
  color: var(--fg);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.98;
  text-wrap: balance;
}
.t-hero { font-size: clamp(42px, 6.4vw, 108px); }
.t-h2 { font-size: clamp(36px, 4.8vw, 82px); }
.t-h3 { font-size: clamp(24px, 2.3vw, 34px); line-height: 1.08; letter-spacing: -0.01em; }
.t-display { font-size: clamp(52px, 9vw, 156px); line-height: 0.94; }
/* Eyebrow: label face, accent, only above a headline. Sentence case, not the DS's uppercase: brand names
   must keep their casing (Modus, iPhone Duo, ProRAW), and an uppercase line would turn them into MODUS and IPHONE. */
.t-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-label); font-weight: 700; font-size: 16px; line-height: 1.2;
  letter-spacing: 0; color: var(--accent);
}
.t-tone { display: inline-block; color: var(--fg-3); }
/* A section's number and name over a hairline, with an aside on the right: sentence case, never uppercase. */
.section-label { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 14px; margin-bottom: clamp(48px, 6vw, 88px); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--fg-3); }
.section-label span + span { color: var(--fg-4); }
@media (max-width: 560px) { .section-label span + span { display: none; } }
.t-eyebrow .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.t-lede { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.5; color: var(--fg-2); text-wrap: pretty; max-width: 34em; }
.t-body { font-size: 17px; line-height: 1.6; color: var(--fg-3); text-wrap: pretty; }
.t-small { font-size: 14px; line-height: 1.5; color: var(--fg-3); }
/* Readout: camera values only (shutter, ISO, kelvin, EV, the A and M letters). Never tracked. */
.t-readout { font-family: var(--font-readout); font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; }
/* Numbers that aren't live camera values (48 MP, 800,000+) stay in the system font, with tabular figures */
.t-num { font-variant-numeric: tabular-nums; }
.t-dim { color: var(--fg-4); }
.t-white { color: var(--fg); }

/* Edge print: the camera's top line. Camera HUD only; captions outside the camera use .meta-line. */
.edge {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  font-family: var(--font-label); font-weight: 700; font-size: 12.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--fg-2); font-variant-numeric: tabular-nums;
}
.edge .tag {
  display: inline-flex; align-items: center; height: 17px; padding: 0 5px; border-radius: 4px;
  box-shadow: inset 0 0 0 1px currentColor; font-size: 10px; letter-spacing: 0.04em; opacity: 0.8;
}
.edge .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.45; }
.edge .val { font-family: var(--font-readout); font-weight: 600; letter-spacing: 0; text-transform: none; }
.edge .keep { text-transform: none; }

/* Captions and spec lines outside the camera: the system font, sentence case */
.meta-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  font-size: 13px; line-height: 18px; color: var(--fg-3); font-variant-numeric: tabular-nums;
}
.meta-line .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.meta-line b { font-weight: 600; color: var(--fg); }

/* ---------- Layout ---------- */
.shell { width: 100%; max-width: calc(var(--shell) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.band { position: relative; padding: var(--band) 0; }
.band--flush { padding: 0; }
.stack > * + * { margin-top: var(--gap, 24px); }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 clamp(16px, 2vw, 32px); }

/* ---------- Buttons (DS Buttons) ---------- */
.btn {
  --h: 50px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 24px; border-radius: 999px; white-space: nowrap;
  font-family: var(--font-body); font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.3s var(--ease), color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
/* Primary: an accent capsule with a white label in the label face, bold. One per screen.
   19px is the DS's 17.5 pt call-site size drawn at 1.08, and counts as large text for contrast. */
.btn--primary {
  --h: 54px; padding: 0 30px; background: var(--accent-fill); color: #fff;
  font-family: var(--font-label); font-weight: 700; font-size: 19px; letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn--primary:hover { background: #2a8fe9; }
/* Secondary: quiet glass with a white SF Pro semibold label, as tall as the primary beside it */
.btn--glass {
  --h: 54px; color: #fff; background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
}
.btn--glass:hover { background: rgba(255, 255, 255, 0.12); }
/* Bar button: a 36 pt quiet-glass capsule, SF Pro 15 semibold. The one that confirms is accent. */
.btn--bar {
  --h: 36px; padding: 0 16px; font-size: 15px; letter-spacing: 0; color: var(--accent);
  background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
}
.btn--bar:hover { background: rgba(255, 255, 255, 0.14); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 600; }
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }
.badge-store { display: inline-block; height: 52px; width: auto; }
.badge-store img { height: 100%; width: auto; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header);
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease), color 0.3s;
  color: var(--fg);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s var(--ease);
  background: rgba(11, 11, 11, 0.72);
  -webkit-backdrop-filter: saturate(170%) blur(20px); backdrop-filter: saturate(170%) blur(20px);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}
.site-header.is-scrolled::before { opacity: 1; }
.site-header.is-light { color: var(--paper-ink); }
.site-header.is-light::before { background: rgba(240, 238, 232, 0.78); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08); }
.site-header .shell { position: relative; height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.brand svg { width: 22px; height: 24px; }
.brand span { font-family: var(--font-label); font-weight: 700; font-size: 21px; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; font-size: 14px; }
.nav a { opacity: 0.72; transition: opacity 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
@media (max-width: 760px) { .nav__section { display: none; } }
.site-header.is-light .btn--bar { color: var(--accent-ink); background: rgba(0, 0, 0, 0.05); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
/* The header CTA: a bar button, with the same label face as the primary "Download" */
.site-header .btn--bar { font-family: var(--font-label); font-weight: 700; font-size: 16px; }
@media (max-width: 760px) {
  .site-header .shell { gap: 18px; }
}

/* ---------- Reveal motion: headings come into focus, photographs develop ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); filter: blur(7px); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease), filter 1s var(--ease); transition-delay: var(--delay, 0s); }
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }
[data-develop] { filter: brightness(0.15) contrast(1.25) saturate(0.4); transition: filter 1.8s var(--ease); transition-delay: var(--delay, 0s); }
[data-develop].is-in { filter: none; }
.no-js [data-reveal], .no-js [data-develop] { opacity: 1; transform: none; filter: none; }

/* ---------- Photographs ---------- */
.photo { position: relative; overflow: hidden; background: #111 center / cover no-repeat; }
.photo > img, .photo > picture > img, .photo picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo picture { position: absolute; inset: 0; }
.print {
  position: relative; background: var(--paper-2); padding: var(--mat, 14px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 12px 28px rgba(0, 0, 0, 0.18), 0 40px 80px -20px rgba(0, 0, 0, 0.35);
}
.print .photo { aspect-ratio: var(--ar, 3 / 2); }
.caption-edge {
  display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px;
  font-size: 13px; line-height: 18px; color: var(--fg-4); font-variant-numeric: tabular-nums;
}

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--ink-deep); color: var(--fg-3); border-top: 1px solid var(--line); padding: 72px 0 40px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 40px 28px; }
.footer-grid h3 { font-size: 13px; font-weight: 600; color: var(--fg-3); margin-bottom: 14px; }
.footer-grid li + li { margin-top: 10px; }
.footer-grid a { color: var(--fg-2); transition: color 0.2s; }
.footer-grid a:hover { color: #fff; }
.footer-brand p { margin-top: 14px; max-width: 26em; color: var(--fg-3); }
.footer-brand .app-icon { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-4); }
.footer-base p { max-width: 70em; }
.footer-base a { color: var(--fg-3); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; transition: color 0.2s; }
.footer-base a:hover { color: #fff; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Light sections ---------- */
.is-paper { background: var(--paper); color: var(--paper-ink-2); }
.is-paper .t-hero, .is-paper .t-h2, .is-paper .t-h3, .is-paper .t-display { color: var(--paper-ink); }
.is-paper .t-eyebrow { color: var(--accent-ink); }
.is-paper .t-lede { color: var(--paper-ink-2); }
.is-paper .t-body, .is-paper .t-small { color: var(--paper-ink-2); }
.is-paper .caption-edge { color: var(--paper-ink-3); }
.is-paper ::selection { background: rgba(0, 0, 0, 0.14); color: inherit; }
.paper-grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.43 0 0 0 0 0.4 0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  [data-reveal], [data-develop] { opacity: 1; transform: none; filter: none; }
}

/* ============ COOKIE CONSENT (js/consent.js) ============ */
.consent { position: fixed; z-index: 60; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); translate: -50% 0; width: min(560px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 16px; padding: 14px 14px 14px 20px; border-radius: 20px;
  background: rgba(24, 25, 28, 0.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 0 1px var(--line), 0 18px 48px rgba(0, 0, 0, 0.5); font-size: 14px; line-height: 1.45; color: var(--fg-2); }
.consent p { flex: 1; }
.consent a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.consent__actions { display: flex; gap: 8px; flex: none; }
.consent__btn { height: 36px; padding: 0 16px; border-radius: 99px; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; font: 600 14px/1 var(--font-body); cursor: pointer; }
.consent__btn:hover { background: rgba(255, 255, 255, 0.18); }
.consent__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 520px) { .consent { flex-direction: column; align-items: stretch; padding: 16px; } .consent__actions > * { flex: 1; } }
