/* AlphaDraw promo site. Colors match source/AlphaDraw/Resources/Styles/Colors.xaml. */
:root {
  --paper: #F5EAD8;
  --paper-light: #F9F4ED;
  --surface: #EBDDC5;
  --ink: #201E1D;
  --sage200: #E1EECC;
  --sage300: #CCDBB2;
  --sage500: #8FA073;
  --sage600: #728157;
  --sage700: #56633F;
  --sage800: #3D472B;
  --sage900: #272E1B;
  --terra200: #FFE1D0;
  --terra400: #F6A06B;
  --terra600: #B2622D;
  --neutral700: #645C50;
  --accent: #C67139;

  --font-display: "Caprasimo", Georgia, serif;
  --font-ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-kana: "Klee One", "Hiragino Mincho ProN", "Yu Mincho", serif;

  --radius: 28px;
  --max: 1080px;
}

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

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

body {
  margin: 0;
  background: var(--sage900);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h3 { font-size: 1.35rem; }

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

/* Bamboo ground: dark green with soft vertical stalks, like BambooBackground. */
.ground {
  background-color: var(--sage900);
  background-image:
    repeating-linear-gradient(90deg,
      transparent 0 34px,
      rgba(61, 71, 43, .55) 34px 52px,
      transparent 52px 96px,
      rgba(61, 71, 43, .35) 96px 104px,
      transparent 104px 150px);
}

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--font-display); font-size: 1.5rem; }
.brand img { border-radius: 10px; }
.nav-cta {
  text-decoration: none; font-weight: 600; padding: 10px 20px; border-radius: 999px;
  background: var(--sage800); color: var(--paper);
}
.nav-cta:hover { background: var(--sage700); }

/* Hero */
.hero { padding-bottom: 72px; }
.hero-body { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 40px; }
.eyebrow { color: var(--sage300); font-weight: 600; letter-spacing: .04em; margin: 0 0 14px; }
.lead { color: var(--sage200); font-size: 1.2rem; max-width: 34em; margin: 22px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
  padding: 0 28px; border-radius: 999px; font-weight: 700; font-size: 1.05rem; text-decoration: none;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--paper); color: var(--sage900); }
.btn-ghost { background: var(--sage800); color: var(--paper); }
.btn-ghost:hover { background: var(--sage700); }

/* Notepad: dotted binding strip, ruled paper, terra margin line. */
.notepad {
  background: var(--paper-light); border-radius: var(--radius); overflow: hidden; color: var(--ink);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .35);
}
.binding {
  height: 34px; background-color: var(--surface);
  background-image: radial-gradient(circle, var(--sage900) 5px, transparent 5.5px);
  background-size: 30px 34px; background-position: 6px 0;
}
.page {
  position: relative;
  background-image:
    linear-gradient(90deg, transparent 52px, var(--terra200) 52px 55px, transparent 55px),
    repeating-linear-gradient(180deg, transparent 0 46px, var(--sage200) 46px 49px);
}

.hero-pad { display: flex; justify-content: center; }
.hero-pad .notepad { width: min(100%, 360px); transform: rotate(2deg); }
.hero-pad .page { aspect-ratio: 1 / 1.05; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hero-kana {
  font-family: var(--font-kana); font-weight: 600; font-size: clamp(9rem, 22vw, 13rem); line-height: 1;
  color: var(--sage800); transition: opacity .35s ease, transform .35s ease;
}
.hero-romaji { font-family: var(--font-display); font-size: 2rem; color: var(--neutral700); margin-top: 8px; transition: opacity .35s ease; }
.hero-kana.swap, .hero-romaji.swap { opacity: 0; transform: translateY(6px); }

/* Sections */
.section { padding: 88px 0; }
.section h2 { text-align: center; }
.section-lead { text-align: center; max-width: 38em; margin: 16px auto 0; font-size: 1.12rem; }

.paper-section { background: var(--paper); color: var(--ink); }
.paper-section .section-lead { color: var(--neutral700); }
.ground .section-lead { color: var(--sage200); }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 52px; }
.card {
  background: var(--paper-light); border: 2px solid var(--sage200); border-radius: 24px; padding: 28px;
}
.card p { color: var(--neutral700); margin: 10px 0 0; }
.card-icon {
  width: 60px; height: 60px; border-radius: 50%; background: var(--sage800); color: var(--paper);
  display: grid; place-items: center; margin-bottom: 18px;
  font-family: var(--font-ui); font-weight: 800; font-size: 1.2rem;
}
.card-icon.kana { font-family: var(--font-kana); font-weight: 600; font-size: 1.6rem; }
.card-icon img { border-radius: 8px; }

/* Screenshot gallery */
.gallery-wrap { position: relative; margin-top: 48px; }
.gallery {
  list-style: none; margin: 0; padding: 8px max(20px, calc((100vw - var(--max)) / 2 + 20px)) 24px;
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery li { flex: 0 0 auto; scroll-snap-align: center; }
.gallery figure { margin: 0; }
.gallery img {
  width: 250px; height: auto; border-radius: 30px; border: 6px solid var(--sage800);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .35); background: var(--sage900);
}
.gallery figcaption { text-align: center; margin-top: 14px; font-weight: 600; color: var(--sage200); }

.gallery-btn {
  position: absolute; top: calc(50% - 40px); width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: var(--paper); color: var(--sage900); font-size: 2rem; line-height: 1; cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3); z-index: 1;
}
.gallery-btn.prev { left: 16px; }
.gallery-btn.next { right: 16px; }
.gallery-btn[disabled] { opacity: 0; pointer-events: none; }

/* Steps */
.steps { list-style: none; margin: 52px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.steps li { text-align: center; padding: 8px 12px; }
.step-kana {
  display: grid; place-items: center; width: 108px; height: 108px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--paper-light); border: 3px solid var(--sage300);
  font-family: var(--font-kana); font-weight: 600; font-size: 3.6rem; color: var(--sage800);
}
.steps p { color: var(--neutral700); margin: 10px auto 0; max-width: 22em; }

/* Download */
.download { text-align: center; }
.download-icon { margin: 0 auto 26px; border-radius: 26px; box-shadow: 0 14px 30px rgba(0, 0, 0, .35); }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 36px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; min-width: 210px; min-height: 64px; padding: 10px 24px;
  border-radius: 16px; background: var(--paper); color: var(--sage900); text-decoration: none; text-align: left;
  font-weight: 700; font-size: 1.35rem; line-height: 1.1; transition: transform .15s ease, box-shadow .15s ease;
}
.store:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, .3); }
.store svg { width: 30px; height: 30px; flex: none; }
.store small { display: block; font-size: .78rem; font-weight: 500; color: var(--sage700); }

/* Footer */
.footer { background: var(--sage900); border-top: 1px solid var(--sage800); color: var(--sage300); padding: 28px 0; font-size: .95rem; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--sage200); }
.footer-links { display: flex; gap: 20px; }
.social-links { list-style: none; margin: 0 0 22px; padding: 0 0 22px; border-bottom: 1px solid var(--sage800); display: flex; gap: 10px; flex-wrap: wrap; }
.social-links a {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--sage700); border-radius: 999px; color: var(--sage200);
  font-weight: 600; text-decoration: none; transition: border-color .15s, color .15s;
}
.social-links a:hover { border-color: var(--terra400); color: var(--paper); }
.social-links svg { width: 20px; height: 20px; flex: none; }

/* Simple text page (privacy) */
.doc { background: var(--paper); color: var(--ink); padding: 64px 0 88px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 8px; }
.doc h2 { text-align: left; font-size: 1.5rem; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--neutral700); }
.doc .updated { color: var(--sage600); font-weight: 600; margin: 0 0 24px; }
.doc a { color: var(--terra600); overflow-wrap: anywhere; }
.credits { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.credits li { background: var(--paper-light); border: 2px solid var(--sage200); border-radius: 20px; padding: 18px 22px; }
.credits h3 { font-size: 1.15rem; }
.credits p { margin: 6px 0 0; }

/* Shared link page (app/index.html) */
.doc .btn-primary { background: var(--sage900); color: var(--paper); }
.doc .store { background: var(--sage900); color: var(--paper); }
.doc .store small { color: var(--sage300); }
.doc .stores { justify-content: flex-start; margin-top: 20px; }
.shared-letter { width: min(100%, 300px); margin: 28px 0 8px; }
.shared-letter .page { aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.shared-kana { font-family: var(--font-kana); font-weight: 600; font-size: 8.5rem; line-height: 1; color: var(--sage800); }
.shared-romaji { font-family: var(--font-display); font-size: 1.7rem; color: var(--neutral700); margin-top: 6px; }
.shared-caption { text-align: center; font-weight: 600; color: var(--sage700); margin: 14px 0 0; }

/* Reveal on scroll (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-kana, .hero-romaji { transition: none; }
}

/* Tablet / phone */
@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding-bottom: 56px; }
  .hero-body { grid-template-columns: 1fr; gap: 40px; padding-top: 16px; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-pad .notepad { width: min(100%, 300px); }
  .section { padding: 64px 0; }
  .features, .steps { grid-template-columns: 1fr; }
  .gallery img { width: 210px; }
  .gallery-btn { display: none; }
  .store { width: 100%; max-width: 320px; justify-content: center; }
}
