/* ═══════════════════════════════════════════════
   Jane TOEIC — Design System v3 "Editorial Trust" (1a)
   Tokens จาก design_handoff_janetoeic_landing_1a
   cream #FAF6EE / ink #0F2A38 / teal #128FB2 / gold #C6982F
   ═══════════════════════════════════════════════ */

:root {
  --ink: #0F2A38;
  --teal: #128FB2;
  --teal-bright: #1CB5D8;
  --teal-deep: #0F6F8C;
  --teal-glow: #4FD0EE;
  --gold: #C6982F;
  --gold-deep: #8A6A1C;
  --gold-soft: #E8C766;
  --cream: #FAF6EE;
  --body-text: #46595F;
  --muted: #5E6E76;
  --border: rgba(15, 42, 56, .09);
  --line-green: #06C755;
  --radius: 16px;
  /* aliases สำหรับ inline style เดิม */
  --navy: #0F2A38;
  --navy-deep: #0B2230;
  font-size: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
:where(section, div)[id] { scroll-margin-top: 86px; }
body {
  font-family: 'IBM Plex Sans Thai', 'Anuphan', 'Leelawadee UI', 'Thonburi', 'Noto Sans Thai', sans-serif;
  background: var(--cream); color: var(--body-text); line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Noto Serif Thai', 'IBM Plex Sans Thai', serif; color: var(--ink); font-weight: 600; }
img { max-width: 100%; }
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 40px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 900px) { .wrap, .wrap-narrow { padding: 0 22px; } }

/* ── Buttons ── */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  border-radius: 11px; padding: 14px 26px; font-size: .95rem; text-align: center;
  border: none; cursor: pointer; font-family: 'IBM Plex Sans Thai', sans-serif;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(.94); }
.btn:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 2px; }
.btn-gold { background: var(--teal); color: #fff; box-shadow: 0 14px 26px -12px rgba(18,143,178,.7); } /* primary (teal ตาม design 1a) */
.btn-ink { background: var(--ink); color: #fff; box-shadow: 0 10px 22px -12px rgba(15,42,56,.6); }
.btn-outline { border: 1.5px solid rgba(15,42,56,.25); color: var(--ink); background: transparent; }
.btn-outline:hover { background: #fff; }
.btn-white { background: #fff; color: var(--teal-deep); box-shadow: 0 10px 24px -12px rgba(15,42,56,.5); }
.btn-line-app { background: var(--line-green); color: #fff; }
.btn-lg { padding: 16px 32px; font-size: 1.02rem; }

/* ── Brand (โลโก้ + wordmark) ── */
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 50px; height: auto; }

/* ── Header แบบหน้าแรก (announce + site-header) — ใช้ร่วมทุกหน้า ── */
.announce {
  background: var(--ink);
  color: #CFE6EE;
  font: 500 12px 'IBM Plex Sans Thai', sans-serif;
  letter-spacing: .02em;
}
.announce .wrap {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 9px; padding-bottom: 9px; gap: 10px;
}
.announce b { color: var(--gold-soft); }
.announce-contact { font-family: 'Space Grotesk', sans-serif; letter-spacing: .04em; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 238, .9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15, 42, 56, .08);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.wordmark { font: 600 27px 'Cormorant Garamond', serif; letter-spacing: .5px; line-height: 1; }
.wordmark .jane { color: var(--ink); }
.wordmark .toeic { color: var(--teal); }
.site-nav {
  display: flex; align-items: center; gap: 26px;
  font: 500 13.5px 'IBM Plex Sans Thai', sans-serif; color: #3A4D56;
}
.site-nav a { text-decoration: none; }
.site-nav > a:not(.nav-trial):hover { color: var(--teal-deep); }
.site-nav > a[aria-current="page"] { color: var(--teal-deep); font-weight: 700; }
.nav-trial {
  border: 1.5px solid var(--gold); color: var(--gold-deep);
  padding: 9px 18px; border-radius: 99px; font-weight: 600;
  white-space: nowrap; transition: background .18s;
}
.nav-trial:hover { background: rgba(198, 152, 47, .1); }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .announce .wrap { justify-content: center; }
  .announce-contact { display: none; }
  .nav-toggle {
    display: block; background: none; border: 0; padding: 6px;
    cursor: pointer; color: var(--ink);
  }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid rgba(15, 42, 56, .1);
    padding: 8px 22px 18px;
  }
  .site-nav.open { display: flex; }
  .site-nav > a { padding: 13px 4px; border-bottom: 1px solid rgba(15, 42, 56, .06); }
  .site-nav > a.nav-trial { margin-top: 14px; text-align: center; border-bottom: 1.5px solid var(--gold); }
}

/* ── Page hero (หน้าใน) ── */
.page-hero { background: linear-gradient(180deg, #fff 0%, var(--cream) 100%); padding: 48px 0 40px; border-bottom: 1px solid var(--border); }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 12px; font-family: 'Space Grotesk', 'IBM Plex Sans Thai', sans-serif; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--teal-deep); }
.page-hero h1 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.3; text-wrap: balance; }
.page-hero p.lede { color: var(--muted); font-size: 1.02rem; max-width: 40em; margin-top: 12px; }

/* ── Sections ── */
section.block { padding: 64px 0; }
section.block.tight { padding: 46px 0; }
.on-sky { background: #fff; }
.eyebrow {
  font-family: 'Space Grotesk', 'IBM Plex Sans Thai', sans-serif;
  color: var(--teal); font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
h2.sec { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.3; margin: 10px 0 10px; text-wrap: balance; }
p.sub { color: var(--muted); max-width: 44em; }

/* ── Badge (การันตี = ทอง) ── */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--gold); color: var(--gold-deep);
  border-radius: 99px; padding: 7px 16px; font-size: .82rem; font-weight: 600;
}

/* ── Course cards ── */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 36px; }
.cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--cream); border: 1px solid var(--border); border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.on-sky .card, .page-hero ~ * .card { background: #fff; }
section.block:not(.on-sky) .card { background: #fff; }
.card:hover { transform: translateY(-5px); box-shadow: 0 20px 36px -18px rgba(15,42,56,.3); }
.card-top { height: 96px; background: linear-gradient(135deg, var(--teal), var(--ink)); position: relative; }
.card-top.alt { background: linear-gradient(135deg, #FAF1DC, #F6E6C4); border-bottom: 1px solid rgba(198,152,47,.35); }
.chip { position: absolute; top: 12px; left: 12px; background: var(--gold); color: #2C2205; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 3px 11px; }
.card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 1.15rem; line-height: 1.4; }
.card h3 a { text-decoration: none; }
.card .meta { font-size: .8rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.price { margin-top: auto; padding-top: 10px; }
.price del { color: #A8B4B9; font-size: .85rem; margin-right: 8px; }
.price strong { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.price .save { display: inline-block; margin-left: 8px; background: #FAF1DC; color: var(--gold-deep); font-size: .72rem; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
.card .btn { margin-top: 14px; padding: 11px 0; font-size: .9rem; }
@media (max-width: 1000px) { .cards, .cards.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards, .cards.cols-3 { grid-template-columns: 1fr; } }

/* ── Feature / method items ── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 36px; }
.m-item { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 30px 26px; }
.m-item .num {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: rgba(18,143,178,.1); color: var(--teal); font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.1rem; margin-bottom: 16px;
}
.m-item h3 { font-size: 1.15rem; margin-bottom: 8px; }
.m-item p { font-size: .9rem; color: var(--muted); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ── Checklist ── */
ul.checks { list-style: none; display: flex; flex-direction: column; gap: 10px; }
ul.checks li { padding-left: 30px; position: relative; }
ul.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; border-radius: 99px; background: rgba(18,143,178,.12);
  color: var(--teal-deep); font-weight: 700; font-size: .75rem;
  display: flex; align-items: center; justify-content: center;
}

/* ── Testimonials (LINE chat style) ── */
.t-rail { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 36px 4px 14px; scrollbar-width: thin; }
.t-card {
  min-width: 340px; max-width: 340px; scroll-snap-align: start;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
}
@media (max-width: 480px) { .t-card { min-width: 86%; } }
.t-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; background: linear-gradient(90deg, var(--teal), var(--ink)); color: #fff; }
.t-head .course { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: .8rem; letter-spacing: .06em; }
.t-head .loc { font-size: .7rem; background: var(--gold); color: #2C2205; font-weight: 700; border-radius: 99px; padding: 2px 10px; white-space: nowrap; }
.t-chat { background: linear-gradient(180deg, #93A9C6, #7E97B8); padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bubble {
  background: #fff; border-radius: 4px 14px 14px 14px; padding: 9px 13px;
  font-size: .87rem; max-width: 88%; color: #1E2A36; box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.t-result { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: .8rem; color: var(--muted); background: #fff; }
.t-result strong { color: var(--teal-deep); font-family: 'Space Grotesk', 'IBM Plex Sans Thai', sans-serif; font-size: 1rem; font-variant-numeric: tabular-nums; }
.t-note { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 14px; }

/* ── FAQ ── */
.faq details { background: #fff; border: 1px solid var(--border); border-radius: 14px; margin-top: 12px; overflow: hidden; }
.faq summary { cursor: pointer; font-weight: 600; padding: 20px 26px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink); font-family: 'IBM Plex Sans Thai', sans-serif; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal); font-size: 1.4rem; font-weight: 400; flex-shrink: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details .a { padding: 0 26px 22px; color: var(--muted); font-size: .92rem; line-height: 1.7; }

/* ── Forms ── */
.form-grid { display: flex; flex-direction: column; gap: 14px; }
.form-grid label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; border-radius: 10px; border: 1.5px solid rgba(15,42,56,.15);
  background: #fff; color: var(--ink); padding: 13px 16px; font: inherit; font-size: .95rem;
}
.form-grid input:focus-visible, .form-grid select:focus-visible, .form-grid textarea:focus-visible { outline: 3px solid rgba(28,181,216,.35); border-color: var(--teal); }
.form-note { font-size: .8rem; color: var(--muted); }

/* ── CTA panel (teal gradient ตาม design) ── */
.cta-panel {
  background: linear-gradient(120deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: #fff; border-radius: 22px; padding: 52px 46px;
  position: relative; overflow: hidden;
  box-shadow: 0 26px 54px -24px rgba(18,143,178,.7);
}
.cta-panel h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); text-wrap: balance; color: #fff; }
.cta-panel p { color: #D7F0F8; margin-top: 10px; font-size: .95rem; }
.cta-panel > * { position: relative; }
.cta-panel .form-grid input { border: none; }
.cta-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .cta-split { grid-template-columns: 1fr; } .cta-panel { padding: 36px 24px; } }

/* ── One-page order (หน้าขายคอร์ส) ── */
.sales-hero { background: linear-gradient(180deg, #fff 0%, var(--cream) 100%); padding: 52px 0; border-bottom: 1px solid var(--border); }
.sales-hero-in { display: grid; grid-template-columns: 1.2fr .8fr; gap: 44px; align-items: start; }
@media (max-width: 900px) { .sales-hero-in { grid-template-columns: 1fr; } }
.buy-box {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 28px; box-shadow: 0 20px 40px -18px rgba(15,42,56,.35); position: sticky; top: 92px;
}
@media (max-width: 900px) { .buy-box { position: static; } }
.buy-box .price-big { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 4px; }
.buy-box .price-big del { color: #A8B4B9; font-size: 1rem; }
.buy-box .price-big strong { font-family: 'Space Grotesk', sans-serif; font-size: 2.1rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.buy-box .save { display: inline-block; background: #FAF1DC; color: var(--gold-deep); font-size: .78rem; font-weight: 700; border-radius: 6px; padding: 2px 9px; }
.buy-box ul.checks { margin: 16px 0 18px; font-size: .9rem; }
.buy-box .btn { width: 100%; }
.buy-box .mini-note { font-size: .78rem; color: var(--muted); text-align: center; margin-top: 10px; }

.order-steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 32px 0; }
@media (max-width: 860px) { .order-steps { grid-template-columns: 1fr; } }
.order-step { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; position: relative; }
.order-step::before {
  counter-increment: step; content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px; background: rgba(18,143,178,.1); color: var(--teal);
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; margin-bottom: 12px;
}
.order-step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.order-step p { font-size: .88rem; color: var(--muted); }
.qr-box {
  width: 180px; height: 180px; border-radius: 12px; border: 2px dashed rgba(15,42,56,.2);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--muted); font-size: .8rem; background: var(--cream); padding: 12px; margin: 10px auto;
}
.order-form-panel { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 32px; max-width: 560px; margin: 0 auto; }

/* ── Curriculum accordion ── */
.curri details { background: #fff; border: 1px solid var(--border); border-radius: 12px; margin-top: 10px; }
.curri summary { cursor: pointer; font-weight: 600; padding: 15px 18px; list-style: none; display: flex; justify-content: space-between; gap: 10px; font-size: .95rem; color: var(--ink); }
.curri summary::-webkit-details-marker { display: none; }
.curri summary .len { color: var(--muted); font-weight: 400; font-size: .8rem; font-family: 'Space Grotesk', 'IBM Plex Sans Thai', sans-serif; }
.curri ul { list-style: none; padding: 0 18px 14px; color: var(--muted); font-size: .9rem; }
.curri ul li { padding: 6px 0; border-top: 1px dashed rgba(15,42,56,.12); }

/* ── Articles ── */
.post-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 36px; }
@media (max-width: 760px) { .post-list { grid-template-columns: 1fr; } }
.post-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px; transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 18px 32px -16px rgba(15,42,56,.3); }
.post-card .date { font-size: .76rem; color: var(--muted); font-family: 'Space Grotesk', 'IBM Plex Sans Thai', sans-serif; }
.post-card h3 { margin: 8px 0 8px; font-size: 1.1rem; line-height: 1.45; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { color: var(--teal-deep); }
.post-card p { font-size: .88rem; color: var(--muted); }
.post-card .more { display: inline-block; margin-top: 12px; font-size: .86rem; font-weight: 600; color: var(--teal-deep); text-decoration: none; }

article.prose { max-width: 720px; margin: 0 auto; padding: 0 24px; }
article.prose > * + * { margin-top: 1.1em; }
article.prose h2 { font-size: 1.45rem; margin-top: 1.8em; }
article.prose h3 { font-size: 1.15rem; margin-top: 1.5em; }
article.prose .tldr {
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--teal); border-radius: 0 12px 12px 0;
  padding: 18px 22px; font-size: .95rem;
}
article.prose .tldr b { color: var(--teal-deep); }
article.prose .post-meta { color: var(--muted); font-size: .85rem; }
.share-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 2.2em; padding-top: 1.2em; border-top: 1px solid var(--border); }
.share-row span { font-weight: 600; font-size: .9rem; color: var(--ink); }
.share-row a { font-size: .85rem; text-decoration: none; border: 1.5px solid rgba(15,42,56,.18); border-radius: 99px; padding: 6px 16px; }
.share-row a:hover { border-color: var(--teal); color: var(--teal-deep); }

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; margin-top: 36px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 26px; }
.contact-card + .contact-card { margin-top: 16px; }
.contact-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.contact-card p { color: var(--muted); font-size: .92rem; }
.map-box {
  border-radius: 16px; border: 2px dashed rgba(15,42,56,.2); background: #fff;
  min-height: 320px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .9rem; text-align: center; padding: 20px;
}

/* ── Footer (Ink ตาม design) ── */
footer.site { background: var(--ink); color: #B9D3DC; padding: 52px 0 30px; margin-top: 72px; font-size: .88rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
footer.site h4 { color: #fff; font-size: .92rem; margin-bottom: 12px; font-family: 'IBM Plex Sans Thai', sans-serif; }
footer.site ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
footer.site a { color: #8FB0BC; text-decoration: none; }
footer.site a:hover { color: var(--teal-glow); }
.soc { display: flex; gap: 10px; margin-top: 16px; }
.soc a { width: 36px; height: 36px; border-radius: 99px; background: rgba(255,255,255,.08); border: none; display: flex; align-items: center; justify-content: center; color: #B9D3DC; }
.soc a:hover { color: var(--teal-glow); background: rgba(255,255,255,.14); }
.qr { width: 92px; height: 92px; border-radius: 10px; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: .68rem; text-align: center; padding: 6px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; } }

/* ── Floating LINE ── */
.line-float {
  position: fixed; right: 18px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60;
  width: 56px; height: 56px; border-radius: 99px; background: var(--line-green);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem; text-decoration: none; box-shadow: 0 8px 20px rgba(6,199,85,.4);
}

/* ── Reveal ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .post-card { transition: none; }
}

/* ── Utilities ── */
.center { text-align: center; }
.mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; } .mt-3 { margin-top: 40px; }
.visually-hidden { position: absolute; left: -9999px; }
