/*
 * Copyrighted: the home page, section by section, as the approved concept
 * lays it out: the hero with the rosette and the stamping stage, the field
 * ticker, the owner groups, the layer plates, the checker teaser, the rules
 * and History, everywhere you share. Plans, Learn cards, posts, the FAQ and
 * the closing call are base.css's.
 */

/* ── Hero ────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 7vw, 100px) clamp(64px, 8vw, 120px); }
/* Drawn once by rosette.js and turned by the compositor; paused off screen (.paused) and under reduced motion. */
.hero canvas.rosette { position: absolute; right: -12%; top: -18%; width: min(1100px, 110vw); aspect-ratio: 1; height: auto; opacity: .5;
  pointer-events: none; animation: cr-turn 180s linear infinite; }
.hero canvas.rosette.paused { animation-play-state: paused; }
@keyframes cr-turn { to { transform: rotate(360deg); } }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 26px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px 22px; align-items: center; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.facts li { font: 500 11px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts li::before { content: "©"; color: var(--gold); margin-right: 8px; }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; } }

/* ── The stamping stage ──────────────────────────────────── */
.stage { position: relative; height: clamp(460px, 48vw, 600px); }
.photo { position: absolute; left: 50%; top: 45%; width: min(58%, 290px); aspect-ratio: 4 / 5; border-radius: 6px; background: var(--paper);
  padding: 10px 10px 0; box-shadow: 0 30px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .2);
  transform: translate(-50%, -50%) rotate(var(--r)) translate(calc(var(--x) * var(--k, 1)), var(--y)); transition: transform .5s var(--ease-out); }
.photo.pressed { transform: translate(-50%, -50%) rotate(var(--r)) translate(calc(var(--x) * var(--k, 1)), calc(var(--y) + 6px)); transition-duration: .12s; }
.photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.photo .label { display: grid; gap: 2px; padding: 10px 4px 12px; }
.photo .fname { font: 500 10px/1.4 var(--mono); color: var(--paper-muted); letter-spacing: .04em; }
.photo .notice { font: 500 11.5px/1.3 var(--mono); color: var(--paper-muted); display: flex; align-items: center; gap: 6px; min-height: 16px; }
.photo .notice i { font-style: normal; width: 8px; height: 8px; border-radius: 50%; background: var(--blank); flex: none; }
.photo.third .notice { color: #8a5a10; }
.photo.third .notice i { background: var(--warn); }
.photo.stamped .notice { color: #1f6b43; }
.photo.stamped .notice i { background: var(--ok); }
.photo .corner { position: absolute; right: 18px; top: 18px; width: 34px; height: 34px; border-radius: 50%; background: var(--foil); color: #3a2a08;
  display: grid; place-items: center; font: 700 20px/1 var(--serif); box-shadow: 0 4px 12px rgba(0, 0, 0, .35); transform: scale(0);
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.photo.stamped .corner { transform: scale(1); }
.seal { position: absolute; left: 50%; top: 4%; width: 128px; height: 128px; margin-left: -64px; z-index: 20; border-radius: 50%; background: var(--foil);
  display: grid; place-items: center; box-shadow: 0 24px 50px rgba(0, 0, 0, .5), inset 0 0 0 6px rgba(255, 255, 255, .18), inset 0 0 0 14px rgba(0, 0, 0, .08);
  transform: translateY(var(--sy, -40px)) scale(var(--ss, 1)); transition: transform .45s cubic-bezier(.6, 0, .3, 1); }
.seal svg { width: 100%; height: 100%; }
.seal text { font: 500 8px var(--mono); letter-spacing: .28em; text-transform: uppercase; fill: #4a360c; } /* any locale's phrase, in the seal's capitals */
.seal .c { font: 700 54px var(--serif); fill: #3a2a08; letter-spacing: 0; }
.ripple { position: absolute; left: 50%; top: 45%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 2px solid var(--gold);
  opacity: 0; pointer-events: none; z-index: 15; }
.ripple.go { animation: cr-ripple .9s ease-out; }
@keyframes cr-ripple { from { transform: scale(1); opacity: .9; } to { transform: scale(14); opacity: 0; } }
.stage-bar { position: absolute; left: 0; right: 0; bottom: -6px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; z-index: 25; }
/* On a phone the fan closes up, so no card leaves the column, and the bar sits below the cards. */
@media (max-width: 520px) {
  .stage { height: 470px; --k: .55; }
  .photo { width: 54%; top: 43%; }
  .seal { width: 104px; height: 104px; margin-left: -52px; }
  .stage-bar { bottom: -14px; }
  .stage-bar .pill { font-size: 11px; letter-spacing: .03em; padding: 7px 12px; }
}

/* ── The field ticker ────────────────────────────────────── */
.ticker { border-block: 1px solid var(--line); background: var(--ink-2); overflow: hidden; padding-block: 16px; }
.ticker .track { display: flex; width: max-content; animation: cr-slide 70s linear infinite; }
.ticker ul { display: flex; gap: 40px; margin: 0; padding: 0 40px 0 0; list-style: none; }
.ticker li { font: 500 12px/1.4 var(--mono); color: var(--muted); white-space: nowrap; letter-spacing: .04em; }
.ticker li b { color: var(--gold); font-weight: 500; margin-right: 8px; }
@keyframes cr-slide { to { transform: translateX(-50%); } }
/* Paused by home.js while off screen or in a hidden tab; never runs under reduced motion. */
.ticker.paused .track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .ticker .track { animation: none; } }

/* ── The owner groups ────────────────────────────────────── */
.groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bin { border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: var(--ink-2); display: grid; gap: 14px; align-content: start; min-height: 260px; }
.bin header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bin h3 { font-size: 19px; }
.bin .n { font: 700 34px/1 var(--serif); color: var(--c); font-variant-numeric: tabular-nums; }
.bin .chip { justify-self: start; font: 500 11px/1.5 var(--mono); padding: 3px 9px; border-radius: 999px; color: color-mix(in srgb, var(--c) 78%, #fff);
  background: color-mix(in srgb, var(--c) 14%, transparent); }
.bin .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; min-height: 0; }
.bin .tiles img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3); }
.bin .tiles img.in { opacity: 0; transform: scale(.6); }
.bin .tiles img.on { opacity: 1; transform: none; transition: opacity .4s var(--d, 0ms), transform .5s cubic-bezier(.3, 1.5, .5, 1) var(--d, 0ms); }
.bin p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; }
.bin.ok { --c: var(--ok); } .bin.warn { --c: var(--warn); } .bin.blank { --c: var(--blank); } .bin.bad { --c: var(--bad); }
.replay { margin-top: 22px; }
.replay-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin-top: 22px; }
.replay-row .replay { margin-top: 0; }
.scan-note { font: 500 12px/1.4 var(--mono); color: var(--muted); letter-spacing: .04em; }
@media (max-width: 960px) { .groups { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .groups { grid-template-columns: 1fr; } .bin { min-height: 0; } }

/* ── The layers ──────────────────────────────────────────── */
.layers .wrap { display: grid; grid-template-columns: .95fr 1.05fr; gap: 56px; align-items: center; }
.ops { display: inline-flex; flex-wrap: wrap; justify-self: start; padding: 4px; border-radius: 12px; background: var(--ink-3); border: 1px solid var(--line); gap: 4px; margin-top: 8px; }
.ops button { font: 500 14px var(--sans); color: var(--muted); background: transparent; border: 0; padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.ops button:hover { color: var(--text); }
.ops button[aria-pressed="true"] { background: var(--text); color: var(--ink); }
.opnote { margin: 0; color: var(--muted); font-size: 15px; min-height: 3em; max-width: 36em; }
.refusal { margin: -6px 0 0; justify-self: start; display: inline-flex; gap: 8px; align-items: baseline; font: 500 12.5px/1.5 var(--mono); color: var(--warn);
  padding: 6px 12px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.refusal[hidden] { display: none; }
.plates { position: relative; height: 520px; perspective: 1600px; }
.plate { position: absolute; left: 50%; top: 50%; width: min(92%, 420px); border-radius: 16px; padding: 16px 18px; transform-style: preserve-3d;
  background: rgba(26, 36, 57, .78); border: 1px solid var(--line-2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transform: translate(-50%, -50%) rotateX(52deg) rotateZ(-18deg) translateZ(var(--z)); box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
.plate.photo-plate { padding: 0; overflow: hidden; background: #000; }
.plate.photo-plate img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; opacity: .92; }
.plate .ptitle { display: flex; justify-content: space-between; align-items: center; font: 500 12px var(--mono); letter-spacing: .14em; color: var(--gold); margin-bottom: 10px; }
.plate dl { margin: 0; display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: 14px; }
.plate dt { font: 400 12px/1.5 var(--mono); color: var(--muted); }
.plate dd { margin: 0; font: 500 13px/1.45 var(--mono); color: var(--text); transition: color .4s; }
.plate dd.bad { color: var(--bad); } .plate dd.none { color: var(--blank); } .plate dd.ok { color: var(--ok); }
.plate dd.flash { animation: cr-flash .6s ease-out; }
@keyframes cr-flash { from { text-shadow: 0 0 12px currentColor; } }
.verdict { --c: var(--blank); font: 500 11px var(--mono); padding: 3px 9px; border-radius: 999px; color: color-mix(in srgb, var(--c) 78%, #fff); background: color-mix(in srgb, var(--c) 16%, transparent); letter-spacing: .06em; }
.verdict.ok { --c: var(--ok); } .verdict.bad { --c: var(--bad); } .verdict.blank { --c: var(--blank); }
@media (max-width: 960px) { .layers .wrap { grid-template-columns: 1fr; } .plates { height: 460px; } }
@media (max-width: 520px) {
  .plates { height: 400px; }
  .plate dl { grid-template-columns: 78px 1fr; }
  .ops { display: flex; flex-wrap: nowrap; justify-self: stretch; }
  .ops button { flex: 1 1 auto; padding: 8px 6px; font-size: 13px; white-space: nowrap; }
}

/* ── The checker teaser ──────────────────────────────────── */
.checker .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.open-full { margin: 0; }
@media (max-width: 960px) { .checker .wrap { grid-template-columns: 1fr; } }

/* ── Safe: the rules and History ─────────────────────────── */
.safe { background: linear-gradient(180deg, var(--ink), var(--ink-2)); }
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rule { border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: grid; gap: 10px; align-content: start; background: rgba(12, 18, 32, .5); }
.rule .code { font: 500 11px/1.4 var(--mono); color: var(--gold); letter-spacing: .12em; }
.rule p { margin: 0; color: var(--muted); font-size: 15px; }
.history { grid-column: span 3; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; border: 1px solid var(--line-2); border-radius: 20px;
  padding: 18px 22px; background: var(--ink-3); }
.history .row { display: grid; gap: 4px; }
.history .row b { font: 600 16px/1.35 var(--sans); }
.history .row span { font: 400 13px/1.5 var(--mono); color: var(--muted); }
@media (max-width: 900px) { .rules { grid-template-columns: 1fr; } .history { grid-column: auto; } }
@media (max-width: 520px) { .history { grid-template-columns: 1fr; justify-items: start; } }

/* ── Everywhere you share ────────────────────────────────── */
.where { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.w { border: 1px solid var(--line); border-radius: 22px; padding: 26px; background: var(--ink-2); display: grid; gap: 12px; align-content: start; }
.w .ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold); }
.w p { margin: 0; color: var(--muted); font-size: 15px; }
.devices { margin: 26px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 900px) { .where { grid-template-columns: 1fr; } }
