/* ==========================================================================
   Personalize Science — shared look (colours, fonts, nav, buttons, form fields)
   Changing something here changes it on EVERY page.
   Page-specific styling lives inside each .html file in its own <style> block.
   ========================================================================== */

/* ---------- colours & fonts ---------- */
:root {
  --bg:        #fbfaf8;
  --bg-subtle: #f3f1ed;
  --card:      #ffffff;
  --fg:        #16130f;
  --fg-muted:  #6d675e;
  --border:    #e4e0d8;
  --danger:    #c62828;

  --sun:       #e07b0c;   /* sun orange  */
  --sun-soft:  rgba(224,123,12,.12);
  --mol:       #0e8a9e;   /* molecule teal */
  --mol-soft:  rgba(14,138,158,.12);

  --accent:      var(--fg);
  --accent-soft: var(--bg-subtle);

  --radius: 14px;
  --font-h: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-b: 'DM Sans', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d12; --bg-subtle: #131720; --card: #161b26;
    --fg: #ece8e1; --fg-muted: #9a958c; --border: #262c3a;
    --sun: #f59a2e; --sun-soft: rgba(245,154,46,.14);
    --mol: #2bb3c8; --mol-soft: rgba(43,179,200,.14);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d12; --bg-subtle: #131720; --card: #161b26;
  --fg: #ece8e1; --fg-muted: #9a958c; --border: #262c3a;
  --sun: #f59a2e; --sun-soft: rgba(245,154,46,.14);
  --mol: #2bb3c8; --mol-soft: rgba(43,179,200,.14);
  color-scheme: dark;
}

/* a page with <body class="sun"> or <body class="mol"> gets that accent colour */
body.sun { --accent: var(--sun); --accent-soft: var(--sun-soft); }
body.mol { --accent: var(--mol); --accent-soft: var(--mol-soft); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-h); line-height: 1.15; text-wrap: balance; margin: 0; }

/* ---------- top navigation ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-h); font-weight: 600; font-size: 17px;
  text-decoration: none;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(90deg, var(--sun) 0 50%, var(--mol) 50% 100%);
}
.nav-links { display: flex; gap: clamp(14px, 3vw, 28px); font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--fg-muted); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); }

/* ---------- page wrapper ---------- */
.page {
  max-width: 760px; margin: 0 auto;
  padding-inline: 16px; padding-block: 40px 80px;
}
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.lead { color: var(--fg-muted); font-size: 17px; max-width: 60ch; }

/* step indicator: "1 Your sun — 2 Poster & delivery" */
.steps { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--fg-muted); margin-bottom: 28px; flex-wrap: wrap; }
.steps .dot {
  width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1px solid var(--border); font-size: 12px; font-weight: 600; margin-right: 6px;
}
.steps .on { color: var(--fg); }
.steps .on .dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.steps .line { flex: 0 0 32px; height: 1px; background: var(--border); }

/* ---------- form building blocks ---------- */
.section { margin-top: 40px; display: grid; gap: 28px; }
.section-title { font-size: 22px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

.q { display: grid; gap: 8px; }
.q-label { font-weight: 600; font-size: 15px; }
.q-help  { font-size: 14px; color: var(--fg-muted); margin-top: -4px; }
.optional { font-weight: 400; color: var(--fg-muted); font-size: 13px; }

input[type=text], input[type=email], input[type=date], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--fg);
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .two-col { grid-template-columns: 1fr; } }

/* option tiles: plain radio buttons styled as cards (no JavaScript needed) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile {
  position: relative; display: grid; gap: 6px; padding: 12px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 12px; background: var(--card);
  font-size: 14px; font-weight: 500;
}
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile:hover { border-color: var(--fg-muted); }
.tile:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile small { color: var(--fg-muted); font-weight: 400; }
.tile .price { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.swatch { height: 36px; border-radius: 8px; }

/* photo upload slots */
.uploads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 520px) { .uploads { grid-template-columns: 1fr 1fr; } }
.slot {
  position: relative; aspect-ratio: 1; max-width: 100%;
  border: 1.5px dashed var(--border); border-radius: 12px; background: var(--card);
  display: grid; place-items: center; text-align: center; cursor: pointer; overflow: hidden;
  font-size: 13px; color: var(--fg-muted); padding: 8px;
}
.slot:hover { border-color: var(--accent); }
.slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .remove {
  position: absolute; top: 6px; right: 6px; z-index: 2; border: 0; cursor: pointer;
  width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 15px; line-height: 1;
}
.slot .plus { font-size: 26px; line-height: 1; color: var(--accent); display: block; margin-bottom: 4px; }

/* ---------- buttons ---------- */
.actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 44px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16px var(--font-h); text-decoration: none; cursor: pointer;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  background: var(--accent); color: #fff;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--fg-muted); filter: none; }

/* ---------- small message popup ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--danger); color: #fff; padding: 12px 20px; border-radius: 10px;
  font-size: 15px; z-index: 100; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--border); color: var(--fg-muted); font-size: 14px;
  padding: 24px clamp(16px, 4vw, 40px);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.footer a { color: var(--fg-muted); }
