/* Abramov Softworks: shared shell (tokens, base, header, footer, buttons). Loaded by every page.

   The shell is monochrome. Colour on this site always means a product.

   Colour, light / dark
     --bg         #F6F5F8 / #121016   page
     --surface    #FFFFFF / #1B1920   cards, panels
     --surface-2  #ECEAF0 / #25232C   wells, art backdrops
     --ink        #17151C / #F2F0F6   text
     --muted      #5E5A68 / #A5A1B0   secondary text
     --line, --line-strong            hairlines: ink at 11% and 26%
   Product hues: fill (takes --on-hue text) and -ink (text on --bg and --surface)
     --tomato  #DC3327 / #FF6B6B   --tomato-ink #B9271F / #FF8A84   Tomatoro
     --sound   #12805F / #6FDDB0   --sound-ink  #0F7A5A / #6FDDB0   Soundhop
     --moor    #1F66CC / #6FAEFF   --moor-ink   #1A5AB8 / #6FAEFF   Mooring
     --laser   #B02AA0 / #EE6BDD   --laser-ink  #8F1F83 / #F59BE8   Laser Cascade
   Studio titanium --ti-1..4: the header mark and wordmark, dark metal / light metal
   A .hue-* class maps one hue onto --accent, --accent-ink, --accent-soft, --on-accent.
   Draft notes: --todo-ink #7A4F00 / #F2C14E, --decision-ink #4F37B8 / #B9A8FF

   Type: system fonts only. --display and --body are system-ui, --mono is ui-monospace.
     Scale: --t-xs .8rem, --t-s .92rem, --t-m 1rem (17px), --t-l 1.2rem, --t-xl 1.45rem,
            --t-2xl clamp(1.9rem .. 3rem), --t-3xl clamp(2.6rem .. 5.1rem)
   Space: --u 8px, --gutter clamp(20px .. 40px), --section clamp(80px .. 140px)
   Radius: --r-s 10px, --r-m 16px, --r-l 24px
   Widths: --w-page 1160px, --w-text 70ch
*/
:root {
  color-scheme: light dark;

  --bg: #F6F5F8;
  --surface: #FFFFFF;
  --surface-2: #ECEAF0;
  --ink: #17151C;
  --muted: #5E5A68;
  --line: rgba(23, 21, 28, 0.11);
  --line-strong: rgba(23, 21, 28, 0.26);

  --tomato: #DC3327;
  --tomato-ink: #B9271F;
  --tomato-leaf: #14873C;
  --sound: #12805F;
  --sound-ink: #0F7A5A;
  --moor: #1F66CC;
  --moor-ink: #1A5AB8;
  --laser: #B02AA0;
  --laser-ink: #8F1F83;
  --on-hue: #FFFFFF;
  /* Studio titanium (header mark and wordmark): top, above the reflection, below it, bottom. */
  --ti-1: #868A92;
  --ti-2: #45484F;
  --ti-3: #1B1D21;
  --ti-4: #5C6068;

  --todo-ink: #7A4F00;
  --todo-soft: rgba(214, 150, 0, 0.14);
  --decision-ink: #4F37B8;
  --decision-soft: rgba(96, 72, 214, 0.11);

  --accent: var(--ink);
  --accent-ink: var(--ink);
  --accent-soft: var(--surface-2);
  --on-accent: var(--bg);

  --display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --t-xs: 0.8rem;
  --t-s: 0.92rem;
  --t-m: 1rem;
  --t-l: 1.2rem;
  --t-xl: 1.45rem;
  --t-2xl: clamp(1.9rem, 1.3rem + 2.4vw, 3rem);
  --t-3xl: clamp(2.6rem, 1.4rem + 5.2vw, 5.1rem);

  --u: 8px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(80px, 10vw, 140px);
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --w-page: 1160px;
  --w-text: 70ch;

  --shadow: 0 1px 2px rgba(23, 21, 28, 0.06), 0 16px 40px -16px rgba(23, 21, 28, 0.22);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121016;
    --surface: #1B1920;
    --surface-2: #25232C;
    --ink: #F2F0F6;
    --muted: #A5A1B0;
    --line: rgba(242, 240, 246, 0.11);
    --line-strong: rgba(242, 240, 246, 0.28);

    --tomato: #FF6B6B;
    --tomato-ink: #FF8A84;
    --tomato-leaf: #22BF87;
    --sound: #6FDDB0;
    --sound-ink: #6FDDB0;
    --moor: #6FAEFF;
    --moor-ink: #6FAEFF;
    --laser: #EE6BDD;
    --laser-ink: #F59BE8;
    --on-hue: #16101A;
    --ti-1: #F7F6F3;
    --ti-2: #D2D3D6;
    --ti-3: #9A9EA5;
    --ti-4: #C9CBCF;

    --todo-ink: #F2C14E;
    --todo-soft: rgba(242, 193, 78, 0.13);
    --decision-ink: #B9A8FF;
    --decision-soft: rgba(185, 168, 255, 0.13);

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 20px 48px -16px rgba(0, 0, 0, 0.6);
  }
}

/* One product hue becomes the accent for a page (on body) or for a single card. */
.hue-tomato { --accent: var(--tomato); --accent-ink: var(--tomato-ink); }
.hue-sound { --accent: var(--sound); --accent-ink: var(--sound-ink); }
.hue-moor { --accent: var(--moor); --accent-ink: var(--moor-ink); }
.hue-laser { --accent: var(--laser); --accent-ink: var(--laser-ink); }
.hue-tomato, .hue-sound, .hue-moor, .hue-laser {
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --on-accent: var(--on-hue);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
code, pre, kbd { font-family: var(--mono); font-size: 0.92em; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; letter-spacing: -0.025em; font-weight: 700; text-wrap: balance; }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-l); letter-spacing: -0.015em; margin-bottom: 0.4rem; }
p { margin: 0 0 1rem; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute;
  left: 12px;
  top: 0;
  z-index: 50;
  transform: translateY(-120%);
  padding: 10px 16px;
  border-radius: var(--r-s);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; transform: none; }

.wrap { width: 100%; max-width: var(--w-page); margin: 0 auto; padding: 0 var(--gutter); }
main { display: block; padding-bottom: var(--section); }
/* A page whose last section runs to the footer rule. */
main.flush { padding-bottom: 0; }

/* ---------- Site header: the same markup on every page ---------- */
.site-head { border-bottom: 1px solid var(--line); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; min-height: 60px; }
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 700 1.02rem/1 var(--display);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  gap: 9px;
  --wm-h: 22px;
}
/* The studio mark (the Tip A), a cap height and a little more, on the text's centre line. */
.wm-mark { flex: none; width: var(--wm-h); height: var(--wm-h); fill: currentColor; }
/* Titanium: the mark and the letters share one metal gradient, dark on the light theme and light on
   the dark one, with a reflection line across the middle. The text gets the gradient in a band as tall
   as the mark, so both cross the same tones at the same height. Stops are --ti-1..4 in :root. */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .wordmark {
    background: linear-gradient(180deg, var(--ti-1), var(--ti-2) 48%, var(--ti-3) 52%, var(--ti-4)) 0 50% / 100% var(--wm-h) no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .wm-mark { fill: url(#wm-ti); }
}
.wm-mark stop:nth-child(1) { stop-color: var(--ti-1); }
.wm-mark stop:nth-child(2) { stop-color: var(--ti-2); }
.wm-mark stop:nth-child(3) { stop-color: var(--ti-3); }
.wm-mark stop:nth-child(4) { stop-color: var(--ti-4); }
@media (forced-colors: active) {
  .wordmark { background: none; -webkit-text-fill-color: currentColor; }
  .wm-mark { fill: currentColor; }
}
/* Price footnote: one fine-print line under the block that shows prices, the same on every page. */
.footnote { max-width: 84ch; margin: 20px auto 0; color: var(--muted); font-size: var(--t-xs); line-height: 1.5; text-align: center; text-wrap: balance; }
.site-links { display: flex; list-style: none; margin: 0 -10px 0 0; padding: 0; gap: 2px; }
.site-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.site-links a:hover { color: var(--ink); background: var(--surface-2); }
/* The negative side margins equal the link padding, so link text sits on the gutter lines:
   on the right in one row, and on the left under the wordmark when the list wraps. */
@media (max-width: 440px) {
  /* Phones: the mark, the wordmark and three links fit one row down to 360 px. */
  .site-nav { column-gap: 6px; }
  .wordmark { gap: 6px; font-size: 0.92rem; letter-spacing: -0.03em; --wm-h: 18px; }
  .site-links { margin: 0 -5px; gap: 0; }
  .site-links a { padding: 0 5px; font-size: 0.84rem; }
}
@media (max-width: 370px) {
  .wordmark { gap: 5px; --wm-h: 16px; }
  .site-links { margin: 0 -4px; }
  .site-links a { padding: 0 4px; font-size: 0.8rem; }
}

/* ---------- Site footer: the same markup on every page ---------- */
.site-foot { border-top: 1px solid var(--line); }
.site-foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
  padding-top: 16px;
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-foot p { margin: 0; }
.site-foot ul { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; gap: 0 20px; }
.site-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.site-foot a:hover { color: var(--ink); }

/* ---------- Buttons: pill, no gradients ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: 600 0.98rem/1.2 var(--body);
  text-decoration: none;
  text-align: center;
  text-wrap: balance;
}
.btn:hover { border-color: var(--ink); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); border-color: transparent; background: var(--surface-2); }
.btn.store { min-height: 52px; padding: 12px 24px; font-size: 1.02rem; }
/* A store button before release: a status, not an action. The lamp carries the product hue. */
.btn.store:disabled {
  gap: 10px;
  /* If the label wraps, its lines stay next to the lamp. */
  text-align: left;
  border-style: dashed;
  background: var(--surface);
  color: var(--ink);
  cursor: default;
}
.btn.store:disabled:hover { border-color: var(--line-strong); }
.btn.store:disabled::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .btn, .site-links a { transition: border-color 0.15s, background 0.15s, color 0.15s; }
}
