/* RideMate ChiangMai — น้ำเงินกรมท่า · ดำ · ทอง */
:root {
  --navy: #0b1830;
  --navy-2: #13254a;
  --ink: #0d0f14;
  --gold: #c9a24b;
  --gold-2: #e2c27a;
  --paper: #f7f5f0;
  --paper-2: #efebe2;
  --line: #ddd6c6;
  --muted: #5b6272;
  --r: 14px;
  --wrap: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: 'IBM Plex Sans Thai', 'Noto Sans Thai', sans-serif;
  font-size: 17px; line-height: 1.7; color: var(--ink); background: var(--paper);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.45; margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: clamp(28px, 4.2vw, 44px); letter-spacing: -.01em; }
h3 { font-size: 19px; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic--lg { width: 28px; height: 28px; }
.ic--xl { width: 40px; height: 40px; }

.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .08em; color: var(--gold); margin-bottom: .6em; display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow--gold { color: var(--gold-2); }

/* ปุ่ม */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn--lg { min-height: 54px; padding: 12px 28px; font-size: 17px; }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--gold-2); box-shadow: 0 8px 24px -10px rgba(201,162,75,.8); }
.btn--ghost { border-color: rgba(255,255,255,.5); color: #fff; background: rgba(255,255,255,.04); }
.btn--ghost:hover { background: rgba(255,255,255,.14); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-2); }

/* แถบบน */
.topbar { background: var(--ink); color: #c9cdd6; font-size: 14px; }
.topbar__in { display: flex; gap: 22px; justify-content: flex-end; align-items: center; min-height: 38px; flex-wrap: wrap; }
.topbar__in > * { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.topbar .ic { width: 15px; height: 15px; color: var(--gold); }
.topbar a:hover { color: #fff; }
@media (max-width: 767px) { .topbar { display: none; } }

/* หัวเว็บ — ห้ามใส่ backdrop-filter/transform/filter เพราะเมนูมือถือเป็น position:fixed */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--navy); color: #fff; border-bottom: 1px solid rgba(201,162,75,.25); }
.hdr__in { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 52px; height: 52px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--gold); }
.brand__txt { display: flex; flex-direction: column; line-height: 1.45; }
.brand__txt b { font-size: 20px; letter-spacing: .01em; }
.brand__txt small { font-size: 13px; color: var(--gold-2); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { padding: 8px 12px; font-size: 15px; text-decoration: none; color: #dfe3ec; border-radius: 8px; }
.nav a:not(.btn):hover { color: var(--gold-2); }
.nav__cta { margin-left: 10px; min-height: 44px; }
.burger { display: none; background: none; border: 0; color: #fff; width: 48px; height: 48px; align-items: center; justify-content: center; cursor: pointer; }
.burger .ic { width: 26px; height: 26px; }
@media (max-width: 1023px) {
  .burger { display: inline-flex; position: relative; z-index: 61; }
  .nav {
    position: fixed; inset: 0; z-index: 60; background: var(--navy);
    flex-direction: column; justify-content: center; gap: 6px; padding: 80px 24px 40px;
    opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s;
  }
  .nav a:not(.btn) { font-size: 22px; padding: 10px 16px; }
  .nav__cta { margin: 18px 0 0; }
  body.nav-open .nav { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; }
}

/* แบนเนอร์ */
.hero { position: relative; min-height: min(86vh, 760px); display: flex; align-items: center; color: #fff; overflow: hidden; background: var(--navy); }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 55%; will-change: transform; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,16,32,.88) 0%, rgba(8,16,32,.62) 45%, rgba(8,16,32,.08) 80%), linear-gradient(0deg, rgba(8,16,32,.5), transparent 40%); }
.hero__in { position: relative; z-index: 1; padding: 72px 0 80px; }
.hero h1 { font-size: clamp(32px, 5.6vw, 62px); line-height: 1.4; margin-bottom: .45em; max-width: 13em; }
.hero h1 span { color: var(--gold-2); }
.hero__lead { font-size: clamp(17px, 1.6vw, 19px); max-width: 34em; color: #e3e7ef; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 767px) {
  .hero { min-height: 0; height: 70vh; min-height: 520px; max-height: 70vh; align-items: flex-end; }
  .hero__media img { object-position: 72% 50%; }
  .hero::after { background: linear-gradient(0deg, rgba(8,16,32,.94) 0%, rgba(8,16,32,.7) 50%, rgba(8,16,32,.15) 100%); }
  .hero__in { padding: 0 0 32px; }
  .hero__lead { font-size: 16px; }
  .hero__cta .btn { flex: 1 1 100%; }
}
@media (max-height: 640px) and (max-width: 767px) { .hero { max-height: none; height: auto; } .hero__in { padding-top: 140px; } }

/* จุดเด่น */
.trust { background: var(--ink); color: #fff; }
.trust__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 28px 0; }
.trust__item { padding: 16px 12px; text-align: left; }
.trust__item .ic { color: var(--gold); margin-bottom: 10px; }
.trust__item h3 { font-size: 16px; margin-bottom: 4px; }
.trust__item p { font-size: 14px; color: #a9b0bd; margin: 0; line-height: 1.6; }
@media (min-width: 480px) { .trust__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .trust__grid { grid-template-columns: repeat(4, 1fr); padding: 40px 0; } .trust__item { padding: 8px 20px; border-left: 1px solid rgba(201,162,75,.3); } .trust__item h3 { font-size: 17px; } }

/* ส่วนทั่วไป */
.section { padding: 72px 0; }
@media (min-width: 1024px) { .section { padding: 110px 0; } }
.section--paper2 { background: var(--paper-2); }
.section--navy { background: var(--navy); color: #fff; }
.head { max-width: 640px; margin-bottom: 36px; }
.head__sub { color: var(--muted); font-size: 17px; }
.head--light .head__sub { color: #b9c1d1; }

/* เกี่ยวกับ */
.about__grid { display: grid; gap: 32px; align-items: center; }
.about__img img { width: 100%; border-radius: var(--r); aspect-ratio: auto; }
.about__img { margin: 0; }
.about__txt p { color: #33394a; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.ticks .ic { color: var(--gold); margin-top: 4px; }
@media (min-width: 900px) { .about__grid { grid-template-columns: 1.05fr 1fr; gap: 64px; } }

/* บริการ */
.svc__feature { display: grid; background: var(--navy); color: #fff; border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.svc__feature img { width: 100%; height: auto; }
.svc__feature-txt { padding: 26px 22px 28px; }
.svc__feature-txt .ic { color: var(--gold); margin-bottom: 8px; }
.svc__feature-txt h3 { font-size: clamp(22px, 2.6vw, 30px); }
.svc__feature-txt p { color: #c7cedb; }
@media (min-width: 768px) { .svc__feature { grid-template-columns: 1.15fr 1fr; align-items: center; } .svc__feature-txt { padding: 40px; } }
.svc__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.svc { background: #fff; border-radius: var(--r); padding: 20px 16px; transition: transform .2s var(--ease), box-shadow .2s; }
.svc:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(11,24,48,.35); }
.svc .ic { color: var(--gold); margin-bottom: 10px; }
.svc h3 { font-size: 16px; margin-bottom: 6px; }
.svc p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }
@media (min-width: 768px) { .svc__grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } .svc { padding: 28px 24px; } .svc h3 { font-size: 18px; } .svc p { font-size: 15px; } }

/* รถ */
.fleet__grid { display: grid; gap: 12px; }
.car { position: relative; border: 1px solid rgba(201,162,75,.28); border-radius: var(--r); padding: 28px 24px; background: rgba(255,255,255,.03); transition: transform .2s var(--ease), border-color .2s; }
.car:hover { transform: translateY(-3px); border-color: var(--gold); }
.car .ic--xl { color: var(--gold); margin-bottom: 14px; }
.car h3 { font-size: 22px; }
.car__fit { color: #b9c1d1; font-size: 15px; }
.car ul { list-style: none; padding: 16px 0 0; margin: 0; border-top: 1px solid rgba(255,255,255,.1); display: grid; gap: 8px; }
.car li { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.car li .ic { color: var(--gold-2); width: 18px; height: 18px; }
.car--hl { background: linear-gradient(160deg, rgba(201,162,75,.16), rgba(201,162,75,.03)); border-color: var(--gold); }
.car__tag { position: absolute; top: 20px; right: 20px; background: var(--gold); color: var(--ink); font-size: 13px; font-weight: 700; padding: 2px 12px; border-radius: 999px; }
@media (min-width: 768px) { .fleet__grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

/* ราคา */
.prices__grid { display: grid; gap: 32px; }
.prices__grid p { color: #33394a; }
.ptable { background: #fff; border-radius: var(--r); padding: 8px 22px 18px; box-shadow: 0 20px 50px -34px rgba(11,24,48,.4); }
.prow { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--paper-2); font-size: 16px; }
.prow span:last-child { color: var(--navy); font-weight: 600; text-align: right; white-space: nowrap; }
.prow--head { font-size: 14px; color: var(--muted); font-weight: 600; }
.prow--head span:last-child { color: var(--muted); }
.ptable__note { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
@media (max-width: 479px) { .prow { flex-direction: column; gap: 2px; } .prow span:last-child { text-align: left; } .prow--head { display: none; } }
@media (min-width: 900px) { .prices__grid { grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; } }

/* ขั้นตอน */
.steps__list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; counter-reset: s; }
.steps__list li { background: #fff; border-radius: var(--r); padding: 22px 18px; position: relative; }
.steps__list b { display: block; font-size: 30px; color: var(--gold); line-height: 1.4; margin-bottom: 8px; font-weight: 700; }
.steps__list h3 { font-size: 17px; margin-bottom: 6px; }
.steps__list p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }
@media (min-width: 900px) {
  .steps__list { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .steps__list li { padding: 28px 24px; }
  .steps__list li:not(:last-child)::after { content: ""; position: absolute; top: 44px; right: -16px; width: 16px; height: 1px; background: var(--gold); }
}

/* แกลเลอรี — ไม่ครอป ใช้สัดส่วนจริงของไฟล์ */
.gal { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gal__item { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; overflow: hidden; }
.gal__item img { width: 100%; height: auto; transition: transform .4s var(--ease); }
.gal__item:hover img { transform: scale(1.03); }
.gal__item--wide { grid-column: 1 / -1; }
.gal__more { margin-top: 22px; }
.gal__more a { color: var(--navy); font-weight: 600; }
@media (min-width: 1024px) { .gal { grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; gap: 14px; } .gal__item--wide { grid-column: 1; grid-row: 1 / span 2; align-self: center; } }

/* คำถาม */
.faq__in { display: grid; gap: 10px; }
.faq__list { display: grid; gap: 10px; }
.faq details { background: #fff; border-radius: 12px; padding: 0 20px; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { color: var(--gold); transition: transform .25s var(--ease); }
.faq details[open] summary .ic { transform: rotate(180deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }
@media (min-width: 900px) { .faq__in { grid-template-columns: 1fr 1.6fr; gap: 64px; } }

/* ติดต่อ */
.contact__grid { display: grid; gap: 36px; }
.contact__lead { color: #c7cedb; }
.contact__main { margin: 8px 0 26px; }
.clist { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 14px; }
.clist li { display: flex; gap: 14px; align-items: flex-start; }
.clist .ic { color: var(--gold); margin-top: 4px; }
.clist small { display: block; color: #98a2b5; font-size: 14px; line-height: 1.5; }
.clist a, .clist span { text-decoration: none; font-weight: 600; word-break: break-word; }
.clist a, .ftr a, .gal__more a, .skip { display: inline-flex; align-items: center; min-height: 44px; }
.clist li { align-items: center; }
.clist li .ic { margin-top: 0; }
.clist a:hover { color: var(--gold-2); }
.social { display: flex; gap: 12px; }
.social a { display: inline-flex; width: 44px; height: 44px; transition: transform .2s var(--ease); }
.social a:hover { transform: translateY(-3px); }
.social svg { width: 44px; height: 44px; }
.tripform { background: #fff; color: var(--ink); border-radius: var(--r); padding: 26px 20px; display: grid; gap: 14px; align-self: start; }
.tripform h3 { font-size: 22px; margin: 0; }
.tripform__hint { font-size: 14px; color: var(--muted); margin: -6px 0 0; }
.tripform label { display: grid; gap: 6px; font-size: 15px; font-weight: 600; }
.tripform input, .tripform select, .tripform textarea {
  font: inherit; font-size: 16px; font-weight: 400; width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink);
}
.tripform textarea { resize: vertical; }
.tripform input:focus, .tripform select:focus, .tripform textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.tripform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tripform__btns { display: grid; gap: 10px; }
.tripform .btn--ghost { color: var(--navy); border-color: var(--line); background: #fff; }
.tripform .btn--ghost:hover { background: var(--paper-2); }
.tripform__err { color: #b42318; font-size: 14px; margin: 0; }
.tripform__ok { color: #067647; font-size: 14px; margin: 0; }
@media (min-width: 480px) { .tripform__btns { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .contact__grid { grid-template-columns: 1fr 1fr; gap: 64px; } .tripform { padding: 34px; } }
.map { margin-top: 48px; }
.map iframe { width: 100%; height: 340px; border: 0; border-radius: var(--r); display: block; }

/* ท้ายเว็บ */
.ftr { background: var(--ink); color: #b9c0cc; padding: 56px 0 24px; font-size: 15px; }
.ftr__grid { display: grid; gap: 28px; }
.ftr__brand { display: flex; gap: 14px; align-items: center; }
.ftr__brand img { width: 64px; height: 64px; border-radius: 50%; background: #fff; }
.ftr b { color: #fff; }
.ftr h4 { color: var(--gold-2); font-size: 15px; margin-bottom: 10px; }
.ftr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ftr a { text-decoration: none; }
.ftr a:hover { color: #fff; }
.ftr__copy { border-top: 1px solid rgba(255,255,255,.08); margin-top: 36px; padding-top: 20px; font-size: 14px; }
@media (min-width: 768px) { .ftr__grid { grid-template-columns: 1.4fr 1fr 1fr; } }

/* ปุ่มลอยมือถือ */
.fab { display: none; }
@media (max-width: 767px) {
  .fab { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40; }
  .fab a { height: 52px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; font-weight: 700; text-decoration: none; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); }
  .fab__line { background: #06C755; color: #fff; }
  .fab__line svg { width: 26px; height: 26px; }
  .fab__tel { background: var(--gold); color: var(--ink); }
  body { padding-bottom: 76px; }
  body.nav-open .fab { display: none; }
}

/* รูปขยาย */
.lb { position: fixed; inset: 0; z-index: 90; background: rgba(5,10,20,.94); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lb[hidden] { display: none; }
.lb img { max-width: 100%; max-height: 88vh; width: auto; height: auto; border-radius: 8px; }
.lb__x { position: absolute; top: 14px; right: 14px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ปรากฏตอนเลื่อน */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero__media img { transform: none !important; }
  * { transition-duration: 0s !important; }
}
