/* Ryokan-Ready — theme matched to the YukiHomes PDF (navy / vermilion / gold / cream) */

:root {
  --navy: #16233a;
  --navy-2: #1d2d4a;
  --ink: #24334d;
  --ink-soft: #5b6880;
  --paper: #fdfbf7;
  --cream: #f6edde;
  --red: #d64e2c;
  --red-dark: #b93d1f;
  --gold: #c8a15e;
  --gold-soft: #dfc391;
  --line: #e8e1d2;
  --line-dark: rgba(200, 161, 94, 0.25);
  --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Sans 3', 'Avenir Next', system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Source Serif 4', Georgia, serif; line-height: 1.12; }

/* ---------- Hero (mirrors the PDF cover) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 85% 0%, rgba(214, 78, 44, 0.14), transparent 60%),
    linear-gradient(168deg, #1a2a46 0%, var(--navy) 62%);
  color: var(--white);
  padding: 44px 22px 54px;
}
.hero-inner { position: relative; z-index: 2; max-width: 720px; margin: 0 auto; }
.hero-logo { width: 126px; height: auto; margin-bottom: 26px; }
.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(52px, 11vw, 92px);
  font-weight: 700;
  color: #f7f3ea;
  letter-spacing: -0.01em;
}
.hero-kanji {
  color: var(--gold);
  letter-spacing: 0.42em;
  font-size: 15px;
  margin: 12px 0 20px;
}
.hero-sub {
  max-width: 520px;
  font-size: clamp(16.5px, 2.6vw, 19px);
  color: #cdd6e4;
}
.hero-meta {
  margin-top: 16px;
  font-size: 14px;
  color: #8fa0b8;
}
.hero-meta strong { color: var(--gold-soft); font-weight: 700; }
.hero-actions { margin-top: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero-alt { color: #a9b7cb; font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; }
.hero-alt:hover { color: var(--white); }
.hero-circle {
  position: absolute;
  z-index: 1;
  top: 40px;
  right: -60px;
  width: clamp(190px, 34vw, 330px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 26px rgba(253, 251, 247, 0.045), 0 24px 70px rgba(0, 0, 0, 0.35);
}
.hero-circle::after {
  content: '';
  position: absolute;
  inset: -44px;
  border-radius: 50%;
  border: 1px solid rgba(253, 251, 247, 0.28);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: var(--white);
  padding: 15px 28px;
  font-size: 16px;
  box-shadow: 0 8px 24px rgba(214, 78, 44, 0.38);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(214, 78, 44, 0.5); transform: translateY(-1px); }
.btn-small { background: var(--red); color: var(--white); padding: 9px 16px; font-size: 14px; white-space: nowrap; }
.btn-small:hover { background: var(--red-dark); }

/* ---------- Sticky progress bar ---------- */
.stickybar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: rgba(22, 35, 58, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
  transform: translateY(-110%);
  transition: transform 0.25s ease;
}
.stickybar.show { transform: translateY(0); }
.stickybar img { border-radius: 6px; }
.sticky-progress { flex: 1; min-width: 0; }
#sticky-count { display: block; font-weight: 700; font-size: 13px; color: #cdd6e4; margin-bottom: 4px; }
.sticky-track { height: 5px; border-radius: 999px; background: rgba(253, 251, 247, 0.16); overflow: hidden; }
.sticky-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--red)); transition: width 0.25s ease; }

/* ---------- Content ---------- */
.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 20px 30px;
}
.section { padding: 38px 0 10px; }
.section > p { margin-bottom: 16px; max-width: 680px; }

.sec-head { margin-bottom: 18px; }
.sec-eyebrow {
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.sec-title {
  font-size: clamp(27px, 5vw, 36px);
  color: var(--navy);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--red);
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.sec-num { color: var(--red); font-weight: 700; }
.sec-count {
  margin-left: auto;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 12px;
  align-self: center;
}
.sec-count.done { color: var(--white); background: var(--red); border-color: var(--red); }

/* ---------- Checklist ---------- */
.checks { list-style: none; margin: 4px 0 20px; }
.checks li + li { border-top: 1px solid var(--line); }
.check {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 6px;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.12s ease;
}
.check:hover { background: rgba(200, 161, 94, 0.08); }
.check input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.box {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  margin-top: 2px;
  border: 2px solid #a9b1c2;
  border-radius: 7px;
  background: var(--white);
  position: relative;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.box::after {
  content: '';
  position: absolute;
  left: 7px; top: 2.5px;
  width: 6px; height: 12px;
  border: solid var(--white);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.14s ease;
}
.check input:checked ~ .box { background: var(--red); border-color: var(--red); }
.check input:checked ~ .box::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible ~ .box { outline: 3px solid rgba(214, 78, 44, 0.4); outline-offset: 2px; }
.check-text { font-size: 16px; }
.check-text strong { color: var(--navy); }
.check input:checked ~ .check-text { opacity: 0.55; }
.note { display: block; font-style: normal; color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; }

/* ---------- Callouts ---------- */
.callout {
  border-radius: 14px;
  padding: 20px 22px;
  margin: 22px 0 26px;
}
.callout h3 { font-size: 19px; margin-bottom: 8px; }
.callout p { font-size: 15px; }
.callout-cream {
  background: var(--cream);
  border-left: 4px solid var(--red);
}
.callout-cream h3 { color: var(--navy); }
.callout-cream p { color: #4d5a72; }
.callout-dark {
  background: var(--navy);
  border: 1px solid var(--line-dark);
}
.callout-dark h3 { color: var(--gold); }
.callout-dark p { color: #c3cddc; }
.callout-dark strong { color: var(--white); }

/* ---------- License table ---------- */
.table-eyebrow { margin: 26px 0 10px; }
.table-scroll { overflow-x: auto; margin-bottom: 12px; border-radius: 12px; border: 1px solid var(--line); }
.license-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; background: var(--white); }
.license-table th {
  background: var(--navy);
  color: var(--white);
  text-align: left;
  font-weight: 700;
  padding: 11px 14px;
  white-space: nowrap;
}
.license-table td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.license-table td strong { color: var(--navy); }
.license-table td[lang="ja"] { color: var(--ink-soft); white-space: nowrap; }
.table-note { color: var(--ink-soft); font-size: 13.5px; max-width: 680px; }

/* ---------- Licensing sequence ---------- */
.sequence { list-style: none; counter-reset: seq; margin: 6px 0 22px; }
.sequence li {
  counter-increment: seq;
  position: relative;
  padding: 10px 6px 10px 46px;
  font-size: 16px;
}
.sequence li + li { border-top: 1px solid var(--line); }
.sequence li::before {
  content: counter(seq);
  position: absolute;
  left: 2px; top: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sequence strong { color: var(--navy); }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  background: var(--navy);
  border-radius: 18px;
  padding: 32px 22px;
  margin: 30px 0 6px;
}
.cta-band h3 { font-size: 25px; color: var(--white); margin-bottom: 8px; }
.cta-band p { color: #c3cddc; font-size: 15px; max-width: 480px; margin: 0 auto 20px; }

/* ---------- Playbook (mirrors the PDF back page) ---------- */
.playbook {
  background: linear-gradient(180deg, var(--navy) 0%, #121d31 100%);
  padding: 56px 20px 60px;
  margin-top: 34px;
}
.playbook-inner { max-width: 720px; margin: 0 auto; }
.playbook h2 { font-size: clamp(30px, 6vw, 44px); color: #f7f3ea; margin: 6px 0 28px; }
.pb-card {
  display: block;
  text-decoration: none;
  border: 1px solid rgba(200, 161, 94, 0.28);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 14px;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}
.pb-card:hover { border-color: var(--gold); background: rgba(200, 161, 94, 0.06); transform: translateY(-1px); }
.pb-card h3 { color: var(--gold); font-size: 18.5px; margin-bottom: 6px; }
.pb-card p { color: #c3cddc; font-size: 15px; margin-bottom: 8px; }
.pb-url { color: #7e8da6; font-size: 13px; word-break: break-all; }
.pb-card-hot { background: rgba(214, 78, 44, 0.12); border-color: rgba(214, 78, 44, 0.55); }
.pb-card-hot:hover { border-color: var(--red); background: rgba(214, 78, 44, 0.18); }
.pb-card-hot h3 { color: #ff9a7b; }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  background: #121d31;
  color: #a9b7cb;
  padding: 36px 20px 46px;
  border-top: 1px solid rgba(200, 161, 94, 0.18);
  font-size: 14.5px;
}
.footer img { margin-bottom: 12px; }
.footer p { margin-bottom: 10px; }
.footer a { color: var(--gold-soft); }
.fineprint { color: #67758d; font-size: 12.5px; max-width: 560px; margin-left: auto; margin-right: auto; }
.reset-link {
  background: none; border: 0; padding: 0;
  color: #67758d; font-family: inherit; font-size: 12.5px;
  text-decoration: underline; cursor: pointer;
}
.reset-link:hover { color: var(--gold-soft); }

/* ---------- Quiz popup ---------- */
.quiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 16, 28, 0.66);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.quiz-overlay.on { opacity: 1; }
.quiz-overlay:not(.on) { pointer-events: none; }
.quiz-card {
  position: relative;
  background: var(--navy-2);
  border: 1px solid var(--line-dark);
  border-radius: 20px 20px 0 0;
  padding: 26px 20px 30px;
  width: 100%;
  max-width: 480px;
  transform: translateY(24px);
  transition: transform 0.25s ease;
}
.quiz-overlay.on .quiz-card { transform: translateY(0); }
.quiz-card h3 { font-size: 23px; color: var(--white); margin-bottom: 4px; padding-right: 30px; }
.quiz-sub { color: #8fa0b8; font-size: 14px; margin-bottom: 16px; }
.quiz-opt {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--navy);
  color: #e6ebf3;
  border: 1.5px solid rgba(200, 161, 94, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.quiz-opt:hover { border-color: var(--red); background: #223353; }
.quiz-later {
  display: block;
  margin: 6px auto 0;
  background: none;
  border: 0;
  color: #8fa0b8;
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: underline;
}
.quiz-x {
  position: absolute;
  top: 14px; right: 14px;
  background: none;
  border: 0;
  color: #8fa0b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
.quiz-x:hover { color: var(--white); }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .hero { padding: 64px 22px 74px; }
  .hero-circle { right: max(-40px, calc(50% - 620px)); top: 90px; }
  .content { padding-top: 30px; }
  .quiz-overlay { align-items: center; }
  .quiz-card { border-radius: 20px; }
}

/* ---------- Wide desktop — use the width ---------- */
@media (min-width: 1100px) {
  body { font-size: 17px; }
  .hero-inner, .content, .playbook-inner { max-width: 1000px; }
  .hero-circle { right: max(24px, calc(50% - 690px)); width: clamp(300px, 26vw, 380px); }
  .section > p { max-width: 740px; }
  .checks { columns: 2; column-gap: 48px; }
  .checks li { break-inside: avoid; border-bottom: 1px solid var(--line); }
  .checks li + li { border-top: 0; }
  .check { padding: 14px 6px; }
  .callout p { max-width: 800px; }
  .sequence { max-width: 860px; }
  .playbook-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .playbook .eyebrow, .playbook h2 { grid-column: 1 / -1; }
  .pb-card { margin-bottom: 0; }
}

/* ---------- Print ---------- */
@media print {
  .stickybar, .quiz-overlay, .cta-band, .hero-actions, .playbook, .reset-link { display: none !important; }
  body { background: #fff; color: #000; }
  .hero { background: #fff; color: #000; padding: 10px 0; }
  .hero h1, .sec-title, .check-text strong, .sequence strong { color: #000; }
  .hero-sub, .hero-kanji, .hero-meta, .eyebrow { color: #333; }
  .hero-circle { display: none; }
  .callout-dark { background: #f2f2f2; border: 1px solid #ccc; }
  .callout-dark h3, .callout-dark p, .callout-dark strong { color: #000; }
  .footer { background: #fff; color: #333; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}
