/* KnowSoda website. Same tokens as the app (STYLE.md): two inks, square corners, solid offset shadows. */

@font-face { font-family: 'Pixelify Sans'; src: url('assets/fonts/PixelifySans_400Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Pixelify Sans'; src: url('assets/fonts/PixelifySans_700Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('assets/fonts/IBMPlexMono_400Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('assets/fonts/IBMPlexMono_500Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --background: #EFE6CC;
  --surface: #F8F2DF;
  --text: #1E2B20;
  --text-muted: #5A6452;
  --border: #1E2B20;
  --divider: #E2D7B6;
  --shadow: #1E2B20;
  --primary: #3E9E5A;
  --primary-text: #2F7A45;
  --on-primary: #F8F2DF;
  --mint: #B9DDB0;
  --negative: #D2553A;
  --pixel: 'Pixelify Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --gutter: clamp(20px, 3.5vw, 40px);
  --max: 1320px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0F1611;
    --surface: #18221A;
    --text: #EDE3C8;
    --text-muted: #A3A894;
    --border: #3A4C3D;
    --divider: #243026;
    --shadow: #2A3A2D;
    --primary: #6FD08C;
    --primary-text: #6FD08C;
    --on-primary: #0F1611;
    --mint: #22382A;
    --negative: #F07A5C;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: var(--primary-text); }
.pixel-art { image-rendering: pixelated; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Panels and buttons: the core Y2K block, a bordered surface on a solid offset shadow. */
.panel {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--text);
  box-shadow: 6px 6px 0 var(--shadow);
}
/* Quiet blocks take the soft tone, so they don't shine white in the dark theme (Panel tone="soft"). */
.panel.soft { border-color: var(--border); }
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  font-family: var(--pixel);
  font-size: 18px;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--text);
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform 80ms, box-shadow 80ms;
}
.button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
.button:active { transform: translate(4px, 4px); box-shadow: none; }
.button.primary { background: var(--primary); color: var(--on-primary); }

/* Pixel icons are white art tinted by the text colour. */
.icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
  mask: var(--src) center / contain no-repeat;
  image-rendering: pixelated;
}

.eyebrow {
  margin: 0 0 8px;
  font-family: var(--pixel);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-text);
}
h1, h2, h3 { font-family: var(--pixel); font-weight: 700; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(36px, 7vw, 60px); }
h2 { font-size: clamp(28px, 5vw, 40px); }
h3 { font-size: 22px; }
p { margin: 0; }

/* Header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--pixel); font-weight: 700; font-size: 24px; }
.logo img { width: 36px; height: 36px; border: 2px solid var(--text); }
.site-nav { display: flex; gap: 20px; font-family: var(--pixel); font-size: 16px; }
.site-nav a { color: var(--text); text-decoration: none; }
.site-nav a:hover { color: var(--primary-text); }

/* EN / ES, in the footer: the current language filled green. */
.lang-switch { display: flex; border: 2px solid var(--border); font-family: var(--pixel); font-size: 14px; }
.lang-switch a { padding: 4px 9px; line-height: 1.2; color: var(--text-muted); text-decoration: none; }
.lang-switch a + a { border-left: 2px solid var(--border); }
.lang-switch a:hover { color: var(--primary-text); }
.lang-switch a[aria-current] { background: var(--primary); color: var(--on-primary); }

/* Hero */
.hero { padding: 40px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--primary-text); }
.hero .lead { margin-top: 20px; font-size: 18px; color: var(--text-muted); max-width: 42ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero .note { margin-top: 16px; font-size: 13px; color: var(--text-muted); }

/* Release status: a flat label with a blinking LED, so it never reads as a button. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 16px;
  font-family: var(--pixel);
  font-size: 16px;
  color: var(--text);
  border: 2px dashed var(--border);
}
.status i { width: 10px; height: 10px; flex: none; background: var(--primary); animation: led 1.6s steps(1) infinite; }
@keyframes led { 50% { opacity: 0.25; } }

/* The demo card, drawn like the app's feed. */
.demo { max-width: 460px; margin-left: auto; }
.soda-bubble { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 22px; }
.soda-bubble img { width: 64px; height: 64px; flex: none; }
.soda-bubble .bubble { padding: 10px 12px; font-size: 14px; }
.soda-bubble .bubble b { display: block; font-family: var(--pixel); font-weight: 400; font-size: 12px; color: var(--primary-text); }
/* On a single column Soda greets above the title instead of beside the sample card. */
.hero-greeting { display: none; }
.card { background: var(--mint); }
.card-strip { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 2px solid var(--text); font-family: var(--pixel); font-size: 13px; }
.card-body { padding: 16px 18px 18px; }
.card-body .art { width: 78%; height: auto; margin: 0 auto 14px; }
.card-body .text { font-size: 15px; line-height: 1.5; }
.key-fact { margin-top: 14px; padding: 10px 12px; background: var(--surface); border: 2px solid var(--text); font-size: 14px; }
.key-fact b { display: inline-block; margin-bottom: 4px; padding: 1px 6px; font-family: var(--pixel); font-weight: 400; font-size: 11px; background: var(--text); color: var(--surface); }

/* Stats */
.stats { border-top: 2px solid var(--border); border-bottom: 2px solid var(--border); background: var(--surface); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 26px 16px; text-align: center; }
.stat + .stat { border-left: 2px solid var(--divider); }
.stat strong { display: block; font-family: var(--pixel); font-size: 36px; line-height: 1; color: var(--primary-text); }
.stat span { display: block; margin-top: 8px; font-size: 13px; color: var(--text-muted); }

/* Sections */
section.block { padding: 80px 0; }
.section-head { max-width: 40ch; margin-bottom: 36px; }
.section-head p { margin-top: 14px; color: var(--text-muted); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step { padding: 22px; }
.step .icon { color: var(--primary-text); margin-bottom: 16px; }
.step h3 { margin-bottom: 10px; }
.step p { font-size: 15px; color: var(--text-muted); }
.swipe-demo { display: flex; gap: 8px; margin-top: 16px; }
.swipe-demo span { flex: 1; padding: 6px 0; text-align: center; font-family: var(--pixel); font-size: 14px; border: 2px solid var(--text); }
.swipe-demo .no { color: var(--negative); }
.swipe-demo .yes { background: var(--primary); color: var(--on-primary); }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.gallery-dots { display: none; }
.tile { display: flex; flex-direction: column; }
.tile .art-frame { padding: 14px; border-bottom: 2px solid var(--border); background: var(--background); }
/* Each picture has a canvas of its own: all sit centred in frames of one shape, so the tiles line up. */
.tile .art-frame img { width: 100%; height: auto; aspect-ratio: 12 / 7; object-fit: contain; }
.tile figcaption { padding: 14px 16px 16px; font-size: 14px; }
.tile figcaption b { display: block; margin-bottom: 4px; font-family: var(--pixel); font-weight: 400; font-size: 13px; color: var(--primary-text); text-transform: uppercase; letter-spacing: 0.04em; }

/* The light band with Soda the coach. Panels inside sit on the page colour. */
.band { background: var(--surface); border-top: 2px solid var(--border); }
.band .mood { background: var(--background); }
.soda-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.coach .intro { margin-top: 14px; color: var(--text-muted); }
.moods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.mood { padding: 14px; text-align: center; font-family: var(--pixel); font-size: 14px; color: var(--text-muted); }
/* Soda is 64 art pixels square: shown at 1x or 2x so every pixel stays whole. */
.soda-stage { position: relative; display: block; width: 128px; margin: 0 auto 6px; }
.soda-stage img { width: 128px; height: 128px; }

/* Sleepy "z"s drift up from the head one after another, as in the app: up, a little right, growing, fading. */
.zs i {
  position: absolute;
  left: 70%;
  top: 18%;
  font-family: var(--pixel);
  font-weight: 700;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
  opacity: 0;
  animation: z-float 2.7s linear infinite;
}
/* Negative delays: the three are already spread along the path when the page opens. */
.zs i:nth-child(1) { animation-delay: -0.4s; }
.zs i:nth-child(2) { animation-delay: -1.3s; }
.zs i:nth-child(3) { animation-delay: -2.2s; }
@keyframes z-float {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  15% { opacity: 1; }
  35% { transform: translate(11px, -21px) scale(0.81); }
  70% { opacity: 1; transform: translate(14px, -41px) scale(1.02); }
  100% { opacity: 0; transform: translate(23px, -59px) scale(1.2); }
}
.coach ul { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.coach li { display: flex; gap: 12px; align-items: flex-start; }
.coach li .icon { color: var(--primary-text); margin-top: 2px; }


/* Not found */
.not-found { padding: 24px 0 88px; text-align: center; }
.not-found .panel { max-width: 560px; margin: 0 auto; padding: 44px 24px; }
.not-found .soda-stage { margin-bottom: 12px; }
.not-found p { margin: 16px auto 0; max-width: 40ch; color: var(--text-muted); }
.not-found .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 28px; }

/* Footer */
.site-footer { padding: 36px 0 48px; border-top: 2px solid var(--border); font-size: 14px; color: var(--text-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; }
.site-footer .footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer .footer-links a { color: var(--text); }

/* Legal pages */
.legal { padding: 24px 0 72px; }
.legal .panel { padding: 32px clamp(18px, 4vw, 44px); max-width: 780px; margin: 0 auto; }
.legal h1 { font-size: clamp(30px, 6vw, 44px); margin-bottom: 8px; }
.legal .updated { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.legal h2 { font-size: 22px; margin: 32px 0 10px; }
.legal p, .legal li { font-size: 15px; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; margin: 10px 0 0; }
.legal li + li { margin-top: 6px; }
.legal ul + p { margin-top: 12px; }

@media (max-width: 860px) {
  .hero .wrap, .soda-grid { grid-template-columns: 1fr; gap: 40px; }
  .demo { margin: 0 auto; }
  .hero .hero-greeting { display: flex; margin-bottom: 26px; }
  .demo .soda-bubble { display: none; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 2px solid var(--divider); }
  section.block { padding: 56px 0; }
  .section-head { margin-bottom: 24px; }

  /* Steps: compact rows, the icon beside the words. */
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .step { display: grid; grid-template-columns: 24px 1fr; column-gap: 14px; padding: 16px; }
  .step .icon { grid-row: 1 / span 3; margin: 1px 0 0; }
  .step h3 { margin-bottom: 6px; font-size: 19px; }
  .step p { font-size: 14px; line-height: 1.55; }
  .swipe-demo { margin-top: 12px; }

  /* Cards: a gallery swiped sideways, bleeding to the screen edges, the next card peeking in. */
  .gallery {
    position: relative;
    display: flex;
    gap: 16px;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery .tile { flex: 0 0 min(82%, 340px); scroll-snap-align: start; }
  /* Each dot is a 12 px square on a 24 px touch target. */
  .gallery-dots { display: flex; justify-content: center; gap: 2px; margin-top: 8px; }
  .gallery-dots button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
  .gallery-dots button::before { content: ''; width: 12px; height: 12px; border: 2px solid var(--border); box-sizing: border-box; }
  .gallery-dots button[aria-current="true"]::before { background: var(--primary); border-color: var(--primary); }
}
@media (max-width: 520px) {
  .site-nav { display: none; }

  /* Hero: tighter, the steps button dropped (they're just below), a smaller sample card. */
  .hero { padding: 20px 0 44px; }
  .hero .wrap { gap: 32px; }
  .hero .lead { margin-top: 16px; font-size: 16px; line-height: 1.55; }
  .hero .actions { margin-top: 22px; }
  .hero .button { display: none; }
  .status { min-height: 42px; padding: 0 14px; font-size: 15px; }
  .hero .note { margin-top: 12px; }
  .soda-bubble { margin-bottom: 16px; }
  .soda-bubble .bubble { font-size: 13px; }
  .card-strip { padding: 7px 12px; font-size: 12px; }
  .card-body { padding: 14px 14px 16px; }
  .card-body .art { width: 66%; margin-bottom: 12px; }
  .card-body .text { font-size: 14px; }
  .key-fact { margin-top: 12px; padding: 8px 10px; font-size: 13px; }

  .stat { padding: 18px 10px; }
  .stat strong { font-size: 30px; }
  .stat span { margin-top: 6px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
  .status i { animation: none; }
  /* Still z's, spread along their path. */
  .zs i { animation: none; opacity: 1; }
  .zs i:nth-child(1) { transform: translate(4px, -8px) scale(0.7); }
  .zs i:nth-child(2) { transform: translate(12px, -27px) scale(0.9); }
  .zs i:nth-child(3) { transform: translate(19px, -47px) scale(1.1); }
}
