/* K&A Digital Studio: shared styles.
   Change the tokens first; everything else reads from them.
   Each project section overrides --accent with its own color. */
:root {
  --bg: #0d0f13;
  --bg-2: #11141a;
  --surface: #161a21;
  --surface-2: #1c212a;
  --border: #262c37;
  --border-strong: #353d4b;
  --text: #edf0f5;
  --muted: #98a1b0;
  --faint: #838c9c;      /* dimmest text; still passes WCAG AA contrast */

  --studio: #7cc7ff;          /* K&A studio blue */
  --accent: var(--studio);
  --accent-ink: #08121c;

  --wiu-amber: #ffb300;       /* Wrap It Up */
  --wiu-red: #e53935;
  --harbor: #14b8a6;          /* Harbor template */
  --lantern: #f2a93b;         /* Lantern template */
  --keepsake: #d4b36d;        /* Keepsake template */

  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --max: 1120px;
  --radius: 14px;
  --radius-lg: 22px;
}

/* Bangers (SIL OFL, license in assets/fonts/). Only downloads where Wrap It Up uses it. */
@font-face {
  font-family: "Bangers";
  src: url("/assets/fonts/Bangers-Regular.ttf") format("truetype");
  font-display: swap;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--studio); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* Smooth page-to-page transitions where the browser supports them. */
@view-transition { navigation: auto; }

/* --- Header ------------------------------------------------------------- */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13, 15, 19, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
header.site .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 28px; padding-top: 14px; padding-bottom: 14px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: 0.01em;
}
/* The K&A icon (same file as the favicon) */
.brand .mark { display: block; width: 30px; height: 30px; flex: 0 0 auto; }
nav.main { display: flex; flex-wrap: wrap; gap: 4px 22px; }
nav.main a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--text); }
nav.main a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--studio); }

/* --- Project sub-nav (inside a project, e.g. Wrap It Up) ----------------- */
.subnav { border-bottom: 1px solid var(--border); background: var(--bg-2); }
.subnav .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; padding-top: 10px; padding-bottom: 10px; }
.subnav .crumb { font: 600 0.85rem/1 var(--font); color: var(--faint); margin-right: 6px; }
.subnav .crumb a { color: var(--muted); text-decoration: none; }
.subnav .crumb a:hover { color: var(--text); }
.subnav .crumb b { color: var(--text); font-weight: 700; }
.subnav nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.subnav nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.9rem;
  padding: 6px 12px; border-radius: 999px;
}
.subnav nav a:hover { color: var(--text); }
.subnav nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }

/* --- Type --------------------------------------------------------------- */
h1, h2, h3 { letter-spacing: -0.022em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); line-height: 1.05; margin: 0 0 20px; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.12; margin: 0 0 12px; font-weight: 800; }
h3 { font-size: 1.12rem; line-height: 1.3; margin: 0 0 6px; }
p, ul, ol { margin: 0 0 16px; }
.lead { color: var(--muted); font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 60ch; text-wrap: pretty; }
.eyebrow {
  font: 700 0.78rem/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
.muted { color: var(--muted); }
.h-title { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

section { padding: 72px 0; }
section.tight { padding: 48px 0; }
section.alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 28px; }
.section-head p { margin: 0; }

/* --- Buttons & chips ---------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid transparent;
  font: 700 0.98rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, border-color 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font: 700 0.72rem/1 var(--font); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border-strong); border-radius: 999px; padding: 6px 10px;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.live { color: #4ade80; border-color: rgba(74, 222, 128, 0.35); }
.chip.beta { color: var(--wiu-amber); border-color: rgba(255, 179, 0, 0.35); }
.chip.soon { color: var(--studio); border-color: rgba(124, 199, 255, 0.35); }

/* --- Hero (home) -------------------------------------------------------- */
.hero { padding: 80px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(800px 420px at 85% 10%, rgba(124, 199, 255, 0.14), transparent 60%),
    radial-gradient(600px 380px at 0% 100%, rgba(20, 184, 166, 0.09), transparent 60%);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { max-width: 13ch; }
.hero h1 .soft { color: var(--studio); }

/* Hero collage: a browser window (templates) and a phone (apps). */
.collage { position: relative; min-height: 420px; }
.browser {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); overflow: hidden;
}
.browser .bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.browser .bar .url {
  margin-left: 10px; flex: 1; font: 500 0.72rem/1 var(--mono); color: var(--faint);
  background: var(--bg); border-radius: 6px; padding: 6px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.collage .browser { position: absolute; inset: 0 56px 34px 0; }
.collage .phone { position: absolute; right: 0; bottom: -18px; width: 138px; padding: 6px; border-radius: 22px; transform: rotate(5deg); }
.collage .phone img { border-radius: 17px; }

.phone {
  width: 180px; border-radius: 26px; padding: 7px; background: #05060a;
  border: 1px solid #2c3242; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
}
.phone img { border-radius: 20px; aspect-ratio: 585 / 1266; width: 100%; }

/* --- Harbor mini site (used in the collage and the live preview) -------- */
.harbor {
  --h-brand: var(--harbor);
  --h-bg: #f7f6f2; --h-surface: #ffffff; --h-text: #14201f; --h-muted: #5c6b69; --h-border: #e4e2da;
  --h-radius: 12px; --h-font: var(--font); --h-head: var(--font); --h-weight: 800;
  background: var(--h-bg); color: var(--h-text); font-family: var(--h-font);
  height: 100%; overflow: hidden; font-size: 13px; line-height: 1.5;
}
.harbor[data-skin="bold"]  { --h-radius: 4px; --h-weight: 900; --h-bg: #ffffff; --h-border: #14201f; }
.harbor[data-skin="warm"]  { --h-bg: #fbf3ea; --h-border: #ecdcc8; --h-radius: 18px; --h-head: Georgia, "Times New Roman", serif; --h-weight: 700; }
.harbor[data-skin="night"] { --h-bg: #0f1716; --h-surface: #16211f; --h-text: #e8f1ef; --h-muted: #93a6a2; --h-border: #24332f; }
.harbor .h-nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--h-border); }
.harbor .h-logo { font-family: var(--h-head); font-weight: var(--h-weight); font-size: 14px; display: flex; align-items: center; gap: 7px; }
.harbor .h-logo::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--h-brand); }
.harbor .h-links { display: flex; gap: 14px; color: var(--h-muted); font-size: 11.5px; }
.harbor .h-cta, .harbor .h-btn {
  background: var(--h-brand); color: #fff; border-radius: var(--h-radius); padding: 6px 12px; font-weight: 700; font-size: 11.5px; border: 0;
}
.harbor .h-hero { padding: 26px 18px 18px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: center; }
.harbor .h-hero :is(h1, h4, .h-title) { font-family: var(--h-head); font-weight: var(--h-weight); font-size: 21px; line-height: 1.12; margin: 0 0 8px; letter-spacing: -0.02em; }
.harbor .h-hero p { color: var(--h-muted); margin: 0 0 12px; font-size: 12px; }
.harbor .h-art {
  aspect-ratio: 4 / 3; border-radius: var(--h-radius);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--h-brand) 75%, #fff) 0%, var(--h-brand) 55%, color-mix(in srgb, var(--h-brand) 60%, #000) 100%);
  position: relative;
}
.harbor .h-art::after {
  content: "★ 4.9 · 212 reviews"; position: absolute; left: 10px; bottom: 10px;
  background: var(--h-surface); color: var(--h-text); font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 999px;
}
.harbor .h-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 18px 18px; }
.harbor .h-card { background: var(--h-surface); border: 1px solid var(--h-border); border-radius: var(--h-radius); padding: 10px; }
.harbor .h-card b { display: block; font-family: var(--h-head); font-size: 12px; margin-bottom: 2px; }
.harbor .h-card span { color: var(--h-muted); font-size: 10.5px; }
.harbor .h-card i { display: block; width: 18px; height: 18px; border-radius: 6px; margin-bottom: 8px; background: color-mix(in srgb, var(--h-brand) 22%, transparent); }
.harbor .h-strip {
  margin: 0 18px; padding: 12px 14px; border-radius: var(--h-radius);
  background: color-mix(in srgb, var(--h-brand) 12%, var(--h-surface)); border: 1px solid var(--h-border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 12px;
}

/* --- Cards & grids ------------------------------------------------------ */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; color: var(--text); text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .thumb { aspect-ratio: 16 / 10; background: var(--surface-2); border-bottom: 1px solid var(--border); overflow: hidden; position: relative; }
.card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .body p { color: var(--muted); margin: 0; font-size: 0.96rem; }
.card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; }
.card .meta .price { margin-left: auto; font-weight: 800; }
.card h3 { margin: 0; font-size: 1.2rem; }

/* Card thumbs */
.thumb.wiu {
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 179, 0, 0.35), transparent 55%),
    radial-gradient(circle at 20% 90%, rgba(229, 57, 53, 0.35), transparent 50%), #15110c;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.thumb.wiu .phone { width: 92px; padding: 4px; border-radius: 16px; box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5); }
.thumb.wiu .phone img { border-radius: 12px; }
.thumb.wiu .phone:nth-child(2) { transform: translateY(14px); }
.thumb.wiu .wordmark { position: absolute; left: 16px; top: 12px; font: 400 1.35rem/1 "Bangers", var(--font); letter-spacing: 0.05em; color: var(--wiu-amber); }
.thumb.harbor-thumb { padding: 18px 18px 0; background: linear-gradient(160deg, #0f2a27, #0b1514); }
.thumb.harbor-thumb .browser { height: 100%; border-bottom: 0; border-radius: 10px 10px 0 0; }
.thumb.harbor-thumb .harbor { font-size: 11px; }
.thumb.workshop {
  display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 14px, var(--surface) 14px 28px);
}
.thumb.workshop span { font: 700 0.76rem/1 var(--font); color: var(--faint); letter-spacing: 0.1em; text-transform: uppercase; border: 1px dashed var(--border-strong); padding: 10px 14px; border-radius: 10px; }
.card.wiu-card { --accent: var(--wiu-amber); }
.card.harbor-card { --accent: var(--harbor); }
.card.dashed { border-style: dashed; background: transparent; }

/* Principles */
.principle { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.principle .num { font: 700 0.76rem/1 var(--font); color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; }
.principle h3 { margin-top: 14px; }
.principle .icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
}
.principle .icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.approach .principle { background: transparent; }
.principle p { color: var(--muted); margin: 0; }

/* Filter chips (Work, Templates) */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filters button {
  font: 600 0.88rem/1 var(--font); color: var(--muted); background: transparent; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 9px 15px;
}
.filters button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
[hidden] { display: none !important; }

/* --- Signup band -------------------------------------------------------- */
.signup {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center;
  padding: 36px; border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
  background: linear-gradient(135deg, rgba(124, 199, 255, 0.10), rgba(20, 184, 166, 0.08)), var(--surface);
}
.signup h2 { margin-bottom: 6px; }
.signup p { margin: 0; color: var(--muted); }
.signup form { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input {
  flex: 1 1 220px; min-width: 0; font: 500 1rem/1.2 var(--font); color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong); border-radius: 10px; padding: 12px 14px;
}
.signup small { display: block; width: 100%; color: var(--faint); font-size: 0.8rem; }

/* --- Page header (inner pages) ------------------------------------------ */
.page-head { padding-top: 64px; padding-bottom: 28px; }
.page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); }

/* --- Product page ------------------------------------------------------- */
.product { --accent: var(--harbor); --accent-ink: #04201d; }
.product-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; padding: 56px 0 28px; }
.crumbs { font: 500 0.88rem/1 var(--font); color: var(--faint); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.buy {
  position: sticky; top: 88px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 22px;
}
.buy fieldset { border: 0; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.buy legend { font: 700 0.76rem/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.license {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 14px;
}
.license:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.license input { accent-color: var(--accent); margin: 0; }
.license b { font-size: 0.98rem; }
.license .amt { font-weight: 800; }
.license small { grid-column: 2 / 4; color: var(--muted); font-size: 0.84rem; }
.buy .btn { width: 100%; margin-top: 6px; }
.buy .fine { color: var(--faint); font-size: 0.82rem; margin: 12px 0 0; text-align: center; }

/* Live preview with controls */
.preview { border: 1px solid var(--border-strong); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.preview .controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.preview .controls label, .preview .controls .ctl { font: 600 0.85rem/1 var(--font); color: var(--muted); display: flex; align-items: center; gap: 8px; }
.preview .controls input[type="text"] {
  font: 500 0.9rem/1 var(--font); color: var(--text); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 10px; width: 170px;
}
.preview .controls input[type="color"] { width: 34px; height: 30px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg); padding: 2px; cursor: pointer; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; }
.seg button { font: 600 0.82rem/1 var(--font); color: var(--muted); background: transparent; border: 0; padding: 8px 11px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border-strong); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.preview .stage { background: var(--bg); padding: 22px; display: flex; justify-content: center; }
.preview .stage .browser { width: 100%; max-width: 920px; transition: max-width 0.35s ease; }
.preview .stage .harbor .h-hero { padding: 36px 24px 24px; gap: 24px; }
.preview .stage .harbor .h-hero :is(h1, h4, .h-title) { font-size: 30px; }
.preview .stage .harbor .h-hero p { font-size: 14px; }
.preview .stage .harbor .h-cards { padding: 0 24px 20px; }
.preview .stage .harbor .h-strip { margin: 0 24px; }
.preview .stage[data-device="tablet"] .browser { max-width: 560px; }
.preview .stage[data-device="phone"] .browser { max-width: 340px; }
.preview .stage .harbor { height: auto; font-size: 13px; }
.preview .stage[data-device="phone"] .harbor .h-hero,
.preview .stage[data-device="phone"] .harbor .h-cards { grid-template-columns: 1fr; }
.preview .stage[data-device="phone"] .harbor .h-links { display: none; }
.preview .stage[data-device="phone"] .harbor .h-hero :is(h1, h4, .h-title) { font-size: 22px; }
.preview .stage[data-device="phone"] .harbor .h-strip { flex-direction: column; align-items: flex-start; }
.preview .stage .harbor { padding-bottom: 18px; }


.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.checks { list-style: none; padding: 0; display: grid; gap: 10px; }
.checks li { padding-left: 28px; position: relative; }
/* A drawn check mark, so the list never reads as empty checkboxes */
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.36em; width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.checks li::after {
  content: ""; position: absolute; left: 6px; top: calc(0.36em + 4px); width: 5px; height: 9px;
  border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.pages { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.pages li { font: 600 0.88rem/1 var(--font); border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 11px; color: var(--muted); }

details { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
details + details { margin-top: 10px; }
summary { cursor: pointer; padding: 15px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "–"; }
details > div { padding: 0 18px 16px; color: var(--muted); }


/* --- About -------------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.fact { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.fact span:first-child { color: var(--muted); }
.fact span:last-child { font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.about-grid > * { min-width: 0; }

/* --- Footer ------------------------------------------------------------- */
footer.site { border-top: 1px solid var(--border); margin-top: 40px; color: var(--muted); font-size: 0.92rem; }
footer.site .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; padding-top: 44px; padding-bottom: 28px; }
footer.site h2 { font: 700 0.76rem/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin: 0 0 14px; }
footer.site ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--text); }
footer.site .footer-base {
  border-top: 1px solid var(--border); padding-top: 18px; padding-bottom: 30px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font: 500 0.85rem/1.5 var(--font); color: var(--faint);
}

/* --- Small screens ------------------------------------------------------ */
@media (max-width: 900px) {
  .hero .wrap, .product-head, .two-col, .about-grid, .signup { grid-template-columns: 1fr; }
  .collage { min-height: 340px; }
  .buy { position: static; }
  footer.site .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  header.site { position: static; }
  .hero { padding-top: 48px; }
  section { padding: 52px 0; }
  /* On a phone the overlapping mock-ups clip each other: show the browser alone, full width, stacked. */
  .hero .wrap > * { min-width: 0; } /* the one-line URL bar must not widen the column */
  .collage { min-height: 0; }
  .collage .browser { position: relative; inset: auto; }
  .collage .phone { display: none; }
  .collage .harbor .h-hero { grid-template-columns: 1fr; padding: 18px 16px 14px; }
  .collage .harbor .h-art { display: none; }
  .collage .harbor .h-cards { grid-template-columns: repeat(2, 1fr); padding: 0 16px 16px; }
  .collage .harbor .h-card:nth-child(3) { display: none; }
  .harbor .h-links { display: none; }
  .signup { padding: 24px; }
  .preview .stage { padding: 12px; }
  /* On a phone the preview is already phone-sized: stack it and drop the width toggle. */
  .preview .seg[aria-label="Device width"] { display: none; }
  .preview .stage .harbor .h-hero, .preview .stage .harbor .h-cards { grid-template-columns: 1fr; }
  .preview .stage .harbor .h-hero { padding: 24px 16px 16px; }
  .preview .stage .harbor .h-hero :is(h1, h4, .h-title) { font-size: 22px; }
  .preview .stage .harbor .h-cards { padding: 0 16px 16px; }
  .preview .stage .harbor .h-strip { margin: 0 16px; flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}


/* --- Template demo pages ------------------------------------------------ */
/* A slim studio bar on top of a full-page template demo, so buyers can always get back. */
.demo-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  padding: 10px 20px; background: var(--bg); border-bottom: 1px solid var(--border-strong);
  font-size: 0.92rem;
}
.demo-bar .brand .mark { width: 26px; height: 26px; }
.demo-bar .back { color: var(--muted); text-decoration: none; font-weight: 600; }
.demo-bar .back:hover { color: var(--text); }
.demo-bar .spacer { flex: 1; }
.demo-bar .btn { padding: 8px 14px; font-size: 0.9rem; }
.demo-page { --accent: var(--harbor); --accent-ink: #04201d; }
.demo-page .harbor { height: auto; font-size: 16px; }
.demo-page .harbor .h-nav { padding: 18px 5vw; }
.demo-page .harbor .h-logo { font-size: 18px; }
.demo-page .harbor .h-links { font-size: 15px; gap: 26px; }
.demo-page .harbor .h-cta, .demo-page .harbor .h-btn { font-size: 15px; padding: 10px 18px; }
.demo-page .harbor .h-hero { padding: 64px 5vw 48px; gap: 48px; }
.demo-page .harbor .h-hero :is(h1, h4, .h-title) { font-size: clamp(2rem, 5vw, 3.4rem); }
.demo-page .harbor .h-hero p { font-size: 17px; max-width: 46ch; }
.demo-page .harbor .h-art::after { font-size: 13px; padding: 6px 12px; left: 16px; bottom: 16px; }
.demo-page .harbor .h-cards { padding: 0 5vw 40px; gap: 18px; }
.demo-page .harbor .h-card { padding: 22px; }
.demo-page .harbor .h-card b { font-size: 17px; }
.demo-page .harbor .h-card span { font-size: 14px; }
.demo-page .harbor .h-card i { width: 32px; height: 32px; }
.demo-page .harbor .h-strip { margin: 0 5vw 64px; padding: 22px 26px; font-size: 16px; }
@media (max-width: 700px) {
  .demo-page .harbor .h-hero, .demo-page .harbor .h-cards { grid-template-columns: 1fr; }
  .demo-page .harbor .h-links { display: none; }
  .demo-page .harbor .h-strip { flex-direction: column; align-items: flex-start; }
  .demo-bar .hide-sm { display: none; }
}

/* Short text pages (legal, 404): align with the page edge like every other page, keep lines readable. */
.page-head.narrow { max-width: var(--max); }
.page-head.narrow > * { max-width: 720px; }

/* Email signup (mailto until an email provider is chosen) */
.signup-action { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.signup-action small { color: var(--faint); font-size: 0.82rem; }

/* Long-form text pages (legal) */
.legal { padding-bottom: 40px; }
.legal > * { max-width: 720px; }
.legal > .grid-3 { max-width: 760px; }
.legal h2 { font-size: 1.35rem; margin-top: 36px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }

/* --- About ---------------------------------------------------------------- */
.mission {
  margin: 0 0 40px; padding: 4px 0 4px 26px; border-left: 3px solid var(--studio);
}
.mission p { font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.5; font-weight: 600; color: var(--text); margin: 0; text-wrap: pretty; }
.about-grid h2 { font-size: 1.45rem; margin-top: 36px; }
.about-grid .checks { margin-top: 14px; }
.facts-title { font-size: 1.05rem; margin: 0 0 6px; }
.facts .fact a { color: var(--text); }

/* Footer brand line */
footer.site .tagline { margin-top: 14px; color: var(--muted); }

/* --- Template shop: cards, product pages ------------------------------------ */
.card.lantern-card { --accent: var(--lantern); }
.card.keepsake-card { --accent: var(--keepsake); }
.card .thumb.shot { padding: 0; overflow: hidden; }
.card .thumb.shot img { width: 100%; height: 100%; object-fit: cover; }
.product.lantern { --accent: var(--lantern); --accent-ink: #2b1d05; }
.product.keepsake { --accent: var(--keepsake); --accent-ink: #1d1606; }
.prices { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.prices li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; }
.prices b { font-size: 0.98rem; }
.prices .amt { font-weight: 800; }
.prices small { grid-column: 1 / -1; color: var(--muted); font-size: 0.84rem; }
.prices .both { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.product-shot { margin: 0 0 8px; }
.product-shot img, .shots img { border-radius: var(--radius-lg); border: 1px solid var(--border); }
.shots { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); }
.shots figure { margin: 0; }
.shots figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.versions { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.version { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.version h3 { font-size: 1.2rem; margin-bottom: 4px; }
.version .muted { margin-bottom: 14px; }
.version .checks { margin: 0; font-size: 0.96rem; }

/* --- TidyHarbor shop page ----------------------------------------------- */
.tidyharbor-page { --tidy-navy: #1f3a5a; --tidy-sky: #a8cbe0; --tidy-cream: #fbf8f2; --accent: var(--tidy-sky); --accent-ink: #0f2236; }
.th-hero { padding-top: 64px; }
.th-hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.th-hero .wrap > * { min-width: 0; }
.th-hero h1 { margin-bottom: 4px; }
.th-tagline { font: 700 1.25rem/1.3 var(--font); color: var(--tidy-sky); margin: 0 0 14px; }
.th-hero-art img { width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); }
.th-products .card .thumb { aspect-ratio: 4 / 3; background: var(--tidy-cream); }
.th-products .card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.th-products .th-go { margin-left: auto; font-weight: 700; color: var(--accent); font-size: 0.92rem; }
.th-sections { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 24px; }
.th-sections a {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); text-decoration: none;
}
.th-sections a:hover { border-color: var(--accent); }
.th-sections b { font-size: 1.08rem; }
.th-sections b::after { content: "\00a0→"; color: var(--accent); }
.th-sections span { color: var(--muted); font-size: 0.95rem; }
.th-steps { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.th-steps li { counter-increment: step; padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.th-steps li::before { content: counter(step); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--accent); color: var(--accent-ink); margin-bottom: 6px; }
.th-steps b { font-size: 1.05rem; }
.th-steps span { color: var(--muted); font-size: 0.95rem; }
.th-follow { background: linear-gradient(135deg, rgba(168, 203, 224, 0.14), rgba(31, 58, 90, 0.35)), var(--surface); }
.thumb.tidy img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .th-hero .wrap { grid-template-columns: 1fr; gap: 32px; } }
