/*
 * The showcase site (cardoscope.app): same colors as the app, no scripts,
 * no cookies, no external fonts.
 */

:root {
  --text: #1b2340;
  --muted: #5b6380;
  --bg: #f3f5fb;
  --surface: #ffffff;
  --border: #d9deeb;
  --accent: #cc2e0e;
  --accent-shadow: #8f1f08;
  --red: #e3350d;
  --ink: #1b1b23;
  --lens: #8fd6ff;
  --yellow: #ffcb05;
  --yellow-soft: #fff4c2;
  --navy: #1d2c5e;
  --shadow: 0 6px 18px rgb(29 44 94 / 0.1);
  --display: 'Fredoka Variable', 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  font: 17px/1.6 system-ui, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light dark;
  color: var(--text);
  background: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #eef1fb;
    --muted: #a3abc8;
    --bg: #0d1430;
    --surface: #17203f;
    --border: #2d3a66;
    --accent: #d93a17;
    --accent-shadow: #861f08;
    --ink: #e9ecf7;
    --yellow-soft: #3a3214;
    --shadow: 0 6px 18px rgb(0 0 0 / 0.35);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: inherit;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header ------------------------------------------------------------------ */

.top {
  background: var(--navy);
  color: #fff;
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 1.35rem var(--display);
  text-decoration: none;
  margin-right: auto;
}

.brand svg {
  width: 36px;
  height: 36px;
}

.top nav {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
}

.top nav a {
  text-decoration: none;
  opacity: 0.85;
}

.top nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .top nav .section-link {
    display: none;
  }
}

/* --- Emblem ------------------------------------------------------------------ */

.emblem-card {
  fill: #fff;
  stroke: #1b1b23;
  stroke-width: 3.5;
}

.emblem-art {
  fill: var(--lens);
}

.emblem-line {
  fill: none;
  stroke: #1b1b23;
  stroke-width: 3;
  stroke-linecap: round;
}

.emblem-frame {
  fill: none;
  stroke: var(--red);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Hero -------------------------------------------------------------------- */

.hero {
  background: var(--navy);
  color: #fff;
  padding: 48px 0 64px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font: 600 clamp(2rem, 5vw, 3.1rem) / 1.15 var(--display);
  margin: 0 0 16px;
}

.hero h1 em {
  font-style: normal;
  color: var(--yellow);
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0 0 24px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font: 600 1.05rem var(--display);
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--accent-shadow);
}

.button:hover {
  filter: brightness(1.08);
}

.button.ghost {
  background: transparent;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.6);
}

.hero .beta {
  font-size: 0.9rem;
  opacity: 0.75;
  margin-top: 14px;
}

/* A card in the scanner's frame, drawn in CSS. */
.scene {
  position: relative;
  aspect-ratio: 1;
  max-width: 340px;
  justify-self: center;
  width: 100%;
}

.scene .frame {
  position: absolute;
  inset: 0;
}

.scene .card {
  position: absolute;
  inset: 14% 24%;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff9d6, var(--yellow) 45%, #f5a623);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.35);
  padding: 7%;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 6%;
  transform: rotate(-4deg);
}

.scene .card span {
  display: block;
  border-radius: 6px;
  background: rgb(27 27 35 / 0.18);
}

.scene .card .name {
  height: 9%;
  min-height: 10px;
  width: 60%;
}

.scene .card .art {
  background: linear-gradient(160deg, var(--lens), #4fa3d9);
}

.scene .card .text {
  height: 8px;
}

.scene .card .code {
  height: 8px;
  width: 35%;
  background: var(--red);
}

.scene .beam {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 3px;
  background: #4fd2ff;
  box-shadow: 0 0 16px 4px rgb(79 210 255 / 0.6);
  top: 50%;
  animation: scan 3s ease-in-out infinite alternate;
}

@keyframes scan {
  from {
    top: 16%;
  }
  to {
    top: 84%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene .beam {
    animation: none;
  }
}

@media (max-width: 760px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .scene {
    max-width: 240px;
    order: -1;
  }
}

/* --- Sections ---------------------------------------------------------------- */

section {
  padding: 56px 0;
}

section + section {
  border-top: 1px solid var(--border);
}

h2 {
  font: 600 clamp(1.5rem, 3.5vw, 2rem) / 1.2 var(--display);
  margin: 0 0 12px;
}

h3 {
  font: 600 1.15rem / 1.3 var(--display);
  margin: 0 0 6px;
}

.lead {
  color: var(--muted);
  max-width: 680px;
  margin: 0 0 28px;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  counter-reset: step;
}

.steps li,
.features article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--yellow);
  color: #3b2f00;
  font: 600 1.1rem var(--display);
  margin-bottom: 10px;
}

.steps p,
.features p {
  margin: 0;
  color: var(--muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.grades {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 18px 0;
  list-style: none;
}

.grades li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 0.95rem;
}

.grades b {
  font-family: var(--display);
  margin-right: 6px;
}

.note {
  background: var(--yellow-soft);
  border-left: 4px solid var(--yellow);
  border-radius: 8px;
  padding: 14px 18px;
  max-width: 760px;
}

.checks {
  max-width: 760px;
  padding-left: 1.2em;
}

.checks li {
  margin-bottom: 6px;
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  max-width: 800px;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

details p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* --- Footer ------------------------------------------------------------------ */

footer {
  background: var(--navy);
  color: #fff;
  padding: 32px 0;
  font-size: 0.9rem;
}

footer p {
  margin: 0 0 8px;
  opacity: 0.8;
}

footer .links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  opacity: 1;
  margin-bottom: 16px;
}
