/* ==========================================================================
   Freeze or Sneeze — Enamel Town website
   Design tokens follow docs/design/enamel-town-approved-decisions.md section 2.
   Flat fills, ink outlines, hard offset shadows. No gradients on components.
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------
   Self-hosted so the site makes no third-party requests. Both families are
   SIL Open Font License; the licences ship in assets/fonts/.
   ------------------------------------------------------------------------ */
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka_medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka_semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/fredoka_bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo_semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo_bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --frost: #2bb3e8;
  --marigold: #ffb020;

  /* Semantic — reserved meanings only, never decorative */
  --vital: #34c77b; /* healthy / success */
  --siren: #ff7a2f; /* warning / urgency */
  --signal: #e23d3d; /* danger / failure */
  --violet: #7b5cf0; /* rare */

  /* Surfaces */
  --ink: #20304a;
  --paper: #fff3e2;
  --card: #ffffff;
  --rule: #e4d7c3;

  --ink-70: #46536b;
  --ink-55: #5c6880;

  --shadow-hard: 0 6px 0 rgba(32, 48, 74, 0.14);
  --shadow-hard-sm: 0 3px 0 rgba(32, 48, 74, 0.14);
  --shadow-panel: 0 10px 30px rgba(32, 48, 74, 0.18);

  --radius: 18px;
  --radius-sm: 12px;
  --border: 3px solid var(--ink);

  --measure: 66ch;
  --page: 1120px;
  --gap: 24px;

  --font-body: "Fredoka", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-stat: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-code: "Consolas", "SFMono-Regular", ui-monospace, monospace;
}

/* --- Reset --------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #0c6e99;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--ink);
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(2.1rem, 7vw, 3.4rem);
}
h2 {
  font-size: clamp(1.6rem, 4.4vw, 2.3rem);
}
h3 {
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
}
h4 {
  font-size: 1.05rem;
}

p,
li {
  max-width: var(--measure);
}
p {
  margin: 0 0 1em;
}

ul,
ol {
  padding-left: 1.2em;
}
li {
  margin-bottom: 0.4em;
}

code,
kbd,
samp {
  font-family: var(--font-code);
  font-size: 0.9em;
}

hr {
  border: 0;
  border-top: 2px dashed var(--rule);
  margin: 2.5rem 0;
}

/* --- Focus --------------------------------------------------------------- */
:focus-visible {
  /* Two-tone ring: the ink outline carries the 3:1 contrast against every
     ground on the site, the marigold halo makes it unmistakable. */
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px var(--marigold);
  border-radius: 6px;
}
:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -200px;
  z-index: 100;
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-hard-sm);
}
.skip-link:focus {
  top: 12px;
}

/* --- Layout -------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding-block: clamp(48px, 8vw, 88px);
}
.section--tint {
  background: #fbe8ce;
  border-block: 3px solid var(--rule);
}

.section__lede {
  max-width: 60ch;
  color: var(--ink-70);
  font-size: 1.1rem;
}

.eyebrow {
  font-family: var(--font-stat);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-55);
  margin: 0 0 10px;
}

/* --- Header / navigation ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand:hover {
  color: inherit;
}
.brand__mark {
  width: 40px;
  height: 40px;
  flex: none;
}
.brand__name {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.brand__name .freeze {
  color: #166f97;
}
.brand__name .sneeze {
  color: #915c00;
}

.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer;
}
.nav-toggle__bars {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  box-shadow:
    0 -6px 0 var(--ink),
    0 6px 0 var(--ink);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.site-nav li {
  margin: 0;
  max-width: none;
}
.site-nav a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border: 3px solid transparent;
}
.site-nav a:hover {
  background: var(--card);
  border-color: var(--rule);
}
.site-nav a[aria-current="page"] {
  background: var(--card);
  border-color: var(--ink);
  box-shadow: var(--shadow-hard-sm);
}

@media (max-width: 880px) {
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
    padding-bottom: 14px;
  }
  .site-nav.is-open {
    display: block;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 6px;
  }
  .site-header__inner {
    flex-wrap: wrap;
  }
}
@media (min-width: 881px) {
  .nav-toggle {
    display: none;
  }
  .site-nav {
    margin-left: auto;
  }
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--card);
  border: var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-hard);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 90ms ease,
    box-shadow 90ms ease;
}
.btn:hover {
  color: var(--ink);
  transform: translateY(2px);
  box-shadow: 0 4px 0 rgba(32, 48, 74, 0.14);
}
.btn:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 rgba(32, 48, 74, 0.14);
}
.btn--primary {
  background: var(--frost);
}
.btn--accent {
  background: var(--marigold);
}
.btn--ghost {
  background: transparent;
  box-shadow: none;
}
.btn--ghost:hover {
  background: var(--card);
  box-shadow: none;
  transform: none;
}
.btn--block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

/* --- Cards --------------------------------------------------------------- */
.card {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 24px;
}
.card > :last-child {
  margin-bottom: 0;
}
.card p,
.card li {
  max-width: none;
}

.grid {
  display: grid;
  gap: var(--gap);
}
.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

/* Numbered loop steps */
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border: var(--border);
  border-radius: 50%;
  background: var(--frost);
  font-family: var(--font-stat);
  font-weight: 700;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}
.step:nth-child(2) .step__num {
  background: var(--marigold);
}
.step:nth-child(3) .step__num {
  background: #bfe9fb;
}
.step:nth-child(4) .step__num {
  background: #ffe0a8;
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  padding-block: clamp(40px, 7vw, 76px);
}
.hero__grid {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}
/* Wordmark lockup. The shield stands in for the word "or", as in the approved
   stacked lockup. Luckiest Guy is not a web dependency, so the two words are set
   in Fredoka Bold with the same hard ink shadow. */
.lockup {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 26px;
  max-width: none;
}
.lockup__mark {
  width: clamp(46px, 11vw, 66px);
  height: auto;
  flex: none;
}
.lockup__word {
  font-weight: 700;
  font-size: clamp(2rem, 8vw, 3.1rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-shadow: 0 4px 0 var(--ink);
}
.lockup__word--freeze {
  color: var(--frost);
}
.lockup__word--sneeze {
  color: var(--marigold);
}

.hero__logo {
  width: min(340px, 86%);
  margin-bottom: 24px;
}
.hero h1 {
  margin-bottom: 18px;
}
.hero__lede {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--ink-70);
  max-width: 48ch;
}

.hero__art {
  display: flex;
  justify-content: center;
}

/* Phone frame — a display device, not an imitation of an Android screen */
.phone {
  position: relative;
  width: min(300px, 78vw);
  padding: 10px;
  background: var(--card);
  border: var(--border);
  border-radius: 34px;
  box-shadow: var(--shadow-hard);
}
.phone img {
  border-radius: 24px;
  border: 2px solid var(--rule);
}
.phone--sm {
  width: min(240px, 64vw);
}

/* --- Status chips -------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--font-stat);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--vital);
  flex: none;
}
.chip--dev .chip__dot {
  background: var(--siren);
}
.chip--live .chip__dot {
  background: var(--vital);
}
.chip--soon .chip__dot {
  background: var(--ink-55);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

/* --- Release / download -------------------------------------------------- */
.release {
  border: var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}
.release__head {
  padding: 22px 24px;
  background: var(--frost);
  border-bottom: 3px solid var(--ink);
}
.release__head h2,
.release__head h3 {
  margin-bottom: 8px;
}
.release__body {
  padding: 24px;
}
.release__body > :last-child {
  margin-bottom: 0;
}
.release p,
.release li {
  max-width: none;
}

/* Spec table */
.specs {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
}
.specs caption {
  text-align: left;
  font-weight: 700;
  padding-bottom: 10px;
}
.specs th,
.specs td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--rule);
  vertical-align: top;
}
.specs th {
  width: 42%;
  font-weight: 600;
  color: var(--ink-70);
}
.specs td {
  font-family: var(--font-stat);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.specs td.mono {
  font-family: var(--font-code);
  font-weight: 400;
  font-size: 0.8rem;
  word-break: break-all;
}
.table-scroll {
  overflow-x: auto;
}

/* --- Gallery ------------------------------------------------------------- */
.shots {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.shot {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 12px;
  margin: 0;
}
.shot img {
  border-radius: 10px;
  border: 2px solid var(--rule);
  width: 100%;
}
.shot figcaption {
  padding: 12px 4px 2px;
  font-size: 0.95rem;
  color: var(--ink-70);
  max-width: none;
}
.shot figcaption b {
  display: block;
  color: var(--ink);
  font-weight: 700;
}

.shot__btn {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  cursor: zoom-in;
  border-radius: 10px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(32, 48, 74, 0.82);
}
.lightbox[hidden] {
  display: none;
}
.lightbox__panel {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 12px;
  max-width: min(520px, 92vw);
  max-height: 92vh;
  overflow: auto;
  box-shadow: var(--shadow-panel);
}
.lightbox__panel img {
  max-height: 70vh;
  width: auto;
  margin-inline: auto;
  border-radius: 10px;
}
.lightbox__cap {
  padding: 12px 4px 2px;
  font-size: 0.95rem;
  color: var(--ink-70);
}

/* --- Zones / lists ------------------------------------------------------- */
.zone {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.zone__n {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: var(--border);
  border-radius: 10px;
  background: var(--paper);
  font-family: var(--font-stat);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.zone h3 {
  margin-bottom: 4px;
}
.zone p {
  margin: 0;
  color: var(--ink-70);
}

.stack {
  display: grid;
  gap: 16px;
}

.note {
  border: var(--border);
  border-left-width: 10px;
  border-radius: var(--radius-sm);
  background: var(--card);
  padding: 20px 22px;
  box-shadow: var(--shadow-hard-sm);
}
.note--calm {
  border-left-color: var(--frost);
}
.note--warn {
  border-left-color: var(--siren);
}
.note--safe {
  border-left-color: var(--vital);
}
.note > :last-child {
  margin-bottom: 0;
}
.note p,
.note li {
  max-width: none;
}

.fact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.fact-list li {
  max-width: none;
  padding-left: 30px;
  position: relative;
  margin: 0;
}
.fact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 14px;
  height: 14px;
  border: 3px solid var(--ink);
  border-radius: 4px;
  background: var(--frost);
}
.fact-list--none li::before {
  background: var(--card);
}

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 3px solid var(--ink);
  background: #fbe8ce;
  padding-block: 40px;
  margin-top: 40px;
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.site-footer li {
  margin: 0;
  max-width: none;
}
.site-footer p {
  color: var(--ink-70);
  font-size: 0.95rem;
}
.footer__grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* --- Utilities ----------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.center {
  text-align: center;
}
.mt-0 {
  margin-top: 0;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.75rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.75rem;
}
.muted {
  color: var(--ink-70);
}
.small {
  font-size: 0.93rem;
}
.lede {
  font-size: 1.1rem;
  color: var(--ink-70);
  max-width: 60ch;
}

/* --- 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;
  }
  .btn:hover,
  .btn:active {
    transform: none;
  }
}

/* --- Narrow phones (360px) ---------------------------------------------- */
@media (max-width: 400px) {
  :root {
    --gap: 18px;
  }
  .wrap {
    padding-inline: 16px;
  }
  .card {
    padding: 20px;
  }
  .release__head,
  .release__body {
    padding: 20px;
  }
  .btn {
    width: 100%;
  }
  .shots {
    grid-template-columns: 1fr;
  }
  .specs th {
    width: 45%;
  }
}

/* --- Print --------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .btn-row,
  .nav-toggle {
    display: none;
  }
  body {
    background: #fff;
  }
}

.mb-0 { margin-bottom: 0; }

/* Keep the hard offset shadow while a button is focused. */
.btn:focus-visible {
  box-shadow:
    0 0 0 7px var(--marigold),
    var(--shadow-hard);
}
