/* website/assets/style.css */
:root {
  --orange: #ff7a00;
  --deep-orange: #e65c00;
  --yellow: #ffc21a;
  --cream: #fff8e7;
  --ink: #3a2a12;
  --muted: #7a6a52;
  --line: #f0e3c8;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(58, 42, 18, 0.1);
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Thai", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--deep-orange); }
a:hover { color: var(--orange); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--white); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Navbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 248, 231, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--deep-orange); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: var(--white); box-shadow: 0 6px 18px rgba(255, 122, 0, 0.35); }
.btn-primary:hover { background: var(--deep-orange); color: var(--white); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; pointer-events: none; box-shadow: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  background: linear-gradient(160deg, #fff3d6 0%, var(--cream) 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-block; background: var(--yellow); color: var(--ink);
  font-weight: 800; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin: 0 0 16px; }
.hero h1 span { color: var(--orange); }
.hero p.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { display: flex; justify-content: center; }
.hero-art .card-logo {
  background: var(--white); border-radius: 32px; padding: 28px; box-shadow: var(--shadow);
  text-align: center; max-width: 280px;
}
.hero-art .card-logo img { width: 120px; height: 120px; border-radius: 28px; }
.hero-art .card-logo strong { display: block; font-size: 1.6rem; margin-top: 12px; }
.hero-art .card-logo span { color: var(--muted); font-size: 0.95rem; }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
section.alt { background: var(--white); }
h2.section-title { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin: 0 0 8px; text-align: center; }
p.section-sub { text-align: center; color: var(--muted); margin: 0 auto 36px; max-width: 40em; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 2px 10px rgba(58, 42, 18, 0.04);
}
section.alt .card { background: var(--cream); }
.card .icon { font-size: 2rem; line-height: 1; margin-bottom: 10px; }
.card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; }
.steps li {
  counter-increment: step; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 20px; position: relative;
}
.steps li::before {
  content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: var(--white);
  font-weight: 800; margin-bottom: 10px;
}
.steps h3 { margin: 0 0 4px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.notice {
  background: #fff3d6; border: 1px solid var(--yellow); border-radius: var(--radius);
  padding: 16px 20px; color: var(--ink); font-size: 0.95rem;
}

/* ---------- Document pages (policy / terms / support) ---------- */
.page-head { padding: 48px 0 24px; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.page-head p { margin: 0; color: var(--muted); }

.doc {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; margin-bottom: 56px; box-shadow: var(--shadow);
}
.doc h2 { margin: 32px 0 8px; font-size: 1.35rem; padding-top: 8px; border-top: 1px solid var(--line); }
.doc h2:first-of-type { margin-top: 8px; border-top: 0; }
.doc h3 { margin: 20px 0 6px; font-size: 1.05rem; }
.doc p, .doc li { color: #4d3f2a; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 4px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.95rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--cream); }
.toc { background: var(--cream); border-radius: 12px; padding: 14px 20px; margin: 0 0 8px; }
.toc ol { margin: 6px 0 0; columns: 2; column-gap: 32px; }
.toc a { text-decoration: none; }

.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 24px; }
.faq details {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 10px 0;
}
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 0; color: #4d3f2a; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #e9dfcc; padding: 40px 0 28px; }
.site-footer a { color: #ffd98a; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; }
.footer-small { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 0.85rem; color: #bfb39a; }
.footer-small .admin-link { opacity: 0.75; }
.footer-small .admin-link:hover { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .nav { flex-direction: column; align-items: flex-start; padding: 10px 0; }
  .doc { padding: 20px; }
  .hero { padding-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
