/* SubeSubeGames — light, warm, handmade.
   Type: Montserrat (display) + Open Sans (text), à la lessmore.games.
   Palette: warm paper, ink, and the Tiles green/orange as living accents. */

:root {
  --paper:    #FBFAF6;   /* warm near-white, not sterile */
  --paper-2:  #F4F1E9;   /* card / section wash */
  --ink:      #211F26;   /* warm near-black */
  --ink-soft: #4A4750;
  --muted:    #7C786E;   /* warm grey */
  --line:     #E7E1D4;   /* warm hairline */
  --green:    #1E9E50;   /* deep game-green, readable on paper */
  --green-dk: #15803D;
  --orange:   #DE7A26;
  --gold:     #C68A2C;

  --display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --text: "Open Sans", "Segoe UI", system-ui, sans-serif;
  --max: 680px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--text);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint paper grain so it reads printed, not rendered */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 26px; }

a { color: var(--green-dk); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--orange); }

/* ---------- Header ---------- */
.site-header { padding: 48px 0 44px; }
.brand { display: inline-flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; }
.brand svg { display: block; flex: none; border-radius: 11px; box-shadow: 0 6px 16px -8px rgba(33,31,38,.5); }
.brand .name { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -.01em; }
.brand .name b { color: var(--green); font-weight: 800; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 46px 0 8px; }

.hello {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  background: #FFF7E6;
  border: 1.5px solid #EBD9A8;
  padding: 5px 13px 6px;
  border-radius: 14px 13px 16px 12px;   /* uneven = handmade */
  transform: rotate(-2.2deg);
  box-shadow: 0 4px 0 -1px rgba(198,138,44,.18);
  margin: 0 0 22px;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 7.5vw, 56px);
  line-height: 1.04;
  letter-spacing: -.025em;
  margin: 0 0 22px;
  color: var(--ink);
}

/* hand-drawn underline under a keyword */
.mark { position: relative; white-space: nowrap; color: var(--green-dk); }
.mark .squiggle {
  position: absolute;
  left: -2%; right: -2%; bottom: -.34em;
  width: 104%; height: .36em;
  overflow: visible;
}
.mark .squiggle path { stroke: var(--orange); }

.hero .lede {
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 33ch;
  margin: 0;
}

/* ---------- Section label ---------- */
.section-label {
  display: flex; align-items: baseline; gap: 12px;
  margin: 64px 0 22px;
}
.section-label h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.section-label .rule { flex: 1; height: 1.5px; background: var(--line); }

/* ---------- Game card (a little postcard) ---------- */
.card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 20px 19px 21px 18px;
  padding: 26px 26px 28px;
  display: flex; gap: 22px; align-items: flex-start;
  box-shadow: 0 18px 40px -28px rgba(33,31,38,.45);
  transform: rotate(-.5deg);
}
.card .thumb {
  flex: none; width: 92px; height: 92px;
  border-radius: 22px;
  background: #0D0D14;
  display: grid; place-items: center;
  box-shadow: 0 10px 22px -10px rgba(13,13,20,.6);
}
.card .body { min-width: 0; }
.card h3 { font-family: var(--display); font-weight: 800; font-size: 25px; letter-spacing: -.02em; margin: 2px 0 8px; }
.card .tagline { color: var(--ink-soft); margin: 0 0 18px; font-size: 16.5px; }
.card .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* hand-written nudge above the card */
.nudge {
  font-family: var(--display); font-weight: 600;
  color: var(--gold); font-size: 15px;
  transform: rotate(-1.5deg);
  margin: 0 0 -6px 6px;
}

/* ---------- Buttons (Google-Play-style pill) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--display); font-weight: 600;
  font-size: 15px;
  background: var(--ink); color: #fff;
  border: 1.5px solid var(--ink);
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { color: #fff; background: #000; transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(0,0,0,.6); }
.btn[aria-disabled="true"] { background: #fff; color: var(--ink); opacity: .85; cursor: default; pointer-events: none; }
.btn .store-stack { display: flex; flex-direction: column; text-align: left; line-height: 1.1; }
.btn .store-sub { font-size: 10.5px; font-weight: 600; opacity: .7; text-transform: uppercase; letter-spacing: .06em; }
.btn .store-main { font-size: 16px; font-weight: 700; }

/* ---------- Game: full-bleed colour band (the game's own world) ---------- */
.game { background: #0D0D14; color: #E8E8F0; }
.game-inner {
  max-width: 880px; margin: 0 auto;
  padding: 76px 26px;
  display: flex; align-items: center; gap: 52px;
}
.game-art { flex: none; }
.game-art svg { display: block; width: 240px; height: 240px; }
.game-text { min-width: 0; }
.game-text h2 {
  font-family: var(--display); font-weight: 800;
  font-size: 34px; letter-spacing: -.02em;
  margin: 0 0 14px; color: #fff;
}
.game-desc { color: #B7B7C6; font-size: 16.5px; line-height: 1.7; margin: 0 0 24px; }
.game .btn { background: #fff; color: #16141d; border-color: #fff; }
.game .btn[aria-disabled="true"] { background: #fff; color: #16141d; opacity: 1; }
.game .btn .store-sub { opacity: .6; color: #16141d; }
.game .btn:hover { background: #f1f0ec; }

@media (max-width: 680px) {
  .game-inner { flex-direction: column; align-items: flex-start; gap: 30px; padding: 52px 26px; }
  .game-art svg { width: 186px; height: 186px; }
  .game-text h2 { font-size: 30px; }
}

/* ---------- Long-form / legal ---------- */
.legal { padding-bottom: 56px; }
.legal h1 { font-family: var(--display); font-weight: 800; font-size: clamp(28px,5vw,40px); letter-spacing: -.02em; margin: 30px 0 6px; }
.legal .meta { color: var(--muted); font-size: 15px; margin: 0 0 26px; padding-bottom: 22px; border-bottom: 1.5px solid var(--line); }
.legal h2 { font-family: var(--display); font-weight: 800; font-size: 22px; margin: 38px 0 12px; letter-spacing: -.01em; }
.legal h3 { font-family: var(--display); font-weight: 700; font-size: 18px; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal strong { color: var(--ink); }
.legal a { color: var(--green-dk); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal code { background: var(--paper-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; display: block; overflow-x: auto; }
.legal th, .legal td { border: 1.5px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal th { background: var(--paper-2); color: var(--ink); font-weight: 700; font-family: var(--display); }
.legal td { color: var(--ink-soft); }

.callout {
  border: 1.5px solid #EBD9A8;
  border-left: 4px solid var(--gold);
  background: #FFFaef;
  border-radius: 4px 12px 12px 4px;
  padding: 14px 16px; margin: 22px 0;
  font-size: 14.5px; color: var(--ink-soft);
}

.back { display: inline-flex; gap: 8px; align-items: center; font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--muted); margin-top: 36px; text-decoration: none; }
.back:hover { color: var(--green-dk); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1.5px solid var(--line); color: var(--muted); font-size: 15px; }
.site-footer .wrap {
  padding-top: 26px; padding-bottom: 60px;
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  align-items: center; justify-content: space-between;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 540px) {
  body { font-size: 17px; }
  .card { flex-direction: column; gap: 16px; padding: 22px; transform: none; }
  .hero .lede { font-size: 18px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Motion — gentle, on-brand, fully gated behind reduced-motion.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {

  .site-header, .game-art, .game-text,
  .legal h1, .legal .meta {
    opacity: 0; animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
  }
  .game-art    { animation-delay: .10s; }
  .game-text   { animation-delay: .20s; }
  .legal .meta { animation-delay: .10s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

  /* the hand-drawn underline draws itself in, once */
  .mark .squiggle path {
    stroke-dasharray: 120; stroke-dashoffset: 120;
    animation: ink-in 1s ease .7s forwards;
  }
  @keyframes ink-in { to { stroke-dashoffset: 0; } }

  /* the game's signature line keeps drawing itself in the card icon */
  .logo-anim .line {
    stroke-dasharray: 100;
    filter: drop-shadow(0 0 2px rgba(74,222,128,.5));
    animation: draw 5.5s ease-in-out infinite;
  }
  @keyframes draw {
    0%{stroke-dashoffset:100;opacity:.35} 38%{stroke-dashoffset:0;opacity:1}
    80%{stroke-dashoffset:0;opacity:1} 90%{stroke-dashoffset:0;opacity:0}
    91%{stroke-dashoffset:100;opacity:0} 100%{stroke-dashoffset:100;opacity:.35}
  }
  .logo-anim .wp { transform-box: fill-box; transform-origin: center; animation: pulse 2.8s ease-in-out infinite; }
  .logo-anim .wp-start { color:#4ADE80; }
  .logo-anim .wp-end { color:#FB923C; animation-delay:.9s; }
  @keyframes pulse { 0%,100%{transform:scale(1);filter:drop-shadow(0 0 0 transparent)} 50%{transform:scale(1.16);filter:drop-shadow(0 0 4px currentColor)} }

  .card { transition: transform .25s ease, box-shadow .25s ease; }
  .card:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 26px 50px -28px rgba(33,31,38,.5); }
  .hello { transition: transform .25s ease; }
  .hello:hover { transform: rotate(1deg) scale(1.03); }
}
