/*
 * Tan Dash public pages: landing, support, privacy. One stylesheet, no web fonts, no third-party requests.
 * The look follows michikanji.com's homepage: temple-stone page, soft-mist wash, deep-ocean headings in
 * Georgia, system sans for text, rounded cards with a light border, pill chips. The tokens are the
 * homepage's (app/globals.css); the terracotta pill and sage disc come from michikanji's share cards.
 * The game's pixel look lives only inside the screenshots.
 */
:root {
  color-scheme: light dark;
  --bg: #faf8f5; /* temple-stone */
  --mist: #f5f7fa; /* soft-mist */
  --card: #ffffff;
  --border: #e8edf2;
  --ink: #1a1a1a; /* ink-black */
  --ocean: #1b365d; /* deep-ocean: headings */
  --mountain: #2c5f7c; /* mountain-mist: secondary text */
  --sakura: #7bb3d3; /* sakura-waters */
  --coral-ink: #c24521; /* coral-sunset-ink: coral that may carry text */
  --sage: #dcebd4; /* narration-paper */
  --pill: #9b3a26; /* the share cards' terracotta pill */
  --pill-ink: #faf6ee;
  --frame: #2b211b; /* the phone frame: the game's cabinet brown */
  --wash: rgba(123, 179, 211, 0.16);
  --shadow: 0 1px 2px rgba(27, 54, 93, 0.06), 0 10px 28px rgba(27, 54, 93, 0.08);
  --ring: #1b365d;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1a2c;
    --mist: #122238;
    --card: #172a45;
    --border: #28425f;
    --ink: #eaf0f6;
    --ocean: #eaf1f8;
    --mountain: #a9c6d8;
    --sakura: #7bb3d3;
    --coral-ink: #ff9576;
    --sage: #274640;
    --wash: rgba(123, 179, 211, 0.1);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.3);
    --ring: #bfe0f3;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ocean);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--mountain);
}

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ocean);
  color: var(--bg);
  font-weight: 700;
}

.skip:focus {
  top: 12px;
  color: var(--bg);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  color: var(--ocean);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.7rem, 4.6vw, 2.4rem);
}

p {
  margin: 0 0 12px;
}

.lead {
  color: var(--mountain);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  text-wrap: pretty;
}

/* ---- top bar ---------------------------------------------------------- */
.top {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ocean);
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--border);
}

.brand b {
  display: block;
  font-size: 1.05rem;
  line-height: 1.2;
}

.brand small {
  display: block;
  color: var(--mountain);
  font-size: 0.8rem;
  line-height: 1.2;
}

/* ---- hero ------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 28px 0 56px;
  background: linear-gradient(to bottom, var(--mist), var(--bg) 70%);
  text-align: center;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(to top, var(--wash), transparent);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 28px;
  align-items: center;
}

.pill {
  display: inline-block;
  margin: 0 0 16px;
  padding: 7px 18px 8px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--pill-ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.2rem, 5.2vw + 0.6rem, 3.9rem);
  font-weight: 700;
}

h1 em {
  color: var(--coral-ink);
  font-style: normal;
}

.hero .lead {
  max-width: 34rem;
  margin: 16px auto 24px;
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.badge {
  display: inline-block;
  line-height: 0;
  border-radius: 10px;
}

.badge img {
  display: block;
  width: auto;
  height: 54px;
}

.cta-note {
  margin: 0;
  color: var(--mountain);
  font-size: 0.95rem;
}

/* The QR card is for people on a computer: it needs a pointer, not a thumb. */
.qr {
  display: none;
  align-items: center;
  gap: 16px;
  max-width: 22rem;
  padding: 14px 18px 14px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: left;
}

.qr img {
  flex: none;
  width: 124px;
  height: 124px;
  border-radius: 8px;
}

.qr p {
  margin: 0;
}

.qr strong {
  display: block;
  color: var(--ocean);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.25;
}

.qr span {
  display: block;
  margin-top: 4px;
  color: var(--mountain);
  font-size: 0.92rem;
  line-height: 1.4;
}

@media (hover: hover) and (pointer: fine) {
  .qr {
    display: flex;
  }
}

.hero-art {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.disc {
  position: absolute;
  inset: 6% 4% 2%;
  border-radius: 50%;
  background: var(--sage);
}

.hero-art .tan {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 92%;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 10px rgba(27, 54, 93, 0.16));
}

/* Kanji tiles floating round Tan: the three are on the N5 list. */
.tile {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 3px solid var(--frame);
  border-radius: 12px;
  background: #faf6ee;
  box-shadow: 3px 4px 0 rgba(43, 33, 27, 0.25);
  color: #2b211b;
  font-size: 1.9rem;
  line-height: 1;
}

.float {
  position: absolute;
  animation: bob 4.8s ease-in-out infinite alternate;
}

.float.a {
  top: 6%;
  left: 2%;
  rotate: -8deg;
}

.float.b {
  top: 2%;
  right: 6%;
  rotate: 7deg;
  animation-delay: -1.6s;
}

.float.c {
  top: 36%;
  right: -2%;
  rotate: -4deg;
  animation-delay: -3.1s;
}

@keyframes bob {
  to {
    transform: translateY(-8px);
  }
}

@media (min-width: 760px) {
  .hero {
    padding: 56px 0 80px;
    text-align: left;
  }

  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(24px, 4vw, 48px);
  }

  .hero .lead {
    margin-left: 0;
  }

  .cta {
    align-items: flex-start;
    gap: 20px;
  }

  .hero-art {
    width: min(100%, 440px);
    margin-right: 0;
  }

  .tile {
    width: 4.2rem;
    height: 4.2rem;
    font-size: 2.3rem;
  }
}

/* ---- sections --------------------------------------------------------- */
.section {
  padding: clamp(56px, 9vw, 104px) 0;
}

.section.band {
  background: var(--mist);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 40rem;
  margin: 0 auto clamp(28px, 5vw, 44px);
  text-align: center;
}

.section-head p {
  margin-top: 12px;
}

/* what you do */
.how {
  display: grid;
  gap: 28px;
  align-items: center;
}

.how-art {
  display: flex;
  justify-content: center;
}

.how-art img {
  width: min(52vw, 220px);
  height: auto;
}

.how-copy h2 {
  margin-bottom: 14px;
}

.signs {
  display: grid;
  gap: 12px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.sign {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.sign-label {
  flex: none;
  min-width: 4.6rem;
  padding: 5px 12px 6px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--pill-ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.sign-word {
  flex: 1;
  color: var(--ocean);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
}

.sign .arrow {
  color: var(--mountain);
  font-size: 1.3rem;
}

.sign .tile {
  width: 3.2rem;
  height: 3.2rem;
  font-size: 1.7rem;
  box-shadow: 2px 3px 0 rgba(43, 33, 27, 0.25);
}

.steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--ink);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: var(--coral-ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
}

@media (min-width: 860px) {
  .how {
    grid-template-columns: 0.7fr 1.3fr;
    gap: 56px;
  }

  .how-art img {
    width: min(100%, 300px);
  }
}

/* screenshots */
.shots {
  display: flex;
  gap: 18px;
  margin: 0 -20px;
  padding: 6px 20px 22px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding: 0 20px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.shot {
  flex: none;
  width: min(60vw, 232px);
  margin: 0;
  scroll-snap-align: start;
}

.phone {
  display: block;
  padding: 6px;
  border-radius: 30px;
  background: var(--frame);
  box-shadow: var(--shadow);
}

.phone img {
  display: block;
  width: 100%;
  border-radius: 24px;
  aspect-ratio: 1206 / 2622;
}

.shot figcaption {
  margin-top: 14px;
  color: var(--mountain);
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
}

@media (min-width: 1000px) {
  .shots {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin: 0;
    padding: 6px 0 0;
    overflow: visible;
  }

  .shot {
    width: auto;
  }

  .shot:nth-child(even) {
    margin-top: 28px;
  }
}

/* facts */
.facts {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fact {
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.fact .icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--sage);
  color: var(--ocean);
}

.fact svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fact h3 {
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.fact p {
  margin: 0;
  color: var(--mountain);
}

@media (min-width: 620px) {
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .facts {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* closing */
.closing {
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 36px 24px 40px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(to bottom, var(--sage), var(--card));
  box-shadow: var(--shadow);
  text-align: center;
}

.closing img.tan {
  width: min(44vw, 170px);
  height: auto;
}

.closing p {
  margin: 4px 0 14px;
  color: var(--mountain);
  font-size: 1.1rem;
}

@media (min-width: 760px) {
  .closing {
    grid-template-columns: auto 1fr;
    justify-items: start;
    gap: 8px 40px;
    padding: 40px 56px;
    text-align: left;
  }

  .closing img.tan {
    grid-row: 1 / span 3;
    width: 200px;
  }
}

/* ---- footer ----------------------------------------------------------- */
.foot {
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--mountain);
  font-size: 0.95rem;
  text-align: center;
}

.foot p {
  margin: 0 0 8px;
}

.foot .contact {
  color: var(--ink);
  font-size: 1.02rem;
}

.foot nav {
  margin: 10px 0 14px;
}

.foot nav a {
  margin: 0 10px;
  font-weight: 600;
}

.foot .copy {
  margin: 0;
  font-size: 0.88rem;
}

/* ---- support and privacy pages ---------------------------------------- */
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

.doc-card {
  padding: 28px 24px 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.doc-card h1 {
  font-size: clamp(1.9rem, 5.6vw, 2.5rem);
}

.doc-card .sub {
  margin: 8px 0 20px;
  color: var(--mountain);
  font-size: 0.98rem;
}

.doc-card h2 {
  margin: 32px 0 10px;
  font-size: 1.4rem;
}

.doc-card ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

.doc-card li {
  margin: 0 0 8px;
}

.doc-card .note {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--mist);
}

.doc-card a {
  color: var(--ocean);
  font-weight: 600;
}

@media (min-width: 720px) {
  .doc-card {
    padding: 40px 44px 36px;
  }
}

/* ---- motion ----------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .float {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
