/* =====================================================================
   COMPONENTS — buttons, cards, FAQ, guarantee bar, sticky bar, etc.
   ===================================================================== */

/* --- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.92em 1.7em;
  border-radius: 7px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s, background 0.2s, box-shadow 0.25s;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.btn-primary,
.btn--primary,
.btn--dark {
  background: var(--navy);
  color: var(--cream);
  box-shadow: 0 12px 24px -14px rgba(43, 63, 88, 0.85);
}
.btn-primary:hover,
.btn--primary:hover,
.btn--dark:hover {
  background: var(--navy-deep);
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -16px rgba(43, 63, 88, 0.9);
}
.btn-primary .arr,
.btn--primary .arr { transition: transform 0.25s; }
.btn-primary:hover .arr,
.btn--primary:hover .arr { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--cream); }

.btn-text {
  font-weight: 700;
  color: var(--navy);
  border-bottom: 1px dotted var(--gold-deep);
  border-radius: 0;
  padding: 0.15em 0;
  display: inline;
  font-size: inherit;
}
.btn-text:hover { color: var(--gold-text); }

.btn-gold,
.btn--amber {
  background: var(--gold);
  color: var(--charcoal);
  box-shadow: 0 10px 22px -12px rgba(201, 154, 79, 0.7);
}
/* v2 AA fix: hover was #fff on gold-deep (2.56:1 FAIL) — now cream on navy (9.51:1).
   Under no-preference the navy arrives as a fill-from-left sweep (see v2 block below). */
.btn-gold:hover,
.btn--amber:hover {
  background: var(--navy);
  color: var(--cream);
  transform: translateY(-2px);
}

/* v2: legacy-class aliases (.btn--primary/.btn--amber/.btn--dark) are merged into the
   real button selectors above — the old SCSS @extend lines were invalid in plain CSS
   and silently dropped by browsers, leaving index.php/newsletter/goal/level-quiz
   buttons unstyled. .btn--lg / .btn--sm size modifiers: */
.btn--lg { font-size: 1.08rem; padding: 1.05em 2em; }
.btn--sm { font-size: 0.88rem; padding: 0.65em 1.2em; }

/* --- guarantee bar --- */
.guarantee-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.8rem;
  background: var(--navy);
  color: var(--cream);
  border-radius: 16px;
  padding: 1.9rem 2.3rem;
}
.guarantee-bar .gb-mark { height: 48px; width: auto; opacity: 0.92; }
.guarantee-bar p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.45;
  color: #eef1f5;
}
.guarantee-bar p b { color: var(--gold); }
.guarantee-bar .btn {
  white-space: nowrap;
  background: var(--gold);
  color: var(--charcoal);
}
.guarantee-bar .btn:hover { background: var(--cream); color: var(--navy); }

@media (max-width: 920px) {
  .guarantee-bar {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.1rem;
  }
  .guarantee-bar .gb-mark { margin: 0 auto; }
}

/* --- credibility strip --- */
.creds {
  background: var(--cream-2);
  border-bottom: 1px solid var(--hairline);
}
.creds .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  padding: 1.2rem 40px;
}
.creds .who {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--navy);
  padding-right: 1.5rem;
  margin-right: 1.5rem;
  border-right: 1px solid var(--hairline);
}
.creds .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.82rem;
  color: var(--ink-60);
  font-weight: 600;
}
.creds .chips span { display: inline-flex; align-items: center; gap: 0.45rem; }
.creds .chips span::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-deep);
}

/* --- method cards --- */
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.6rem; }
.m-card { position: relative; padding-top: 1.5rem; border-top: 2px solid var(--navy); }
.m-card .num { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--gold-text); }
.m-card h3 { font-size: 1.5rem; margin: 0.7rem 0 0.7rem; }
.m-card p { color: var(--ink-60); font-size: 1rem; margin: 0; }

/* --- achievement grid (navy band) --- */
.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; margin-top: 1rem; }
.ach { border-top: 1px solid rgba(244, 241, 232, 0.28); padding-top: 1.3rem; }
.ach .lesson {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.ach p { font-family: var(--serif); font-size: 1.12rem; line-height: 1.45; color: #f4f1e8; margin: 0.7rem 0 0; }

/* --- roadmap path --- */
.path-wrap { position: relative; margin-top: 1.5rem; }
.road { width: 100%; height: 170px; display: block; overflow: visible; }
.road .ink { fill: none; stroke: var(--navy); stroke-width: 2.5; stroke-linecap: round; }
.road .dot { fill: var(--gold); }
.road .dot-ring { fill: none; stroke: var(--navy); stroke-width: 1.5; }
.node-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; margin-top: 0.6rem; }
.node { padding-top: 1.1rem; border-top: 1px solid var(--hairline); }
.node .stage { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; color: var(--navy); }
.node .tag {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-text);
  font-weight: 700;
  margin-top: 0.3rem;
  font-variant-numeric: tabular-nums;
}
.node p { font-size: 0.92rem; color: var(--ink-60); margin: 0.5rem 0 0; }

/* --- assessment / level-check card --- */
.assess-art {
  border-radius: 14px;
  border: 1.5px solid var(--navy);
  background: var(--cream);
  position: relative;
  padding: 2rem 2.1rem;
}
.assess-art .ar-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-60);
  background: var(--cream-2);
  border: 1px solid var(--hairline);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}
.assess-art .ar-h { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; color: var(--navy); margin: 0.1rem 0 1.5rem; }
.ar-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.05rem; }
.ar-bars li { display: grid; gap: 0.45rem; }
.ar-bars li .lab { display: flex; justify-content: space-between; font-size: 0.82rem; font-weight: 700; color: var(--charcoal); }
.ar-bars li .lab em { font-style: normal; font-weight: 600; color: var(--gold-text); }
.ar-bars li i {
  height: 8px;
  border-radius: 20px;
  background: var(--cream-2);
  border: 1px solid var(--hairline);
  position: relative;
  overflow: hidden;
}
.ar-bars li i::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--v);
  background: var(--navy);
  border-radius: 20px;
}
.ar-foot { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--hairline); font-size: 0.8rem; font-weight: 700; color: var(--gold-text); letter-spacing: 0.03em; }

/* --- first lesson steps --- */
.fl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.6rem; margin-bottom: 3.4rem; }
.fl { padding-top: 1.4rem; border-top: 2px solid var(--gold); }
.fl .fl-n { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--gold-text); }
.fl h3 { font-size: 1.4rem; margin: 0.5rem 0 0.6rem; }
.fl p { color: var(--ink-60); font-size: 1rem; margin: 0; }

/* --- FAQ accordion --- */
.faq-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.faq-item { border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-q:hover { background: var(--cream-2); }
.faq-q::after { content: '+'; font-size: 1.3rem; font-weight: 400; flex-shrink: 0; transition: transform 0.25s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 1.5rem 1.4rem; font-family: var(--serif); font-size: 1.05rem; color: var(--ink-60); line-height: 1.6; }
.faq-item.open .faq-a { display: block; }

/* --- pricing / pack card --- */
.price-card {
  background: var(--cream);
  border: 2px solid var(--navy);
  border-radius: 18px;
  padding: 3rem 3.2rem;
  max-width: 520px;
}
.price-card .big-num {
  font-family: var(--serif);
  font-size: clamp(4rem, 9vw, 7.5rem);
  font-weight: 500;
  line-height: 1;
  color: var(--navy);
}
.price-card .big-num sup { font-size: 0.38em; vertical-align: super; font-weight: 600; }
.price-card .per { font-size: 0.9rem; font-weight: 700; color: var(--ink-60); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 0.4rem; }
.price-card .divider { height: 1px; background: var(--hairline); margin: 2rem 0; }
.price-incl { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 0.8rem; }
.price-incl li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.98rem; color: var(--ink-60); }
.price-incl li::before { content: '✓'; color: var(--navy); font-weight: 700; flex-shrink: 0; margin-top: 0.08em; }

/* --- final CTA section --- */
.final-cta { text-align: center; background: var(--navy); color: var(--cream); position: relative; overflow: hidden; }
/* Blind-test verdict delta 3 (2026-06-10): the global .final-cta::before 旅路
   watermark was REMOVED. The site's single decorative kanji now lives at the
   curriculum flagship only (v2-flagship.css, .v2-curriculum .journey::before). */
.final-cta .wrap { position: relative; z-index: 1; }
.final-cta .mark { height: 54px; width: auto; margin: 0 auto 1.6rem; display: block; opacity: 0.9; }
.final-cta h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.06; margin: 0 auto 1.3rem; max-width: 18ch; color: #fff; }
.final-cta .dek { font-family: var(--serif); font-size: 1.2rem; color: #cfd6df; margin: 0 auto 2.3rem; max-width: 48ch; }
.final-cta .tagline { margin-top: 2.6rem; font-family: var(--jp); font-size: 1rem; color: var(--slate); letter-spacing: 0.1em; }

/* --- form elements --- */
.field { display: grid; gap: 0.45rem; margin-bottom: 1.3rem; }
.field label { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-60); }
.field input, .field textarea, .field select {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.8em 1em;
  border: 1.5px solid var(--hairline);
  border-radius: 8px;
  background: var(--cream);
  color: var(--charcoal);
  transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--navy);
}
.field textarea { resize: vertical; min-height: 120px; }

/* --- blog card --- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.6rem; }
.blog-card { border-top: 2px solid var(--hairline); padding-top: 1.4rem; }
.blog-card .bc-tag { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 0.6rem; display: block; }
.blog-card h3 { font-size: 1.35rem; line-height: 1.2; margin: 0 0 0.7rem; }
.blog-card p { font-size: 0.95rem; color: var(--ink-60); margin: 0 0 1rem; }
.blog-card .read { font-size: 0.88rem; font-weight: 700; color: var(--navy); border-bottom: 1px dotted var(--gold-deep); }

/* --- mobile sticky booking bar --- */
/* starts hidden; JS adds .sticky-visible only after hero CTA scrolls out of viewport */
.sticky-book {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: none;
  background: rgba(31, 46, 65, 0.98);
  backdrop-filter: blur(8px);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transition: opacity 0.3s, transform 0.3s;
}
.sticky-book .pr { color: var(--cream); font-size: 0.86rem; line-height: 1.2; }
.sticky-book .pr b { font-family: var(--serif); font-size: 1.15rem; display: block; }
.sticky-book .btn { padding: 0.7em 1.2em; font-size: 0.9rem; background: var(--gold); color: var(--charcoal); }

@media (max-width: 920px) {
  .sticky-book { display: flex; opacity: 0; transform: translateY(100%); pointer-events: none; }
  .sticky-book.sticky-visible { opacity: 1; transform: none; pointer-events: auto; transition: opacity 0.3s, transform 0.3s; }
  .method-grid, .fl-grid, .blog-grid { grid-template-columns: 1fr; }
  .ach-grid, .node-row { grid-template-columns: 1fr 1fr; }
  .road { height: 120px; }
}

@media (max-width: 600px) {
  .ach-grid, .node-row { grid-template-columns: 1fr; }
}

/* =====================================================================
   V2 GLOBAL SYSTEMS — focus, motion, reveal choreography, micro-craft
   (MAIN agent, 2026-06-09. All motion gated behind prefers-reduced-motion;
   nothing in the first viewport ever starts hidden — reveals are ARMED by
   JS only for elements below the fold; html.no-js neutralizes everything.)
   ===================================================================== */

/* --- anchor targets clear the 80px sticky header --- */
[id] { scroll-margin-top: calc(80px + 1.25rem); }

/* --- :focus-visible rings, site-wide (AA / 2.4.11) --- */
:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
  border-radius: 2px;
}
/* on dark surfaces the navy ring vanishes — use gold */
.band-navy :focus-visible,
.final-cta :focus-visible,
.page-hero.dark :focus-visible,
.sticky-book :focus-visible,
.email-band :focus-visible,
.guarantee-bar :focus-visible,
.no-hidden :focus-visible {
  outline-color: var(--gold);
}
/* restore a real focus indicator on form fields (was outline:none + 1.5px hue shift) */
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* --- kicker: accessible gold for text on light surfaces ---
   base.css sets .kicker to --gold-deep (2.26:1 on cream — AA FAIL); components.css
   loads after base.css so this same-specificity override wins. The dark-surface
   rules (.band-navy .kicker / .page-hero.dark .kicker) carry higher specificity
   and correctly keep bright gold on navy (5.75:1 PASS). */
.kicker { color: var(--gold-text); }

/* --- accessible gold for accent text defined in pages.css (loads after this
   file, so these carry one extra type selector to win the cascade). The dark
   variants (.page-hero.dark h1 em) still win on specificity — intended. --- */
body .page-hero h1 em,
body .hero-wrap h1 em { color: var(--gold-text); }
body .cred-item .ci-label,
body .level-step .ls-n,
body .resource-card .rc-type,
body .role-card .role-type { color: var(--gold-text); }

/* --- v2 reveal system ---
   JS (main.js) adds .v2-armed ONLY to .reveal elements currently below the
   viewport, then .in when they intersect. First-viewport content therefore
   never starts at opacity:0 (LCP-safe, JS-failure-safe, no-JS-safe).
   This also retires base.css's unconditional `.reveal{opacity:0}`: */
.reveal { opacity: 1; transform: none; transition: none; }

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal.v2-armed {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--dur-reveal) var(--ease-brand),
                transform var(--dur-reveal) var(--ease-brand);
  }
  html.js .reveal.v2-armed.in { opacity: 1; transform: none; }

  /* image settle: pair .reveal--settle with .reveal on imagery (Gemini §3) */
  html.js .reveal--settle.v2-armed { transform: translateY(8px) scale(1.03); }
  html.js .reveal--settle.v2-armed.in { transform: none; }

  /* --- stagger choreography: group wrapper carries data-stagger; JS arms the
     group and sets per-child transition-delay (70ms steps, capped 350ms) --- */
  html.js [data-stagger].v2-armed > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--dur-reveal) var(--ease-brand),
                transform var(--dur-reveal) var(--ease-brand);
  }
  html.js [data-stagger].v2-armed.in > * { opacity: 1; transform: none; }
}
/* belt-and-braces: no JS (or class swap failed) = fully settled state */
html.no-js .reveal,
html.no-js [data-stagger] > * { opacity: 1 !important; transform: none !important; }

/* --- CTA fill-from-left micro-interaction (Gemini move #9) ---
   Pseudo-element sweep, transform-only, 0.3s. Navy sweeps over gold buttons
   (text flips to cream, 9.51:1); navy-deep sweeps over navy buttons.
   isolation:isolate + z-index:-1 places the fill above the button background
   but below its text. Reduced-motion users get the instant hover colors
   defined in the base rules above — no sweep. */
@media (prefers-reduced-motion: no-preference) {
  .btn-primary, .btn--primary, .btn--dark,
  .btn-gold, .btn--amber, .guarantee-bar .btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    transition: transform 0.25s var(--ease-brand), box-shadow 0.25s var(--ease-brand),
                color var(--dur-micro) var(--ease-brand);
  }
  .btn-primary::before, .btn--primary::before, .btn--dark::before,
  .btn-gold::before, .btn--amber::before, .guarantee-bar .btn::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--dur-micro) var(--ease-brand);
  }
  .btn-primary::before, .btn--primary::before, .btn--dark::before { background: var(--navy-deep); }
  .btn-gold::before, .btn--amber::before { background: var(--navy); }
  .guarantee-bar .btn::before { background: var(--cream); }

  /* keep the rest-state background during hover so the sweep is what you see */
  .btn-primary:hover, .btn--primary:hover, .btn--dark:hover { background: var(--navy); }
  .btn-gold:hover, .btn--amber:hover { background: var(--gold); }
  .guarantee-bar .btn:hover { background: var(--gold); }

  .btn-primary:hover::before, .btn--primary:hover::before, .btn--dark:hover::before,
  .btn-gold:hover::before, .btn--amber:hover::before, .guarantee-bar .btn:hover::before,
  .btn-primary:focus-visible::before, .btn--primary:focus-visible::before,
  .btn-gold:focus-visible::before, .btn--amber:focus-visible::before {
    transform: scaleX(1);
  }

  /* press acknowledgment */
  .btn:active { transform: translateY(0) scale(0.985); transition-duration: 0.08s; }
}

/* --- card hover lift (decision-point texture; transform/shadow only) --- */
@media (prefers-reduced-motion: no-preference) {
  .pack, .resource-card, .aud-card, .blog-card, .role-card {
    transition: transform 0.25s var(--ease-brand), box-shadow 0.25s var(--ease-brand);
  }
  .pack:hover, .resource-card:hover, .aud-card:hover, .role-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px -22px rgba(43, 63, 88, 0.3);
  }
  .blog-card:hover { transform: translateY(-3px); }
}

/* --- header condense on scroll (transform only — height never changes, 0 CLS) --- */
header.site .brand-logo { transform-origin: left center; }
@media (prefers-reduced-motion: no-preference) {
  header.site .brand-logo { transition: transform 0.3s var(--ease-brand); }
}
header.site.scrolled .brand-logo { transform: scale(0.78); }
header.site.scrolled {
  background: rgba(244, 241, 232, 0.97);
  box-shadow: 0 1px 0 var(--hairline), 0 8px 24px -18px rgba(44, 42, 41, 0.4);
}

/* --- sticky booking bar: yield to the page's own final CTA / footer --- */
.sticky-book.sticky-suppressed {
  opacity: 0 !important;
  transform: translateY(100%) !important;
  pointer-events: none !important;
}

/* --- skill-bar fill (data-skillbar wrapper; JS arms + .in triggers; Gemini move #6).
   scaleX instead of width: transform-only, zero layout cost. --- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-skillbar].v2-armed .ar-bars li i::after,
  html.js [data-skillbar].v2-armed li i::after {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--dur-settle) var(--ease-brand);
  }
  html.js [data-skillbar].v2-armed.in .ar-bars li i::after,
  html.js [data-skillbar].v2-armed.in li i::after {
    transform: scaleX(1);
  }
  /* gentle per-bar cascade */
  html.js [data-skillbar].v2-armed li:nth-child(2) i::after { transition-delay: 120ms; }
  html.js [data-skillbar].v2-armed li:nth-child(3) i::after { transition-delay: 240ms; }
  html.js [data-skillbar].v2-armed li:nth-child(4) i::after { transition-delay: 360ms; }
}

/* count-up numerals must never shift layout while ticking */
[data-countup] { font-variant-numeric: tabular-nums; }
