/* ==========================================================================
   GOGAKU — Stylesheet
   Light mode. Royal Oxford accent. App-matching aesthetic.
   ========================================================================== */

:root {
  /* Palette — matches Gogaku app theme */
  --primary: #3873c4;        /* Royal Oxford blue */
  --primary-hover: #2c5ea1;
  --primary-soft: #e8f0f9;
  --kanji-accent: #d04f12;   /* brick orange — used sparingly */
  --success: #138a73;        /* pine green */

  /* Surfaces */
  --bg: #f4f5f7;             /* cool slate */
  --surface: #ffffff;
  --surface-elevated: #ffffff;

  /* Text */
  --text: #1e293b;           /* deep slate */
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* Borders & shadows */
  --border: #e2e8f0;
  --border-soft: #eef0f3;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* NAV =================================================================== */
nav {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
nav .brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
nav .brand img {
  height: 60px;
  width: auto;
  flex: none;
  object-fit: contain;
  display: block;
}
nav .nav-links {
  display: flex;
  gap: 32px;
  font-size: 15px;
  font-weight: 500;
}
nav .nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
nav .nav-links a:hover { color: var(--text); }
nav .nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* HERO ================================================================== */
.hero {
  background: var(--surface);
  padding: 100px 32px 120px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.hero.compact { padding: 80px 32px 80px; }
.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
}
.hero .tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 32px;
}
.hero h1 {
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2.5px;
  margin-bottom: 28px;
  color: var(--text);
  max-width: 900px;
}
.hero.compact h1 {
  font-size: clamp(36px, 5vw, 56px);
}
.hero h1 .accent {
  color: var(--primary);
}
.hero p.lede {
  font-size: 19px;
  max-width: 620px;
  color: var(--text-muted);
  margin-bottom: 44px;
  line-height: 1.6;
}

/* BUTTONS =============================================================== */
.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.btn-primary {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s, transform 0.15s;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 22px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg);
}

/* SECTION COMMON ======================================================== */
section { padding: 100px 32px; }
section.bg-slate { background: var(--bg); }
section.bg-white { background: var(--surface); }
.container { max-width: 1080px; margin: 0 auto; }
.container.narrow { max-width: 720px; }

.section-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.15;
  color: var(--text);
}
.section-lede {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 56px;
  line-height: 1.6;
}

/* FEATURES ============================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.feature .icon {
  width: 48px;
  height: 48px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}
.feature h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.3px;
}
.feature p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* SCREENSHOTS PLACEHOLDER =============================================== */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 8px;
}
.phone-frame {
  aspect-ratio: 9 / 18;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 32px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.phone-frame:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.phone-frame::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}
.phone-frame .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}
.phone-frame .sub {
  font-size: 11px;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* DOWNLOAD CTA ========================================================== */
.download-section {
  background: var(--primary-soft);
  text-align: center;
  padding: 100px 32px;
}
.download-section .inner {
  max-width: 640px;
  margin: 0 auto;
}
.download-section h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text);
}
.download-section h2 .accent { color: var(--primary); }
.download-section p {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 36px;
}
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--text);
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: transform 0.15s, background 0.15s;
}
.appstore-badge:hover {
  transform: translateY(-2px);
  background: #0f172a;
}
.appstore-badge .icon {
  font-size: 24px;
  line-height: 1;
}
.appstore-badge .text {
  text-align: left;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.appstore-badge .text small {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
}
.appstore-badge .text span {
  font-size: 16px;
  font-weight: 600;
}
.coming-soon-note {
  display: block;
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
}

/* PROSE PAGES (About/Privacy/Terms) ====================================== */
.prose {
  padding: 80px 32px 100px;
  background: var(--surface);
}
.prose .container { max-width: 720px; }
.prose h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--text);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
  margin-top: 32px;
  margin-bottom: 12px;
}
.prose p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 16px;
}
.prose ul, .prose ol {
  margin-bottom: 16px;
  padding-left: 24px;
}
.prose li {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 6px;
}
.prose strong { color: var(--text); font-weight: 600; }
.prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--primary-hover); }
.prose .effective-date {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-subtle);
  font-weight: 600;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.prose .pull-quote {
  border-left: 3px solid var(--primary);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--primary-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 17px;
  color: var(--text);
  font-weight: 500;
  font-style: italic;
}
.prose .note-box {
  margin-top: 48px;
  padding: 20px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}
.prose .note-box strong { color: var(--text); }

/* FOOTER ================================================================ */
footer {
  background: var(--bg);
  padding: 56px 32px 32px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.footer-brand img {
  height: 26px;
  width: auto;
  flex: none;
  object-fit: contain;
  margin-bottom: 4px;
}
.footer-brand .tagline {
  font-size: 12px;
  color: var(--text-subtle);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.footer-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  max-width: 1080px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-subtle);
  text-align: center;
}

/* RESPONSIVE ============================================================ */
@media (max-width: 640px) {
  nav { padding: 20px; }
  nav .nav-links { gap: 16px; font-size: 13px; }
  nav .brand img { height: 42px; }
  .hero { padding: 70px 20px 80px; }
  .hero.compact { padding: 50px 20px 50px; }
  .hero .lede { font-size: 16px; }
  section { padding: 70px 20px; }
  .prose { padding: 60px 20px 80px; }
  .download-section { padding: 70px 20px; }
  footer { padding: 40px 20px 24px; }
  .footer-inner { flex-direction: column; gap: 20px; }
}
/* ACCESSIBILITY & POLISH ================================================ */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

img { max-width: 100%; }

.footer-bottom { line-height: 1.7; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn-primary:hover,
  .feature:hover,
  .appstore-badge:hover { transform: none; }
}
