/* ==========================================================================
   Sakura Health — site styles
   Built to Brand & Design System v1.2 (see /brand/brand-guidelines.html)
   ========================================================================== */

:root {
  /* Color */
  --blue: #1942B6;
  --blue-deep: #12308A;
  --ink: #101C3D;
  --slate: #45516E;
  --fog: #8B94AC;
  --cloud: #D8DEEF;
  --mist: #EEF2FC;
  --paper: #FFFFFF;
  --green: #2F7D5C;
  --green-deep: #1E5940;
  --green-tint: #E6F2EC;
  --warn: #A9761C;
  --error: #BC4440;

  /* Type */
  --serif: 'Lora', Georgia, serif;
  --sans: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;

  /* Layout */
  --maxw: 1080px;
  --pad: 24px;
  --header-h: 72px;
}

/* Japanese pages swap the type stack (brand: Zen Old Mincho / Zen Maru Gothic) */
:root[lang="ja"] {
  --serif: 'Zen Old Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --sans: 'Zen Maru Gothic', 'Hiragino Sans', 'Yu Gothic', sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
:root[lang="ja"] body { line-height: 1.9; line-break: strict; text-wrap: pretty; }
/* Orphan guard: keeps a sentence-final phrase (お届けします。/医療です。…) from
   dangling alone on the last line; browsers without text-wrap:pretty rely on
   these spans entirely. */
.nb { white-space: nowrap; }

h1, h2, h3 { line-height: 1.2; font-weight: 500; }
h1, h2 { font-family: var(--serif); }
h3 { font-family: var(--sans); font-weight: 700; font-size: 20px; line-height: 1.3; }
:root[lang="ja"] h1, :root[lang="ja"] h2 { line-height: 1.4; }

p { margin-bottom: 12px; }
a { color: var(--blue); }
img { max-width: 100%; height: auto; }
strong { font-weight: 700; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.eyebrow {
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue);
  display: block;
  margin-bottom: 12px;
}
:root[lang="ja"] .eyebrow { letter-spacing: .12em; font-weight: 500; font-size: 13.5px; }

.section-title { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 14px; }
:root[lang="ja"] .section-title { font-size: clamp(23px, 3vw, 29px); }
.lede { font-size: 17.5px; color: var(--slate); max-width: 640px; margin-bottom: 8px; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--blue); color: #fff; font-weight: 700;
  padding: 12px 20px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Buttons — pill shapes echo the petal (brand §06)
   ========================================================================== */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  border-radius: 999px;
  padding: 13px 26px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  min-height: 44px;
}
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-deep); }
.btn.secondary { background: var(--paper); color: var(--blue); border: 1.5px solid var(--blue); }
.btn.secondary:hover { background: var(--mist); }
.btn.quiet { background: var(--mist); color: var(--blue); }
.btn.quiet:hover { background: var(--cloud); }
.btn.on-blue { background: #fff; color: var(--blue); }
.btn.on-blue:hover { background: var(--mist); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--cloud);
}
.site-header .bar {
  display: flex; align-items: center; gap: 20px;
  min-height: var(--header-h);
}
.site-header .logo { display: flex; align-items: center; flex: none; }
.site-header .logo img { width: 200px; height: auto; display: block; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 4px; list-style: none; align-items: center; }
.site-nav a {
  display: block; padding: 10px 14px; border-radius: 8px;
  color: var(--slate); text-decoration: none; font-weight: 600; font-size: 15px;
}
.site-nav a:hover { background: var(--mist); color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 12px; flex: none; }

.lang-switch {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--cloud); border-radius: 999px; padding: 3px;
  font-size: 13.5px; font-weight: 700;
}
.lang-switch a, .lang-switch span {
  padding: 6px 12px; border-radius: 999px; text-decoration: none; line-height: 1.3;
}
.lang-switch [aria-current] { background: var(--blue); color: #fff; }
.lang-switch a:not([aria-current]) { color: var(--slate); }
.lang-switch a:not([aria-current]):hover { color: var(--blue); background: var(--mist); }

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; border-radius: 10px;
  align-items: center; justify-content: center;
  color: var(--ink);
}
.nav-toggle:hover { background: var(--mist); }

@media (max-width: 940px) {
  .site-header .logo img { width: 168px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--cloud);
    padding: 8px var(--pad) 16px;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: 13px 14px; font-size: 16px; }
  .header-cta { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: var(--mist);
  overflow: hidden;
  padding: 88px 0 96px;
  text-align: center;
}
/* Single cropped petal motif, 4–8% opacity, bleeding off one edge (brand §05) */
.hero::before {
  content: "";
  position: absolute;
  right: -180px; top: -140px;
  width: 560px; height: 560px;
  background: url("../img/sakura-mark-blue.svg") no-repeat center / contain;
  opacity: .06;
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 {
  font-size: clamp(34px, 5.2vw, 52px);
  line-height: 1.15;
  max-width: 760px;
  margin: 0 auto 20px;
}
:root[lang="ja"] .hero h1 { font-size: clamp(29px, 4.4vw, 44px); line-height: 1.35; }
.hero .sub {
  font-size: clamp(17px, 2vw, 19.5px);
  color: var(--slate);
  max-width: 620px;
  margin: 0 auto 10px;
}
.hero .cta-row {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-top: 34px;
}
.hero .opening-note {
  margin-top: 26px;
  font-size: 14px; font-weight: 700; color: var(--green);
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 88px 0; }
.section.on-mist { background: var(--mist); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* --- Why choose: benefit grid --- */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.benefit {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--cloud);
  border-radius: 16px;
  padding: 20px 22px;
}
.benefit .check { flex: none; margin-top: 2px; color: var(--green); }
.benefit p { margin: 0; font-weight: 600; }

/* --- DPC comparison --- */
.compare { overflow-x: auto; }
.compare table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  min-width: 560px;
  background: var(--paper);
  border: 1px solid var(--cloud);
  border-radius: 16px;
  overflow: hidden;
  font-size: 15.5px;
}
.compare th {
  text-align: left; padding: 16px 22px;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  font-family: var(--sans);
}
:root[lang="ja"] .compare th { letter-spacing: .1em; text-transform: none; font-size: 14.5px; }
.compare thead th:first-child { background: var(--paper); color: var(--fog); border-bottom: 2px solid var(--cloud); }
.compare thead th:last-child { background: var(--blue); color: #fff; }
.compare td { padding: 14px 22px; border-top: 1px solid var(--cloud); color: var(--slate); vertical-align: top; }
.compare td:last-child { background: var(--mist); color: var(--ink); font-weight: 600; }
.compare .row-icon { color: var(--green); vertical-align: -3px; margin-right: 8px; }

/* --- Membership --- */
.membership-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px;
  align-items: start;
}
@media (max-width: 860px) { .membership-grid { grid-template-columns: 1fr; } }

.included-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
@media (max-width: 640px) { .included-list { grid-template-columns: 1fr; } }
.included-list li { display: flex; gap: 10px; align-items: flex-start; }
.included-list .check { flex: none; margin-top: 4px; color: var(--green); }

.procedures {
  margin-top: 28px;
  background: var(--paper); border: 1px solid var(--cloud); border-radius: 16px;
  padding: 22px 24px;
}
.procedures h3 { margin-bottom: 6px; }
.procedures .fineprint { color: var(--slate); font-size: 14px; margin-bottom: 12px; }
.procedures ul {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.procedures li {
  background: var(--mist); color: var(--slate);
  border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600;
}

.price-card {
  background: var(--blue); color: #fff;
  border-radius: 16px; padding: 34px 32px;
  position: sticky; top: calc(var(--header-h) + 24px);
}
.price-card .plan-label {
  font-size: 12.5px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #C7D2F0; margin-bottom: 14px;
}
:root[lang="ja"] .price-card .plan-label { letter-spacing: .12em; }
.price-card .price { font-family: var(--serif); font-size: 52px; line-height: 1; }
.price-card .price small { font-family: var(--sans); font-size: 16px; font-weight: 600; color: #C7D2F0; }
.price-card .per { color: #C7D2F0; margin: 6px 0 20px; font-size: 15px; }
.price-card ul { list-style: none; margin-bottom: 26px; }
.price-card li {
  padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: 15px; display: flex; justify-content: space-between; gap: 12px;
}
.price-card li b { font-weight: 700; }
.price-card .btn { width: 100%; }

/* --- Doctor --- */
.doctor-grid {
  display: grid; grid-template-columns: 380px 1fr; gap: 48px;
  align-items: start;
}
@media (max-width: 860px) { .doctor-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } }
.doctor-photo { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 860px) { .doctor-photo { position: static; } }
.doctor-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 16px; display: block;
  border: 1px solid var(--cloud);
}
.doctor-photo figcaption { font-size: 14px; color: var(--slate); margin-top: 10px; text-align: center; }
.doctor-bio p { color: var(--slate); }
.doctor-bio .pull-quote {
  font-family: var(--serif); font-size: 21.5px; line-height: 1.5; color: var(--ink);
  border-left: 3px solid var(--blue);
  padding: 6px 0 6px 22px;
  margin: 26px 0 0;
}
:root[lang="ja"] .doctor-bio .pull-quote { font-size: 19px; line-height: 1.8; }

/* --- FAQ --- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  background: var(--paper);
  border: 1px solid var(--cloud); border-radius: 16px;
  margin-bottom: 12px;
}
.faq-item summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 24px;
  font-weight: 700; font-size: 16.5px;
  border-radius: 16px;
  min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { flex: none; color: var(--blue); transition: transform .2s ease; }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .answer { padding: 0 24px 20px; color: var(--slate); }
.faq-item .answer p:last-child { margin-bottom: 0; }

/* --- Waitlist --- */
.waitlist { position: relative; overflow: hidden; }
.waitlist::before {
  content: "";
  position: absolute; left: -200px; bottom: -220px;
  width: 620px; height: 620px;
  background: url("../img/sakura-mark-blue.svg") no-repeat center / contain;
  opacity: .05;
  pointer-events: none;
}
.waitlist .wrap { position: relative; }
.waitlist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .waitlist-grid { grid-template-columns: 1fr; } }
.waitlist-copy .opening-badge {
  display: inline-block;
  background: var(--green-tint); color: var(--green-deep);
  font-weight: 700; font-size: 14px;
  border-radius: 999px; padding: 8px 18px; margin-bottom: 18px;
}
.waitlist-copy p { color: var(--slate); }

.typeform-embed {
  background: var(--paper);
  border: 1px solid var(--cloud); border-radius: 16px;
  min-height: 480px;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.typeform-embed > div { width: 100%; }
.typeform-fallback { text-align: center; padding: 48px 32px; }
.typeform-fallback p { color: var(--slate); margin-bottom: 20px; }
/* Hide the fallback once the embed script has mounted the form (the
   [data-tf-live] div gains an iframe). If the script never loads, the
   div stays empty and the fallback remains visible. */
.typeform-embed:has(iframe) .typeform-fallback { display: none; }
.typeform-embed [data-tf-live]:not(:empty) + .typeform-fallback { display: none; }

/* --- Scheduling note --- */
.scheduling-note {
  display: flex; gap: 16px; align-items: flex-start;
  max-width: 760px; margin: 0 auto;
  background: var(--mist); border-radius: 16px; padding: 24px 28px;
}
.scheduling-note .icon { flex: none; color: var(--blue); margin-top: 3px; }
.scheduling-note p { margin: 0; color: var(--slate); }
.scheduling-note b { color: var(--ink); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink); color: var(--cloud);
  padding: 64px 0 40px;
  font-size: 14.5px;
}
.site-footer a { color: var(--cloud); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer a:focus-visible { outline-color: #fff; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { width: 190px; margin-bottom: 16px; }
.footer-brand p { color: var(--fog); max-width: 300px; }
.site-footer h2 {
  font-family: var(--sans); font-size: 12.5px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--fog); margin-bottom: 14px;
}
:root[lang="ja"] .site-footer h2 { letter-spacing: .12em; font-weight: 500; font-size: 13px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.footer-social { display: flex; gap: 14px; margin-top: 18px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
}
.footer-social a:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  padding-top: 24px; color: var(--fog); font-size: 13.5px;
}
