/* Early Editions — site styles. Colours follow the app shell (teal on warm paper). */

:root {
  --paper: #faf6ef;
  --paper-2: #f1eadf;
  --ink: #1f2a2a;
  --ink-soft: #4d5a59;
  --teal: #0f766e;
  --teal-dark: #0b5952;
  --teal-tint: #e3f1ef;
  --night: #12302d;
  --wood: #8a5a3b;
  --wood-dark: #5e3b25;
  --line: #e2d9cb;
  --radius: 14px;
  --font-body: "Mulish", system-ui, sans-serif;
  --font-head: "Bitter", Georgia, serif;
  --font-hand: "Kalam", "Comic Sans MS", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; max-width: 22ch; }
h3 { font-size: 1.2rem; font-weight: 500; }
p { margin: 0 0 1em; }
a { color: var(--teal); }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow-wrap { max-width: 760px; }

.eyebrow {
  font-weight: 800; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--teal); margin-bottom: .8em;
}
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 56ch; }
.lede.narrow { max-width: 62ch; }
.fine { font-size: .875rem; color: var(--ink-soft); }
.hand { font-family: var(--font-hand); font-weight: 700; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  background: var(--teal); color: #fff; text-decoration: none;
  font-weight: 700; padding: .8em 1.4em; border-radius: 999px;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--teal-dark); }
.btn:active { transform: scale(.97); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #f59e0b; outline-offset: 3px; }
.btn-small { padding: .5em 1.1em; font-size: .95rem; }

.store-btn { background: var(--ink); border-radius: 12px; padding: .55em 1.2em .55em 1em; }
.store-btn:hover { background: #000; }
.store-btn svg { width: 24px; height: 24px; flex: none; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.15; font-size: 1.05rem; }
.store-btn small { font-weight: 400; font-size: .7rem; opacity: .85; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0 .8em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-head); font-weight: 700; font-size: 1.25rem;
  color: var(--ink); text-decoration: none;
}
.brand-mark { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; }
.brand-mark i { display: block; width: 6px; border-radius: 1.5px; background: var(--teal); }
.brand-mark i:nth-child(1) { height: 18px; }
.brand-mark i:nth-child(2) { height: 22px; background: #f59e0b; }
.brand-mark i:nth-child(3) { height: 15px; background: #c2410c; transform: rotate(12deg); transform-origin: bottom left; margin-left: 1px; }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a:not(.btn) { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:not(.btn):hover { color: var(--teal); }
@media (max-width: 760px) { .site-nav a:not(.btn) { display: none; } }

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

/* CSS bookshelf */
.shelf-art { position: relative; }
.case {
  background: linear-gradient(var(--wood), var(--wood-dark));
  padding: 14px; border-radius: 10px;
  box-shadow: 0 24px 48px -18px rgba(40, 25, 10, .45);
  display: grid; gap: 14px;
}
.shelf {
  height: 170px; display: flex; align-items: flex-end; gap: 3px;
  padding: 0 14px; position: relative;
  background: linear-gradient(#e9dfcf, #d9ccb7);
  border-radius: 3px;
  box-shadow: inset 0 10px 16px -8px rgba(0, 0, 0, .35);
  border-bottom: 10px solid #6f4529;
}
.spine {
  height: var(--h); width: var(--w); flex: none;
  border-radius: 3px 3px 1px 1px; position: relative;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset -3px 0 0 rgba(0,0,0,.15), inset 3px 0 0 rgba(255,255,255,.12);
}
.spine::before, .spine::after {
  content: ""; position: absolute; left: 3px; right: 3px; height: 2px; background: rgba(255,255,255,.35);
}
.spine::before { top: 10px; } .spine::after { bottom: 10px; }
.spine span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--font-hand); font-weight: 700; font-size: 12.5px; color: #fff;
  white-space: nowrap; overflow: hidden; max-height: 80%; text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(0,0,0,.2);
}
.s1 { background: #0f766e; } .s2 { background: #c2410c; } .s3 { background: #7c3aed; }
.s4 { background: #f59e0b; } .s4 span { color: #3b2506; text-shadow: none; }
.s5 { background: #2563eb; } .s6 { background: #be185d; } .s7 { background: #15803d; }
.spine.lean { transform: rotate(8deg); transform-origin: bottom right; margin-left: 10px; }
.gap { flex: 1; }
.prop-cover {
  width: 104px; height: 82%; flex: none; align-self: flex-end;
  background: #7c3aed; border-radius: 3px 6px 6px 3px; color: #fff;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: 8px; transform: rotate(-4deg); transform-origin: bottom left;
  box-shadow: inset 6px 0 0 rgba(0,0,0,.18), 0 6px 12px -6px rgba(0,0,0,.4);
}
.cover-title { font-family: var(--font-hand); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.cover-by { font-size: .65rem; margin-top: .5em; opacity: .9; white-space: nowrap; }
.note-tag {
  position: absolute; top: -18px; right: 18px; margin: 0;
  background: #fff8d6; color: #5b4a12; font-family: var(--font-hand); font-size: 1.05rem;
  padding: .2em .8em; transform: rotate(3deg);
  box-shadow: 0 4px 10px -4px rgba(0,0,0,.25);
}
@media (max-width: 460px) {
  .shelf { height: 140px; padding: 0 8px; }
  .prop-cover { width: 84px; }
  .cover-title { font-size: .95rem; }
}

/* Sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section.alt { background: var(--paper-2); }
.section.dark { background: var(--night); color: #dfeceb; }
.section.dark h2, .section.dark strong { color: #fff; }
.section.dark .eyebrow { color: #5eead4; }
.section.dark .lede { color: #b9cfcc; }
.link-light { color: #5eead4; font-weight: 700; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 2.4rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.step p { color: var(--ink-soft); margin: 0; }
.step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 50%; background: var(--teal-tint); color: var(--teal);
  font-family: var(--font-hand); font-weight: 700; font-size: 1.3rem;
}

/* Sharing */
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.ticks { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 14px; }
.ticks li { padding-left: 34px; position: relative; color: var(--ink-soft); }
.ticks li strong { color: var(--ink); }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: .1em;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal); color: #fff; font-size: .75rem; font-weight: 800;
}
.reaction-card {
  margin: 0; background: #fffdf7; border-radius: 6px; padding: 28px 26px;
  border: 1px solid var(--line); transform: rotate(-2deg);
  box-shadow: 0 18px 36px -20px rgba(40, 25, 10, .4);
}
.reaction-stamp {
  display: inline-block; border: 2px solid #be185d; color: #be185d; border-radius: 6px;
  padding: .1em .6em; font-weight: 800; font-size: .85rem; letter-spacing: .04em;
  text-transform: uppercase; transform: rotate(-4deg);
}
.reaction-text { font-family: var(--font-hand); font-size: 1.3rem; line-height: 1.4; color: #2b2b2b; }
.reaction-from { font-family: var(--font-hand); color: var(--ink-soft); margin: 0; text-align: right; }
.reaction-from::before { content: "— "; }

/* Customise cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 2.4rem; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p { color: var(--ink-soft); margin: 0; font-size: .98rem; }
.swatches { display: flex; gap: 6px; margin-bottom: 16px; }
.swatches i { width: 30px; height: 30px; border-radius: 8px; background: var(--c); }
.font-sample { display: flex; gap: 14px; margin-bottom: 12px; font-size: 1.7rem; line-height: 1; color: var(--teal); }
.f-kalam { font-family: var(--font-hand); font-weight: 700; }
.f-bitter { font-family: var(--font-head); font-weight: 700; }
.avatar-sample {
  width: 40px; height: 40px; border-radius: 50%; margin-bottom: 14px;
  display: grid; place-items: center; background: #f59e0b; color: #fff;
  font-family: var(--font-hand); font-weight: 700; font-size: 1.3rem;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--teal);
}

/* Privacy promises */
.promise-grid { list-style: none; padding: 0; margin: 2rem 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 960px) { .promise-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .promise-grid { grid-template-columns: 1fr; } }
.promise-grid li { border-top: 2px solid #5eead4; padding-top: 14px; color: #b9cfcc; }
.promise-grid strong { display: block; font-family: var(--font-head); font-size: 1.15rem; margin-bottom: .2em; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
details:first-of-type { border-top: 1px solid var(--line); margin-top: 1.6rem; }
summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 1em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--teal); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--ink-soft); margin: .8em 0 0; max-width: 64ch; }

/* Closing */
.closing { text-align: center; background: var(--teal-tint); }
.closing h2 { margin-inline: auto; font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--teal-dark); max-width: none; }

/* Inner pages (support, 404) */
.btn-outline { background: transparent; color: var(--teal); box-shadow: inset 0 0 0 2px var(--teal); }
.btn-outline:hover { background: var(--teal-tint); }
.page-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.section.help { padding-top: 0; }
.help-block { border-top: 1px solid var(--line); padding: 32px 0 8px; scroll-margin-top: 80px; }
.help-block h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); max-width: none; }
.help-block p, .help-block li { color: var(--ink-soft); max-width: 66ch; }
.help-block strong { color: var(--ink); }
.help-block ul { padding-left: 1.2em; margin: 0 0 1em; display: grid; gap: .5em; }
.help-block a { font-weight: 700; overflow-wrap: anywhere; }
.not-found { padding: clamp(56px, 10vw, 120px) 0; min-height: 55vh; }
.not-found-note { font-size: 1.5rem; color: var(--teal); margin-bottom: .4em; }

/* Footer */
.site-footer { padding: 36px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.footer-inner .fine { margin: .4em 0 0; }
.footer-inner nav { display: flex; gap: 1.4rem; }
.footer-inner nav a { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.footer-inner nav a:hover { color: var(--teal); }
