/* ไร่ดี Landing — Prompt + โทนทุ่งนา / ครีม (อ้างอิง showcase) */
:root {
  --green-brand: #73c088;
  --green-forest: #2e7d32;
  --green-dark: #1b5e20;
  --brown-text: #4e342e;
  --brown-muted: #6d4c41;
  --cream-page: #f5f5ed;
  --cream-card: #fafaf4;
  --white: #ffffff;
  --line-green: #06c755;
  --radius: 16px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 32px rgba(46, 125, 50, 0.12);
  --font: 'Prompt', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(0.95rem, 0.9rem + 0.35vw, 1.05rem);
  line-height: 1.65;
  color: var(--brown-text);
  background: var(--cream-page);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

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

a {
  color: var(--green-dark);
  font-weight: 600;
}

/* ——— Header (พื้นขาว โลโก้เข้ม) ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.879);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(46, 125, 50, 0.1);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.55rem clamp(0.85rem, 3vw, 1.35rem);
  padding-top: calc(0.55rem + env(safe-area-inset-top, 0));
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'logo nav actions';
  align-items: center;
  gap: 0.5rem 1rem;
}

.logo-link {
  grid-area: logo;
  display: flex;
  align-items: center;
  text-decoration: none;
  min-width: 0;
}

.logo-img {
  height: clamp(32px, 8vw, 38px);
  width: auto;
  max-width: min(140px, 42vw);
  object-fit: contain;
}

.nav-toggle {
  display: none;
  grid-area: toggle;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: rgba(46, 125, 50, 0.08);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--brown-text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-main {
  grid-area: nav;
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.35rem);
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.nav-main a {
  color: var(--brown-text);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.88rem, 2.5vw, 0.95rem);
  padding: 0.35rem 0.15rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-main a:hover {
  color: var(--green-forest);
}

.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .header-inner {
    grid-template-columns: 1fr auto auto;
    grid-template-areas:
      'logo toggle actions'
      'nav nav nav';
  }

  .nav-toggle {
    display: flex;
  }

  .nav-main {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.35rem 0 0.75rem;
    border-top: 1px solid rgba(46, 125, 50, 0.12);
    margin-top: 0.25rem;
  }

  .nav-main.nav-is-open {
    display: flex;
  }

  .nav-main a {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid rgba(78, 52, 46, 0.08);
    min-height: 48px;
  }

  .nav-main a:last-child {
    border-bottom: none;
  }
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none !important;
  }

  .nav-main {
    display: flex !important;
  }
}

.btn-lang-header {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid rgba(78, 52, 46, 0.2);
  color: var(--brown-text);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-lang-header:hover {
  border-color: var(--green-brand);
  color: var(--green-forest);
}

.lang-ico {
  font-size: 1rem;
  line-height: 1;
}

.btn-header-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-forest);
  color: #fff !important;
  text-decoration: none;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--shadow-soft);
}

.btn-header-download:hover {
  background: var(--green-dark);
}

/* ——— Hero carousel — slide 1: illustration_1 + overlay ——— */
.hero-carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: min(88vh, 900px);
}

.hero-carousel-viewport {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.hero-carousel-track {
  display: flex;
  height: 100%;
  min-height: min(88vh, 900px);
  transition: transform 0.55s cubic-bezier(0.33, 1, 0.68, 1);
  will-change: transform;
}

.hero-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-height: min(88vh, 900px);
  box-sizing: border-box;
}

.hero-slide--home,
.hero-slide--market {
  padding: 2rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.hero-slide--home {
  background: var(--cream-page) url('assets/images/illustration_1.jpg')
    76% center / cover no-repeat;
}

/* สไลด์ตลาด — รูปเต็มพื้นที่แบบสไลด์ 1 + ถมขาวซ้ายผ่าน .hero-overlay */
.hero-slide--market {
  background: var(--cream-page) url('assets/images/illustration_4.jpg')
    72% center / cover no-repeat;
}

.hero-carousel-btn {
  position: absolute;
  top: 40%;
  z-index: 6;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  font-size: 1.65rem;
  line-height: 1;
  font-weight: 700;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}

.hero-carousel-btn:hover {
  background: #fff;
}

.hero-carousel-btn:focus-visible {
  outline: 2px solid var(--green-forest);
  outline-offset: 3px;
}

.hero-carousel-btn--prev {
  left: max(0.5rem, env(safe-area-inset-left, 0px));
}

.hero-carousel-btn--next {
  right: max(0.5rem, env(safe-area-inset-right, 0px));
}

.hero-carousel-dots {
  position: absolute;
  bottom: max(1.15rem, calc(0.65rem + env(safe-area-inset-bottom, 0px)));
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.hero-carousel-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 2px solid rgba(46, 125, 50, 0.85);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}

.hero-carousel-dot.is-active {
  background: var(--green-forest);
  transform: scale(1.15);
}

.hero-carousel-dot:focus-visible {
  outline: 2px solid var(--green-forest);
  outline-offset: 3px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* ฝั่งซ้าย (ข้อความ) ขาวขึ้น — ค่อยๆ โปร่งไปทางขวา */
  background: linear-gradient(
    to right,
    rgba(252, 252, 247, 0.93) 0%,
    rgba(252, 252, 247, 0.86) 18%,
    rgba(255, 255, 255, 0.66) 36%,
    rgba(255, 255, 255, 0.30) 58%,
    rgba(245, 245, 237, 0.14) 82%,
    rgba(245, 245, 237, 0) 100%
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  align-content: start;
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.hero-copy {
  max-width: 34rem;
}

.hero-logo-mark {
  height: 52px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brown-text);
}

.hero-title {
  margin: 0 0 0.5rem;
  font-family: var(--font);
  font-size: clamp(2.5rem, 5.5vw, 3.6rem);
  font-weight: 700;
  color: var(--green-forest);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 1.5rem;
  font-size: 1.02rem;
  color: var(--brown-muted);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--green-forest);
  color: #fff !important;
  text-decoration: none;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(46, 125, 50, 0.35);
  border: none;
}

.btn-hero-primary:hover {
  background: var(--green-dark);
}

.btn-ico {
  font-size: 1.1rem;
}

.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--green-forest) !important;
  text-decoration: none;
  padding: 0.9rem 1.35rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid var(--green-forest);
}

.btn-hero-outline:hover {
  background: rgba(46, 125, 50, 0.08);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.hero-mascots {
  max-height: min(420px, 52vh);
  width: auto;
  margin: 0 auto;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.12));
}

/* ——— Story split — พื้นครีม + มาสคอตซ้าย ——— */
.story-split {
  padding: 2rem 1.25rem 3.25rem;
  background: var(--cream-page);
}

.story-split-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 860px) {
  .story-split-inner {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 3rem;
  }
}

.story-split-art {
  display: flex;
  justify-content: center;
}

.story-mascot-img {
  max-height: 400px;
  width: auto;
  margin: 0 auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.08));
}

.pill-badge {
  display: inline-block;
  background: rgba(115, 192, 136, 0.25);
  color: var(--green-dark);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
}

.story-heading {
  margin: 0 0 1rem;
  font-family: var(--font);
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--brown-text);
  line-height: 1.25;
}

.story-body {
  margin: 0 0 1rem;
  color: var(--brown-muted);
  max-width: 36rem;
}

.story-mission {
  margin: 1.25rem 0 1.5rem;
  font-weight: 600;
  color: var(--green-forest);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 36rem;
}

.btn-line-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--line-green);
  color: #fff !important;
  text-decoration: none;
  padding: 1rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1.02rem;
  box-shadow: 0 6px 24px rgba(6, 199, 85, 0.35);
}

.btn-line-large::before {
  content: '💬';
  font-size: 1.1rem;
}

.btn-line-large:hover {
  filter: brightness(1.05);
}

/* ——— Sections ทั่วไป ——— */
.section-inner {
  max-width: 1140px;
  margin: 0 auto;
}

.section-kicker {
  font-weight: 700;
  color: var(--green-forest);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.78rem;
  margin: 0 0 0.4rem;
}

.section-title {
  margin: 0 0 0.65rem;
  font-family: var(--font);
  font-size: clamp(1.65rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--green-dark);
}

.section-lead {
  margin: 0 0 1.75rem;
  color: var(--brown-muted);
  max-width: 44rem;
  line-height: 1.6;
}

/* ——— Features ——— */
.features {
  padding: 3.5rem 1.25rem;
  background: var(--cream-card);
  border-top: 1px solid rgba(46, 125, 50, 0.08);
  border-bottom: 1px solid rgba(46, 125, 50, 0.08);
}

.features-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 0.35rem;
}

.features-head-text .section-kicker {
  margin-bottom: 0.35rem;
}

.features-head-text .section-title {
  margin-bottom: 0;
}

.features-lead-below {
  margin-top: 0.65rem;
  margin-bottom: 1.75rem;
}

.btn-features-screens {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--green-brand);
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.12);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.btn-features-screens:hover {
  background: var(--green-brand);
  color: #fff;
}

.btn-features-screens:focus-visible {
  outline: 2px solid var(--green-forest);
  outline-offset: 3px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1.2rem;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.35rem;
  border: 1px solid rgba(115, 192, 136, 0.35);
  box-shadow: 0 6px 24px rgba(46, 125, 50, 0.06);
}

.feature-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green-brand), var(--green-forest));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
  color: var(--green-dark);
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--brown-muted);
  line-height: 1.55;
}

/* ——— ตลาดนัดเกษตรกร + LINE (ก่อน UX) — illustration_3 ——— */
.market-cta {
  position: relative;
  padding: 3.25rem 1.25rem;
  background-color: var(--cream-page);
  background-image:
    linear-gradient(
      180deg,
      rgba(252, 252, 247, 0.38) 0%,
      rgba(252, 252, 247, 0.32) 38%,
      rgba(252, 252, 247, 0.42) 100%
    ),
    url('assets/images/illustration_3.jpg');
  background-size: cover;
  /* ยึดด้านบนของภาพ — ไม่ให้โฟกัสกลาง (cover) ตัดหัวเกษตรกรทิ้ง */
  background-position: center top 25%;
  background-repeat: no-repeat;
  border-top: 1px solid rgba(46, 125, 50, 0.08);
  border-bottom: 1px solid rgba(78, 52, 46, 0.06);
}

.market-cta-inner {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.market-cta .section-kicker,
.market-cta .section-title,
.market-cta .market-cta-lead {
  text-shadow:
    0 0 1px rgba(252, 252, 247, 0.98),
    0 1px 4px rgba(252, 252, 247, 0.92),
    0 0 14px rgba(252, 252, 247, 0.65),
    0 1px 10px rgba(40, 40, 40, 0.12);
}

.market-cta-inner .section-kicker,
.market-cta-inner .section-title {
  text-align: center;
}

.market-cta-lead {
  margin-bottom: 1.5rem;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.market-cta-inner .btn-line-large {
  margin-top: 0.15rem;
}

/* ——— UX — พื้นครีมอ่อน ——— */
.ux-section {
  padding: 3.5rem 1.25rem;
  background: linear-gradient(180deg, #eef5ef 0%, var(--cream-page) 100%);
}

.ux-section-title {
  margin-top: 0;
  color: var(--green-dark);
}

.ux-section-lead {
  max-width: 46rem;
  margin-bottom: 1.5rem;
}

.ux-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 0.5rem;
}

.ux-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 720px) {
  .ux-pair {
    grid-template-columns: 1fr 1fr;
  }
}

.ux-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid rgba(78, 52, 46, 0.1);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.ux-feature-screen {
  border-left: 4px solid var(--green-brand);
  padding: 0 1.25rem 1.35rem;
  padding-top: 0;
  overflow: hidden;
}

.ux-feature-name {
  margin: 0 -1.25rem 0.85rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, var(--green-brand), var(--green-forest));
  color: #fff;
  font-family: var(--font);
  font-size: clamp(0.88rem, 2.1vw, 1rem);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}

.ux-feature-desc {
  margin: 0;
  color: var(--brown-text);
  font-size: 0.94rem;
  line-height: 1.55;
}

/* ม็อกโทรศัพท์ — ขอบเครื่อง มุมจอ เงา + notch / home indicator ให้รู้สึกเป็นมือถือจริง */
.phone-mock {
  margin-top: 0.85rem;
  box-sizing: border-box;
  --pm-h: 268px;
  height: var(--pm-h);
  width: calc(var(--pm-h) * 9 / 16);
  max-width: min(100%, 92vw);
  margin-left: auto;
  margin-right: auto;
  position: relative;
  padding: 20px 9px 16px;
  border-radius: 28px;
  background: linear-gradient(160deg, #3a3a3a 0%, #0f0f0f 42%, #080808 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 0 5px #1a1a1a,
    0 20px 48px rgba(0, 0, 0, 0.38),
    0 6px 16px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  color: #888;
  font-size: 0.82rem;
  text-align: center;
  overflow: hidden;
}

/* Dynamic Island จำลอง — อยู่เหนือพื้นที่จอ ไม่บังเนื้อสกรีนหลัก */
.phone-mock::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: min(38%, 76px);
  height: 18px;
  border-radius: 999px;
  background: #050505;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.07),
    0 1px 3px rgba(0, 0, 0, 0.6);
  z-index: 3;
  pointer-events: none;
}

/* แถบ home indicator เมื่อมีรูป */
.phone-mock:has(img)::after {
  content: '';
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  max-width: 56px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
  z-index: 3;
  pointer-events: none;
}

@media (min-width: 720px) {
  .phone-mock {
    --pm-h: 308px;
  }
}

@media (min-width: 960px) {
  .phone-mock {
    --pm-h: 348px;
  }
}

.phone-mock img {
  display: block;
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  object-fit: contain;
  object-position: top center;
  border-radius: 14px;
  background: #0e0e0e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 1;
}

/* กล่องยังไม่มีรูป */
.phone-mock:not(:has(img)) {
  padding: 1.5rem 0.65rem;
  align-items: center;
}

.phone-mock:not(:has(img))::after {
  content: 'Screenshot';
  position: static;
  transform: none;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  color: inherit;
}

/* ——— Footer ——— */
.site-footer {
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.92);
  padding: 2.5rem 1.25rem 2.75rem;
}

.footer-shell {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
  align-items: end;
  gap: clamp(0.75rem, 3vw, 2rem);
}

.footer-mascot {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.footer-mascot img {
  width: auto;
  max-height: min(160px, 28vw);
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.2));
}

.footer-mascot--left {
  justify-content: flex-end;
}

.footer-mascot--right {
  justify-content: flex-start;
}

.footer-main {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.footer-logo {
  height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  opacity: 0.98;
}

.site-footer strong {
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff;
}

.footer-contact {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: 0.92;
  max-width: 22rem;
}

.footer-email {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-email:hover {
  opacity: 0.95;
}

.footer-back-top {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.footer-back-top:hover {
  background: #fff;
}

.footer-back-top:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .footer-shell {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .footer-mascot--left,
  .footer-mascot--right {
    justify-content: center;
  }

  .footer-mascot img {
    max-height: 120px;
  }

  .footer-mascot--left {
    order: 2;
  }

  .footer-main {
    order: 1;
  }

  .footer-mascot--right {
    order: 3;
  }
}

/* ——— Responsive polish (มือถือ + เดสก์ท็อป) ——— */
.story-split,
.features,
.ux-section {
  padding-left: clamp(0.85rem, 4vw, 1.25rem);
  padding-right: clamp(0.85rem, 4vw, 1.25rem);
}

.site-footer {
  padding-left: clamp(0.85rem, 4vw, 1.25rem);
  padding-right: clamp(0.85rem, 4vw, 1.25rem);
  padding-bottom: calc(2.75rem + env(safe-area-inset-bottom, 0));
}

@media (max-width: 560px) {
  .features-head {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-features-screens {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 767px) {
  .header-inner {
    gap: 0.35rem 0.5rem;
    padding-left: clamp(0.65rem, 3.5vw, 1rem);
    padding-right: clamp(0.65rem, 3.5vw, 1rem);
  }

  .logo-img {
    max-width: min(118px, 36vw);
  }

  .btn-header-download {
    padding: 0.42rem 0.65rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .btn-lang-header {
    padding: 0.38rem 0.5rem;
    font-size: 0.8rem;
    gap: 0.28rem;
  }

  .btn-line-large {
    width: 100%;
    max-width: 22rem;
    box-sizing: border-box;
    text-align: center;
  }

  /* มือถือ: hero ไม่ดันสูงเท่าเดสก์ท็อป — เหลือพื้นที่เห็นเนื้อหา + แถบความเป็นส่วนตัว */
  .hero-carousel,
  .hero-carousel-track,
  .hero-slide {
    min-height: clamp(300px, 52svh, 520px);
  }

  .hero-slide--home,
  .hero-slide--market {
    padding-bottom: 2.75rem;
  }

  .hero-actions {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  /* ลูกศรอยู่เหนือจุด — ไม่ทับย่อหน้า */
  .hero-carousel-btn {
    top: auto;
    bottom: calc(2.65rem + env(safe-area-inset-bottom, 0px));
    transform: none;
  }

  /* มีโลโก้ในเฮดเดอร์แล้ว — ลดซ้ำซ้อนในแบนเนอร์ */
  .hero-logo-mark {
    display: none;
  }

  .hero-tagline {
    margin-top: 0.15rem;
  }
}

@media (max-width: 599px) {
  .hero-carousel,
  .hero-carousel-track,
  .hero-slide {
    min-height: clamp(280px, 46svh, 420px);
  }

  .hero-slide--home,
  .hero-slide--market {
    /* เว้นข้างมากพอให้ลูกศรไม่ทับข้อความ */
    padding: 0.85rem clamp(2.85rem, 8vw, 3.35rem) 3.1rem;
  }

  .hero-slide--home {
    background-position: 88% center;
  }

  .hero-slide--market {
    background-position: 82% center;
  }

  .hero-carousel-btn {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
    bottom: calc(2.35rem + env(safe-area-inset-bottom, 0px));
  }

  .hero-carousel-btn--prev {
    left: max(0.4rem, env(safe-area-inset-left, 0px));
  }

  .hero-carousel-btn--next {
    right: max(0.4rem, env(safe-area-inset-right, 0px));
  }

  .hero-carousel-dots {
    bottom: max(0.65rem, calc(0.35rem + env(safe-area-inset-bottom, 0px)));
  }

  .hero-overlay {
    background: linear-gradient(
      to right,
      rgba(252, 252, 247, 0.96) 0%,
      rgba(252, 252, 247, 0.9) 24%,
      rgba(255, 255, 255, 0.72) 48%,
      rgba(255, 255, 255, 0.35) 72%,
      rgba(245, 245, 237, 0.06) 100%
    );
  }

  .hero-inner {
    gap: 0.75rem;
  }

  .hero-title {
    font-size: clamp(1.65rem, 7.5vw, 2.1rem);
    line-height: 1.12;
    margin-bottom: 0.35rem;
  }

  .hero-tagline {
    font-size: clamp(0.88rem, 3.6vw, 1.02rem);
    margin-bottom: 0.2rem;
  }

  .hero-lead {
    font-size: clamp(0.86rem, 3.2vw, 0.98rem);
    line-height: 1.52;
    margin-bottom: 0.85rem;
    text-shadow:
      0 0 12px rgba(252, 252, 247, 0.95),
      0 1px 2px rgba(255, 255, 255, 0.85);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .btn-hero-primary,
  .btn-hero-outline {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
    padding: 0.62rem 1rem;
    font-size: 0.9rem;
  }

  .hero-mascots {
    max-height: min(260px, 36vh);
  }

  .story-split {
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
  }

  .story-mascot-img {
    max-height: min(280px, 42vh);
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .hero-carousel,
  .hero-carousel-track,
  .hero-slide {
    min-height: unset;
  }

  .hero-slide--home,
  .hero-slide--market {
    padding-top: 0.85rem;
    padding-bottom: 1.25rem;
  }

  .hero-slide--home {
    background-position: 72% center;
  }

  .hero-slide--market {
    background-position: 68% center;
  }

  .hero-mascots {
    max-height: min(200px, 48vh);
  }

}

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

  .hero-carousel-track {
    transition: none;
  }

  .nav-toggle-bar {
    transition: none;
  }
}

/* ——— Privacy consent: แถบล่างจอ (แบบเว็บภาครัฐ — ไม่บังเนื้อหาเต็มจอ) ——— */
body.privacy-consent-active {
  padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
}

body.privacy-consent-active.privacy-consent-panel-open {
  padding-bottom: calc(min(48vh, 420px) + 5.5rem + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 767px) {
  body.privacy-consent-active {
    padding-bottom: calc(5.35rem + env(safe-area-inset-bottom, 0px));
  }

  body.privacy-consent-active.privacy-consent-panel-open {
    padding-bottom: calc(min(42vh, 360px) + 4.75rem + env(safe-area-inset-bottom, 0px));
  }

  .privacy-consent__bar-inner {
    padding: 0.6rem 0.85rem;
    gap: 0.55rem 0.85rem;
  }

  .privacy-consent__summary {
    font-size: 0.8125rem;
    line-height: 1.45;
    margin-bottom: 0.2rem;
  }

  .privacy-consent__readmore {
    font-size: 0.8125rem;
  }

  .btn-privacy-accept {
    padding: 0.52rem 1.15rem;
    font-size: 0.88rem;
    min-width: 6.5rem;
  }
}

@media (min-width: 768px) {
  body.privacy-consent-active {
    padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  }
}

.privacy-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  pointer-events: none;
}

.privacy-consent[hidden] {
  display: none !important;
}

.privacy-consent > * {
  pointer-events: auto;
}

.privacy-consent__panel {
  order: 1;
  flex: 0 0 auto;
  max-height: min(48vh, 420px);
  overflow: hidden;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #f6f6f0;
  box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.07);
}

.privacy-consent__panel[hidden] {
  display: none !important;
}

.privacy-consent__full-scroll {
  max-height: min(48vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.9rem 1.15rem 1.1rem;
  background: #fdfdf8;
  outline: none;
}

.privacy-consent__full-scroll:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(46, 125, 50, 0.3);
}

.privacy-inline-doc-title {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--green-forest);
  line-height: 1.3;
}

.privacy-consent__full-scroll .privacy-updated {
  margin: 0 0 0.85rem;
}

.privacy-consent__bar {
  order: 2;
  flex: 0 0 auto;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.privacy-consent__bar-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding: 0.85rem 1.15rem;
}

.privacy-consent__copy {
  flex: 1 1 220px;
  min-width: 0;
}

.privacy-consent__summary {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--brown-text);
}

.privacy-consent__readmore {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.privacy-consent__readmore:hover {
  color: var(--green-forest);
}

.privacy-consent__readmore:focus-visible {
  outline: 2px solid var(--green-forest);
  outline-offset: 3px;
  border-radius: 4px;
}

.btn-privacy-accept {
  flex: 0 0 auto;
  min-width: 7.5rem;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: 10px;
  background: var(--green-forest);
  color: #fff !important;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(46, 125, 50, 0.28);
  transition: background 0.2s ease;
}

.btn-privacy-accept:hover {
  background: var(--green-dark);
}

.btn-privacy-accept:focus-visible {
  outline: 2px solid var(--green-forest);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .btn-privacy-accept {
    width: 100%;
    min-height: 44px;
  }

  .privacy-consent__bar-inner {
    padding: 0.5rem 0.75rem;
    gap: 0.45rem 0.65rem;
  }
}

/* ——— ข้อความนโยบายในป๊อปอัป (และใช้ร่วมกับบล็อกเนื้อหา) ——— */
.privacy-updated {
  margin: 0 0 1.75rem;
  font-size: 0.88rem;
  color: var(--brown-muted);
}

.privacy-block {
  margin-bottom: 1.5rem;
}

.privacy-block h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brown-text);
}

.privacy-block p,
.privacy-block li {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--brown-text);
}

.privacy-block ul {
  margin: 0.5rem 0 0;
  padding-left: 1.35rem;
}

.privacy-block li {
  margin-bottom: 0.4rem;
}

.privacy-consent__full-scroll .privacy-block:last-child {
  margin-bottom: 0.35rem;
}

.privacy-consent__full-scroll .privacy-block h2 {
  font-size: 0.98rem;
}

.privacy-consent__full-scroll .privacy-block p,
.privacy-consent__full-scroll .privacy-block li {
  font-size: 0.88rem;
  line-height: 1.58;
}
