/* ============================================================
   JAI PROM (ใจพร้อม) — Design System
   Calm • Warm • Hopeful • Natural • Trustworthy
   ============================================================ */

:root {
  /* Palette — soft sage green, cream, light sky blue */
  --cream:        #FAF7EF;
  --cream-2:      #F3EEE2;
  --paper:        #FFFFFF;

  --sage:         #8FBE9C;   /* primary light green */
  --sage-soft:    #DDEBDD;
  --sage-tint:    #EEF5EC;
  --sage-deep:    #5C8F6B;
  --sage-ink:     #3E5C49;

  --sky:          #AFD4E3;   /* light blue */
  --sky-soft:     #E3F0F4;
  --sky-deep:     #6BA8BE;

  --warm:         #E8C9A0;   /* warm cream accent */
  --warm-soft:    #F6E7D2;
  --blossom:      #E7B7B0;   /* gentle hopeful pink */

  --ink:          #3A463E;   /* main text */
  --ink-soft:     #5E6B62;
  --muted:        #8A968D;
  --line:         #E7E0D2;

  /* Typography */
  --font-head: 'Prompt', 'Sarabun', system-ui, sans-serif;
  --font-body: 'Sarabun', 'Prompt', system-ui, sans-serif;

  /* Shape & depth */
  --radius:    18px;
  --radius-lg: 28px;
  --radius-sm: 12px;
  --shadow-sm: 0 4px 16px rgba(92, 143, 107, 0.08);
  --shadow:    0 10px 30px rgba(76, 116, 90, 0.12);
  --shadow-lg: 0 20px 50px rgba(76, 116, 90, 0.16);

  --maxw: 1120px;
  --gap: clamp(1rem, 3vw, 2rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.75;
  font-size: 17px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--sage-deep); text-decoration: none; transition: color .2s; }
a:hover { color: var(--sage-ink); }
h1,h2,h3,h4 { font-family: var(--font-head); color: var(--sage-ink); line-height: 1.3; font-weight: 600; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
p  { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 3px; border-radius: 6px; }

/* ---------- Layout helpers ---------- */
.container { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.center { text-align: center; }
.lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 60ch; }
.center .lead { margin-inline: auto; }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; font-size: .78rem;
  color: var(--sage-deep); background: var(--sage-tint);
  padding: .35em 1em; border-radius: 999px; margin-bottom: 1rem;
}
.text-balance { text-wrap: balance; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em; justify-content: center;
  font-family: var(--font-head); font-weight: 500; font-size: 1.02rem;
  padding: .8em 1.7em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .2s, background .2s;
  text-align: center; line-height: 1.2; white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--sage); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--sage-deep); color: #fff; box-shadow: var(--shadow); transform: translateY(-2px); }
.btn-sky { background: var(--sky); color: #214a58; }
.btn-sky:hover { background: var(--sky-deep); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: var(--paper); color: var(--sage-deep); border-color: var(--sage-soft); }
.btn-ghost:hover { border-color: var(--sage); background: var(--sage-tint); }
.btn-warm { background: var(--warm); color: #6b4f2a; }
.btn-warm:hover { background: #dcb583; transform: translateY(-2px); }
.btn-lg { font-size: 1.12rem; padding: .95em 2.1em; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 239, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .7rem 0; flex-wrap: wrap; }
.nav > nav { flex: 0 1 auto; min-width: 0; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--sage-ink); flex: 0 0 auto; }
.brand .brand-en { letter-spacing: .04em; }
.brand .brand-th { color: var(--sage-deep); font-weight: 500; }
.brand svg { flex: none; }
.nav-links { display: flex; align-items: center; justify-content: flex-end; gap: .35rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-links li { flex: 0 0 auto; }
.nav-links a { font-family: var(--font-head); font-weight: 500; color: var(--ink-soft); padding: .5em .9em; border-radius: 999px; font-size: .98rem; white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--sage-ink); background: var(--sage-tint); }
.nav-cta { margin-left: .3rem; }
.nav-cta .btn { white-space: nowrap; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .4rem; color: var(--sage-ink); }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: .8rem 1.2rem 1.2rem; box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .7em 1em; }
  .nav-cta { margin: .4rem 0 0; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--sage-ink); color: #dCe9dD; margin-top: 4rem;
  padding: 3rem 0 1.6rem; font-size: .96rem;
}
.site-footer a { color: #cfe3d2; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: .8rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-brand .brand { color: #fff; }
.footer-note { border-top: 1px solid rgba(255,255,255,.15); margin-top: 2rem; padding-top: 1.2rem; color: #a9c2ad; font-size: .86rem; }
@media (max-width: 720px){ .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3rem,7vw,5.5rem) 0 clamp(2.5rem,5vw,4rem); overflow: hidden; }
.hero::before {
  content:""; position:absolute; inset:0; z-index:-2;
  background:
    radial-gradient(60% 70% at 85% 10%, var(--sky-soft) 0%, transparent 60%),
    radial-gradient(70% 80% at 5% 90%, var(--sage-tint) 0%, transparent 55%),
    var(--cream);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem,4vw,3.5rem); align-items: center; }
.hero-photo { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; aspect-ratio: 4/3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-motto { font-family: var(--font-head); color: var(--sage-deep); font-weight: 500; font-size: 1.15rem; margin-bottom: .4rem; }
@media (max-width: 820px){ .hero-grid { grid-template-columns: 1fr; } .hero-media { order:-1; } }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){ .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.6rem; margin-bottom: 1rem; background: var(--sage-tint);
}
.card.sky .card-icon { background: var(--sky-soft); }
.card.warm .card-icon { background: var(--warm-soft); }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-soft); margin-bottom: 0; }

.panel { background: var(--paper); border:1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.6rem); box-shadow: var(--shadow-sm); }
.panel-soft { background: var(--sage-tint); border-color: var(--sage-soft); }
.panel-sky  { background: var(--sky-soft); border-color: #d2e6ec; }
.panel-warm { background: var(--warm-soft); border-color: #efddc4; }

/* feature list */
.feature { display: flex; gap: 1rem; align-items: flex-start; }
.feature .ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--sage-tint); display: grid; place-items: center; font-size: 1.25rem; }
.feature h3 { font-size: 1.12rem; margin-bottom: .2rem; }
.feature p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* note box */
.note {
  background: var(--cream-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; color: var(--ink-soft);
}
.note ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.note li { margin-bottom: .4rem; }

/* stat */
.stat { text-align: center; }
.stat .num { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem,5vw,2.8rem); color: var(--sage-deep); line-height: 1; }
.stat .lbl { color: var(--ink-soft); font-size: .95rem; margin-top: .3rem; }

/* breadcrumb / page head */
.page-head { background: linear-gradient(180deg, var(--sage-tint), var(--cream)); padding: clamp(2rem,5vw,3.4rem) 0 clamp(1.6rem,4vw,2.4rem); border-bottom: 1px solid var(--line); }
.crumb { font-size: .9rem; color: var(--muted); margin-bottom: .6rem; }
.crumb a { color: var(--sage-deep); }

/* media row */
.media-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,3rem); align-items: center; }
.media-row img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 16/11; object-fit: cover; }
.media-row.rev .media-text { order: 2; }
@media (max-width: 760px){ .media-row { grid-template-columns: 1fr; } .media-row.rev .media-text { order: 0; } }

/* video */
.video-frame { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.video-frame iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }

/* utility */
.mt-0{margin-top:0}.mt-1{margin-top:.6rem}.mt-2{margin-top:1.2rem}.mt-3{margin-top:2rem}
.mb-0{margin-bottom:0}.muted{color:var(--muted)}.sage{color:var(--sage-deep)}
.tag { display:inline-block; background:var(--sky-soft); color:var(--sky-deep); font-size:.8rem; font-weight:600; padding:.25em .8em; border-radius:999px; font-family:var(--font-head); }
.skip-link { position:absolute; left:-999px; top:0; background:var(--sage-deep); color:#fff; padding:.6em 1em; border-radius:0 0 8px 0; z-index:100; }
.skip-link:focus { left:0; color:#fff; }

/* ============================================================
   ACP JOURNEY (questionnaire)
   ============================================================ */
.journey-wrap { max-width: 760px; margin-inline: auto; }
.progress { position: sticky; top: 64px; z-index: 30; background: rgba(250,247,239,.92); backdrop-filter: blur(8px); padding: .9rem 0; border-bottom: 1px solid var(--line); }
.progress-bar { height: 10px; background: var(--sage-soft); border-radius: 999px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sage), var(--sky-deep)); border-radius: 999px; transition: width .4s ease; }
.progress-meta { display: flex; justify-content: space-between; font-size: .85rem; color: var(--ink-soft); margin-top: .45rem; font-family: var(--font-head); }

.step { display: none; animation: fade .4s ease; }
.step.active { display: block; }
@keyframes fade { from { opacity:0; transform: translateY(8px);} to {opacity:1; transform:none;} }

.section-intro { text-align: center; padding: 1rem 0 1.5rem; }
.section-badge { font-family: var(--font-head); font-weight:600; color:#fff; padding:.4em 1.2em; border-radius:999px; display:inline-block; margin-bottom:1rem; }
.badge-stories { background: var(--sage-deep); }
.badge-views   { background: var(--sky-deep); }
.badge-wishes  { background: #c58fa6; }
.badge-medical { background: #6b9e8e; }

.q-card { background: var(--paper); border:1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.4rem,4vw,2.4rem); box-shadow: var(--shadow); }
.q-number { font-family: var(--font-head); font-weight:600; color: var(--sage-deep); font-size:.95rem; letter-spacing:.05em; }
.q-text { font-family: var(--font-head); font-weight:600; font-size: clamp(1.2rem,2.6vw,1.55rem); color: var(--sage-ink); margin:.3rem 0 1.3rem; line-height:1.4; }

.options { display: grid; gap: .7rem; }
.opt {
  display: flex; align-items: center; gap: .85rem; padding: .9rem 1.1rem;
  border: 2px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
  background: var(--cream); transition: border-color .15s, background .15s, transform .1s;
  font-size: 1.02rem;
}
.opt:hover { border-color: var(--sage); background: var(--sage-tint); }
.opt input { accent-color: var(--sage-deep); width: 20px; height: 20px; flex: none; cursor: pointer; }
.opt.checked { border-color: var(--sage-deep); background: var(--sage-tint); }
.opt-text-input, .more-input {
  width: 100%; margin-top: .6rem; padding: .8rem 1rem; border: 2px solid var(--line);
  border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 1rem; background: var(--paper);
  resize: vertical; min-height: 48px;
}
.opt-text-input:focus, .more-input:focus { border-color: var(--sage); }
.more-label { display:block; font-family:var(--font-head); font-weight:500; color:var(--ink-soft); font-size:.92rem; margin-top:1rem; }

.q-nav { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; justify-content: space-between; }
.q-nav .left, .q-nav .right { display: flex; gap: .7rem; flex-wrap: wrap; }

/* ACP Summary Card */
.summary-stage { background: var(--cream); }
.theme-picker { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin: 1.2rem 0 1.8rem; }
.theme-chip { border: 2px solid var(--line); background: var(--paper); border-radius: 999px; padding: .5em 1.1em; cursor: pointer; font-family: var(--font-head); font-weight:500; font-size:.92rem; display:flex; align-items:center; gap:.5em; transition: all .15s; }
.theme-chip:hover { border-color: var(--sage); }
.theme-chip.active { border-color: var(--sage-deep); background: var(--sage-tint); }
.theme-dot { width: 16px; height:16px; border-radius:50%; display:inline-block; }

#acpCard {
  border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 2.8rem);
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
  --c-bg:#FAF7EF; --c-panel:#fff; --c-accent:#5C8F6B; --c-soft:#EEF5EC; --c-ink:#3A463E;
  background: var(--c-bg); color: var(--c-ink);
}
#acpCard.theme-green  { --c-bg:#eef5ec; --c-accent:#5C8F6B; --c-soft:#dEEcde; }
#acpCard.theme-blue   { --c-bg:#e7f1f5; --c-accent:#4f8aa0; --c-soft:#d6e8ee; }
#acpCard.theme-warm   { --c-bg:#f8efe1; --c-accent:#bb8a52; --c-soft:#f1e2cc; }
#acpCard.theme-minimal{ --c-bg:#ffffff; --c-accent:#5a6b60; --c-soft:#f1f1ee; }
.acp-head { text-align:center; border-bottom: 2px dashed var(--c-accent); padding-bottom: 1.2rem; margin-bottom: 1.4rem; }
.acp-head .acp-logo { font-family: var(--font-head); font-weight:700; color: var(--c-accent); letter-spacing:.06em; }
.acp-head h2 { color: var(--c-ink); margin:.4rem 0 .2rem; }
.acp-meta { color: var(--c-accent); font-family: var(--font-head); font-size:.95rem; }
.acp-section { background: var(--c-panel); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-bottom: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.acp-section h3 { color: var(--c-accent); font-size:1.1rem; margin-bottom:.6rem; display:flex; align-items:center; gap:.5em; }
.acp-item { margin-bottom:.5rem; }
.acp-item .k { font-family: var(--font-head); font-weight:600; color: var(--c-ink); font-size:.9rem; }
.acp-item .v { color: var(--c-ink); }
.acp-reflection { background: var(--c-soft); border-radius: var(--radius); padding: 1.2rem 1.4rem; font-style: italic; line-height:1.8; }
.acp-insights { list-style:none; padding:0; margin:.6rem 0 0; display:grid; gap:.5rem; }
.acp-insights li { background: var(--c-soft); border-radius: 10px; padding:.6rem .9rem; }
.acp-footer-note { text-align:center; font-size:.82rem; color: var(--c-accent); margin-top:1rem; }

.share-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:.8rem; }
@media(max-width:560px){ .share-grid{ grid-template-columns:1fr 1fr; } }
.nextstep-list { display:grid; gap:.7rem; margin: 1rem 0 0; }
.nextstep { display:flex; gap:.8rem; align-items:flex-start; padding:.9rem 1.1rem; border:2px solid var(--line); border-radius:var(--radius-sm); background:var(--paper); cursor:pointer; }
.nextstep input { accent-color: var(--sage-deep); width:20px;height:20px;margin-top:2px; flex:none; }
.nextstep.checked { border-color:var(--sage-deep); background:var(--sage-tint); }

@media print {
  .site-header, .site-footer, .progress, .share-card, .theme-picker, .no-print { display:none !important; }
  body { background:#fff; }
  #acpCard { box-shadow:none; }
}

/* toast */
.toast { position: fixed; left:50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--sage-ink); color:#fff; padding:.8em 1.4em; border-radius:999px; box-shadow: var(--shadow); opacity:0; pointer-events:none; transition:all .3s; z-index:200; font-family:var(--font-head); }
.toast.show { opacity:1; transform: translateX(-50%) translateY(0); }

/* ---------- Icons (SVG sprite) ---------- */
.icon { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -0.18em; flex: none; fill: none; stroke: currentColor; box-sizing: border-box; }
.btn .icon { width: 1.2em; height: 1.2em; vertical-align: -0.2em; }
.card-icon .icon { width: 28px; height: 28px; color: var(--sage-deep); }
.card.sky .card-icon .icon { color: var(--sky-deep); }
.card.warm .card-icon .icon { color: #bb8a52; }
.feature .ic .icon { width: 24px; height: 24px; color: var(--sage-deep); }
.crumb .icon, .acp-section h3 .icon { width: 1.1em; height: 1.1em; }
.acp-section h3 .icon { color: var(--c-accent); vertical-align: -0.15em; }
.acp-insights .icon { color: var(--c-accent); width: 1em; height: 1em; vertical-align: -0.12em; }
.section-badge .icon, .eyebrow .icon { width: 1em; height: 1em; vertical-align: -0.12em; }

/* decorative leaf divider */
.leaf-divider { display:flex; align-items:center; justify-content:center; gap:.8rem; color:var(--sage); margin: 1rem 0; }
.leaf-divider::before, .leaf-divider::after { content:""; height:1px; width:60px; background: var(--sage-soft); }
