/* Word Puzzle: Swipe Tiles site. No scripts, no external requests, no inline styles (CSP style-src 'self').
   Colors, radii and shadows mirror docs/design/tokens.json (warm paper, glazed tiles, lantern amber, lagoon actions). */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #11242f;
  --ink-soft: #2b4350;
  --ink-muted: #4d626d;
  --ivory: #fbf1df;
  --paper: #fff9ec;
  --parchment: #f2e3c6;
  --parchment-deep: #dcc59a;
  --moonlight: #dde8f1;
  --lagoon: #1b7178;
  --lagoon-deep: #134b57;
  --lagoon-light: #6fc0bc;
  --sage: #8fb89e;
  --apricot: #f5a55b;
  --amber: #ff9f2e;
  --amber-deep: #cc6d08;
  --amber-light: #ffd08a;
  --ember: #e9654f;
  --gold: #f8d34f;
  --plum: #4b2e63;
  --plum-deep: #2e1a3f;
  --plum-light: #8f6cae;
  --shadow: 43, 26, 18;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-ui: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-card: 28px;
  --r-cta: 22px;
  --r-chip: 18px;
  --r-icon: 12px;
  --gutter: clamp(18px, 5vw, 32px);
  --measure: 70ch;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-soft);
  background: var(--paper);
  background-image: radial-gradient(1200px 520px at 50% -120px, rgba(255, 208, 138, 0.35), rgba(255, 249, 236, 0));
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--lagoon-deep); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--lagoon); }
:focus-visible { outline: 3px solid var(--lagoon-deep); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--amber-light); color: var(--ink); }

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-weight: 800; }
h2, h3 { font-weight: 700; }
p { margin: 0 0 1em; }

.skip {
  position: absolute; left: 12px; top: -64px; z-index: 50;
  padding: 10px 16px; background: var(--ink); color: var(--ivory); border-radius: var(--r-chip); font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 800px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 249, 236, 0.9);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(220, 197, 154, 0.55);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; min-height: 44px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 2px 6px rgba(var(--shadow), 0.28); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem;
}
.nav a:hover { background: var(--parchment); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--ivory); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--ivory);
  background:
    radial-gradient(520px 320px at 78% 38%, rgba(255, 190, 120, 0.34), rgba(255, 190, 120, 0)),
    linear-gradient(180deg, var(--plum-deep) 0%, #3d2556 34%, #7a4f7a 62%, #c98aa0 82%, var(--apricot) 96%, var(--paper) 99%);
  padding: clamp(48px, 9vw, 96px) 0 clamp(120px, 16vw, 190px);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: clamp(90px, 14vw, 170px); z-index: 0;
  background:
    url("/assets/hills.svg") center bottom / 100% 100% no-repeat;
}
.hero-grid { position: relative; z-index: 1; display: grid; gap: 40px; align-items: center; }
.hero h1 { color: var(--ivory); font-size: clamp(2.3rem, 7.2vw, 4rem); margin-bottom: 0.3em; text-wrap: balance; }
.hero h1 .sub { display: block; color: var(--amber-light); font-weight: 700; font-size: 0.62em; letter-spacing: 0; margin-top: 0.15em; }
.hero .lead { font-size: clamp(1.1rem, 2.6vw, 1.3rem); color: rgba(251, 241, 223, 0.92); max-width: 36ch; }
.eyebrow { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 700; color: var(--ivory);
  background: rgba(251, 241, 223, 0.14); border: 1px solid rgba(251, 241, 223, 0.28);
}
.app-line { display: flex; align-items: center; gap: 16px; margin: 28px 0 14px; flex-wrap: wrap; }
.app-icon { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 10px 24px rgba(20, 8, 30, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.18); }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px; margin: 0; padding: 10px 20px 10px 16px; min-height: 56px;
  border-radius: var(--r-chip); color: var(--ivory); background: rgba(10, 8, 20, 0.82);
  border: 1px solid rgba(251, 241, 223, 0.38);
}
.store-badge .icon { width: 26px; height: 26px; color: var(--amber-light); }
.store-badge span { display: grid; line-height: 1.15; }
.store-badge small { font-size: 0.72rem; font-weight: 600; opacity: 0.85; }
.store-badge strong { font-size: 1.15rem; font-weight: 700; }
.cta-note { font-size: 0.9rem; color: rgba(251, 241, 223, 0.8); margin: 0; max-width: 46ch; }

/* tray art */
.art { position: relative; justify-self: center; width: min(88vw, 360px); }
.tray {
  position: relative; padding: 14px; border-radius: 34px;
  background: linear-gradient(160deg, #2a3d45, #14232b);
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.55), 0 24px 50px rgba(20, 8, 30, 0.5), 0 0 0 2px rgba(255, 208, 138, 0.22);
}
.tray-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); aspect-ratio: 1; gap: 3%; }
.tile {
  position: relative; display: grid; place-items: center; border-radius: 22%;
  background: linear-gradient(180deg, var(--ivory), var(--parchment));
  box-shadow: inset 0 0 0 1.5px var(--parchment-deep), inset 0 2px 0 rgba(255, 255, 255, 0.85), 2px 5px 10px rgba(var(--shadow), 0.4);
}
.tile.on { background: linear-gradient(180deg, var(--amber-light), var(--amber) 55%, var(--apricot)); box-shadow: inset 0 0 0 1.5px var(--amber-deep), inset 0 2px 0 rgba(255, 255, 255, 0.6), 0 0 22px rgba(255, 159, 46, 0.55), 2px 5px 10px rgba(var(--shadow), 0.4); }
.letters { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 3%; pointer-events: none; }
.letters span {
  position: relative; display: grid; place-items: center; font-weight: 800; font-size: clamp(1.8rem, 9vw, 2.7rem); line-height: 1; color: var(--ink);
}
.letters .on { text-shadow: 0 0 3px #ffe9b8, 0 0 9px #ffe9b8; }
.letters i {
  position: absolute; right: 8%; bottom: 7%; min-width: 1.4em; height: 1.4em; padding: 0 0.25em; display: grid; place-items: center;
  border-radius: 999px; background: var(--ink); color: var(--ivory); font-style: normal; font-size: 0.7rem; font-weight: 700; text-shadow: none;
}
.string { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.mote { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--amber-light); box-shadow: 0 0 14px 4px rgba(255, 208, 138, 0.8); animation: drift 7s ease-in-out infinite; z-index: 2; }
.mote.m1 { left: -4%; top: 12%; }
.mote.m2 { right: -6%; top: 46%; animation-delay: -2.4s; width: 6px; height: 6px; }
.mote.m3 { left: 8%; bottom: -6%; animation-delay: -4.6s; width: 5px; height: 5px; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); opacity: 0.9; } 50% { transform: translate(8px, -14px); opacity: 0.45; } }

@media (min-width: 880px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px;
  border-radius: var(--r-cta); font-weight: 700; font-size: 1.02rem; text-decoration: none; border: 0; cursor: pointer;
}
.btn-cta {
  color: var(--ivory); background: linear-gradient(180deg, var(--lagoon), var(--lagoon-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 14px rgba(19, 75, 87, 0.35);
}
.btn-cta:hover { color: #fff; filter: brightness(1.08); }
.btn-sec { color: var(--ink); background: var(--ivory); box-shadow: inset 0 0 0 2px var(--parchment-deep); }
.btn-sec:hover { color: var(--ink); background: var(--parchment); }

/* ---------- sections ---------- */
.section { padding: clamp(48px, 8vw, 88px) 0; }
.section-head { max-width: 62ch; margin-bottom: 32px; }
.kicker { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; color: var(--amber-deep); margin: 0 0 10px; }
.section-head h2 { font-size: clamp(1.7rem, 4.6vw, 2.4rem); }
.section-head p { color: var(--ink-muted); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card {
  position: relative; padding: 26px 24px 24px; border-radius: var(--r-card);
  background: linear-gradient(180deg, var(--paper), var(--ivory));
  box-shadow: inset 0 0 0 1.5px var(--parchment), 2px 6px 18px rgba(var(--shadow), 0.12);
}
.card h3 { font-size: 1.25rem; margin-bottom: 0.4em; }
.card p { margin: 0; color: var(--ink-muted); font-size: 1rem; }
.card ul { margin: 0; padding-left: 1.2em; color: var(--ink-muted); }
.card li { margin-bottom: 0.35em; }
.card a { font-weight: 600; }
.disc {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: var(--r-icon);
  color: var(--ivory); background: linear-gradient(180deg, var(--lagoon), var(--lagoon-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 10px rgba(19, 75, 87, 0.3);
}
.disc.amber { background: linear-gradient(180deg, var(--amber), var(--amber-deep)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 10px rgba(204, 109, 8, 0.3); color: var(--ink); }
.disc.plum { background: linear-gradient(180deg, var(--plum-light), var(--plum)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 10px rgba(75, 46, 99, 0.3); }
.disc.sage { background: linear-gradient(180deg, var(--sage), #4e7c63); }
.disc.ember { background: linear-gradient(180deg, var(--ember), #b73e2b); }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: step; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.steps > li {
  counter-increment: step; position: relative; padding: 26px 24px 24px 24px; border-radius: var(--r-card);
  background: var(--ivory); box-shadow: inset 0 0 0 1.5px var(--parchment);
}
.steps > li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 12px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink);
  background: linear-gradient(180deg, var(--amber-light), var(--amber)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 3px 8px rgba(204, 109, 8, 0.3);
}
.steps > li strong { display: block; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); margin-bottom: 0.25em; }
.steps.plain > li { padding-top: 22px; }

.band { background: linear-gradient(180deg, var(--ivory), var(--parchment)); border-top: 1px solid var(--parchment-deep); border-bottom: 1px solid var(--parchment-deep); }
.honest { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; max-width: 760px; }
.honest li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; font-size: 1.05rem; color: var(--ink-soft); }
.honest .icon { color: var(--lagoon); margin-top: 2px; }
.cta-note-dark { margin: 28px 0 0; color: var(--ink-muted); }

.contact {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 28px;
  border-radius: var(--r-card); background: linear-gradient(160deg, var(--lagoon), var(--lagoon-deep)); color: var(--ivory);
  box-shadow: 0 14px 34px rgba(19, 75, 87, 0.32);
}
.contact h2 { color: var(--ivory); font-size: 1.6rem; margin-bottom: 0.2em; }
.contact p { margin: 0; color: rgba(251, 241, 223, 0.92); }
.contact a { color: var(--amber-light); }
.contact .btn-cta { background: var(--ivory); color: var(--lagoon-deep); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }
.contact .btn-cta:hover { color: var(--ink); }
.contact-main { display: flex; gap: 18px; align-items: flex-start; flex: 1 1 320px; }
.contact-main .disc { background: rgba(251, 241, 223, 0.16); box-shadow: inset 0 0 0 1.5px rgba(251, 241, 223, 0.35); margin: 0; flex: none; }
.contact.light { background: var(--ivory); color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px var(--parchment-deep), 2px 6px 18px rgba(var(--shadow), 0.1); }
.contact.light h2 { color: var(--ink); }
.contact.light p { color: var(--ink-soft); margin-bottom: 0.6em; }
.contact.light a { color: var(--lagoon-deep); }
.contact.light .btn-cta { background: linear-gradient(180deg, var(--lagoon), var(--lagoon-deep)); color: var(--ivory); }
.contact.light .contact-main .disc { background: linear-gradient(180deg, var(--lagoon), var(--lagoon-deep)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 10px rgba(19, 75, 87, 0.3); }
.contact.light .contact-main .disc.amber { background: linear-gradient(180deg, var(--amber), var(--amber-deep)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 10px rgba(204, 109, 8, 0.3); }
.mail { font-weight: 800; font-size: 1.2rem; word-break: break-word; }
.postal { font-size: 0.95rem; }

/* ---------- inner pages ---------- */
.page-head { padding: clamp(36px, 7vw, 64px) 0 12px; }
.page-title { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 0.3em; text-wrap: balance; }
.page-sub { font-size: 1.15rem; color: var(--ink-muted); max-width: 60ch; }
.stack > * + * { margin-top: 44px; }
.page-foot { margin: 48px 0 0; padding-bottom: 72px; color: var(--ink-muted); }
.wrap-narrow > .panel { margin-top: 28px; }

.faq { display: grid; gap: 10px; }
.faq details { border-radius: var(--r-chip); background: var(--ivory); box-shadow: inset 0 0 0 1.5px var(--parchment); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 20px;
  cursor: pointer; font-weight: 700; color: var(--ink); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--lagoon); transition: transform 0.2s ease; }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details[open] { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--parchment-deep); }
.faq .answer { padding: 0 20px 16px; color: var(--ink-muted); }
.faq .answer p:last-child { margin-bottom: 0; }

.two { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

/* legal text */
.toc { margin: 24px 0 0; padding: 22px 24px; border-radius: var(--r-card); background: var(--ivory); box-shadow: inset 0 0 0 1.5px var(--parchment); }
.toc-title { font-size: 1.05rem; margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 0; list-style: none; columns: 2 260px; column-gap: 32px; }
.toc li { margin-bottom: 0.3em; break-inside: avoid; font-size: 0.97rem; }
.panel { padding: clamp(22px, 5vw, 44px); border-radius: var(--r-card); background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--parchment), 2px 8px 24px rgba(var(--shadow), 0.1); }
.prose { max-width: 100%; overflow-wrap: anywhere; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; padding-top: 0.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose li > ul, .prose li > ol { margin-top: 0.4em; }
.prose blockquote { margin: 1em 0; padding: 0.4em 1.2em; border-left: 4px solid var(--amber); background: var(--ivory); border-radius: 0 var(--r-icon) var(--r-icon) 0; }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; padding: 0.1em 0.4em; border-radius: 6px; background: var(--parchment); color: var(--ink); }
.prose pre { overflow-x: auto; padding: 14px 16px; border-radius: var(--r-icon); background: var(--ink); color: var(--ivory); }
.prose pre code { background: none; color: inherit; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--parchment-deep); margin: 2em 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border-radius: var(--r-icon); box-shadow: inset 0 0 0 1.5px var(--parchment); }
.table-wrap:focus-visible { outline-offset: 2px; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.96rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--parchment); }
th { background: var(--ivory); color: var(--ink); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.align-center { text-align: center; }
.align-right { text-align: right; }

.lost { text-align: center; padding: clamp(56px, 12vw, 120px) 0; }
.lost .app-icon { margin: 0 auto 28px; }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 24px; background: var(--ink); color: rgba(251, 241, 223, 0.82); padding: 44px 0 36px; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--ivory); margin-bottom: 8px; }
.foot-brand img { width: 32px; height: 32px; border-radius: 8px; }
.foot-note { margin: 0; max-width: 38ch; color: rgba(251, 241, 223, 0.7); }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ivory); text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--amber-light); text-decoration: underline; }
.fine { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid rgba(251, 241, 223, 0.16); font-size: 0.85rem; color: rgba(251, 241, 223, 0.62); }

@media (max-width: 560px) {
  .nav a { padding: 0 11px; font-size: 0.9rem; }
  .bar { justify-content: center; }
  .contact { padding: 22px; }
  .contact .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mote { animation: none; }
  .faq summary .icon { transition: none; }
}

@media (forced-colors: active) {
  .tile, .card, .panel, .faq details { border: 1px solid CanvasText; }
}
