/* historoo design tokens.
   Rules: neutral surfaces, dark or light (~70%), off-white text (~20%), one accent (~10%).
   Gradients are artwork only (hero field, explainer, headline thumbnails, the search page's seasons). No glass, no emoji, small radii. */

:root {
  --bg: #08080A;
  --panel: #0F0F12;
  --panel-2: #151519;
  --panel-3: #1C1C21;
  --line: #222228;
  --line-2: #2E2E36;
  --text: #EDEDF0;
  --muted: #9B9BA6;
  --dim: #66666F;
  --accent: #CFFF4A;        /* fills: primary buttons, switches, ticked boxes */
  --accent-ink: #0A0A0B;    /* text and ticks on an accent fill */
  --accent-hover: #DBFF72;
  --accent-text: #CFFF4A;   /* the accent as text, links, icons, focus rings and borders */
  --accent-mark: #CFFF4A;   /* the accent as a small mark: dots, meters, chart bars */
  --accent-rgb: 207, 255, 74; /* for tints: rgba(var(--accent-rgb), .1) */
  --on-text: #0A0A0B;       /* text on a var(--text) fill */
  --danger: #FF8A8A;
  --danger-warm: #FF8A7A;
  --orange-text: #FF8A3D;   /* var(--orange) as text */
  --orange-rgb: 255, 138, 61;
  --selection: rgba(207, 255, 74, .28);

  /* over the page: dialogs' scrim, drop zones, shadows */
  --scrim: rgba(0, 0, 0, .66);
  --overlay: rgba(8, 8, 10, .88);
  --shadow-dialog: 0 30px 80px rgba(0, 0, 0, .5);
  --shadow-pop: 0 20px 40px -20px rgba(0, 0, 0, .8);
  --shadow-toast: 0 10px 30px rgba(0, 0, 0, .45);

  /* what takes how much room (Settings' meters), by type */
  --type-video: #B4B4BD;
  --type-headline: #7E7E89;
  --type-product: #575761;
  --type-page: #45454E;
  --type-model: #3A3A43;

  /* charts (stats.js reads these) */
  --chart-mark: #6E6E78;
  --chart-area: rgba(155, 155, 166, .1);
  --chart-tile: #222228;
  --chart-other: #141418;
  /* sequential, empty to the accent, checked against the background */
  --ramp-0: #1C1C21;
  --ramp-1: #424C27;
  --ramp-2: #66792F;
  --ramp-3: #94B73D;
  --ramp-4: #CFFF4A;

  /* on top of photos and thumbnails: the same in both themes */
  --photo-text: #EDEDF0;
  --photo-muted: #9B9BA6;
  --photo-dim: #66666F;
  --photo-line: #2E2E36;
  --photo-hover: #1C1C21;

  /* artwork palette (gradients only) */
  --blue: #3D5BFF;
  --violet: #7C4DFF;
  --pink: #FF4F9A;
  --orange: #FF8A3D;

  --font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;

  --r: 6px;
  --r-lg: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  --grain: 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='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  color-scheme: dark;
}

/* Light (Settings > Opening & search > Theme; theme.js sets data-theme before the page draws).
   Text colours meet WCAG AA on --bg, --panel and --panel-2. The lime stays as a fill with dark ink;
   as text it is a dark olive. */
:root[data-theme="light"] {
  --bg: #FAFAF8;
  --panel: #FFFFFF;
  --panel-2: #F2F2EF;
  --panel-3: #E9E9E5;
  --line: #E4E4DF;
  --line-2: #D3D3CE;
  --text: #17171B;
  --muted: #55555F;
  --dim: #6B6B75;
  --accent-hover: #C4F53A;
  --accent-text: #4A6300;
  --accent-mark: #739600;
  --accent-rgb: 115, 150, 0;
  --on-text: #FFFFFF;
  --danger: #B42318;
  --danger-warm: #B42318;
  --orange-text: #A84300;
  --orange-rgb: 240, 120, 40;
  --selection: rgba(160, 215, 20, .35);

  --scrim: rgba(23, 23, 27, .4);
  --overlay: rgba(250, 250, 248, .92);
  --shadow-dialog: 0 30px 80px rgba(23, 23, 27, .2);
  --shadow-pop: 0 20px 40px -18px rgba(23, 23, 27, .3);
  --shadow-toast: 0 10px 30px rgba(23, 23, 27, .15);

  --type-video: #3A3A43;
  --type-headline: #62626C;
  --type-product: #8A8A94;
  --type-page: #ABABB4;
  --type-model: #C9C9D0;

  --chart-mark: #9C9CA6;
  --chart-area: rgba(85, 85, 95, .1);
  --chart-tile: #E4E4DF;
  --chart-other: #F2F2EF;
  --ramp-0: #E9E9E5;
  --ramp-1: #D6E89A;
  --ramp-2: #AFD045;
  --ramp-3: #82A80F;
  --ramp-4: #5A7800;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
::selection { background: var(--selection); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 15px/1 var(--font); letter-spacing: -.005em;
  padding: 13px 18px; border-radius: var(--r); border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink);
  text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--accent-hover); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.secondary:hover { border-color: var(--muted); background: var(--panel-2); }
.btn.big { font-size: 16px; padding: 15px 22px; }
.btn .provider-icon { flex: none; } /* Google, Microsoft and Apple's marks (lib/brands.js) */

/* Logo: "Going back", a link, a video and an image getting bigger towards today (icons/logo.svg) */
.logo { display: inline-flex; align-items: center; gap: 10px; font: 600 18px/1 var(--font); letter-spacing: -.02em; text-decoration: none; color: var(--text); }
/* The mark sits in the middle of a square 32 box, so the box is drawn larger and cropped to the cards. */
.logo-mark { width: 40px; height: 25px; flex: none; background: url(logo.svg) center / 44px 44px no-repeat; }

/* Grain overlay for gradient artwork */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  background-image: var(--grain); background-size: 220px; mix-blend-mode: overlay; opacity: .5;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
