/* flicco.io, the studio's site. Flicco's look: a bright day out (sky over the pitch), warm-white
   cards, toy buttons that sit on a ledge and press down, Baloo 2 throughout. Each game's page
   sets --accent for its own colour. */

@font-face { font-family: 'Baloo 2'; font-weight: 600; font-display: swap; src: url(/site/fonts/baloo-2-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 700; font-display: swap; src: url(/site/fonts/baloo-2-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url(/site/fonts/baloo-2-latin-800-normal.woff2) format('woff2'); }

:root {
  --sky: #86bfe8; --sky-2: #b9dcf2; --grass: #5f9f4c; --grass-2: #6fae5a;
  --ground: #f6efe0; --paper: #fffaf0; --cream: #fff4df; --line: rgba(42, 38, 32, 0.12);
  --ink: #2a2620; --ink-2: rgba(42, 38, 32, 0.72); --ink-3: rgba(42, 38, 32, 0.5);
  --flick: #ff6a3d; --flick-deep: #c2401a; --pitch: #3f9a4a; --pitch-deep: #2a6b32;
  --gold: #ffc93c; --gold-text: #a86f00; --ledge: #cfc1a5; --woad: #2f4f86; --woad-deep: #1f3660;
  --accent: var(--flick); --accent-deep: var(--flick-deep);
  --lift: 0 14px 34px rgba(60, 45, 20, 0.16);
  --r-hero: 30px; --r-panel: 24px; --r-small: 16px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --wrap: min(1160px, calc(100vw - 32px));
  --font: 'Baloo 2', ui-rounded, system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--ground); color: var(--ink); font: 600 18px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.02; letter-spacing: -0.01em; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: var(--wrap); margin: 0 auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 14px; border-radius: 12px; background: var(--ink); color: var(--paper); }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------------------------------------------------------------- the wordmark */
.flicco-mark { position: relative; display: inline-block; white-space: nowrap; font-family: var(--font); font-weight: 800;
  line-height: 1; letter-spacing: -0.02em; padding: 0.28em 0.12em 0 0.1em; color: #fff4df; }
.flicco-mark .word { position: relative; z-index: 2; display: block; -webkit-text-stroke: 0.075em #2a2620;
  paint-order: stroke fill; text-shadow: 0 0.06em 0 #2a2620, 0 0.16em 0.3em rgba(0, 0, 0, 0.25); }
.flicco-mark .i { position: relative; display: inline-block; }
.flicco-mark .dot { position: absolute; width: 0.36em; height: 0.36em; left: 50%; top: -0.04em; transform: translateX(-46%) rotate(-18deg); }
.flicco-mark .swipe { position: absolute; z-index: 1; left: 0; top: 0; width: 2.731em; height: 1.512em; overflow: visible; }
.flicco-mark .swipe path { fill: none; stroke: #fff4df; stroke-width: 0.05; stroke-linecap: round; stroke-dasharray: 0 0.1; }

/* ---------------------------------------------------------------- buttons (toys on a ledge) */
.btn {
  --b: var(--accent); --b-deep: var(--accent-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 10px 26px;
  border: 0; border-radius: 18px; background: var(--b); color: #fff; font: 800 20px/1 var(--font); text-decoration: none;
  box-shadow: 0 5px 0 var(--b-deep); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms ease;
}
.btn:active { transform: translateY(4px) scale(0.98); box-shadow: 0 1px 0 var(--b-deep); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: color-mix(in srgb, var(--b) 88%, #fff); } }
.btn-quiet { --b: var(--paper); --b-deep: var(--ledge); color: var(--ink); }
.btn-small { min-height: 42px; padding: 6px 18px; font-size: 17px; border-radius: 14px; box-shadow: 0 4px 0 var(--b-deep); }
.btn-small:active { transform: translateY(3px) scale(0.98); }
.btn[disabled] { opacity: 0.6; cursor: default; }

.chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 3px; border-radius: 99px; background: var(--paper);
  color: var(--ink); font-weight: 800; font-size: 14px; letter-spacing: 0.01em; box-shadow: 0 2px 0 var(--ledge); }
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--chip, var(--pitch)); }
.chip.soon { --chip: var(--gold); }
.chip.making { --chip: var(--woad); }
.kicker { font-weight: 800; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-deep); }

/* ---------------------------------------------------------------- the top bar */
.top { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--ground) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line); }
.top-in { width: var(--wrap); margin: 0 auto; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { text-decoration: none; font-size: 34px; display: inline-flex; margin-top: -8px; }
.nav { display: flex; align-items: center; gap: 10px; }
.links ul, .menu ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.links a, .menu a { display: block; padding: 8px 14px; border-radius: 12px; font-weight: 700; font-size: 17px; text-decoration: none; color: var(--ink-2); transition: background-color 160ms ease, color 160ms ease; }
.links a:hover, .menu a:hover { color: var(--ink); background: var(--line); }
.links a[aria-current="page"], .menu a[aria-current="page"] { color: var(--ink); background: var(--paper); box-shadow: 0 2px 0 var(--ledge); }
.menu { display: none; }
@media (max-width: 860px) {
  .links { display: none; }
  .menu { display: block; }
  .menu summary { display: grid; place-content: center; gap: 5px; width: 46px; height: 42px; border-radius: 14px; background: var(--paper);
    box-shadow: 0 3px 0 var(--ledge); cursor: pointer; list-style: none; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu summary span { display: block; width: 20px; height: 2.5px; border-radius: 2px; background: var(--ink); transition: transform 200ms var(--ease-out), opacity 200ms ease; }
  .menu[open] summary span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .menu[open] summary span:nth-child(2) { opacity: 0; }
  .menu[open] summary span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .menu ul { position: absolute; left: 16px; right: 16px; top: calc(68px + env(safe-area-inset-top)); flex-direction: column; padding: 10px;
    border-radius: var(--r-panel); background: var(--paper); box-shadow: var(--lift); transform-origin: top right;
    animation: drop 220ms var(--ease-out); }
  .menu a { font-size: 22px; padding: 12px 16px; }
  @keyframes drop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
}

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(56px, 9vw, 112px) 0; }
.section-head { display: grid; gap: 12px; max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(36px, 5.4vw, 60px); }
.section-head p { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); }
.center { text-align: center; margin-inline: auto; justify-items: center; }

/* ---------------------------------------------------------------- the home page's hero: a bright day out */
.sky { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--sky) 0, var(--sky-2) 58%, #cfe6c4 78%); }
.hero { padding: clamp(40px, 7vw, 88px) 0 0; text-align: center; }
.hero h1 { font-size: clamp(46px, 8.6vw, 104px); color: #fff; text-shadow: 0 2px 0 rgba(42, 38, 32, 0.25), 0 6px 26px rgba(42, 38, 32, 0.18); }
.hero .lede { max-width: 780px; margin: 20px auto 0; font-size: clamp(19px, 2.3vw, 24px); color: #2a2620; }
.hero .ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }

/* The three games fanned out over the grass, like cards dealt on a table */
.fan { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 24px);
  width: var(--wrap); margin: clamp(40px, 6vw, 72px) auto 0; padding-bottom: clamp(36px, 5vw, 64px); }
.fan::before { content: ''; position: absolute; inset: 38% -50vw 0; background: linear-gradient(180deg, var(--grass-2), var(--grass)); z-index: 0; }
.fan a { position: relative; z-index: 1; display: block; border-radius: var(--r-panel); overflow: hidden; background: var(--paper);
  box-shadow: 0 6px 0 var(--ledge), var(--lift); text-decoration: none; transition: transform 240ms var(--ease-out); }
.fan a:nth-child(1) { transform: rotate(-3deg) translateY(10px); }
.fan a:nth-child(3) { transform: rotate(3deg) translateY(10px); }
@media (hover: hover) and (pointer: fine) {
  .fan a:hover { transform: rotate(0) translateY(-6px); }
}
.fan a:active { transform: rotate(0) translateY(0) scale(0.98); }
.fan img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.fan .label { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px 14px; }
.fan .label strong { font-size: clamp(17px, 2vw, 24px); }
.fan .label span { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 700px) {
  .fan { grid-template-columns: minmax(0, 1fr); max-width: 460px; }
  .fan a:nth-child(n) { transform: none; }
  .fan::before { inset: 20% -50vw 0; }
}

/* ---------------------------------------------------------------- a game, big (home page) */
.game { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.game + .game { margin-top: clamp(56px, 8vw, 104px); }
.game.flip .game-pic { order: 2; }
.game-pic { position: relative; border-radius: var(--r-hero); overflow: hidden; box-shadow: 0 6px 0 var(--ledge), var(--lift); background: var(--paper); }
.game-pic img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.game-about { display: grid; gap: 14px; justify-items: start; }
.game-about h3 { font-size: clamp(36px, 4.6vw, 54px); }
.game-about p { font-size: 19px; color: var(--ink-2); }
.game-about ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.game-about li { position: relative; padding-left: 28px; color: var(--ink-2); }
.game-about li::before { content: ''; position: absolute; left: 4px; top: 0.55em; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 2px 0 var(--accent-deep); }
.game-about .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.phones { display: flex; gap: 12px; justify-content: center; align-items: center; padding: 28px 20px; background: linear-gradient(160deg, #ff8a5c, var(--flick)); }
.phones img { width: calc(33% - 8px); aspect-ratio: auto; object-fit: contain; border-radius: 16px; box-shadow: 0 8px 22px rgba(60, 20, 0, 0.3); }
.phones img:nth-child(2) { transform: translateY(-10px); }
@media (max-width: 820px) {
  .game { grid-template-columns: minmax(0, 1fr); }
  .game.flip .game-pic { order: 0; }
}
.more-card { margin-top: clamp(56px, 8vw, 96px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center;
  padding: clamp(22px, 3vw, 32px); border-radius: var(--r-hero); background: var(--paper); border: 2px dashed var(--line); }
.more-card .beans { display: flex; }
.more-card .beans img { width: 76px; height: 76px; margin-left: -18px; border-radius: 50%; background: var(--cream); border: 3px solid var(--paper); object-fit: cover; }
.more-card .beans img:first-child { margin-left: 0; }
.more-card h3 { font-size: 28px; margin-bottom: 4px; }
.more-card p { color: var(--ink-2); }
@media (max-width: 640px) { .more-card { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- how we make games */
.ways { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.way { padding: 24px 22px 26px; border-radius: var(--r-panel); background: var(--paper); box-shadow: 0 4px 0 var(--ledge); display: grid; gap: 8px; align-content: start; }
.way .n { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--accent); color: #fff; font-size: 24px; font-weight: 800; box-shadow: 0 3px 0 var(--accent-deep); }
.way h3 { font-size: 24px; margin-top: 6px; }
.way p { color: var(--ink-2); font-size: 17px; }
@media (max-width: 980px) { .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ways { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- the beans */
.beans-band { background: var(--cream); overflow: hidden; }
.bean-row { display: flex; gap: 14px; width: max-content; animation: drift 60s linear infinite; }
.bean-row img { width: clamp(96px, 12vw, 150px); aspect-ratio: 1; border-radius: 28px; background: var(--paper); box-shadow: 0 4px 0 var(--ledge); object-fit: cover; }
@keyframes drift { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .bean-row { animation: none; } }
.beans-band:hover .bean-row { animation-play-state: paused; }

/* ---------------------------------------------------------------- schools band */
.schools-band { background: var(--woad); color: #fff; }
.schools-band .kicker { color: var(--gold); }
.schools-band .section-head p, .schools-band p { color: rgba(255, 255, 255, 0.84); }
.schools-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.schools-grid .game-pic { box-shadow: 0 6px 0 var(--woad-deep), 0 14px 34px rgba(0, 0, 0, 0.3); }
.ticks { margin: 18px 0 26px; padding: 0; list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before { content: ''; position: absolute; left: 0; top: 0.2em; width: 22px; height: 22px; border-radius: 8px; background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%232a2620' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.schools-band .btn { --b: var(--gold); --b-deep: #b88a10; color: #2a2620; }
@media (max-width: 820px) { .schools-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- forms: the news, waitlists, contact */
.signup { padding: clamp(28px, 4vw, 48px); border-radius: var(--r-hero); background: var(--paper); box-shadow: 0 6px 0 var(--ledge), var(--lift);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.signup h2 { font-size: clamp(32px, 4.4vw, 48px); margin: 8px 0 12px; }
.signup > div > p { color: var(--ink-2); }
@media (max-width: 820px) { .signup { grid-template-columns: minmax(0, 1fr); } }
form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label, fieldset legend { font-weight: 800; font-size: 16px; }
input[type=email], input[type=text], select, textarea {
  width: 100%; min-height: 54px; padding: 12px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--ground);
  color: var(--ink); font: 700 18px/1.3 var(--font); transition: border-color 160ms ease, box-shadow 160ms ease; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
@media (max-width: 480px) { .inline { grid-template-columns: minmax(0, 1fr); } }
fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 7px; border-radius: 12px; border: 2px solid var(--line); background: var(--ground);
  font-weight: 700; font-size: 16px; transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out); }
.pick span::before { content: ''; width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--ink-3); transition: background-color 160ms ease, border-color 160ms ease; }
.pick input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--paper)); }
.pick input:checked + span::before { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.pick input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.pick:active span { transform: scale(0.97); }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.agree input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.small { font-size: 14px; color: var(--ink-3); }
.small a { color: var(--ink-2); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-done { display: none; padding: 20px 22px; border-radius: 18px; background: color-mix(in srgb, var(--pitch) 14%, var(--paper)); }
.form-done:focus { outline: none; }
.form-done strong { display: block; font-size: 22px; margin-bottom: 4px; }
form.sent > :not(.form-done) { display: none; }
form.sent .form-done { display: block; animation: rise 320ms var(--ease-out); }
.form-err { color: var(--flick-deep); font-weight: 800; font-size: 16px; min-height: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ---------------------------------------------------------------- a game's own page */
.game-hero { position: relative; padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 7vw, 88px); background: var(--hero-bg, var(--cream)); color: var(--hero-ink, var(--ink)); overflow: hidden; }
.game-hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.game-hero h1 { font-size: clamp(50px, 8vw, 96px); margin: 14px 0 12px; }
.game-hero .lede { font-size: clamp(20px, 2.4vw, 26px); color: inherit; opacity: 0.86; max-width: 34ch; }
.game-hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.game-hero .shot { border-radius: var(--r-hero); overflow: hidden; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.18), 0 22px 50px rgba(0, 0, 0, 0.22); }
.game-hero .shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.game-hero .platform { margin-top: 14px; font-size: 16px; opacity: 0.8; }
@media (max-width: 860px) { .game-hero .wrap { grid-template-columns: minmax(0, 1fr); } }

.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.feature + .feature { margin-top: clamp(56px, 8vw, 104px); }
.feature.flip > :first-child { order: 2; }
.feature h3 { font-size: clamp(30px, 4vw, 46px); margin: 10px 0 12px; }
.feature p { font-size: 19px; color: var(--ink-2); }
.feature p + p { margin-top: 12px; }
.feature .pic { border-radius: var(--r-hero); overflow: hidden; box-shadow: 0 6px 0 var(--ledge), var(--lift); }
.feature .pic img { width: 100%; }
@media (max-width: 820px) { .feature { grid-template-columns: minmax(0, 1fr); } .feature.flip > :first-child { order: 0; } }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { padding: 24px 22px 26px; border-radius: var(--r-panel); background: var(--paper); box-shadow: 0 4px 0 var(--ledge); display: grid; gap: 8px; align-content: start; }
.card h3 { font-size: 24px; }
.card p, .card li { color: var(--ink-2); font-size: 17px; }
.card ul { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 6px; }
@media (max-width: 900px) { .cards { grid-template-columns: minmax(0, 1fr); } .cards.two { grid-template-columns: minmax(0, 1fr); } }

/* Phone pictures in a row that scrolls sideways on small screens */
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 4px 20px; margin: 0 -4px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.shelf figure { margin: 0; scroll-snap-align: start; display: grid; gap: 10px; }
.shelf img { width: 100%; border-radius: 22px; box-shadow: 0 4px 0 var(--ledge), var(--lift); background: var(--paper); }
.shelf figcaption { font-size: 16px; color: var(--ink-2); padding: 0 6px; }

/* Before and after: one picture over the other, the top one clipped to the handle (drag, tap or arrow keys) */
.compare { position: relative; border-radius: var(--r-hero); overflow: hidden; box-shadow: 0 6px 0 var(--ledge), var(--lift); touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; --at: 50%; }
.compare img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; pointer-events: none; }
.compare .after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--at)); }
.compare .after img { height: 100%; }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--at); width: 0; }
.compare .handle::before { content: ''; position: absolute; top: 0; bottom: 0; left: -2px; width: 4px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, 0.3); }
.compare .knob { position: absolute; top: 50%; left: 0; width: 52px; height: 52px; transform: translate(-50%, -50%); border-radius: 50%; background: #fff;
  box-shadow: 0 4px 0 var(--ledge), 0 8px 24px rgba(0, 0, 0, 0.25); display: grid; place-items: center; color: var(--ink); font-size: 22px; border: 0; cursor: ew-resize; transition: transform 160ms var(--ease-out); }
.compare .knob:active { transform: translate(-50%, -50%) scale(0.94); }
.compare .tag { position: absolute; bottom: 16px; padding: 6px 14px; border-radius: 12px; background: rgba(255, 250, 240, 0.94); color: #2a2620; font-weight: 800; font-size: 16px; pointer-events: none; }
.compare .tag.l { left: 16px; } .compare .tag.r { right: 16px; }
@media (max-width: 560px) { .compare .tag { bottom: 10px; padding: 4px 10px; font-size: 14px; } .compare .tag.l { left: 10px; } .compare .tag.r { right: 10px; } .compare .knob { width: 44px; height: 44px; } }
.compare.easing .after { transition: clip-path 700ms var(--ease-in-out); }
.compare.easing .handle { transition: left 700ms var(--ease-in-out); }

/* A timeline of chapters (Britannia) */
.chapters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.chapter { position: relative; display: grid; gap: 8px; align-content: start; padding: 0 0 18px; border-radius: var(--r-panel); background: var(--paper); box-shadow: 0 4px 0 var(--ledge); overflow: hidden; }
.chapter .pic { aspect-ratio: 4 / 3; background: repeating-linear-gradient(135deg, var(--cream) 0 12px, var(--ground) 12px 24px); display: grid; place-items: center; color: var(--ink-3); font-weight: 800; font-size: 15px; }
.chapter .pic img { width: 100%; height: 100%; object-fit: cover; }
.chapter .n { font-size: 14px; font-weight: 800; color: var(--accent-deep); padding: 0 16px; letter-spacing: 0.06em; text-transform: uppercase; }
.chapter h3 { font-size: 21px; padding: 0 16px; }
.chapter .when { font-size: 15px; color: var(--ink-3); padding: 0 16px; }
.chapter p { font-size: 15px; color: var(--ink-2); padding: 0 16px; }
.chapter.later { opacity: 0.78; }
@media (max-width: 1100px) { .chapters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .chapters { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; }
  .chapter { scroll-snap-align: start; } }

/* ---------------------------------------------------------------- reading pages (studio, privacy) */
.prose { max-width: 720px; }
.prose h2 { font-size: clamp(28px, 3.6vw, 38px); margin: 48px 0 12px; }
.prose h3 { font-size: 22px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); font-size: 18px; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 22px; display: grid; gap: 6px; }
.prose a { color: var(--accent-deep); }
.draft { margin: 0 0 24px; padding: 12px 16px; border-radius: 14px; background: #fde9b8; color: #2a2620; font-size: 16px; }
.contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.contacts a { display: grid; gap: 2px; padding: 16px 18px; border-radius: 18px; background: var(--paper); box-shadow: 0 3px 0 var(--ledge); text-decoration: none; transition: transform 160ms var(--ease-out); }
.contacts a:active { transform: scale(0.98); }
.contacts strong { font-size: 19px; }
.contacts span { color: var(--ink-2); font-size: 16px; }
@media (max-width: 560px) { .contacts { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- the footer */
.foot { background: #2a2620; color: rgba(255, 244, 223, 0.86); padding: 56px 0 calc(40px + env(safe-area-inset-bottom)); }
.foot-in { width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; }
.foot-brand p { margin-top: 10px; }
.foot .logo { font-size: 40px; }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot h2 { font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { color: rgba(255, 244, 223, 0.86); text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot .legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid rgba(255, 244, 223, 0.14); font-size: 14px; color: rgba(255, 244, 223, 0.6); }
@media (max-width: 760px) { .foot-in { grid-template-columns: minmax(0, 1fr); } .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- arriving on screen: once, gently */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
  .js .reveal.seen { opacity: 1; transform: none; }
}
