/* Karmino site. Lithograph+ (docs/design/hifi/website-hero.html + hifi.css tokens): flat fills, 2px ink keylines, night-sky tile, one sun ring.
   Contrast (WCAG AA): ink-text on paper 14:1, paper on indigo 12.6:1, ink-text on chrome 9:1, chrome on indigo 8.2:1,
   mist on indigo 8.5:1, muted on paper 7.8:1. Vermilion is decoration only. Logical properties throughout (RTL-safe). */
@font-face { font-family: "El Messiri"; src: url("fonts/el-messiri-700-latin.woff2?v=81db2a64") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("fonts/rubik-400-latin.woff2?v=82ac0e78") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Rubik"; src: url("fonts/rubik-600-latin.woff2?v=6182043a") format("woff2"); font-weight: 500 600; font-display: swap; }

:root {
  --indigo: #14254A; --indigo-low: #0F1D3B; --chrome: #F2B53C; --paper: #F3EAD8; --paper-bright: #FBF6EC;
  --mist: #B9C3D6; --ink: #0E0E12; --ink-text: #1B1F2B; --muted: #3B4663; --sc: #EEE3CE;
  --sky: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='%23283E70'%3E%3Cpath d='M24 14l2.2 7.8L34 24l-7.8 2.2L24 34l-2.2-7.8L14 24l7.8-2.2z'/%3E%3Cpath d='M86 70l1.4 4.6L92 76l-4.6 1.4L86 82l-1.4-4.6L80 76l4.6-1.4z'/%3E%3Ccircle cx='70' cy='22' r='1.6'/%3E%3Ccircle cx='104' cy='40' r='1.2'/%3E%3Ccircle cx='40' cy='92' r='1.6'/%3E%3Ccircle cx='12' cy='66' r='1.2'/%3E%3Ccircle cx='60' cy='112' r='1'/%3E%3C/g%3E%3Cpath d='M100 98l.8 2.7 2.7.8-2.7.8-.8 2.7-.8-2.7-2.7-.8 2.7-.8z' fill='%23F2B53C' fill-opacity='.15'/%3E%3C/svg%3E");
  --key: 2px solid var(--ink);
  --font-display: "El Messiri", Georgia, "Times New Roman", serif;
  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink-text); font: 400 1.0625rem/1.65 var(--font-body); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; line-height: 1.12; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem); }
h3 { font-size: 1.375rem; line-height: 1.2; }
p, ul, ol { margin: 12px 0 0; }
ul, ol { padding-inline-start: 1.25em; }
li + li { margin-top: 6px; }
a { color: var(--indigo); text-underline-offset: .18em; text-decoration-thickness: 2px; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 4px; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; }
.night :focus-visible, .band :focus-visible, .site-footer :focus-visible { outline-color: var(--chrome); }
.band a { color: var(--chrome); }
strong { font-weight: 600; }

.wrap { width: min(100% - 2 * var(--gutter), 75rem); margin-inline: auto; }
.narrow { width: min(100% - 2 * var(--gutter), 46rem); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 16px; top: -100px; z-index: 10; background: var(--chrome); color: var(--ink-text); border: var(--key); border-radius: 999px; padding: 12px 20px; font-weight: 600; }
.skip:focus { top: 16px; }

/* night sky (header + hero) */
.night { background: var(--indigo) var(--sky); color: var(--paper); }
.site-header { color: var(--paper); }
.site-header .wrap, .hero .wrap { width: min(100%, 75rem); padding-inline: 24px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 24px; padding-block: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; font: 700 1.625rem/1 var(--font-display); min-height: 48px; }
.brand i { width: 28px; aspect-ratio: 1; flex: none; background: url("favicon.svg?v=592ae25b") center / contain no-repeat; }
.nav { display: flex; flex-wrap: wrap; gap: 0 8px; }
.nav a { color: var(--paper); font: 500 1rem/1 var(--font-body); text-decoration: none; display: inline-flex; align-items: center; min-height: 48px; padding-inline: 12px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--chrome); }

/* hero */
.hero { position: relative; background-position: 0 0; overflow: hidden; border-bottom: var(--key); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-block: 40px 88px; position: relative; }
.hero h1 { font-size: clamp(3.5rem, 7.2vw, 6.5rem); line-height: .96; }
.nb { white-space: nowrap; }
.store svg { width: 24px; height: 24px; }
.hero h1 em { font-style: normal; color: var(--chrome); }
.lede { font-size: clamp(1.125rem, 1.05rem + .4vw, 1.3125rem); line-height: 1.52; color: var(--mist); max-width: 30ch; margin-top: 24px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 36px; }
.cta p { margin: 0; }
.store { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 28px; background: var(--chrome); color: var(--ink-text); border: var(--key); border-radius: 999px; font: 600 1rem/1.25 var(--font-body); }
.store svg { flex: none; }
.badge { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border: 1px solid var(--mist); border-radius: 999px; color: var(--mist); font: 500 .875rem/1 var(--font-body); }

/* stage: sun ring + sunfield + three 1909 cards (public domain, see docs/design/hifi/CREDITS.md) */
.stage { position: relative; height: 600px; container-type: inline-size; }
/* physical left on purpose: the fan is symmetric, so it needs no RTL mirroring */
.ring, .sunfield { position: absolute; left: 50%; top: 50%; translate: -50% -50%; pointer-events: none; }
.ring { width: 600px; height: 600px; background: url("art/ring-night.svg?v=98e8b3be") center / contain no-repeat; }
.sunfield { width: 420px; height: 420px; border-radius: 50%; background: var(--chrome); border: var(--key); }
.fan .card { position: absolute; width: min(200px, 40.3cqw); left: 50%; top: 50%; }
.card { margin: 0; aspect-ratio: 7 / 12; display: flex; flex-direction: column; overflow: hidden; background: var(--paper-bright); border: var(--key); border-radius: 12px; color: var(--ink-text); }
.card .num { height: 10%; display: grid; place-items: center; font: 700 15px/1 var(--font-display); border-bottom: 1px solid var(--ink); }
.card img { flex: 1; min-height: 0; width: 90%; margin-inline: 5%; object-fit: cover; object-position: center 30%; border-inline: 1px solid var(--ink); }
.card .band-t { height: 14%; display: grid; place-items: center; text-align: center; font: 700 15px/18px var(--font-display); border-top: 1px solid var(--ink); padding-inline: 6px; }
.fan .c1 { transform: translate(-118%, -46%) rotate(-12deg); }
.fan .c3 { transform: translate(18%, -46%) rotate(12deg); }
.fan .c2 { width: min(240px, 48.4cqw); transform: translate(-50%, -54%); z-index: 2; }

/* legal page head */
.doc-head { position: relative; overflow: hidden; border-bottom: var(--key); padding-block: clamp(32px, 6vw, 72px) clamp(28px, 5vw, 48px); }
.doc-head h1 { font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem); color: var(--paper); }
.doc-head .meta { color: var(--mist); }
.doc-head::after { content: ""; position: absolute; width: 360px; height: 360px; inset-inline-end: -60px; top: 50%; translate: 0 -50%; background: url("art/ring-night.svg?v=98e8b3be") center / contain no-repeat; pointer-events: none; }
[dir=rtl] .doc-head::after { scale: -1 1; }
@media (max-width: 1100px) { .doc-head::after { display: none; } }

/* sections */
.section { background: var(--paper); padding-block: clamp(48px, 8vw, 96px); }
.section > .wrap > p.intro { max-width: 38rem; font-size: 1.125rem; color: var(--muted); }
.grid { display: grid; gap: 20px; margin-top: 36px; padding: 0; list-style: none; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.grid > li { margin: 0; background: var(--sc); border: 1px solid var(--ink); border-radius: 12px; padding: 24px; }
.grid p { color: var(--muted); }
.section.band { background: var(--indigo) var(--sky); color: var(--paper); border-block: var(--key); }
.band h2 { color: var(--chrome); }
.band p { color: var(--paper); max-width: 40rem; }
.band .small { color: var(--mist); }

/* legal pages */
.doc { padding-block: clamp(24px, 4vw, 48px) clamp(48px, 8vw, 96px); }
.doc h2 { font-size: clamp(1.5rem, 1.3rem + .8vw, 1.875rem); margin-top: 44px; padding-top: 12px; border-top: var(--key); }
.doc h2:first-child { margin-top: 0; }
.doc h3 { margin-top: 24px; font-size: 1.25rem; }
.meta { color: var(--muted); margin-top: 12px; }
.doc .notice:first-child { margin-top: 24px; }
.notice { margin-top: 24px; padding: 16px 20px; background: var(--chrome); border: var(--key); border-radius: 12px; font-weight: 600; }
table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: .9375rem; }
th, td { text-align: start; vertical-align: top; padding: 10px 12px; border: 1px solid var(--ink); }
th { background: var(--indigo); color: var(--paper); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* footer */
.site-footer { background: var(--indigo-low); color: var(--paper); border-top: var(--key); padding-block: 40px; font-size: .9375rem; }
.site-footer a { color: var(--chrome); }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.site-footer p { margin: 0 0 8px; }
.site-footer .small { color: var(--mist); font-size: .8125rem; }

@media (max-width: 1100px) {
  .stage { height: 480px; }
  .ring { width: 480px; height: 480px; }
  .sunfield { width: 340px; height: 340px; }
  .fan .card { width: min(160px, 40.3cqw); }
  .fan .c2 { width: min(192px, 48.4cqw); }
}
@media (max-width: 760px) {
  .hero .wrap, .site-header .wrap { padding-inline: 20px; }
  .site-header .wrap { padding-inline: 24px; }
  .nav-hero a:not(:first-child) { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; padding-block: 8px 56px; }
  .stage { height: 400px; order: -1; }
  .ring { width: 400px; height: 400px; }
  .sunfield { width: 280px; height: 280px; }
  .fan .card { width: min(128px, 40.3cqw); }
  .fan .c2 { width: min(156px, 48.4cqw); }
  .hero h1 { font-size: 3.5rem; line-height: 58px; }
  .lede { font-size: 1.125rem; line-height: 1.55; margin-top: 16px; }
  .cta { margin-top: 24px; }
  .store { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .store, .card, .grid > li, .notice, .badge { border: 2px solid CanvasText; }
}
