/* Stone & Felt — shared styles
   Felt table canvas, bone tile surfaces, brass accent.
   Display: Fraunces · Body: Hanken Grotesk · Labels: Space Mono */

:root {
  /* felt (canvas) */
  --felt:        #1f3a2e;
  --felt-deep:   #16291f;
  --felt-line:   #2c4d3e;
  /* bone (surfaces) */
  --bone:        #f1e8d6;
  --bone-hi:     #fbf5e9;
  --bone-lo:     #ddcfb4;
  /* ink + accents */
  --ink:         #211c16;
  --ink-soft:    #5a5142;
  --brass:       #b5934e;
  --brass-hi:    #cda85e;
  --brass-deep:  #8a6e37;
  --cinnabar:    #b23a2b;
  --jade:        #2f6b4f;
  /* text on felt */
  --on-felt:     #ece3cd;
  --on-felt-mut: #aeb89e;

  --maxw: 1080px;
  --pad: clamp(20px, 5vw, 64px);

  --f-display: "Fraunces", Georgia, serif;
  --f-body: "Hanken Grotesk", system-ui, sans-serif;
  --f-mono: "Space Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--on-felt);
  background: var(--felt);
  background-image:
    radial-gradient(120% 80% at 50% -10%, #254536 0%, var(--felt) 55%, var(--felt-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* subtle felt weave */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background-image:
    repeating-linear-gradient(45deg, rgba(0,0,0,.04) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.02) 0 2px, transparent 2px 4px);
  z-index: 0;
}

.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

a { color: var(--brass-hi); text-decoration: none; }
a:hover { color: var(--bone-hi); }
:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; border-radius: 2px; }

/* ---------- top bar ---------- */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad);
  max-width: var(--maxw); margin: 0 auto;
}
.brandmark {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: .01em;
  color: var(--bone-hi);
}
.brandmark .amp { color: var(--brass); font-style: italic; }
.topbar nav { display: flex; gap: 22px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.topbar nav a { color: var(--on-felt-mut); }
.topbar nav a:hover { color: var(--bone-hi); }

/* ---------- eyebrow / headings ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brass);
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--brass); opacity: .7; }

h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.08; margin: 0; color: var(--bone-hi); }

/* ---------- hero ---------- */
.hero { padding: clamp(32px, 7vh, 80px) 0 clamp(48px, 8vh, 96px); }
.hero h1 {
  font-size: clamp(48px, 9vw, 104px);
  font-weight: 600;
  letter-spacing: -.015em;
  margin: 0 0 6px;
}
.hero h1 .amp { color: var(--brass); font-style: italic; font-weight: 400; }
.hero .lede {
  font-size: clamp(18px, 2.4vw, 24px);
  max-width: 30ch;
  color: var(--on-felt);
  margin: 18px 0 0;
}
.hero .sub {
  max-width: 52ch;
  color: var(--on-felt-mut);
  margin: 16px 0 0;
}
.scrollcue {
  margin-top: 40px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--on-felt-mut);
  display: inline-flex; align-items: center; gap: 10px;
}
.scrollcue::after { content: "↓"; color: var(--brass); }

/* ---------- the hand (hero tiles) ---------- */
.hand {
  display: flex; justify-content: flex-start; align-items: flex-end;
  gap: clamp(-6px, -1vw, 0px);
  margin-top: clamp(36px, 6vh, 56px);
  padding-bottom: 8px;
  flex-wrap: wrap;
}

/* ---------- tile component ---------- */
.tile {
  --tw: 76px; --th: 104px;
  position: relative;
  width: var(--tw); height: var(--th);
  flex: 0 0 auto;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--bone-hi) 0%, var(--bone) 48%, var(--bone-lo) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.85),
    inset 0 -3px 6px rgba(120,96,52,.28),
    inset 0 0 0 1px rgba(181,147,78,.45),
    0 12px 22px rgba(0,0,0,.34),
    0 2px 4px rgba(0,0,0,.3);
  display: grid; place-items: center;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
}
.tile::after { /* engraved inset panel */
  content: ""; position: absolute; inset: 7px; border-radius: 6px;
  box-shadow: inset 0 1px 2px rgba(120,96,52,.35), inset 0 -1px 0 rgba(255,255,255,.6);
  pointer-events: none;
}
.tile:hover, .tile:focus-visible { transform: translateY(-10px) rotate(0deg) !important; box-shadow:
    inset 0 2px 0 rgba(255,255,255,.9),
    inset 0 -3px 6px rgba(120,96,52,.28),
    inset 0 0 0 1px rgba(181,147,78,.55),
    0 22px 34px rgba(0,0,0,.42); }

.tile .glyph {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  /* engraving illusion */
  text-shadow: 0 1px 0 rgba(255,255,255,.7), 0 -1px 1px rgba(0,0,0,.18);
}
.tile .num {
  position: absolute; top: 9px; left: 11px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 700;
  color: var(--ink-soft);
}
.tile.is-crak .glyph { color: var(--jade); font-size: 40px; }
.tile.is-crak .top  { color: var(--cinnabar); font-size: 18px; display:block; margin-bottom:2px; font-family: var(--f-mono); font-weight:700; }
.tile.is-dragon .glyph { color: var(--cinnabar); font-size: 46px; }
.tile.is-wind .glyph { color: var(--ink); font-size: 40px; }
.tile.is-joker .glyph { color: var(--brass-deep); font-size: 40px; }
.tile.is-joker .joker-label { font-family: var(--f-mono); font-size: 8px; letter-spacing: .14em; color: var(--ink-soft); display:block; margin-top: 4px; }
.tile svg { display: block; }

/* deal-in animation */
@keyframes deal { from { opacity: 0; transform: translateY(28px) rotate(var(--rot,0deg)) scale(.96); } to { opacity: 1; transform: translateY(0) rotate(var(--rot,0deg)); } }
.hand .tile { opacity: 0; animation: deal .55s cubic-bezier(.2,.7,.2,1) forwards; transform: rotate(var(--rot,0deg)); }
.hand .tile:nth-child(1){ --rot:-7deg; animation-delay:.05s; }
.hand .tile:nth-child(2){ --rot:-3deg; animation-delay:.13s; }
.hand .tile:nth-child(3){ --rot: 1deg; animation-delay:.21s; }
.hand .tile:nth-child(4){ --rot: 4deg; animation-delay:.29s; }
.hand .tile:nth-child(5){ --rot: 8deg; animation-delay:.37s; }
@media (prefers-reduced-motion: reduce) {
  .hand .tile { opacity: 1; animation: none; }
}

/* ---------- generic section ---------- */
.section { padding: clamp(48px, 9vh, 104px) 0; border-top: 1px solid var(--felt-line); }
.section h2 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -.01em; max-width: 20ch; }
.section .intro { color: var(--on-felt-mut); max-width: 56ch; margin: 18px 0 0; font-size: 17px; }

/* ---------- pillars (the idea) ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: clamp(32px, 5vh, 52px); }
@media (max-width: 760px){ .pillars { grid-template-columns: 1fr; } }
.card {
  background: linear-gradient(165deg, var(--bone-hi), var(--bone) 70%, var(--bone-lo));
  color: var(--ink);
  border-radius: 14px;
  padding: 26px 24px 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 0 0 1px rgba(181,147,78,.35), 0 16px 30px rgba(0,0,0,.3);
  position: relative;
}
.card .marker {
  width: 34px; height: 46px; border-radius: 6px; margin-bottom: 18px;
  background: linear-gradient(160deg, #fff, var(--bone-lo));
  box-shadow: inset 0 0 0 1px rgba(181,147,78,.5), inset 0 -2px 4px rgba(120,96,52,.3), 0 4px 8px rgba(0,0,0,.18);
  display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 600; font-size: 22px; color: var(--jade);
}
.card h3 { color: var(--ink); font-size: 22px; margin-bottom: 8px; }
.card p { color: var(--ink-soft); margin: 0; font-size: 15.5px; }

/* ---------- roadmap ---------- */
.timeline { margin-top: clamp(32px, 5vh, 52px); border-left: 2px solid var(--felt-line); padding-left: 0; }
.stop { position: relative; padding: 0 0 30px 34px; }
.stop:last-child { padding-bottom: 0; }
.stop::before {
  content: ""; position: absolute; left: -8px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--felt); border: 2px solid var(--brass);
}
.stop.is-now::before { background: var(--brass); box-shadow: 0 0 0 5px rgba(181,147,78,.2); }
.stop .tag {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brass); margin-bottom: 4px;
}
.stop h3 { font-size: 21px; color: var(--bone-hi); margin-bottom: 6px; }
.stop p { margin: 0; color: var(--on-felt-mut); max-width: 56ch; font-size: 15.5px; }

/* ---------- footer ---------- */
.foot {
  position: relative; z-index: 1;
  border-top: 1px solid var(--felt-line);
  background: var(--felt-deep);
  margin-top: 0;
}
.foot .wrap { display: flex; flex-wrap: wrap; gap: 22px 40px; align-items: baseline; justify-content: space-between; padding-top: 40px; padding-bottom: 48px; }
.foot .brandmark { font-size: 26px; }
.foot .meta { color: var(--on-felt-mut); font-size: 14px; }
.foot nav { display: flex; gap: 24px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.foot nav a { color: var(--on-felt-mut); }
.foot nav a:hover { color: var(--bone-hi); }
.foot .contact a { color: var(--brass-hi); font-family: var(--f-mono); font-size: 13px; }

/* ---------- document pages (privacy/support/attributions) ---------- */
.doc { padding: clamp(36px, 7vh, 72px) 0 clamp(56px, 9vh, 96px); }
.doc .sheet {
  background: linear-gradient(170deg, var(--bone-hi), var(--bone) 60%, var(--bone-lo));
  color: var(--ink);
  border-radius: 16px;
  padding: clamp(28px, 5vw, 56px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), inset 0 0 0 1px rgba(181,147,78,.35), 0 22px 44px rgba(0,0,0,.32);
}
.doc .sheet h1 { color: var(--ink); font-size: clamp(32px, 5vw, 48px); margin-bottom: 6px; }
.doc .sheet h2 { color: var(--ink); font-family: var(--f-display); font-size: 22px; margin: 32px 0 10px; }
.doc .sheet h3 { color: var(--ink); font-family: var(--f-display); font-size: 18px; margin: 22px 0 6px; }
.doc .sheet p, .doc .sheet li { color: #322b21; font-size: 16px; }
.doc .sheet a { color: var(--brass-deep); text-decoration: underline; }
.doc .sheet a:hover { color: var(--cinnabar); }
.doc .updated { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 8px; }
.doc .sheet ul { padding-left: 20px; }
.doc .sheet li { margin: 6px 0; }
.todo {
  background: rgba(178,58,43,.1);
  border: 1px dashed var(--cinnabar);
  color: #7a2419;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin: 18px 0;
}
.todo strong { font-family: var(--f-mono); letter-spacing: .04em; }
.backhome { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-felt-mut); }
.backhome:hover { color: var(--bone-hi); }
.license-row { border-top: 1px solid rgba(120,96,52,.25); padding-top: 16px; margin-top: 16px; }
.license-row:first-of-type { border-top: 0; }
.license-tag { font-family: var(--f-mono); font-size: 12px; color: var(--brass-deep); letter-spacing: .04em; }

/* ===================================================================
   v2 additions: app framing, travel + customization features
   =================================================================== */

/* play-store badge */
.playbadge{
  display:inline-flex; align-items:center; gap:11px; margin-top:26px;
  padding:10px 18px; border:1px solid var(--brass); border-radius:999px;
  font-family:var(--f-mono); font-size:12px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--bone-hi); background:rgba(181,147,78,.08);
}
.playbadge .tri{ width:0;height:0;border-style:solid;border-width:6px 0 6px 10px;
  border-color:transparent transparent transparent var(--brass); }

/* landscape phone mockup */
.device{ margin:clamp(38px,6vh,60px) auto 0; width:min(640px,100%); }
.device .body{
  position:relative; border-radius:34px; padding:13px;
  background:linear-gradient(155deg,#101013,#26262b);
  box-shadow:0 34px 64px rgba(0,0,0,.52), inset 0 0 0 1px rgba(255,255,255,.07), inset 0 1px 0 rgba(255,255,255,.14);
  aspect-ratio:20/9;
}
.device .screen{
  position:relative; height:100%; border-radius:22px; overflow:hidden;
  background:radial-gradient(130% 130% at 50% 0%, #2a4d3a 0%, #1b3327 70%);
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.5), inset 0 0 60px rgba(0,0,0,.35);
  display:flex; align-items:flex-end; justify-content:center; padding:0 30px 16px;
}
.device .punch{ position:absolute; top:50%; left:11px; transform:translateY(-50%);
  width:9px;height:9px;border-radius:50%;background:#000;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18); }
.device .hud{ position:absolute; top:13px; left:50%; transform:translateX(-50%);
  font-family:var(--f-mono); font-size:10px; letter-spacing:.18em; text-transform:uppercase; color:var(--on-felt-mut); }
.device .rack{ display:flex; gap:6px; align-items:flex-end; }
.device .rack .tile{ --tw:52px; --th:72px; border-radius:8px; }
.device .rack .tile .num{ font-size:9px; top:6px; left:7px; }
.device .rack .is-crak .glyph{ font-size:27px; }
.device .rack .is-crak .top{ font-size:11px; }
.device .rack .is-dragon .glyph{ font-size:31px; }
.device .rack .is-joker .glyph{ font-size:26px; }
.device .rack .is-joker .joker-label{ font-size:6px; }
.device .rack svg{ width:28px; height:auto; }
.device-cap{ text-align:center; margin-top:14px; font-family:var(--f-mono); font-size:11px;
  letter-spacing:.12em; text-transform:uppercase; color:var(--on-felt-mut); }

/* feature row (text + media) */
.feature{ display:grid; grid-template-columns:1.05fr .95fr; gap:clamp(28px,5vw,64px); align-items:center; }
.feature__media{ display:flex; justify-content:center; }
.feature.flip .feature__media{ order:-1; }
@media (max-width:820px){
  .feature{ grid-template-columns:1fr; }
  .feature.flip .feature__media{ order:0; }
}

/* travel: "leave the set at home" card */
.packcard{
  background:linear-gradient(165deg,var(--bone-hi),var(--bone) 70%,var(--bone-lo)); color:var(--ink);
  border-radius:16px; padding:26px 28px; width:min(380px,100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8), inset 0 0 0 1px rgba(181,147,78,.35), 0 18px 34px rgba(0,0,0,.3);
}
.packcard .lbl{ font-family:var(--f-mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--ink-soft); margin-bottom:14px; }
.packcard ul{ list-style:none; margin:0 0 16px; padding:0; }
.packcard li{ display:flex; align-items:center; gap:11px; padding:8px 0; font-size:17px; }
.packcard li .x{ color:var(--cinnabar); font-size:13px; width:14px; text-align:center; }
.packcard li .t{ text-decoration:line-through; text-decoration-color:rgba(178,58,43,.5); color:var(--ink-soft); }
.packcard .final{ border-top:1px solid rgba(120,96,52,.3); padding-top:16px; display:flex; align-items:center; gap:11px; font-weight:700; color:var(--ink); }
.packcard .final .dot{ color:var(--jade); font-size:13px; width:14px; text-align:center; }

/* customization: theme tile variants */
.themerow{ display:flex; gap:16px; flex-wrap:wrap; justify-content:center; }
.theme-item{ display:flex; flex-direction:column; align-items:center; }
.theme-cap{ font-family:var(--f-mono); font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--on-felt-mut); margin-top:10px; }

.tile.theme-slate{
  background:linear-gradient(160deg,#3a4047,#23282d 55%,#15181b);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.12), inset 0 -3px 6px rgba(0,0,0,.5), inset 0 0 0 1px rgba(181,147,78,.42), 0 12px 22px rgba(0,0,0,.42);
}
.tile.theme-slate .glyph{ color:#e7c873; text-shadow:0 1px 0 rgba(0,0,0,.5); }
.tile.theme-slate .num{ color:#9aa3ac; }
.tile.theme-slate::after{ box-shadow:inset 0 1px 2px rgba(0,0,0,.5), inset 0 -1px 0 rgba(255,255,255,.08); }

.tile.theme-jade{
  background:linear-gradient(160deg,#41805f,#2c6249 55%,#1d4936);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.18), inset 0 -3px 6px rgba(0,0,0,.35), inset 0 0 0 1px rgba(181,147,78,.45), 0 12px 22px rgba(0,0,0,.38);
}
.tile.theme-jade .glyph{ color:#f3ead8; text-shadow:0 1px 0 rgba(0,0,0,.3); }
.tile.theme-jade .num{ color:#cfe3d6; }
.tile.theme-jade::after{ box-shadow:inset 0 1px 2px rgba(0,0,0,.3), inset 0 -1px 0 rgba(255,255,255,.15); }

.tile.theme-sand{ background:linear-gradient(160deg,#f4dab9,#e9c193 55%,#d3a26a); }
.tile.theme-sand .glyph{ color:#8a3b25; }
.tile.theme-sand .num{ color:#9a6a3c; }

/* tidy top bar on small screens */
@media (max-width:560px){
  .topbar{ flex-wrap:wrap; gap:8px 18px; padding-top:18px; padding-bottom:18px; }
  .topbar nav{ gap:16px; }
}
