/* ThaiRAP — shared styles */
:root {
  --navy: #0e2a47;
  --navy-2: #163a5f;
  --amber: #f4b400;
  --amber-dark: #c99300;
  --ink: #15202b;
  --muted: #5a6b7c;
  --line: #e3e8ee;
  --soft: #f4f6f9;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(14, 42, 71, 0.08);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.75;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-2); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .6em; color: var(--navy); }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section.alt { background: var(--soft); }
.eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--amber-dark); margin-bottom: .6em;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46em; }

/* 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(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 1.35rem; }
.brand svg { width: 34px; height: 34px; }
.brand b { color: var(--amber-dark); }

.site-nav > ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; align-items: center; }
.site-nav a { display: block; padding: 8px 14px; text-decoration: none; color: var(--ink); border-radius: 8px; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--soft); color: var(--navy); }
.site-nav .has-sub { position: relative; }
.site-nav .has-sub > a::after { content: " ▾"; font-size: .75em; color: var(--muted); }
.site-nav .sub {
  list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease;
}
.site-nav .has-sub:hover .sub, .site-nav .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub a { padding: 8px 12px; font-weight: 400; }
.nav-cta { background: var(--navy); color: var(--white) !important; }
.nav-cta:hover { background: var(--navy-2) !important; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--navy); }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 68px; left: 0; right: 0; background: var(--white);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none;
    max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .site-nav.open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 0; }
  .site-nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 14px; }
  .site-nav .has-sub > a::after { content: ""; }
  .nav-cta { margin-top: 8px; text-align: center; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background: radial-gradient(1200px 500px at 85% -10%, #2a5a8a 0%, transparent 60%), var(--navy);
  padding: 96px 0 120px;
}
.hero::after { /* road lane marking */
  content: ""; position: absolute; left: 0; right: 0; bottom: 34px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--amber) 0 60px, transparent 60px 110px);
  opacity: .9;
}
.hero h1 { color: var(--white); max-width: 18em; }
.hero .lead { color: #c9d6e3; }
.hero .eyebrow { color: var(--amber); }
.tagline { margin-top: 1.4em; font-size: .95rem; color: #9fb3c8; }
.tagline strong { color: var(--white); font-weight: 600; }

.page-hero { background: var(--navy); color: var(--white); padding: 64px 0 56px; position: relative; }
.page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: repeating-linear-gradient(90deg, var(--amber) 0 48px, transparent 48px 90px);
}
.page-hero h1 { color: var(--white); margin: 0; }
.page-hero p { color: #c9d6e3; margin: .6em 0 0; max-width: 46em; }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8em; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  text-decoration: none; font-weight: 600; border: 2px solid transparent; transition: .15s;
}
.btn-primary { background: var(--amber); color: var(--navy); }
.btn-primary:hover { background: #ffc61a; }
.btn-ghost { border-color: rgba(255,255,255,.4); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-2); }

/* Grid & cards */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.icon {
  width: 46px; height: 46px; border-radius: 12px; background: #fff4d1; color: var(--amber-dark);
  display: grid; place-items: center; margin-bottom: 14px;
}
.icon svg { width: 24px; height: 24px; }

.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

.stat { border-left: 4px solid var(--amber); padding: 6px 0 6px 18px; margin-bottom: 22px; }
.stat .num { font-size: 2.4rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat .label { color: var(--muted); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 30px 44px; }
.timeline li::before {
  content: ""; position: absolute; left: 3px; top: 7px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--amber); border: 4px solid var(--white); box-shadow: 0 0 0 2px var(--amber);
}
.timeline .date { font-weight: 700; color: var(--navy); }

/* Reports */
.report { display: flex; flex-direction: column; }
.report .tag { font-size: .8rem; font-weight: 600; color: var(--amber-dark); text-transform: uppercase; letter-spacing: .06em; }
.report h3 { margin-top: .3em; }
.report .btn { margin-top: auto; align-self: flex-start; }
.report p { color: var(--muted); }

/* Team */
.person { text-align: center; }
.avatar {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center;
  background: var(--navy); color: var(--amber); font-size: 1.6rem; font-weight: 700;
}
.person .role { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-dark); }
.person .en { color: var(--muted); font-size: .95rem; }

/* Star scale */
.stars { display: grid; gap: 10px; }
.star-row { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); }
.star-row .badge { min-width: 92px; padding: 6px 10px; border-radius: 8px; color: var(--white); font-weight: 700; text-align: center; letter-spacing: .05em; }
.s5 { background: #1f9d55; } .s4 { background: #f2c200; color: var(--ink) !important; }
.s3 { background: #f08a00; } .s2 { background: #d62f2f; } .s1 { background: #111; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; position: relative; padding: 18px 20px 18px 66px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.steps li::before {
  content: counter(step); position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy); color: var(--amber); font-weight: 700; display: grid; place-items: center;
}

/* Activities */
.activity { display: grid; grid-template-columns: 170px 1fr; gap: 28px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.activity:last-child { border-bottom: 0; }
.activity .when { font-weight: 700; color: var(--navy); }
.activity .when span { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; }
@media (max-width: 700px) { .activity { grid-template-columns: 1fr; gap: 6px; } }

.empty { text-align: center; padding: 56px 24px; border: 2px dashed var(--line); border-radius: var(--radius); }

/* Contact */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 14px; margin-bottom: 18px; }
.contact-list svg { width: 22px; height: 22px; flex: none; margin-top: 4px; color: var(--amber-dark); }

/* Footer */
.site-footer { background: #0a1f35; color: #a9bbcd; padding: 48px 0 28px; font-size: .95rem; }
.site-footer a { color: #dfe8f1; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: var(--white); margin: 0 0 .7em; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4em; }
.footer-bottom { border-top: 1px solid #1d3550; margin-top: 32px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
