/* DoggosLab — v1 styles
   Palette taken from the DoggosLab thumbnails: night navy, HUD cyan ring,
   signal-yellow titles, red for busted myths. */

@font-face {
  font-family: "Bitter";
  src: url("/assets/fonts/bitter.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dmsans.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #0f2135;
  --deep: #16304a;
  --line: #27496b;
  --hud: #46d9f0;
  --signal: #ffd447;
  --myth: #ff6b5e;
  --paper: #f2f5f7;
  --mist: #a3b6c7;

  --serif: "Bitter", Georgia, "Times New Roman", serif;
  --ui: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --measure: 38rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { display: block; max-width: 100%; }

a { color: var(--hud); text-underline-offset: 0.18em; }
a:hover { color: var(--paper); }

:focus-visible {
  outline: 3px solid var(--hud);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--signal); color: var(--night);
  padding: 0.5rem 1rem; font-family: var(--ui); font-weight: 700;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* ---------- Header / footer ---------- */

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  max-width: 72rem; margin: 0 auto;
}

.wordmark {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--paper); text-decoration: none;
  font-family: var(--serif); font-weight: 800; font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.wordmark svg { width: 28px; height: 28px; }
.wordmark:hover { color: var(--paper); }

.site-nav { display: flex; gap: 1.25rem; font-family: var(--ui); font-size: 0.95rem; }
.site-nav a { color: var(--mist); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--paper); }
@media (max-width: 560px) { .site-nav .nav-optional { display: none; } }

main { padding: 0 var(--gutter) 4rem; max-width: 72rem; margin: 0 auto; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem var(--gutter) 2.5rem;
  max-width: 72rem; margin: 0 auto;
  font-family: var(--ui); font-size: 0.875rem; color: var(--mist);
  line-height: 1.6;
}
.site-footer p { margin: 0 0 0.5rem; max-width: var(--measure); }
.site-footer a { color: var(--mist); }
.site-footer a:hover { color: var(--paper); }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-weight: 800; font-size: clamp(2.3rem, 8.5vw, 4.25rem); }
h2 { font-weight: 750; font-size: clamp(1.5rem, 4.5vw, 2rem); }
h3 { font-weight: 700; font-size: 1.2rem; line-height: 1.25; }

.lede {
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--mist);
  max-width: 34rem;
  margin: 1rem 0 0;
}

.prose { max-width: var(--measure); }
.prose p, .prose ul { margin: 0 0 1rem; }
.prose h2 { margin: 2.75rem 0 0.9rem; }
.prose h3 { margin: 1.75rem 0 0.5rem; }

.muted { color: var(--mist); }
.small { font-family: var(--ui); font-size: 0.875rem; line-height: 1.55; }

/* ---------- Controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.75rem 1.4rem;
  border: 0; border-radius: 999px;
  font-family: var(--ui); font-size: 1rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
  background: var(--signal); color: var(--night);
  transition: transform 120ms ease, background-color 120ms ease;
}
.btn:hover { color: var(--night); background: #ffe17a; }
.btn:active { transform: scale(0.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

.btn-quiet {
  background: transparent; color: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-quiet:hover { background: var(--deep); color: var(--paper); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.field { display: grid; gap: 0.4rem; }
.field-label { font-family: var(--ui); font-weight: 600; font-size: 0.95rem; }
.field-hint { font-family: var(--ui); font-size: 0.85rem; color: var(--mist); }

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--night);
  color: var(--paper);
  font-family: var(--ui); font-size: 1rem;
  color-scheme: dark;
}
input:hover, select:hover { border-color: #3a6690; }
input:focus-visible, select:focus-visible { outline-offset: 1px; }
input::placeholder { color: #6f8aa3; }

/* Size picker: radio chips with a dog silhouette scaled to the size */
.sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; border: 0; padding: 0; margin: 0; }
.sizes legend { padding: 0; margin-bottom: 0.4rem; }
.size-chip { position: relative; }
.size-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.size-chip label {
  display: grid; justify-items: center; align-content: end; gap: 0.2rem;
  height: 100%;
  padding: 0.7rem 0.3rem 0.6rem;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  font-family: var(--ui); text-align: center; cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.size-chip svg { color: var(--mist); }
.size-chip .size-name { font-weight: 700; font-size: 0.95rem; }
.size-chip .size-weight { font-size: 0.75rem; color: var(--mist); line-height: 1.3; }
.size-chip input:checked + label { border-color: var(--hud); background: rgba(70, 217, 240, 0.08); }
.size-chip input:checked + label svg { color: var(--hud); }
.size-chip input:focus-visible + label { outline: 3px solid var(--hud); outline-offset: 2px; }

/* ---------- Home ---------- */

.home-hero {
  display: grid; gap: 2.5rem;
  padding: clamp(1.5rem, 6vw, 4.5rem) 0 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .home-hero { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; }
}

.quick-age {
  background: var(--deep);
  border-radius: 22px;
  padding: clamp(1.25rem, 4vw, 2rem);
  display: grid; gap: 1.1rem;
}
.quick-age h2 { font-size: clamp(1.35rem, 4vw, 1.65rem); }
.quick-age .row { display: grid; grid-template-columns: 1fr auto; gap: 0.75rem; align-items: end; }

.explore { max-width: 46rem; margin-top: 1rem; }
.explore h2 { margin-bottom: 0.5rem; }
.explore ul { list-style: none; margin: 0; padding: 0; }
.explore li { border-bottom: 1px solid var(--line); }
.explore a {
  display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; align-items: center;
  padding: 1.15rem 0; text-decoration: none; color: var(--paper);
}
.explore a:hover .explore-title { color: var(--signal); }
.explore-title { font-weight: 700; font-size: 1.2rem; }
.explore-text { grid-column: 1; color: var(--mist); font-size: 1rem; line-height: 1.5; }
.explore .tag {
  grid-row: 1 / span 2; grid-column: 2;
  font-family: var(--ui); font-size: 0.8rem; font-weight: 600;
  padding: 0.25rem 0.65rem; border-radius: 999px;
  color: var(--hud); box-shadow: inset 0 0 0 1px rgba(70, 217, 240, 0.45);
  white-space: nowrap;
}

/* ---------- Calculator ---------- */

.calc-intro { padding: clamp(1.5rem, 5vw, 3.5rem) 0 1.75rem; max-width: 46rem; }

.calc-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 960px) { .calc-grid { grid-template-columns: 25rem 1fr; gap: 3.5rem; } }

.calc-form {
  background: var(--deep);
  border-radius: 22px;
  padding: clamp(1.25rem, 4vw, 1.75rem);
  display: grid; gap: 1.35rem;
}
.calc-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.age-mode { display: flex; gap: 1rem; font-family: var(--ui); font-size: 0.9rem; }
.age-mode button {
  background: none; border: 0; padding: 0; color: var(--hud); cursor: pointer;
  font: inherit; text-decoration: underline; text-underline-offset: 0.2em;
}

.photo-pick { display: flex; align-items: center; gap: 0.9rem; }
.photo-pick .thumb {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  background: var(--night) center / cover no-repeat;
  box-shadow: 0 0 0 1.5px var(--line);
}
.photo-pick input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-pick label.btn-quiet { min-height: 2.6rem; padding: 0.5rem 1rem; font-size: 0.95rem; }

.form-error { color: var(--myth); font-family: var(--ui); font-size: 0.9rem; margin: 0; min-height: 1.2em; }

/* Result: the life-stage dial is the one loud thing on the page */
.result { display: grid; gap: 1.75rem; }
.result[hidden] { display: none; }
.result-empty { color: var(--mist); max-width: 30rem; }

.readout { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 640px) { .readout { grid-template-columns: minmax(0, 300px) 1fr; gap: 2rem; } }

.dial { width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 1; }
.dial svg { width: 100%; height: 100%; overflow: visible; }

.result-name { font-family: var(--ui); font-weight: 600; font-size: 1.05rem; color: var(--mist); margin: 0; }
.result-number {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(5rem, 22vw, 8.5rem); line-height: 0.9;
  color: var(--signal); letter-spacing: -0.04em;
  margin: 0.15rem 0 0.25rem;
  font-variant-numeric: lining-nums tabular-nums;
}
.result-unit { font-weight: 700; font-size: 1.35rem; margin: 0; }
.result-stage { margin: 0.6rem 0 0; color: var(--paper); }
.result-stage strong { color: var(--hud); }

.compare { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; font-family: var(--ui); }
.compare li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.compare .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.compare .myth .val { color: var(--myth); text-decoration: line-through; text-decoration-thickness: 2px; }
.compare .note { display: block; font-size: 0.8rem; color: var(--mist); font-weight: 400; }

.sizes-table { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: 0.95rem; }
.sizes-table th, .sizes-table td { text-align: left; padding: 0.6rem 0.4rem; border-bottom: 1px solid var(--line); }
.sizes-table th { color: var(--mist); font-weight: 500; }
.sizes-table td:last-child, .sizes-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.sizes-table tr.is-current td { color: var(--signal); font-weight: 700; }

.tips { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.6rem; max-width: var(--measure); }

.card-out { display: grid; gap: 1rem; justify-items: start; }
.card-out img { width: min(260px, 70vw); border-radius: 14px; box-shadow: 0 0 0 1px var(--line); }
.card-out[hidden] { display: none; }

/* ---------- Picks ---------- */

.picks-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 46rem; }
.pick {
  display: grid; gap: 0.35rem 1.5rem;
  padding: 1.4rem 0; border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) { .pick { grid-template-columns: 1fr auto; align-items: center; } }
.pick .pick-cat { font-family: var(--ui); font-size: 0.85rem; color: var(--hud); font-weight: 600; margin: 0; }
.pick h3 { margin: 0; }
.pick p { margin: 0; color: var(--mist); }
.pick .btn { grid-row: 1 / span 3; grid-column: 2; }
@media (max-width: 639px) { .pick .btn { grid-row: auto; grid-column: auto; justify-self: start; margin-top: 0.5rem; } }

.disclosure {
  font-family: var(--ui); font-size: 0.875rem; color: var(--mist);
  border-left: 3px solid var(--hud); padding: 0.2rem 0 0.2rem 0.9rem; margin: 1.25rem 0 0;
  max-width: 40rem;
}

/* ---------- Memorial teaser ---------- */

.memorial-hero { display: grid; gap: 2rem; align-items: center; padding: clamp(1.5rem, 5vw, 3.5rem) 0 2rem; }
@media (min-width: 900px) { .memorial-hero { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }
.globe-wrap { width: min(420px, 100%); aspect-ratio: 1; margin: 0 auto; }
.globe-wrap canvas { width: 100%; height: 100%; }

.waitlist {
  background: var(--deep); border-radius: 22px;
  padding: clamp(1.25rem, 4vw, 1.75rem);
  display: grid; gap: 1rem; max-width: 34rem;
}
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-family: var(--ui); font-size: 0.9rem; color: var(--mist); }
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; accent-color: var(--hud); }
.form-ok { color: var(--hud); font-family: var(--ui); font-weight: 600; margin: 0; }

/* ---------- Sections ---------- */

.section { margin-top: clamp(2.75rem, 7vw, 4.5rem); }
.section > h2 { margin-bottom: 1rem; }

.faq { max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--line); padding: 0.9rem 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; list-style-position: outside; }
.faq details p { margin: 0.6rem 0 0.2rem; color: var(--mist); }

.notfound { padding: 4rem 0; max-width: 34rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
