/* Words On Words! marketing site
   Palette sampled from the game: purple backdrop, wooden tiles, red buttons,
   bonus-square colours from the board, slate Daily Stack screen. */
:root {
  --bg: #3a1a40;          /* title-screen purple */
  --bg-2: #4c2354;
  --bg-deep: #2c1231;
  --surface: #ffffff;
  --board: #ecebef;       /* board square grey */
  --ink: #3a1a40;
  --ink-soft: #6b5a6e;
  --on-bg: #fff8f2;
  --on-bg-soft: #d9c6dc;
  --wood-hi: #f8c998;     /* tile face, light end */
  --wood: #eda56b;        /* tile face, warm end */
  --wood-sel: #e08848;    /* selected tile in the rack */
  --wood-edge: #c9773f;   /* tile side */
  --wood-edge-2: #a85a2a; /* second / third layer of a stack */
  --wood-ink: #4a3527;    /* letter colour */
  --red: #ef5350;         /* game buttons */
  --red-dark: #cc4a51;
  --dl: #4f8fdc;          /* bonus squares */
  --tl: #5cb36a;
  --dw: #e8504f;
  --tw: #f0a040;
  --slate: #333543;       /* Daily Stack background */
  --slate-2: #45475a;
  --grey-tile: #e4e4ea;
  --grey-edge: #a9aab4;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(20, 5, 25, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Rubik", system-ui, -apple-system, sans-serif;
  color: var(--on-bg);
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--bg-2), transparent 70%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: "Rubik", sans-serif; font-weight: 700; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); text-align: center; }
section { padding: 88px 20px; max-width: 1140px; margin: 0 auto; }
.section-lede { text-align: center; color: var(--on-bg-soft); max-width: 560px; margin: 0 auto 48px; font-size: 1.1rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px;
  background: color-mix(in srgb, var(--bg-deep) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { border-radius: 10px; }
.nav nav { display: flex; align-items: center; gap: 22px; }
.nav nav a { text-decoration: none; color: var(--on-bg-soft); font-weight: 500; }
.nav nav a:hover { color: var(--on-bg); }
.btn { background: var(--red); color: #fff !important; border-radius: 999px; padding: 10px 18px; font-weight: 600; box-shadow: 0 3px 0 var(--red-dark); }
.btn-small { padding: 8px 16px; }

/* Wooden tiles */
.tile-word b, .mini-tiles b, .daily-tiles b {
  display: inline-grid; place-items: center;
  width: 1.25em; height: 1.25em;
  background:
    repeating-linear-gradient(97deg, rgba(160, 80, 30, .07) 0 2px, transparent 2px 6px),
    linear-gradient(170deg, var(--wood-hi), var(--wood));
  color: var(--wood-ink);
  border-radius: .22em;
  font-weight: 600;
  box-shadow: 0 .09em 0 var(--wood-edge), 0 .16em .28em rgba(20, 5, 25, .4);
  position: relative;
}
/* Stacked tiles: extra wooden layers underneath, like the app icon */
.tile-word b.stack2, .mini-tiles b.stack2 {
  transform: translateY(-.09em);
  box-shadow: 0 .09em 0 var(--wood-edge), 0 .18em 0 var(--wood-edge-2), 0 .24em .3em rgba(20, 5, 25, .4);
}
.tile-word b.stack3, .mini-tiles b.stack3 {
  transform: translateY(-.18em);
  box-shadow: 0 .09em 0 var(--wood-edge), 0 .18em 0 var(--wood-edge-2), 0 .27em 0 var(--wood-edge), 0 .36em 0 var(--wood-edge-2), 0 .42em .35em rgba(20, 5, 25, .4);
}

.tile-word { display: flex; flex-direction: column; gap: 12px; font-size: clamp(2rem, 5.2vw, 3.6rem); margin-bottom: 20px; }
.tile-word .row { display: flex; gap: 8px; }
.tile-word .row:nth-child(2) { padding-left: .6em; }
.tile-word b.bang { background: var(--red); color: #fff; box-shadow: 0 .09em 0 var(--red-dark), 0 .16em .28em rgba(20, 5, 25, .4); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 56px; }
.tagline { font-size: 1.6rem; font-weight: 600; color: var(--wood-hi); margin: 0 0 12px; }
.lede { font-size: 1.15rem; color: var(--on-bg-soft); max-width: 520px; }
.lede em { color: var(--on-bg); font-style: normal; font-weight: 700; }
.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 28px; }
.meta { color: var(--on-bg-soft); font-size: .95rem; }
.appstore {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; text-decoration: none;
  border: 1px solid #a6a6a6; border-radius: 12px;
  padding: 8px 18px 8px 14px; font-family: -apple-system, "Helvetica Neue", sans-serif;
  font-size: 1.35rem; font-weight: 600; line-height: 1.05;
  transition: transform .15s ease;
}
.appstore:hover { transform: translateY(-2px); }
.appstore svg { width: 30px; height: 30px; }
.appstore small { display: block; font-size: .62rem; font-weight: 400; letter-spacing: .02em; }

.phone {
  margin: 0;
  border-radius: 34px; overflow: hidden;
  background: #170a1a;
  border: 8px solid #170a1a;
  box-shadow: var(--shadow);
  aspect-ratio: 392 / 696;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; }
.hero-phone { display: flex; justify-content: center; }
.hero-phone .phone { width: min(330px, 80vw); transform: rotate(3deg); }

/* How it plays */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius); padding: 30px 26px;
  box-shadow: var(--shadow);
}
.card p { color: var(--ink-soft); margin: 0; }
.mini-tiles { display: flex; gap: 6px; font-size: 2rem; height: 3.2rem; align-items: flex-end; margin-bottom: 18px; }
.mini-tiles b.plus { background: none; box-shadow: none; width: .7em; color: var(--ink-soft); }

/* "Play on top": new tile landing on an existing one */
.mini-tiles .slot { position: relative; display: inline-grid; margin-right: .42em; }
.mini-tiles .slot .drop {
  position: absolute; left: 0; top: 0;
  background:
    repeating-linear-gradient(97deg, rgba(120, 50, 10, .08) 0 2px, transparent 2px 6px),
    linear-gradient(170deg, #f0a364, var(--wood-sel));
  transform: translate(.42em, -.62em) rotate(8deg);
  box-shadow: 0 .09em 0 var(--wood-edge-2), 0 .3em .4em rgba(20, 5, 25, .4);
}
/* "Combine duplicates": shown sitting in the rack */
.mini-tiles.rack { font-size: 1.6rem; gap: 5px; background: var(--board); border-radius: 10px; padding: 8px 10px 10px; height: auto; width: fit-content; }
.mini-tiles b.new { background: #fff; outline: 2px dashed var(--wood-edge); outline-offset: -3px; box-shadow: none; color: var(--ink-soft); }
.mini-tiles b.double::after {
  content: "×2"; position: absolute; top: -.55em; right: -.5em;
  font-size: .45em; line-height: 1; padding: .25em .35em; border-radius: .3em;
  background: var(--red); color: #fff;
}

/* Gallery */
.gallery { padding-top: 24px; max-width: none; }
.shots {
  display: flex; gap: 28px; justify-content: center;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 20px 28px;
}
.shots .phone { flex: 0 0 230px; scroll-snap-align: center; }
.shots .phone:nth-child(even) { transform: translateY(24px); }

/* Modes: icons sit on the board's bonus-square colours */
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 40px; }
.mode {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius); padding: 26px 22px;
}
.mode p { color: var(--on-bg-soft); margin: 0; }
.badge { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; font-size: 1.5rem; margin-bottom: 14px; background: var(--dl); box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.mode:nth-child(2) .badge { background: var(--tl); }
.mode:nth-child(3) .badge { background: var(--dw); }
.mode:nth-child(4) .badge { background: var(--tw); }
.mode:nth-child(5) .badge { background: var(--wood); }

/* Daily Stack: the game's slate puzzle screen */
.daily {
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center;
  background: linear-gradient(160deg, var(--slate-2), var(--slate));
  color: var(--on-bg);
  border-radius: 28px; padding: 56px 48px; margin: 40px auto;
  max-width: 1100px; width: calc(100% - 40px);
  box-shadow: var(--shadow);
}
.daily h2 { text-align: left; }
.daily p { font-size: 1.15rem; margin: 0; max-width: 480px; color: #d6d7e0; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-weight: 600; font-size: .85rem !important; margin-bottom: 8px !important; color: var(--wood-hi) !important; }
.daily-tiles { display: flex; flex-direction: column; gap: 22px; font-size: 2.4rem; }
.daily-tiles .row { display: flex; gap: 8px; }
.daily-tiles .target b {
  background: linear-gradient(180deg, #fafafc, var(--grey-tile));
  color: #5b5d6b;
  box-shadow: 0 .09em 0 var(--grey-edge), 0 .16em .28em rgba(0,0,0,.4);
}

/* Final CTA */
.final-cta { text-align: center; }
.final-cta p { color: var(--on-bg-soft); font-size: 1.15rem; margin: 0 0 24px; }

/* Footer */
.footer { text-align: center; padding: 40px 20px 56px; color: var(--on-bg-soft); font-size: .95rem; border-top: 1px solid rgba(255,255,255,.08); background: var(--bg-deep); }
.footer p { margin: 6px 0; }
.footer a { margin: 0 10px; }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero-phone .phone { transform: none; }
  .cards { grid-template-columns: 1fr; }
  .daily { grid-template-columns: 1fr; padding: 40px 28px; }
  .shots { justify-content: flex-start; }
}
@media (max-width: 640px) {
  section { padding: 64px 16px; }
  .nav nav a:not(.btn) { display: none; }
  .tile-word { font-size: 2.1rem; }
  .daily-tiles { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .appstore { transition: none; }
}

/* Privacy policy page */
.policy {
  max-width: 760px; margin: 56px auto 88px; padding: 48px 44px;
  background: var(--surface); color: var(--ink);
  border-radius: 24px; box-shadow: var(--shadow);
}
.policy h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.policy h2 { text-align: left; font-size: 1.35rem; margin-top: 1.8em; }
.policy p, .policy li { color: var(--ink-soft); font-size: 1.05rem; }
.policy .policy-lede { font-size: 1.15rem; color: var(--ink); }
.policy ul { padding-left: 1.2em; }
.policy li { margin-bottom: .4em; }
.policy a { color: var(--red-dark); font-weight: 600; }
@media (max-width: 640px) {
  .policy { margin: 24px 16px 56px; padding: 32px 22px; }
}
