/* naporsong design system v2 — restrained, professional, Linear-inspired.
   Flat surfaces, hairline borders, fixed media ratios with object-fit cover. */
:root {
  --navy: #14264a;
  --navy-deep: #0c1830;
  --royal: #1e5aa8;
  --royal-dark: #16467f;
  --gold: #b98f1f;
  --gold-bright: #c9a227;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --forest: #2d6a4f;
  --forest-soft: #e9f2ec;
  --ink: #232b36;
  --muted: #5b6472;
  --line: #e4e7ed;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .18);
  --font-thai: "Noto Sans Thai", "Sarabun", "Leelawadee UI", "Tahoma", sans-serif;
  --max: 1120px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-thai);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.55; margin: 0 0 .55em; color: var(--navy); letter-spacing: 0; }
h1 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--royal); }
img { max-width: 100%; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; color: var(--muted); }
.meta { font-size: .85rem; color: var(--muted); }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
  font-size: .9rem;
}
.skip-link:focus { left: 0; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.brand-mark svg { width: 36px; height: 36px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand-text strong { color: var(--navy); font-size: 1.02rem; font-weight: 700; }
.brand-text small { color: var(--muted); font-size: .74rem; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav ul { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: .92rem;
  padding: 8px 11px; border-radius: var(--radius-sm); white-space: nowrap;
}
.main-nav a:hover { background: var(--bg-soft); color: var(--royal); }
.main-nav a.active { color: var(--royal); font-weight: 700; background: #eaf1fa; }
.nav-cta { margin-left: 10px; white-space: nowrap; }

.has-sub { position: relative; }
.sub-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px; display: none !important; flex-direction: column;
}
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu { display: flex !important; }
.sub-menu a { display: block; padding: 8px 12px; font-size: .9rem; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--navy); margin: 4px 0; border-radius: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; cursor: pointer;
  padding: 10px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
  font-family: inherit; font-size: .95rem; text-align: center; line-height: 1.6;
}
.btn-primary { background: var(--royal); color: #fff; }
.btn-primary:hover { background: var(--royal-dark); color: #fff; }
.btn-gold { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--navy-deep); }
.btn-gold:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-ghost { border-color: #c6cdd8; color: var(--navy); background: #fff; }
.btn-ghost:hover { border-color: var(--royal); color: var(--royal); }
.btn-outline-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.2em; }

/* ---------- hero ---------- */
.hero { background: var(--navy-deep); color: #fff; }
.hero-media { overflow: hidden; }
.hero-media .ph-img,
.hero-media .ph {
  width: 100%; height: clamp(340px, 44vw, 560px); aspect-ratio: auto !important;
  object-fit: cover; display: block; border-radius: 0; border: none;
}
.hero-media .ph-fig { margin: 0; }
.hero-media .img-credit { display: none; }
.hero-overlay {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 56px 0 64px;
}
.hero-overlay h1 { color: #fff; margin-bottom: .25em; }
.hero-kicker { color: var(--gold-bright); font-weight: 600; font-size: .85rem; letter-spacing: .06em; margin-bottom: .6em; }
.hero-sub { font-size: 1.15rem; color: #d6dde8; max-width: 620px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.5em; }
.hero-actions.center { justify-content: center; }

/* ---------- placeholders & uniform media ---------- */
.ph {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--navy-deep); width: 100%;
  border: 1px solid var(--line);
}
.ph-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph-tag {
  position: absolute; left: 12px; bottom: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(12, 24, 48, .8); color: #fff;
  border: 1px dashed rgba(201, 162, 39, .8); border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: .82rem; line-height: 1.5;
}
.ph-key { font-weight: 700; color: var(--gold-bright); letter-spacing: .03em; }
.ph-label { opacity: .92; }
.ph-fig { margin: 0; }
.ph-img { width: 100%; height: auto; display: block; border-radius: var(--radius); object-fit: cover; }
.img-credit { font-size: .78rem; color: var(--muted); padding: 6px 2px 0; margin: 0; }
/* uniform ratios: every card / list image renders identical, cropped by cover */
.card .ph-img, .card .ph,
.place-card .ph-img, .place-card .ph { aspect-ratio: 16 / 10 !important; object-fit: cover; }
.card .ph, .place-card .ph { border-radius: 0; border: none; }
.card .ph-img { border-radius: 0; }
.card .img-credit, .place-card .img-credit { padding: 6px 20px 0; }
.portrait .ph-img, .portrait .ph { aspect-ratio: 3 / 4 !important; object-fit: cover; }
.portrait .ph-fig, .portrait .ph { max-width: 400px; }
.grid-2 .ph-img, .article-body + .ph-fig .ph-img, .container.narrow .ph-fig .ph-img { aspect-ratio: 16 / 9; }
.grid-2 .ph { aspect-ratio: 16 / 9 !important; }

/* ---------- sections / cards ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.page-hero { background: var(--navy); color: #fff; padding: 60px 0; }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: #c3ccd9; }
.page-hero a { color: var(--gold-bright); }
.page-hero .eyebrow { color: var(--gold-bright); }

.eyebrow { color: var(--royal); font-weight: 700; font-size: .8rem; letter-spacing: .08em; margin: 0 0 .5em; }
.eyebrow-light { color: var(--gold-bright); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card-grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .18s ease, border-color .18s ease;
}
.card:hover { box-shadow: var(--shadow); border-color: #cfd5df; }
.card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-body h2, .card-body h3 { margin-bottom: .15em; font-size: 1.08rem; }
.card-body p { font-size: .95rem; color: var(--muted); }
.card-body h2 + p, .card-body h3 + p { color: var(--muted); }
.card-link { font-weight: 600; font-size: .92rem; margin-top: auto; padding-top: 10px; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.card-link::after { content: " →"; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

.fact-list { list-style: none; padding: 0; margin: 0 0 1em; font-size: .95rem; }
.fact-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.check-list { list-style: none; padding: 0; }
.check-list li { padding: 8px 0 8px 32px; position: relative; font-size: .96rem; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 9px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--forest-soft); color: var(--forest);
  font-weight: 700; font-size: .8rem; text-align: center; line-height: 22px;
}
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; padding: 10px 0 10px 48px; position: relative; font-size: .96rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 9px; width: 30px; height: 30px;
  border-radius: 50%; border: 1px solid #c6cdd8; color: var(--navy);
  font-weight: 700; font-size: .85rem; text-align: center; line-height: 30px; background: #fff;
}

/* ---------- vision ---------- */
.vision-hero { background: var(--navy-deep); color: #fff; padding: 96px 0; text-align: center; }
.vision-hero h1 { color: #fff; max-width: 880px; margin: 0 auto .6em; font-size: clamp(1.4rem, 3vw, 2rem); }
.vision-highlight {
  display: inline-block; font-size: 1.25rem; font-weight: 700; color: var(--navy-deep);
  background: var(--gold-bright); border-radius: var(--radius-sm); padding: 8px 28px; margin: 0 0 .9em;
}
.vision-sub { color: #aeb8c8; font-size: .92rem; }
.vision-strip { background: var(--navy); color: #fff; padding: 72px 0; text-align: center; }
.vision-strip blockquote { margin: 0 0 1.4em; }
.vision-strip blockquote p { font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 600; color: #fff; }
.vision-strip cite { color: var(--gold-bright); font-style: normal; font-weight: 700; }

.mission-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.mission-card {
  display: grid; grid-template-columns: 52px 48px 1fr; gap: 18px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.mission-num { font-size: 1.6rem; font-weight: 700; color: var(--gold); line-height: 1.2; }
.mission-icon {
  width: 48px; height: 48px; border-radius: var(--radius-sm);
  background: #eaf1fa; color: var(--royal);
  display: flex; align-items: center; justify-content: center;
}
.mission-icon svg { width: 26px; height: 26px; }
.mission-card h3 { margin-bottom: .25em; font-size: 1.05rem; }
.mission-card p { margin: 0; font-size: .95rem; color: var(--muted); }

.cta-band { text-align: center; background: var(--bg-soft); border-top: 1px solid var(--line); }

/* ---------- places ---------- */
.place-list { display: grid; gap: 20px; }
.place-card {
  display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 28px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; align-items: start;
}
.place-card h2 { margin-top: .35em; font-size: 1.25rem; }
.place-card p { font-size: .95rem; }
.badge {
  display: inline-block; font-size: .78rem; font-weight: 700;
  background: var(--forest-soft); color: var(--forest);
  border-radius: 999px; padding: 3px 12px; letter-spacing: .02em;
}
.badge-nearby { background: #e8eef7; color: var(--royal); }

/* ---------- notices / empty / faq / forms ---------- */
.notice { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f4f7fc; padding: 16px 20px; margin: 0 0 1.5em; font-size: .94rem; }
.notice-warning { border-color: #e5cf8a; background: #fbf6e7; }
.notice p { margin: .4em 0 0; }
.todo-note { background: #fffdf4; border: 1px dashed var(--gold); border-radius: var(--radius-sm); padding: 12px 16px; font-size: .88rem; margin: 1.2em 0; color: var(--muted); }
.todo-note code, p code { background: #f1f3f7; padding: 1px 6px; border-radius: 4px; font-size: .88em; }
.source-note { font-size: .86rem; color: var(--muted); border-left: 2px solid var(--gold-bright); padding-left: 12px; }

.empty-state { text-align: center; border: 1px dashed #c6cdd8; border-radius: var(--radius); padding: 60px 24px; background: var(--bg-soft); }
.empty-title { font-size: 1.2rem; font-weight: 700; color: var(--navy); }

.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 10px; background: #fff; font-size: .95rem; }
.faq summary { font-weight: 600; color: var(--navy); cursor: pointer; }
.faq p { margin: .6em 0 0; color: var(--muted); }

.complaint-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin: 1em 0 2em; }
.complaint-form fieldset { border: none; padding: 0; margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.complaint-form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 12px; }
.complaint-form input, .complaint-form select, .complaint-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 13px;
  border: 1px solid #c6cdd8; border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem; background: var(--bg-soft); color: var(--muted);
}
.complaint-form .check { display: flex; gap: 10px; align-items: start; font-weight: 400; }
.complaint-form .check input { width: auto; margin-top: 7px; }

address { font-style: normal; background: var(--bg-soft); border-radius: var(--radius-sm); padding: 16px 20px; border: 1px solid var(--line); font-size: .95rem; }
.map-frame { width: 100%; min-height: 320px; border: 1px solid var(--line); border-radius: var(--radius); }

.article-body { font-size: 1.03rem; }
.article-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2em; }
.error-code { font-size: 4rem; font-weight: 700; color: var(--gold); margin: 0; line-height: 1.2; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-deep); color: #aeb8c8; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 60px 24px 36px; }
.site-footer strong { color: #fff; display: block; margin-bottom: 10px; font-size: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #aeb8c8; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 0; font-size: .82rem; }
.footer-bottom p { margin: 0; }

/* ---------- animation ---------- */
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .45s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .nav-cta { display: none; }
  .main-nav a { padding: 8px; font-size: .88rem; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; margin-left: auto; }
  .brand { margin-right: 0; }
  .main-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    flex-direction: column; align-items: stretch; padding: 12px 16px 20px;
  }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav a { display: block; padding: 11px 8px; }
  .sub-menu { position: static; display: flex !important; border: none; box-shadow: none; padding: 0 0 0 16px; }
  .nav-cta { display: inline-block; margin: 12px 0 0; text-align: center; }
  .grid-2 { grid-template-columns: 1fr; }
  .place-card { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-media .ph-img, .hero-media .ph { height: 300px; }
  .mission-card { grid-template-columns: 40px 1fr; }
  .mission-icon { display: none; }
  .section { padding: 60px 0; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}
