/* =========================================================
   ATHLIVIA v2 — shared design system for redesigned pages
   Tokai-inspired: single green accent, giant italic display,
   marquee, diagonal slashes, monochrome→colour hover, preloader.
   ========================================================= */
*, *::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;
  --display: "Archivo Display", "Arial Black", "Arial", "Helvetica Neue", "Hiragino Kaku Gothic StdN", "Hiragino Sans", system-ui, sans-serif;
  --bg: #FBFAF8; --bg-elev: #FFFFFF; --bg-soft: #F1EFEA;
  --ink: #17201B; --muted: #57635B; --soft: #939C95;
  --line: rgba(20,30,24,0.13); --line-soft: rgba(20,30,24,0.06);
  --accent: #14502F; --accent-deep: #0E3D24; --accent-bright: #1C6B40; --on-accent: #F3F7EF;
  --ease: cubic-bezier(0.22, 1, 0.36, 1); --maxw: 1180px;
}
:root.dark {
  --bg: #0E1411; --bg-elev: #14201A; --bg-soft: #17231C;
  --ink: #EAF0EC; --muted: #9FB0A5; --soft: #63736A;
  --line: rgba(255,255,255,0.13); --line-soft: rgba(255,255,255,0.06);
  --accent: #55B583; --accent-deep: #3C9A67; --accent-bright: #6ECB97; --on-accent: #08130C;
}
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 .4s var(--ease), color .4s var(--ease); }
a { color: inherit; } img { max-width: 100%; display: block; }
.display { font-family: var(--display); font-style: italic; font-weight: 900; letter-spacing: -0.01em; }

/* Nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 1000; padding: 1.1rem 0; border-bottom: 1px solid transparent; transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s var(--ease); --fg: var(--ink); --fg-dim: var(--muted); }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); padding: .7rem 0; }
.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: .6rem; font-size: 1.25rem; font-weight: 800; letter-spacing: .14em; color: var(--fg); text-decoration: none; }
.logo-chip { width: 32px; height: 32px; border-radius: 7px; background: #F4F1EA; display: inline-flex; align-items: center; justify-content: center; }
.logo-chip img { width: 72%; height: 72%; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 1.9rem; }
.nav-links > a { font-size: .9rem; color: var(--fg-dim); text-decoration: none; transition: color .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; color: var(--fg); display: flex; align-items: center; justify-content: center; font-size: 13px; transition: transform .2s, border-color .2s, color .4s; }
.theme-toggle:hover { transform: scale(1.08); border-color: var(--fg); }
.lang-switch { font-size: .88rem; color: var(--fg-dim); white-space: nowrap; }
.lang-switch a { color: var(--fg); text-decoration: none; }
@media (max-width: 900px) { .nav-links > a { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .95rem 1.9rem; border-radius: 2px; font-size: .95rem; font-weight: 700; text-decoration: none; transition: background .25s var(--ease), color .25s, border-color .25s, transform .2s; cursor: pointer; border: none; font-family: inherit; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-bright); }
.btn-secondary { border: 1.5px solid var(--line); color: var(--ink); background: transparent; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.on-dark .btn-secondary { border-color: rgba(255,255,255,.4); color: #fff; }
.on-dark .btn-secondary:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* Hero (2-col: copy + visual, used by product pages) */
.hero { position: relative; padding: 130px clamp(1.25rem, 4vw, 2.75rem) 0; overflow: hidden; }
.hero-ghost { position: absolute; right: -2%; top: 8%; font-size: 22vw; line-height: .8; color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--accent) 15%, transparent); white-space: nowrap; pointer-events: none; z-index: 0; user-select: none; }
.hero-inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
@media (max-width: 880px) { .hero-inner { grid-template-columns: 1fr; } }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-size: .82rem; font-weight: 800; letter-spacing: .06em; color: var(--accent); margin-bottom: 1rem; }
.eyebrow::before { content: "="; font-weight: 900; font-size: 1.15rem; }
.hero-visual { display: flex; justify-content: center; align-items: center; position: relative; }
.hero-visual.photo { border-radius: 6px; overflow: hidden; aspect-ratio: 4/5; }
.hero-visual.photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 880px) { .hero-visual.photo { aspect-ratio: 16/10; margin-top: 1rem; } }
.hero-app-icon-lg { width: min(360px, 82%); aspect-ratio: 1; border-radius: 24%; border: 1px solid var(--line); box-shadow: 0 34px 74px rgba(0,0,0,.24); }
@media (max-width: 880px) { .hero-visual { justify-content: flex-start; margin-top: .5rem; } .hero-app-icon-lg { width: 156px; } }
.hero h1 { font-family: var(--display); font-style: italic; font-weight: 900; font-size: clamp(2.2rem, 7vw, 5rem); line-height: .98; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 1.3rem; }
.hero h1 .plus { color: var(--accent); }
.hero .lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--muted); max-width: 640px; line-height: 2; margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: .9rem; flex-wrap: wrap; margin-bottom: 1.4rem; align-items: center; }
.dev-note { font-size: .82rem; color: var(--soft); font-weight: 700; }
.store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.store-badges img { height: 40px; width: auto; }
.store-badges a { transition: opacity .2s; } .store-badges a:hover { opacity: .85; }

/* Simple page header (legal / lightweight pages) */
.page-head { position: relative; padding: 150px clamp(1.25rem, 4vw, 2.75rem) 4rem; max-width: var(--maxw); margin: 0 auto; overflow: hidden; }
.page-head .hero-ghost { top: 4%; }
.page-head h1 { position: relative; z-index: 1; font-family: var(--display); font-style: italic; font-weight: 900; font-size: clamp(2rem, 5.5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.01em; margin-bottom: 1.2rem; }
.page-head p { position: relative; z-index: 1; font-size: 1rem; color: var(--muted); max-width: 680px; line-height: 2; }
.page-head .updated { position: relative; z-index: 1; font-size: .85rem; color: var(--soft); margin-top: 1rem; }

/* phone screenshots — monochrome base → colour on hover */
.app-showcase { position: relative; z-index: 2; max-width: var(--maxw); margin: 3rem auto 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.phone-shot { text-align: center; }
.phone-shot img { width: 190px; max-width: 100%; border-radius: 22px; border: 1px solid var(--line); filter: grayscale(1) contrast(1.02); transition: filter .5s var(--ease), transform .35s var(--ease); }
.phone-shot:hover img, .phone-shot.mono-in img { filter: grayscale(0); transform: translateY(-6px); }
.screen-caption { margin-top: .85rem; font-size: .82rem; color: var(--muted); }
@media (max-width: 768px) { .phone-shot img { width: 150px; } }
@media (max-width: 420px) { .phone-shot img { width: 132px; } }

/* diagonal slash */
.slash-wrap { position: relative; margin-top: 4rem; }
.slash { height: 9vw; min-height: 70px; background: var(--accent); clip-path: polygon(0 100%, 100% 35%, 100% 100%, 0 100%); }

/* Marquee */
.marquee { background: var(--accent); color: var(--on-accent); overflow: hidden; padding: .8rem 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 24s linear infinite; }
.marquee-track span { font-family: var(--display); font-style: italic; font-weight: 900; font-size: clamp(1.2rem, 2.6vw, 1.9rem); padding: 0 1.3rem; white-space: nowrap; color: transparent; -webkit-text-stroke: 1.1px var(--on-accent); }
.marquee-track span.solid { color: var(--on-accent); -webkit-text-stroke: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* Sections */
.section { padding: clamp(4rem, 10vh, 7rem) clamp(1.25rem, 4vw, 2.75rem); position: relative; }
.section.soft { background: var(--bg-soft); }
.section.dark { background: var(--accent-deep); color: var(--on-accent); }
.section.narrow-page { padding-top: clamp(2.5rem, 6vh, 4rem); }
.section-inner { max-width: var(--maxw); margin: 0 auto; position: relative; z-index: 1; }
.section-inner.narrow { max-width: 780px; }
.section-inner.legal { max-width: 820px; }
.label { display: inline-flex; align-items: center; gap: .55rem; font-size: .82rem; font-weight: 800; letter-spacing: .06em; color: var(--accent); margin-bottom: 1rem; }
.label::before { content: "="; font-weight: 900; font-size: 1.15rem; }
.section.dark .label { color: var(--on-accent); }
.section-title { font-size: clamp(1.7rem, 4.2vw, 2.6rem); font-weight: 800; line-height: 1.3; margin-bottom: .8rem; }
.section-sub { font-size: 1rem; color: var(--muted); }
.section.dark .section-sub { color: rgba(243,247,239,.8); }
.section-header { margin-bottom: 3rem; max-width: 760px; }
.ghost { position: absolute; z-index: 0; font-family: var(--display); font-style: italic; font-weight: 900; font-size: clamp(5rem, 15vw, 12rem); line-height: .8; white-space: nowrap; pointer-events: none; color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--accent) 10%, transparent); top: -.1em; left: -.03em; user-select: none; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Cards / grid */
.grid { display: grid; gap: 1.3rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 4px; padding: 2rem; transition: border-color .3s, transform .3s; }
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: .6rem; }
.card > p { font-size: .9rem; color: var(--muted); margin-bottom: 1rem; }
.card ul { list-style: none; }
.card ul li { font-size: .88rem; color: var(--muted); padding: .5rem 0; border-top: 1px solid var(--line-soft); }
.card ul li::before { content: "—"; color: var(--accent); margin-right: .5rem; }

.feature { position: relative; }
.feature.center { text-align: center; }
.feature .fi { width: 52px; height: 52px; border-radius: 13px; background: color-mix(in srgb, var(--accent) 13%, transparent); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1.2rem; transition: background .3s var(--ease); }
.feature.center .fi { margin-left: auto; margin-right: auto; }
.feature:hover .fi { background: var(--accent); }
.feature .fi svg { width: 25px; height: 25px; stroke: var(--accent); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s var(--ease); }
.feature:hover .fi svg { stroke: var(--on-accent); }
.feature h3, .feature h4 { font-size: 1.1rem; font-weight: 800; margin-bottom: .6rem; }
.feature p { font-size: .9rem; color: var(--muted); line-height: 1.9; }

/* Step cards (numbered) */
.step { position: relative; padding-top: .5rem; }
.step .step-num { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 2.4rem; color: color-mix(in srgb, var(--accent) 30%, transparent); line-height: 1; margin-bottom: 1rem; }
.step h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: .6rem; }
.step p { font-size: .92rem; color: var(--muted); line-height: 1.9; }

/* Pricing */
.price-big { font-family: var(--display); font-style: italic; font-weight: 900; font-size: 1.9rem; color: var(--accent); margin-bottom: 1rem; }
.price-big span { font-family: var(--font); font-style: normal; font-weight: 600; font-size: .8rem; color: var(--soft); }
.price-row { display: flex; justify-content: space-between; font-size: .9rem; padding: .5rem 0; border-top: 1px solid var(--line-soft); }
.price-row span:last-child { font-weight: 700; color: var(--ink); }
.plan { display: flex; flex-direction: column; }
.plan .eyebrow { color: var(--soft); } .plan .eyebrow::before { content: none; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan h3 { font-size: 1.02rem; font-weight: 800; margin-bottom: .5rem; }
.plan-target { font-size: .82rem; color: var(--soft); margin-bottom: 1rem; }
.plan-min { font-size: .8rem; color: var(--soft); margin-bottom: 1.1rem; }
.plan ul { list-style: none; margin-top: .3rem; }
.plan li { font-size: .9rem; color: var(--muted); padding: .45rem 0; border-top: 1px solid var(--line-soft); }
.plan li::before { content: "—"; color: var(--accent); margin-right: .5rem; }
.team-card h3 { font-size: 1.1rem; font-weight: 800; }
.team-card .eyebrow { color: var(--soft); } .team-card .eyebrow::before { content: none; }

/* Form */
.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: .5rem; margin-bottom: 1.4rem; }
.field label { font-size: .9rem; font-weight: 700; color: var(--ink); }
.field .req { color: var(--accent); }
.field input, .field select, .field textarea {
  background: var(--bg-elev); border: 1.5px solid var(--line); border-radius: 3px;
  padding: .85rem 1rem; color: var(--ink); font-size: 1rem; font-family: inherit;
}
.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: .6rem; }
.checkbox-label { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; padding: .55rem .9rem; background: var(--bg-elev); border: 1.5px solid var(--line); border-radius: 3px; font-size: .9rem; color: var(--muted); transition: border-color .2s; }
.checkbox-label:hover { border-color: var(--accent); }
.checkbox-label input { accent-color: var(--accent); width: 16px; height: 16px; }
.form-card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.5rem, 4vw, 2.75rem); }

/* Legal / long-text content */
.legal-body h2 { font-size: 1.2rem; font-weight: 800; margin: 2.4rem 0 1rem; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { font-size: .95rem; color: var(--muted); line-height: 2; margin-bottom: 1rem; }
.legal-body ul, .legal-body ol { margin: 0 0 1rem 1.4rem; color: var(--muted); font-size: .95rem; line-height: 2; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.6rem; font-size: .9rem; }
.legal-body table th, .legal-body table td { border: 1px solid var(--line); padding: .7rem .9rem; text-align: left; color: var(--muted); }
.legal-body table th { color: var(--ink); font-weight: 700; background: var(--bg-soft); width: 30%; }
.legal-body a { color: var(--accent); }

/* Footer */
footer { background: #0B120E; color: #C9D3CC; padding: 4.5rem clamp(1.25rem, 4vw, 2.75rem) 2.5rem; }
:root.dark footer { background: #070C09; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-word { font-family: var(--display); font-style: italic; font-weight: 900; font-size: clamp(2.5rem, 8vw, 5rem); color: #1D2A22; line-height: .9; margin-bottom: 2.5rem; -webkit-text-stroke: 1px #26362B; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.2rem; margin-bottom: 3rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-section h4 { font-size: .88rem; font-weight: 800; color: #EAF0EC; margin-bottom: 1rem; }
.footer-section p, .footer-links a { font-size: .84rem; color: #94A399; line-height: 1.95; text-decoration: none; }
.footer-links { list-style: none; } .footer-links li { margin-bottom: .55rem; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { padding-top: 2rem; border-top: 1px solid #1B271F; text-align: center; font-size: .8rem; color: #6C7B72; }

.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 900; width: 46px; height: 46px; background: var(--accent); color: var(--on-accent); border: none; border-radius: 3px; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s, transform .2s; }
.to-top.show { opacity: 1; pointer-events: auto; } .to-top:hover { transform: translateY(-3px); }
.to-top svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.icon { width: 1em; height: 1em; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.proto-note { position: fixed; left: 0; bottom: 0; z-index: 1200; background: #17201B; color: #F3F7EF; font-size: .74rem; padding: .5rem .9rem; border-top-right-radius: 6px; opacity: .92; }

/* ---------- Branded preloader (shared across all pages) ---------- */
.preloader { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; background: var(--accent-deep); color: #F3F7EF; transition: transform .85s var(--ease); }
.preloader.done { transform: translateY(-100%); }
.pl-stage { text-align: center; }
.pl-ring { position: relative; width: 108px; height: 108px; margin: 0 auto 1.7rem; }
.pl-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pl-ring .pl-track { fill: none; stroke: rgba(255,255,255,.15); stroke-width: 4; }
.pl-ring .pl-run { fill: none; stroke: #F3F7EF; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 72 218; transform-origin: 50% 50%; animation: pl-spin 1s cubic-bezier(.65,.05,.36,1) infinite; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
.pl-chip { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 12px; background: #F4F1EA; display: flex; align-items: center; justify-content: center; }
.pl-chip img { width: 70%; height: 70%; object-fit: contain; }
.pl-word { font-family: var(--display); font-style: italic; font-weight: 900; font-size: clamp(2rem, 7vw, 3.4rem); letter-spacing: .02em; line-height: 1; opacity: 0; animation: pl-in .7s var(--ease) .25s forwards; }
.pl-tag { margin-top: .85rem; font-size: .72rem; font-weight: 700; letter-spacing: .34em; color: rgba(243,247,239,.6); opacity: 0; animation: pl-in .7s var(--ease) .45s forwards; }
@keyframes pl-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pl-ring .pl-run { animation: none; stroke-dasharray: 220 70; } .pl-word, .pl-tag { animation: none; opacity: 1; } .preloader { transition: opacity .4s; } }
