/* =========================================================
   ATHLIVIA — shared design system (site.css)
   System fonts (JP: Hiragino Kaku Gothic / Latin: Segoe UI),
   light default + dark toggle, editorial / low-decoration.
   ========================================================= */

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

:root {
  --font: "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", Meiryo, sans-serif;

  --bg: #FBFAF8;
  --bg-elev: #FFFFFF;
  --bg-soft: #F2F0EB;
  --line: rgba(22,26,29,0.13);
  --line-strong: rgba(22,26,29,0.26);
  --line-soft: rgba(22,26,29,0.07);
  --ink: #1B1F22;
  --muted: #5B646B;
  --soft: #98A0A6;
  --accent: #14502F;        /* brand green — single accent */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1120px;
}
:root.dark {
  --bg: #14181A;
  --bg-elev: #1A1F22;
  --bg-soft: #1E2427;
  --line: rgba(255,255,255,0.13);
  --line-strong: rgba(255,255,255,0.28);
  --line-soft: rgba(255,255,255,0.06);
  --ink: #ECEEF0;
  --muted: #A2ABB1;
  --soft: #6B747B;
  --accent: #5CB385;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
a { color: inherit; }
img { max-width: 100%; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 1.5rem 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
  --fg: var(--ink); --fg-dim: var(--muted);
}
/* On pages with a dark photo hero, add class "nav--over-hero" for light nav text at top */
.nav.nav--over-hero { --fg: #F4F2EC; --fg-dim: rgba(244,242,236,0.74); }
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  padding: 0.85rem 0;
  --fg: var(--ink); --fg-dim: var(--muted);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.75rem);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-size: 1.3rem; font-weight: 700; letter-spacing: 0.12em;
  color: var(--fg); text-decoration: none; transition: color 0.4s var(--ease);
}
.logo-chip {
  width: 34px; height: 34px; border-radius: 8px; background: #F4F1EA;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.logo-chip img { width: 72%; height: 72%; object-fit: contain; display: block; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links > a {
  position: relative; font-size: 0.92rem; color: var(--fg-dim);
  text-decoration: none; transition: color 0.25s;
}
.nav-links > a:hover { color: var(--fg); }
.theme-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  background: transparent; border: 1px solid var(--fg-dim);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--fg);
  transition: transform 0.2s, border-color 0.2s, color 0.4s;
}
.theme-toggle:hover { transform: scale(1.08); border-color: var(--fg); }
.lang-switch { font-size: 0.9rem; color: var(--fg-dim); white-space: nowrap; }
.lang-switch a { color: var(--fg); text-decoration: none; }
.lang-switch a:hover { opacity: 0.7; }
@media (max-width: 860px) { .nav-links > a { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.95rem 1.9rem; border-radius: 3px;
  font-size: 0.95rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s, border-color 0.25s, transform 0.2s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-secondary { border: 1px solid var(--line-strong); color: var(--ink); background: transparent; }

/* ---------- Page header (sub-page hero, no photo) ---------- */
.page-head { padding: 9rem clamp(1.25rem, 4vw, 2.75rem) 3.5rem; max-width: var(--maxw); margin: 0 auto; }
.page-head .rule { margin-bottom: 1.4rem; }
.page-head h1 { font-size: clamp(1.9rem, 5vw, 3rem); font-weight: 700; line-height: 1.3; letter-spacing: 0.01em; margin-bottom: 1rem; }
.page-head p { font-size: 1rem; color: var(--muted); max-width: 640px; }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 4vw, 2.75rem); position: relative; }
.section.soft { background: var(--bg-soft); }
.section-inner { max-width: var(--maxw); margin: 0 auto; }
.section-inner.narrow { max-width: 820px; }
.section-inner.center { text-align: center; }
.section-inner.center .rule { margin-left: auto; margin-right: auto; }
.rule { width: 36px; height: 2px; background: var(--accent); margin-bottom: 1.4rem; }
.section-header { margin-bottom: 3rem; max-width: 720px; }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-header.center .rule { margin-left: auto; margin-right: auto; }
.section-title { font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 700; line-height: 1.35; letter-spacing: 0.01em; margin-bottom: 0.9rem; }
.section-subtitle { font-size: 0.98rem; color: var(--muted); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Cards & grids ---------- */
.card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 4px; padding: 2rem; transition: border-color 0.3s var(--ease), transform 0.3s var(--ease); }
.card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.75rem; }
.card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.92rem; line-height: 1.9; }
.card ul { list-style: none; margin-top: 0.9rem; }
.card li { color: var(--muted); font-size: 0.92rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line-soft); }
.card li:last-child { border-bottom: none; }

/* eyebrow label above a card title (replaces colored badges) */
.eyebrow { font-size: 0.78rem; color: var(--soft); margin-bottom: 0.4rem; }

/* price rows */
.price-row { display: flex; justify-content: space-between; align-items: baseline; padding: 0.6rem 0; font-size: 0.95rem; border-bottom: 1px solid var(--line-soft); }
.price-row:last-child { border-bottom: none; }
.price-row span:first-child { color: var(--muted); }
.price-row span:last-child { color: var(--ink); font-weight: 700; }
.price-big { font-size: 1.9rem; font-weight: 700; color: var(--accent); }
.price-big span { font-size: 0.95rem; color: var(--soft); font-weight: 400; }

/* ---------- Prose (legal / document pages) ---------- */
.prose { max-width: 820px; margin: 0 auto; padding: 9rem clamp(1.25rem, 4vw, 2.75rem) 5rem; }
.prose .rule { margin-bottom: 1.4rem; }
.prose h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); font-weight: 700; line-height: 1.3; margin-bottom: 0.6rem; }
.prose .updated { color: var(--soft); font-size: 0.88rem; margin-bottom: 2.5rem; }
.prose h2 { font-size: 1.25rem; font-weight: 700; margin: 2.5rem 0 0.9rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft); }
.prose h2:first-of-type { border-top: none; padding-top: 0; }
.prose h3 { font-size: 1.02rem; font-weight: 700; margin: 1.5rem 0 0.6rem; }
.prose p { color: var(--muted); margin-bottom: 1rem; font-size: 0.95rem; line-height: 2; }
.prose ul, .prose ol { color: var(--muted); margin: 0 0 1rem 1.25rem; font-size: 0.95rem; line-height: 2; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--accent); }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.92rem; }
.prose th, .prose td { text-align: left; padding: 0.7rem 0.9rem; border: 1px solid var(--line); color: var(--muted); vertical-align: top; }
.prose th { background: var(--bg-soft); color: var(--ink); font-weight: 700; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 1.4rem; max-width: 760px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.field .req { color: var(--accent); }
.field input, .field select, .field textarea {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 3px;
  padding: 0.85rem 1rem; color: var(--ink); font-size: 1rem; font-family: inherit;
  transition: border-color 0.2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--soft); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.checkbox-label { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; padding: 0.55rem 0.9rem; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 3px; font-size: 0.9rem; color: var(--muted); transition: border-color 0.2s; }
.checkbox-label:hover { border-color: var(--accent); }
.checkbox-label input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- Footer ---------- */
footer, .site-footer { padding: 4.5rem clamp(1.25rem, 4vw, 2.75rem) 2.5rem; background: var(--bg-soft); border-top: 1px solid var(--line); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2.5rem; margin-bottom: 3rem; }
.footer-section h4 { font-size: 0.92rem; font-weight: 700; margin-bottom: 1.1rem; }
.footer-brand { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 1rem; }
.footer-chip { width: 42px; height: 42px; border-radius: 9px; }
.footer-wordmark { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.12em; }
.footer-section p { font-size: 0.85rem; color: var(--muted); line-height: 1.95; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { font-size: 0.85rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { padding-top: 2rem; border-top: 1px solid var(--line); text-align: center; font-size: 0.82rem; color: var(--soft); }
footer a { color: var(--muted); }
footer .footer-section p a { color: var(--accent); }

.icon { display: inline-block; width: 1em; height: 1em; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
