@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;600;800&family=Sarabun:wght@300;400;500&display=swap');

/* ─── Variables ───────────────────────────────────────────── */
:root {
  --gold:        #F5A623;
  --gold-deep:   #C8820C;
  --teal:        #0D6B6B;
  --teal-light:  #12948D;
  --teal-pale:   #E0F7F5;
  --saffron:     #E8480A;
  --cream:       #FEF9EE;
  --ink:         #1A1A2E;
  --ink-light:   #3D3D5C;
  --wheel:       #2A2A2A;
  --radius-card: 20px;
  --shadow-card: 0 6px 32px rgba(13,107,107,.12), 0 1px 4px rgba(0,0,0,.06);
}

/* ─── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Sarabun', sans-serif;
  background: var(--cream);
  color: var(--ink-light);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Decorative road stripe ──────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--gold) 0px, var(--gold) 40px,
    transparent 40px, transparent 70px
  );
  animation: road 1.2s linear infinite;
  z-index: 100;
}
@keyframes road { to { background-position: 70px 0; } }

/* ─── Wrapper ─────────────────────────────────────────────── */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 60%, #1AB8AA 100%);
  border-radius: var(--radius-card);
  padding: 48px 40px 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(13,107,107,.30);
  animation: heroIn .7s cubic-bezier(.22,1,.36,1) both;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(-28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Decorative circle top-right */
.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(245,166,35,.35) 0%, transparent 70%);
  border-radius: 50%;
}

/* Wheels decor */
.hero::after {
  content: '🛺';
  position: absolute;
  bottom: 16px; right: 32px;
  font-size: 5rem;
  opacity: .18;
  transform: scaleX(-1);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.2));
}

.hero h1 {
  font-family: 'Kanit', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  color: #fff;
  letter-spacing: -.5px;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
  margin-bottom: 12px;
}

.hero p {
  color: rgba(255,255,255,.88);
  font-size: 1.05rem;
  max-width: 65ch;
  font-weight: 300;
}

/* Badge */
.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--wheel);
  font-family: 'Kanit', sans-serif;
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 14px;
  border-radius: 40px;
  margin-bottom: 16px;
}

/* ─── Cards grid ──────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

/* ─── Card ────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-card);
  border-top: 4px solid var(--teal-light);
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
  opacity: 0;
  animation: cardIn .5s cubic-bezier(.22,1,.36,1) forwards;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(13,107,107,.18);
}

/* Alternating accent colours */
.card:nth-child(2n)   { border-top-color: var(--gold); }
.card:nth-child(3n)   { border-top-color: var(--saffron); }

/* Staggered entrance */
.card:nth-child(1) { animation-delay: .10s; }
.card:nth-child(2) { animation-delay: .18s; }
.card:nth-child(3) { animation-delay: .26s; }
.card:nth-child(4) { animation-delay: .34s; }
.card:nth-child(5) { animation-delay: .42s; }
.card:nth-child(6) { animation-delay: .50s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Card icon chip */
.card-icon {
  font-size: 1.6rem;
  width: 48px; height: 48px;
  background: var(--teal-pale);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}

.card:nth-child(2n) .card-icon { background: #FEF3D7; }
.card:nth-child(3n) .card-icon { background: #FDE9DF; }

h2 {
  font-family: 'Kanit', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -.2px;
}

/* ─── Lists ───────────────────────────────────────────────── */
ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

ul li {
  padding-left: 22px;
  position: relative;
  font-size: .95rem;
}

ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: .8rem;
  top: 2px;
}

/* ─── Progress bar (JS-driven) ────────────────────────────── */
.progress-bar {
  height: 4px;
  background: var(--teal-pale);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 14px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-light), var(--gold));
  border-radius: 99px;
  width: 0;
  transition: width 1.2s cubic-bezier(.22,1,.36,1);
}

/* ─── Scroll-to-top btn ───────────────────────────────────── */
#back-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 48px; height: 48px;
  background: var(--teal);
  color: #fff;
  border: none; border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(13,107,107,.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 50;
}
#back-top.visible { opacity: 1; pointer-events: auto; }
#back-top:hover   { transform: translateY(-3px) scale(1.08); background: var(--teal-light); }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 32px 24px; }
  .hero::after { font-size: 3.5rem; }
  .cards-grid { grid-template-columns: 1fr; }
}
