/* Tile Checker — frameflipper.app/tilechecker
   Pastel, light, calm. Outfit for display, system UI for body. Reduce Motion stops all movement. */

@font-face {
  font-family: "Outfit";
  src: url("assets/Outfit.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --canvas: #f7f5fd;
  --surface: #ffffff;
  --surface-alt: #f1eef9;
  --text: #1e1f2b;
  --text-2: #5e6072;
  --line: rgba(30, 31, 43, 0.08);
  --valid: #18705a;
  --valid-face: #ddf3eb;
  --valid-ring: #2e9c7e;
  --invalid: #b3332f;
  --invalid-face: #fce3e1;
  --invalid-ring: #d9534d;
  /* theme (changed by the theme picker) */
  --accent: #c9b6f5;
  --accent-ink: #4b33b8;
  --wash: #efe9fd;
  --tile: #f2eefd;
  --tile-edge: #d9cff6;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(30, 31, 43, 0.04), 0 8px 28px rgba(30, 31, 43, 0.07);
  --display: "Outfit", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
body.theme-sky   { --accent: #a8d3f6; --accent-ink: #1f5f99; --wash: #e7f3fd; --tile: #edf6fe; --tile-edge: #c5e0f7; }
body.theme-aqua  { --accent: #9de2df; --accent-ink: #13706b; --wash: #e4f7f6; --tile: #ecf9f8; --tile-edge: #bfe9e6; }
body.theme-blush { --accent: #f6b6ce; --accent-ink: #a12d5d; --wash: #fdebf2; --tile: #fef1f6; --tile-edge: #f4cddc; }
body.theme-peach { --accent: #ffc8a6; --accent-ink: #a14d17; --wash: #fff0e6; --tile: #fff4ec; --tile-edge: #f8d6c0; }
body.theme-lemon { --accent: #f7e07a; --accent-ink: #7a6206; --wash: #fdf8dc; --tile: #fffbe8; --tile-edge: #efe2a6; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font: 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.6s ease;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); padding: 8px 14px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.01em; }
p { margin: 0; }
.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--text-2); max-width: 34em; }
.eyebrow { font: 600 0.82rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 5; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); background: rgba(247, 245, 253, 0.72); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 650 1.2rem/1 var(--display); letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 6px rgba(30, 31, 43, 0.12); }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; font-size: 0.95rem; }
.nav ul a { color: var(--text-2); text-decoration: none; }
.nav ul a:hover { color: var(--text); }
@media (max-width: 620px) { .nav ul li:not(:last-child) { display: none; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 24px; border-radius: 16px; font: 600 1.02rem/1 var(--body); text-decoration: none; transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.6s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--text); box-shadow: 0 6px 20px rgba(30, 31, 43, 0.1); }
.btn-ghost { color: var(--text); background: var(--surface); box-shadow: var(--shadow); }

/* ---------- Tiles ---------- */
.tiles { display: flex; gap: clamp(5px, 1vw, 9px); flex-wrap: nowrap; }
.tile {
  --s: clamp(40px, 6.4vw, 64px);
  position: relative; width: var(--s); height: var(--s); flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: calc(var(--s) * 0.22);
  background: var(--tile);
  font: 650 calc(var(--s) * 0.5)/1 var(--display); color: var(--text);
  box-shadow: inset 0 calc(var(--s) * -0.07) 0 var(--tile-edge), 0 2px 4px rgba(30, 31, 43, 0.08), 0 8px 18px rgba(30, 31, 43, 0.08);
  transition: background-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}
.tile sub { position: absolute; right: 13%; bottom: 10%; font: 500 calc(var(--s) * 0.18)/1 var(--display); color: var(--text-2); }
.tile.valid { background: var(--valid-face); box-shadow: inset 0 0 0 2px var(--valid-ring), inset 0 calc(var(--s) * -0.07) 0 rgba(46, 156, 126, 0.25), 0 8px 18px rgba(24, 112, 90, 0.14); }
.tile.invalid { background: var(--invalid-face); box-shadow: inset 0 0 0 2px var(--invalid-ring), inset 0 calc(var(--s) * -0.07) 0 rgba(217, 83, 77, 0.22), 0 8px 18px rgba(179, 51, 47, 0.12); }
.tile.in { animation: flip-in 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.2) both; }
.tile.out { animation: flip-out 0.3s ease-in both; }
.tile.pop { animation: pop 0.4s ease; }
.tile.shake { animation: shake 0.45s ease; }
@keyframes flip-in { from { transform: perspective(400px) rotateX(-90deg) translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes flip-out { to { transform: perspective(400px) rotateX(90deg) translateY(8px); opacity: 0; } }
@keyframes pop { 50% { transform: translateY(-6px) scale(1.06); } }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 110px); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 120%; background: radial-gradient(60% 50% at 75% 30%, var(--wash), transparent 70%), radial-gradient(40% 40% at 10% 10%, var(--wash), transparent 70%); z-index: -1; transition: background 0.6s ease; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 22px; }
.hero h1 .soft { color: var(--accent-ink); transition: color 0.6s ease; }
.checker { margin-top: 6px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 20px 16px; display: grid; gap: 14px; max-width: 520px; }
.checker .tiles { min-height: clamp(44px, 7vw, 70px); }
.verdict { display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 26px; color: var(--text-2); transition: color 0.3s ease; }
.verdict.valid { color: var(--valid); }
.verdict.invalid { color: var(--invalid); }
.verdict .dot { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; background: var(--line); transition: background-color 0.3s ease; }
.verdict.valid .dot { background: var(--valid); }
.verdict.invalid .dot { background: var(--invalid); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.small { font-size: 0.9rem; color: var(--text-2); }

.phone { position: relative; justify-self: center; width: min(330px, 78vw); aspect-ratio: 1206 / 2622; border-radius: 48px; padding: 10px; background: #1b1c24; box-shadow: 0 30px 60px rgba(30, 31, 43, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.06) inset; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 39px; }
.hero .phone { animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px) rotate(0.6deg); } }
.drift { position: absolute; z-index: -1; pointer-events: none; }
.drift .tile { --s: 52px; opacity: 0.9; }
.drift.d1 { top: 12%; right: 4%; animation: drift 11s ease-in-out infinite; }
.drift.d2 { bottom: 10%; right: 38%; animation: drift 13s ease-in-out infinite reverse; }
.drift.d3 { top: 6%; left: 46%; animation: drift 15s ease-in-out infinite; }
.drift.d1 .tile { transform: rotate(14deg); }
.drift.d2 .tile { transform: rotate(-10deg); }
.drift.d3 .tile { transform: rotate(-18deg); --s: 40px; }
@keyframes drift { 50% { translate: 0 -22px; rotate: 8deg; } }
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .drift.d2, .drift.d3 { display: none; }
}

/* ---------- Sections ---------- */
section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { display: grid; gap: 14px; max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.center { text-align: center; margin-inline: auto; justify-items: center; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; display: grid; gap: 12px; align-content: start; }
.card p { color: var(--text-2); }
.card .art { height: 150px; border-radius: 16px; background: var(--wash); display: grid; place-items: center; overflow: hidden; margin-bottom: 6px; transition: background-color 0.6s ease; }
.card .art .tile { --s: 38px; }
@media (max-width: 880px) { .cards { grid-template-columns: 1fr; } }

/* mini typing art */
.type-art .tiles { gap: 5px; }
/* mini score art */
.score-art { display: flex; gap: 18px; align-items: end; }
.score-art .p { display: grid; justify-items: center; gap: 6px; font: 600 0.8rem/1 var(--body); color: var(--text-2); }
.score-art .bar { width: 34px; border-radius: 10px 10px 4px 4px; background: var(--accent); height: 20px; transition: height 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.6s ease; }
.score-art .num { font: 650 1.25rem/1 var(--display); color: var(--text); }
/* mini scan art */
.scan-art .mini { display: grid; grid-template-columns: repeat(4, 22px); gap: 3px; animation: mini-turn 5s ease-in-out infinite; }
.scan-art .mini i { width: 22px; height: 22px; border-radius: 6px; background: var(--surface); box-shadow: inset 0 -2px 0 var(--tile-edge); }
.scan-art .mini i.e { background: transparent; box-shadow: none; }
@keyframes mini-turn { 0%, 15% { transform: rotate(90deg); } 35%, 100% { transform: rotate(0deg); } }

/* ---------- Scan showcase ---------- */
.scan { background: linear-gradient(180deg, transparent, var(--wash) 30%, var(--wash) 70%, transparent); transition: background 0.6s ease; }
.scan .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.points { display: grid; gap: 18px; margin-top: 8px; padding: 0; list-style: none; }
.points li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.points .ic { width: 36px; height: 36px; border-radius: 11px; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; font: 650 1rem/1 var(--display); color: var(--accent-ink); }
.points b { display: block; }
.points span { color: var(--text-2); }
.photo { position: relative; aspect-ratio: 1 / 1; border-radius: 28px; background: linear-gradient(135deg, #e9dccb, #d9c4ab); box-shadow: 0 30px 60px rgba(90, 60, 30, 0.18); display: grid; place-items: center; overflow: hidden; }
.photo::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 18px); pointer-events: none; }
.board { display: grid; grid-template-columns: repeat(6, var(--c)); grid-auto-rows: var(--c); gap: 4px; --c: clamp(34px, 5.4vw, 58px); transform: rotate(-90deg) scale(0.92); transition: transform 1.2s cubic-bezier(0.5, 0, 0.2, 1); }
.board .tile { --s: var(--c); background: #fffdf6; box-shadow: inset 0 calc(var(--s) * -0.07) 0 #e6dcc4, 0 3px 6px rgba(60, 40, 10, 0.18); }
.board .tile.valid { background: var(--valid-face); box-shadow: inset 0 0 0 2px var(--valid-ring), 0 3px 6px rgba(24, 112, 90, 0.2); }
.board .gap { visibility: hidden; }
.photo.upright .board { transform: rotate(0deg) scale(1); }
.scanline { position: absolute; left: 0; right: 0; height: 3px; top: -10%; background: linear-gradient(90deg, transparent, var(--accent-ink), transparent); box-shadow: 0 0 18px 4px var(--accent); opacity: 0; }
.photo.scanning .scanline { animation: sweep 1.3s ease-in-out both; }
@keyframes sweep { 0% { top: 5%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 95%; opacity: 0; } }
.found { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.found span { background: var(--surface); color: var(--valid); font: 600 0.85rem/1 var(--body); padding: 8px 11px; border-radius: 999px; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: opacity 0.35s ease, transform 0.35s ease; }
.found span.show { opacity: 1; transform: none; }
.found span::before { content: "✓ "; }
.replay { position: absolute; top: 14px; right: 14px; border: 0; background: rgba(255, 255, 255, 0.85); color: var(--text); font: 600 0.85rem/1 var(--body); padding: 9px 12px; border-radius: 999px; cursor: pointer; box-shadow: var(--shadow); }
@media (max-width: 880px) { .scan .wrap { grid-template-columns: 1fr; } }

/* ---------- Split (screenshot + text) ---------- */
.split .wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.flip .wrap { grid-template-columns: 1.1fr 0.9fr; }
.split.flip .phone { order: 2; }
.split .copy { display: grid; gap: 18px; }
@media (max-width: 880px) { .split .wrap, .split.flip .wrap { grid-template-columns: 1fr; } .split.flip .phone { order: 0; } }

/* ---------- Themes ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; padding: 8px 14px 8px 8px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); font: 600 0.95rem/1 var(--body); color: var(--text); transition: transform 0.15s ease, box-shadow 0.2s ease; }
.swatch img { width: 36px; height: 36px; border-radius: 10px; }
.swatch:hover { transform: translateY(-2px); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent-ink), var(--shadow); }

/* ---------- Privacy strip ---------- */
.promise { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.promise div { background: var(--surface); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.promise b { font: 650 1.05rem/1.2 var(--display); }
.promise span { color: var(--text-2); font-size: 0.95rem; }
@media (max-width: 880px) { .promise { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .promise { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta .box { background: var(--surface); border-radius: 32px; box-shadow: var(--shadow); padding: clamp(40px, 6vw, 72px) 24px; display: grid; gap: 20px; justify-items: center; position: relative; overflow: hidden; }
.cta .box::before { content: ""; position: absolute; inset: auto -20% -60%; height: 100%; background: radial-gradient(closest-side, var(--wash), transparent); z-index: 0; }
.cta .box > * { position: relative; }
.cta .logo-big { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 10px 30px rgba(30, 31, 43, 0.15); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }

/* ---------- Footer ---------- */
footer { padding: 40px 0 56px; color: var(--text-2); font-size: 0.92rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 28px; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--text-2); }

/* ---------- Doc pages (privacy, support) ---------- */
.doc { padding: clamp(40px, 7vw, 80px) 0; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 10px; }
.doc h2 { font-size: 1.45rem; margin: 40px 0 10px; }
.doc p, .doc li { color: #353748; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc .meta { color: var(--text-2); }
.doc .panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-top: 24px; }
details { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 16px 20px; margin-top: 12px; }
details summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details summary::after { content: "+"; font: 500 1.3rem/1 var(--display); color: var(--accent-ink); transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details summary::-webkit-details-marker { display: none; }
details p { margin-top: 10px; color: var(--text-2); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.seen { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .board { transform: none; }
}

.btn-mini { display: inline-block; padding: 8px 14px; border-radius: 12px; background: var(--accent); color: var(--text) !important; font-weight: 600; transition: background-color 0.6s ease; }

@media (max-width: 560px) {
  .photo { aspect-ratio: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 60px 14px 16px; }
  .board { --c: clamp(30px, 9vw, 46px); }
  .found { position: static; justify-content: center; }
}
.store-badge { display: inline-block; line-height: 0; transition: transform 0.15s ease; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge img { height: 54px; width: auto; }
.ctas { align-items: center; }
