/* StatMaster — Shared Styles */

:root {
  --primary: #1a2a47;
  --primary-light: #253d6b;
  --accent: #b5a67c;
  --accent-dark: #9a8c65;
  --success: #16A34A;
  --error: #DC2626;
  --warning: #D97706;
  --bg: #f1f3f5;
  --surface: #FFFFFF;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(26,42,71,0.10);
  --shadow-lg: 0 8px 32px rgba(26,42,71,0.16);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--dark {
  background: var(--primary);
  color: #fff;
}

.section--accent {
  background: var(--accent);
  color: var(--primary);
}

/* ── Typography ── */
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section--dark .section-label {
  color: var(--accent);
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: #fff;
}

h1 { font-size: clamp(28px, 5vw, 48px); }
h2 { font-size: clamp(22px, 3.5vw, 36px); }
h3 { font-size: clamp(18px, 2.5vw, 22px); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--primary);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
  border-color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.08);
}

.btn-lg {
  padding: 18px 36px;
  font-size: 18px;
  border-radius: 10px;
}

/* ── App Store Badge ── */
.appstore-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000;
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  transition: opacity 0.2s;
}

.appstore-btn:hover { opacity: 0.85; }

.appstore-btn svg { width: 24px; height: 24px; fill: #fff; }

.appstore-btn__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.appstore-btn__sub {
  font-size: 10px;
  opacity: 0.8;
}

.appstore-btn__name {
  font-size: 18px;
  font-weight: 700;
}

/* ── Card ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

/* ── Badge ── */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-accent { background: var(--accent); color: var(--primary); }
.badge-success { background: #dcfce7; color: #15803d; }

/* ── Header/Nav ── */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.site-header__logo span {
  color: var(--accent);
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header__nav a {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  transition: color 0.2s;
}

.site-header__nav a:hover { color: #fff; }

/* ── Footer ── */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 32px;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}

.site-footer__brand {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.site-footer__brand span { color: var(--accent); }

.site-footer__copy {
  font-size: 13px;
  margin-top: 16px;
  opacity: 0.5;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.site-footer__links a {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  transition: color 0.2s;
}

.site-footer__links a:hover { color: #fff; }

/* ── Grid helpers ── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Stat numbers ── */
.stat-number {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

/* ── Icon box ── */
.icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(181,166,124,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

/* ── Prose (legal pages) ── */
.prose {
  max-width: 760px;
}

.prose h2 {
  font-size: 22px;
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  color: var(--primary);
}

.prose h3 {
  font-size: 17px;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--primary);
}

.prose p {
  margin-bottom: 16px;
  color: var(--text);
}

.prose ul, .prose ol {
  margin: 0 0 16px 24px;
}

.prose li {
  margin-bottom: 6px;
  color: var(--text);
}

.prose a {
  color: var(--primary);
  text-decoration: underline;
}

.prose .updated {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ── Page hero (sub pages) ── */
.page-hero {
  background: var(--primary);
  padding: 60px 0 48px;
  color: #fff;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 8px;
}

.page-hero p {
  color: rgba(255,255,255,0.65);
  font-size: 16px;
}

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.faq-item:last-child { border-bottom: none; }

.faq-item__q {
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 10px;
  color: var(--primary);
  display: flex;
  gap: 12px;
}

.faq-item__q::before {
  content: 'Q';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  flex-shrink: 0;
  margin-top: 1px;
}

.faq-item__a {
  color: var(--text);
  padding-left: 40px;
  font-size: 15px;
}

/* ── Pricing ── */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  position: relative;
}

.pricing-card--premium {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

.pricing-card__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.pricing-card__price {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.pricing-card__price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pricing-card__features {
  list-style: none;
  margin: 0 0 24px;
}

.pricing-card__features li {
  padding: 6px 0;
  font-size: 14px;
  display: flex;
  gap: 8px;
}

.pricing-card__features li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

.pricing-card__features li.disabled {
  color: var(--text-muted);
}

.pricing-card__features li.disabled::before {
  content: '✕';
  color: var(--border);
}

/* ── Support page layout ── */
.support-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.support-sidebar {
  position: sticky;
  top: 76px;
}

/* ── Mobile header CTA ── */
.site-header__mobile-cta {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .section { padding: 48px 0; }

  .container { padding: 0 16px; }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .pricing-grid { grid-template-columns: 1fr; max-width: 100%; }

  .site-header__nav { display: none; }

  .site-header__mobile-cta {
    display: inline-flex;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .site-footer__links {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px 24px;
  }

  /* Support layout: stack on mobile */
  .support-layout {
    grid-template-columns: 1fr;
  }

  .support-sidebar {
    position: static;
  }

  /* Page hero */
  .page-hero {
    padding: 40px 0 32px;
  }

  /* FAQ */
  .faq-item__q { font-size: 15px; }
  .faq-item__a { padding-left: 0; font-size: 14px; }

  /* Prose */
  .prose h2 { font-size: 19px; margin-top: 36px; }

  /* Pricing */
  .pricing-card { padding: 24px 20px; }

  /* AppStore button */
  .appstore-btn {
    width: 100%;
    justify-content: center;
  }

  /* Card */
  .card { padding: 20px; }
}

@media (max-width: 480px) {
  .section { padding: 40px 0; }

  h1 { font-size: 26px; }
  h2 { font-size: 21px; }

  .appstore-btn__name { font-size: 16px; }

  .faq-item { padding: 18px 0; }

  .pricing-card__price { font-size: 28px; }
}
