/* RAW Experience promo site */

:root {
  color-scheme: light dark;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #17171a;
  --muted: #5c5c66;
  --line: #e2e2e6;
  --link: #2f55d4;
  --red: #e5484d;
  --green: #30a46c;
  --blue: #3e63dd;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --width: 68rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e11;
    --surface: #17181d;
    --text: #ececf0;
    --muted: #a0a0ab;
    --line: #2a2b31;
    --link: #8da6ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
}

img, canvas { display: block; max-width: 100%; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.75rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.3rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2 * var(--gutter), var(--width)); margin-inline: auto; }
.prose > * { max-width: 42rem; }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10;
}
.skip:focus { left: 8px; }

/* Header */

.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none; font-weight: 650; font-size: 1.0625rem;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.lang { display: flex; gap: 4px; font-size: 0.9375rem; }
.lang a, .lang span {
  padding: 4px 10px; border-radius: 999px; text-decoration: none;
}
.lang span { background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.lang a { color: var(--muted); }
.lang a:hover { color: var(--text); }

/* Hero */

.hero { padding-block: clamp(24px, 5vw, 64px) clamp(24px, 4vw, 48px); }
.hero .lead { font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem); color: var(--muted); max-width: 40rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }
.badge { display: inline-block; border-radius: 10px; color: inherit; text-decoration: none; }
.badge img { height: 54px; width: auto; }
.cta .muted { font-size: 0.9375rem; margin: 0; }

.hero-image {
  margin: 0;
  image-rendering: pixelated;
}
.hero-image img {
  width: 100%; height: auto; aspect-ratio: 3840 / 1646;
  max-height: min(60vh, 520px); /* wide screens crop top and bottom; the photo-to-mosaic transition runs left to right */
  object-fit: cover; object-position: 50% 40%;
  image-rendering: pixelated;
}

/* Sections */

section { padding-block: clamp(48px, 8vw, 96px); }
section + section { border-top: 1px solid var(--line); }
.section-intro { max-width: 42rem; margin-bottom: 32px; }

.cards {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  padding: 0; margin: 0; list-style: none;
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.card p { margin: 0; color: var(--muted); }

.steps { counter-reset: step; }
.steps .card::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: 12px;
  border-radius: 8px; color: #fff; font-weight: 700;
  background: var(--green);
}
.steps .card:nth-child(1)::before { background: var(--red); }
.steps .card:nth-child(3)::before { background: var(--blue); }

/* Patterns */

.pattern { display: grid; grid-template-columns: 56px 1fr; gap: 4px 16px; align-items: start; }
.pattern .swatch { grid-row: span 2; width: 56px; height: 56px; border-radius: 4px; }
.pattern h3 { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; color: var(--link); border: 1px solid currentColor;
}

/* Demo */

.demo { display: grid; gap: 20px; }
.demo canvas {
  width: 100%; height: auto; aspect-ratio: 3 / 2;
  border-radius: var(--radius); background: var(--surface);
  image-rendering: pixelated;
}
.controls {
  display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px;
}
.controls label { display: inline-flex; align-items: center; gap: 8px; }
.controls select, .controls input[type="range"] { font: inherit; accent-color: var(--link); }
.controls select {
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: inherit;
}
.controls input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--link); }
.controls output { min-width: 3.5em; font-variant-numeric: tabular-nums; color: var(--muted); }
.file { position: relative; }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file span {
  cursor: pointer; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg);
}
.file:focus-within span { outline: 3px solid var(--link); outline-offset: 2px; }
.demo .muted { font-size: 0.9375rem; margin: 0; }
.demo-fallback img { border-radius: var(--radius); }

/* Screenshots */

.gallery {
  display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--gutter), (100% - var(--width)) / 2);
  padding: 4px max(var(--gutter), (100% - var(--width)) / 2) 20px; margin: 0;
  list-style: none;
  scrollbar-width: thin;
}
.gallery li { flex: 0 0 clamp(170px, 42vw, 250px); scroll-snap-align: start; }
.gallery img {
  width: 100%; height: auto; aspect-ratio: 1320 / 2868;
  border-radius: 22px; border: 1px solid var(--line); background: #000;
}
.gallery figure { margin: 0; }
.gallery figcaption { font-size: 0.875rem; color: var(--muted); margin-top: 8px; }

/* Features */

.features { padding: 0; margin: 0 0 32px; list-style: none; display: grid; gap: 12px; }
.features li { padding-left: 28px; position: relative; }
.features li::before {
  content: ""; position: absolute; left: 0; top: 0.45em;
  width: 12px; height: 12px; border-radius: 3px;
  background: conic-gradient(var(--blue) 0 25%, var(--green) 0 50%, var(--red) 0 75%, var(--green) 0);
}
.pro { max-width: 42rem; }

/* Privacy */

.policy h3 { margin-top: 1.5em; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 32px 48px;
  font-size: 0.9375rem; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
}
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
