/* ============================================================
   Lalla × Dahua — Design System
   Apple-inspired layout language, Lalla green palette.
   ============================================================ */

/* ── Webfonts ──
   FC Iconic (Fontcraft) is restricted to the Thai unicode block, so
   Thai text renders in FC Iconic while Latin text falls through to
   SF Pro / -apple-system — Apple's own typeface on Apple devices. */
@font-face {
  font-family: 'FC Iconic';
  src: url('../assets/fonts/FCIconic-Regular.woff2') format('woff2');
  font-weight: 100 450;
  font-style: normal;
  font-display: swap;
  size-adjust: 108%;      /* optically match SF Pro's Latin x-height */
  unicode-range: U+0E00-0E7F, U+200B-200D, U+25CC;
}

@font-face {
  font-family: 'FC Iconic';
  src: url('../assets/fonts/FCIconic-Bold.woff2') format('woff2');
  font-weight: 451 900;
  font-style: normal;
  font-display: swap;
  size-adjust: 108%;
  unicode-range: U+0E00-0E7F, U+200B-200D, U+25CC;
}

/* ── Tokens ── */
:root {
  /* Brand */
  --green:        #4db840;
  --green-dark:   #2b7a22;   /* text-safe green: 4.93:1 on --bg-alt (WCAG AA) */
  --green-deep:   #1e5c17;   /* deepest green: gradient end, white text 8:1 */
  --green-tint:   #f2faf1;
  --green-glow:   rgba(77, 184, 64, 0.28);

  /* Neutrals */
  --text:         #1d1d1f;
  --text-2:       #6e6e73;
  --text-3:       #6b6b70;   /* muted text: 4.87:1 on --bg-alt (WCAG AA) */
  --bg:           #ffffff;
  --bg-alt:       #f5f5f7;
  --bg-deep:      #0b0f0c;
  --hairline:     #d2d2d7;
  --hairline-soft:#e8e8ed;

  /* Type */
  /* Thai resolves to FC Iconic (unicode-range scoped);
     Latin resolves to SF Pro via -apple-system. */
  --font: "FC Iconic", -apple-system, BlinkMacSystemFont,
          "SF Pro Display", "SF Pro Text", "Helvetica Neue",
          "Noto Sans Thai", "Thonburi", Arial, sans-serif;

  /* Metrics */
  --nav-h:        60px;
  --subnav-h:     52px;
  --page:         980px;   /* Apple's classic content column */
  --page-wide:    1240px;
  --gutter:       22px;
  --radius:       18px;
  --radius-lg:    28px;
  --ease:         cubic-bezier(0.28, 0.11, 0.32, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

::selection { background: var(--green-glow); color: var(--text); }

/* ── Typography scale ── */
.t-eyebrow {
  font-size: 19px;
  font-weight: 600;
  color: var(--green-dark);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.t-display {
  font-size: clamp(40px, 7.4vw, 80px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.018em;
}

.t-headline {
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.07;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.t-title {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.t-lead {
  font-size: clamp(19px, 1.9vw, 24px);
  line-height: 1.42;
  font-weight: 400;
  letter-spacing: 0.004em;
  color: var(--text-2);
}

.t-body {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-2);
  letter-spacing: -0.002em;
}

.t-small {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-3);
}

/* Thai copy reads better slightly looser */
:lang(th), .th { line-height: 1.72; }

/* ── Layout helpers ── */
.wrap      { max-width: var(--page);      margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { max-width: var(--page-wide); margin: 0 auto; padding: 0 var(--gutter); }
.center    { text-align: center; }
.section   { padding: 92px 0; }
.section-tight { padding: 64px 0; }
.bg-alt    { background: var(--bg-alt); }
.bg-dark   { background: var(--bg-deep); color: #f5f5f7; }
.bg-dark .t-lead, .bg-dark .t-body { color: #a1a1a6; }

/* ============================================================
   Global navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-inner {
  max-width: var(--page-wide);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-links a {
  font-size: 12px;
  line-height: 1;
  color: var(--text);
  opacity: 0.86;
  padding: 8px 11px;
  border-radius: 8px;
  transition: opacity 0.2s var(--ease), background 0.2s var(--ease);
  white-space: nowrap;
}

.nav-links a:hover { opacity: 1; background: rgba(0, 0, 0, 0.05); }
.nav-links a.is-active { color: var(--green-dark); opacity: 1; font-weight: 500; }

.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--green-dark) !important;
  opacity: 1 !important;
}
.nav-phone svg { width: 13px; height: 13px; }

.nav-burger { display: none; margin-left: auto; padding: 8px; }
.nav-burger span {
  display: block; width: 17px; height: 1.5px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav-burger span + span { margin-top: 5px; }

/* ── Announcement ribbon ── */
.ribbon {
  background: var(--bg-alt);
  text-align: center;
  padding: 13px var(--gutter);
  font-size: 14px;
  color: var(--text-2);
  letter-spacing: -0.002em;
}
.ribbon strong { color: var(--text); font-weight: 600; }
.ribbon a {
  color: var(--green-dark);
  /* underlined always: distinguishes the link from surrounding text without relying on colour (WCAG 1.4.1) */
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ribbon a:hover { text-decoration-thickness: 2px; }

/* ============================================================
   Buttons & links
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 980px;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.002em;
  transition: background 0.22s var(--ease), transform 0.22s var(--ease),
              border-color 0.22s var(--ease), color 0.22s var(--ease);
  white-space: nowrap;
}

.btn-primary { background: var(--green-dark); color: #fff; }
.btn-primary:hover { background: var(--green-deep); }

.btn-ghost {
  border: 1px solid var(--green-dark);
  color: var(--green-dark);
  background: transparent;
}
.btn-ghost:hover { background: var(--green-dark); color: #fff; }

.btn-sm { padding: 7px 15px; font-size: 12px; }

.btn:active { transform: scale(0.975); }

.link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--green-dark);
  font-size: 17px;
  letter-spacing: -0.002em;
  transition: opacity 0.2s var(--ease);
}
.link:hover { text-decoration: underline; }
.link::after {
  content: '›';
  font-size: 1.35em;
  line-height: 0.8;
  transform: translateY(-0.045em);
}
.link-lg { font-size: clamp(17px, 1.6vw, 21px); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 30px;
  margin-top: 22px;
}
.center .cta-row { justify-content: center; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: 66px 0 0;
  text-align: center;
  overflow: hidden;
}

.hero-copy { position: relative; z-index: 2; }
.hero-copy .t-lead { margin-top: 14px; max-width: 640px; margin-inline: auto; }

.hero-stage {
  position: relative;
  margin-top: 34px;
  padding-bottom: 60px;
}

/* Soft green light pooled behind the product */
.hero-stage::before {
  content: '';
  position: absolute;
  inset: 6% 50% auto 50%;
  width: min(1000px, 120vw);
  height: 78%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 45%,
              var(--green-glow) 0%, rgba(77,184,64,0.10) 42%, transparent 70%);
  filter: blur(14px);
  z-index: 0;
  pointer-events: none;
}

.hero-stage img {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-height: min(58vh, 460px);
  width: auto;
  filter: drop-shadow(0 30px 52px rgba(0, 0, 0, 0.26));
}

/* Dark hero variant (product page) */
.hero-dark {
  background: radial-gradient(120% 90% at 50% 0%, #1b241c 0%, var(--bg-deep) 62%);
  color: #f5f5f7;
}
.hero-dark .t-lead { color: #a1a1a6; }
.hero-dark .t-eyebrow { color: var(--green); }
.hero-dark .hero-stage::before { opacity: 0.7; }

/* ============================================================
   Tile grid (Apple homepage rhythm)
   ============================================================ */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: var(--page-wide);
  margin: 0 auto;
  padding: 0 12px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 54px 32px 0;
  min-height: 500px;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  overflow: hidden;
}

.tile.is-full { grid-column: 1 / -1; }

.tile.is-dark {
  background: var(--bg-deep);
  color: #f5f5f7;
}
.tile.is-dark .tile-sub { color: #a1a1a6; }
.tile.is-dark .t-eyebrow { color: var(--green); }

.tile.is-green {
  background: linear-gradient(165deg, var(--green-dark) 0%, var(--green-deep) 100%);
  color: #fff;
}
.tile.is-green .tile-sub { color: rgba(255, 255, 255, 0.86); }
.tile.is-green .t-eyebrow { color: rgba(255, 255, 255, 0.9); }
.tile.is-green .link { color: #fff; }

.tile-title {
  font-size: clamp(26px, 2.5vw, 38px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.014em;
  max-width: 20ch;
}

.tile-sub {
  margin-top: 10px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 40ch;
}

.tile-media {
  margin-top: auto;
  padding-top: 30px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.tile-media img { max-height: 300px; width: auto; object-fit: contain; }

/* Tile whose image bleeds edge-to-edge */
.tile-bleed { padding-bottom: 0; }
.tile-bleed .tile-media img { max-height: none; width: 100%; object-fit: cover; }

/* ============================================================
   Stat strip
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 44px 24px;
  text-align: center;
}

.stat-num {
  font-size: clamp(38px, 4.4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  background: linear-gradient(160deg, var(--green-dark) 0%, var(--green-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-num sup { font-size: 0.44em; font-weight: 500; top: -0.7em; }

.stat-label {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.45;
}

/* ============================================================
   Product cards (lineup)
   ============================================================ */
.lineup {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.pcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 42px 28px 34px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline-soft);
  transition: transform 0.34s var(--ease), box-shadow 0.34s var(--ease),
              border-color 0.34s var(--ease);
}

.pcard:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.10);
}

.pcard-media {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.pcard-media img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  transition: transform 0.45s var(--ease);
}
.pcard:hover .pcard-media img { transform: scale(1.045); }

.pcard-media.is-empty {
  width: 100%;
  border-radius: var(--radius);
  background: var(--bg-alt);
  color: var(--text-3);
  font-size: 15px;
}

.pcard-cat {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 7px;
}

.pcard-name {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.pcard-sub {
  margin-top: 6px;
  font-size: 16px;
  color: var(--text-2);
}

.pcard-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============================================================
   Sticky sub-navigation (product page)
   ============================================================ */
.subnav {
  position: sticky;
  top: var(--nav-h);
  z-index: 850;
  height: var(--subnav-h);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.subnav-inner {
  max-width: var(--page-wide);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 18px;
}

.subnav-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.012em;
  white-space: nowrap;
}

.subnav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav-links::-webkit-scrollbar { display: none; }

.subnav-links a {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.subnav-links a:hover { color: var(--text); }
.subnav-links a.is-active { color: var(--green-dark); font-weight: 500; }

/* ============================================================
   Highlights carousel-ish row
   ============================================================ */
.hl-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 26px;
  max-width: var(--page-wide);
  margin: 0 auto;
  scrollbar-width: thin;
}

/* keyboard-focusable scroll region (see detail.js) */
.hl-row:focus-visible {
  outline: 2px solid var(--green-dark);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.hl-card {
  scroll-snap-align: center;
  background: var(--bg-deep);
  color: #f5f5f7;
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
}

.hl-card:nth-child(3n+2) {
  background: linear-gradient(168deg, var(--green-dark) 0%, var(--green-deep) 100%);
}
.hl-card:nth-child(3n+3) { background: var(--bg-alt); color: var(--text); }
.hl-card:nth-child(3n+3) .hl-card-body { color: var(--text-2); }

.hl-card-icon {
  width: 42px; height: 42px;
  margin-bottom: auto;
  color: currentColor;
  opacity: 0.92;
}
.hl-card-icon svg { width: 100%; height: 100%; }

.hl-card-title {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.16;
  margin: 26px 0 10px;
}

.hl-card-body {
  font-size: 16px;
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0;
}

/* ============================================================
   Feature list panels
   ============================================================ */
.panel {
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--hairline-soft);
  padding: 40px 40px 34px;
}
.bg-alt .panel { border-color: transparent; }

.feat-header {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.feat-list li,
.features-list li {
  position: relative;
  padding: 12px 0 12px 28px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-2);
  border-bottom: 1px solid var(--hairline-soft);
}
.feat-list li:last-child,
.features-list li:last-child { border-bottom: none; }

.feat-list li::before,
.features-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 21px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.feat-divider {
  border: none;
  border-top: 1px solid var(--hairline-soft);
  margin: 26px 0 22px;
}

.feat-main-title { font-size: 26px; font-weight: 600; letter-spacing: -0.012em; margin-bottom: 14px; }
.feat-intro { font-size: 17px; line-height: 1.7; color: var(--text-2); }
.feat-section-title { font-size: 19px; font-weight: 600; margin-bottom: 10px; }

/* Capability badges */
.feat-icons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.feat-icon-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 92px;
  padding: 16px 14px;
  border-radius: 16px;
  background: var(--bg-alt);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  transition: background 0.24s var(--ease), transform 0.24s var(--ease);
}
.feat-icon-badge:hover { background: var(--green-tint); transform: translateY(-3px); }
.feat-icon-badge svg { width: 26px; height: 26px; color: var(--green-dark); }
.feat-icon-badge small { font-size: 11px; color: var(--text-3); display: block; font-weight: 400; }

/* ============================================================
   Full-bleed showcase
   ============================================================ */
.showcase {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-alt);
}
.showcase img { width: 100%; object-fit: cover; }

.showcase-caption {
  padding: 30px 34px 34px;
  text-align: center;
}
.showcase-caption .t-title { margin-bottom: 8px; }

/* Alternating spec/benefit rows */
.alt-list { display: grid; gap: 1px; background: var(--hairline-soft); border-radius: var(--radius); overflow: hidden; }
.alt-list li {
  background: var(--bg);
  padding: 22px 26px 22px 60px;
  position: relative;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}
.alt-list li::before {
  content: '';
  position: absolute;
  left: 26px; top: 27px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px var(--green);
}
.alt-list li::after {
  content: '';
  position: absolute;
  left: 31.5px; top: 33.5px;
  width: 7px; height: 4px;
  border-left: 1.8px solid #fff;
  border-bottom: 1.8px solid #fff;
  transform: rotate(-45deg);
}

/* ============================================================
   Tech specs
   ============================================================ */
.specs-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 8px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 56px;
}

.spec-row {
  display: grid;
  grid-template-columns: minmax(140px, 44%) 1fr;
  gap: 18px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--hairline-soft);
  font-size: 16px;
  align-items: baseline;
}

.spec-row dt { color: var(--text-2); letter-spacing: -0.002em; }
.spec-row dd { color: var(--text); font-weight: 500; }

.specs-collapsed { max-height: 430px; overflow: hidden; position: relative; }
.specs-collapsed::after {
  content: '';
  position: absolute; inset: auto 0 0 0; height: 150px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--bg) 82%);
  pointer-events: none;
}
.bg-alt .specs-collapsed::after {
  background: linear-gradient(to bottom, rgba(245,245,247,0), var(--bg-alt) 82%);
}

.specs-toggle { display: flex; justify-content: center; margin-top: 26px; }

/* ============================================================
   Contact / support
   ============================================================ */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 44px 24px;
  text-align: center;
}

.support-item svg { width: 34px; height: 34px; color: var(--green-dark); margin: 0 auto 16px; }
.support-item h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 7px; }
.support-item p { font-size: 15px; line-height: 1.6; color: var(--text-2); }

.contact-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--green-dark) 0%, var(--green-deep) 100%);
  color: #fff;
  padding: 62px 40px;
  text-align: center;
}
.contact-card .t-headline { margin-bottom: 14px; }
.contact-card p { font-size: 19px; line-height: 1.6; color: rgba(255, 255, 255, 0.9); }

.contact-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.contact-card .btn-primary { background: #fff; color: var(--green-deep); }
.contact-card .btn-primary:hover { background: rgba(255, 255, 255, 0.86); }
.contact-card .btn-ghost { border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.contact-card .btn-ghost:hover { background: #fff; color: var(--green-deep); border-color: #fff; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--bg-alt);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
  padding: 42px 0 26px;
}

.footer-note {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-3);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 30px 40px;
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--hairline);
}

.footer-col h2, .footer-col h4 { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-2); transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--text); text-decoration: underline; }

.footer-legal {
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  color: var(--text-3);
}
.footer-legal .sep { margin-left: auto; }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .section { padding: 68px 0; }
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 420px; padding: 44px 24px 0; }
  .specs-grid { grid-template-columns: 1fr; column-gap: 0; }
  .hero { padding-top: 48px; }
}

@media (max-width: 734px) {
  :root { --gutter: 18px; }

  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hairline);
    padding: 6px var(--gutter) 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
  }
  .nav.is-open .nav-links { max-height: 70vh; overflow-y: auto; }
  .nav-links a { font-size: 17px; padding: 13px 4px; border-bottom: 1px solid var(--hairline-soft); border-radius: 0; }

  .nav-burger { display: block; }
  .nav.is-open .nav-burger span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .nav.is-open .nav-burger span:last-child  { transform: translateY(-3.25px) rotate(-45deg); }

  .subnav-inner { gap: 12px; }
  .subnav-name {
    font-size: 17px;
    /* a long model name used to push the quote button off the screen */
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .subnav-links { gap: 16px; min-width: 0; }
  /* Pin the quote button to the right edge of the scrolling strip so it is
     always on screen and tappable; the section links scroll underneath it.
     Without this the button sat up to 121px off-screen on a 375px phone. */
  .subnav-links a.btn {
    position: sticky;
    right: 0;
    flex: 0 0 auto;
    margin-left: 4px;
    box-shadow: -10px 0 10px -6px rgba(255, 255, 255, 0.95);
  }

  .panel { padding: 28px 22px 24px; }
  .contact-card { padding: 46px 24px; }
  .hero-stage img { max-height: 400px; }
  .alt-list li { padding: 18px 20px 18px 52px; font-size: 16px; }
  .spec-row { grid-template-columns: 1fr; gap: 3px; }
  .spec-row dt { font-size: 14px; }
  .footer-legal .sep { margin-left: 0; width: 100%; }
}

/* ============================================================
   Partnership logos
   ============================================================ */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.logo-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 34px 26px 30px;
  text-align: center;
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease);
}
.logo-card:hover { transform: translateY(-5px); box-shadow: 0 20px 42px rgba(0,0,0,0.09); }

.logo-card-media {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.logo-card-media img {
  max-height: 100%;
  max-width: 78%;
  width: auto;
  object-fit: contain;
}

.logo-card-name { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.logo-card-note { margin-top: 6px; font-size: 14px; line-height: 1.55; color: var(--text-2); }

/* ============================================================
   Our Works
   ============================================================ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.work-card {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease);
}
.work-card:hover { transform: translateY(-5px); box-shadow: 0 22px 46px rgba(0,0,0,0.10); }

.work-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--hairline-soft);
}
.work-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.work-card:hover .work-media img { transform: scale(1.05); }

.work-cap { padding: 20px 24px 24px; }
.work-cap h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.work-cap p  { margin-top: 5px; font-size: 14px; color: var(--text-2); }

/* ============================================================
   Empty slots — placeholders awaiting content
   ============================================================ */
.is-slot {
  background: transparent;
  border: 1.5px dashed var(--hairline);
  box-shadow: none;
  cursor: default;
}
.is-slot:hover { transform: none; box-shadow: none; border-color: var(--green); }

.is-slot .pcard-cat,
.is-slot .logo-card-name,
.is-slot .work-cap h3 { color: var(--text-3); }

.is-slot .pcard-name { color: var(--text-3); font-weight: 500; }
.is-slot .pcard-sub,
.is-slot .logo-card-note,
.is-slot .work-cap p { color: var(--hairline); }

.is-slot-media {
  background: var(--bg-alt);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.work-card.is-slot .is-slot-media { border-radius: 0; }
.bg-alt .is-slot .is-slot-media { background: rgba(0, 0, 0, 0.035); }

.slot-plus {
  font-size: 38px;
  font-weight: 200;
  line-height: 1;
  color: var(--hairline);
  transition: color 0.28s var(--ease), transform 0.28s var(--ease);
}
.is-slot:hover .slot-plus { color: var(--green); transform: scale(1.12); }

.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.work-card.is-slot .work-media { display: flex; align-items: center; justify-content: center; }

/* ============================================================
   Anchor offsets & late overrides
   ============================================================ */
section[id], .tile[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
#overview, #highlights, #gallery, #specs { scroll-margin-top: calc(var(--nav-h) + var(--subnav-h) + 12px); }

/* Buttons living inside the nav rows keep their own colours */
.subnav-links a.btn-primary { color: #fff; }
.subnav-links a.btn-primary:hover { color: #fff; }
.nav-links a.btn { border-radius: 980px; }

/* Cards that are links shouldn't inherit link underlines */
.pcard, .pcard:hover { text-decoration: none; }

/* Keep the hero product from touching the next section on tall screens */
.hero-dark .hero-stage { padding-bottom: 72px; }

/* ── Thai typography ──
   The --font stack already resolves Latin to SF Pro and Thai to
   IBM Plex Sans Thai (the first family in the chain carrying Thai
   glyphs), so only the rhythm needs adjusting. */
.th, :lang(th) { line-height: 1.75; }
.th .t-display, .t-display:lang(th) { line-height: 1.16; }
.tile-title:lang(th), .t-headline:lang(th) { line-height: 1.24; }

/* ============================================================
   Dahua catalogue — category tiles
   ============================================================ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 14px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 18px 24px;
  min-height: 214px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
              background 0.3s var(--ease);
}
.bg-alt .cat-card { background: var(--bg); }

.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.10);
}

.cat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px; height: 58px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--green-dark);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.bg-alt .cat-icon { background: var(--bg-alt); }
.cat-icon svg { width: 27px; height: 27px; }

.cat-card:hover .cat-icon {
  background: linear-gradient(160deg, var(--green-dark) 0%, var(--green-deep) 100%);
  color: #fff;
}

.cat-body { display: block; }

.cat-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.008em;
  color: var(--text);
}

.cat-name-en {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-3);
}

.cat-count {
  margin-top: auto;
  padding-top: 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--green-dark);
}

/* ── Category hero ── */
.cat-hero { padding-bottom: 18px; }
.cat-hero .hero-copy { padding-bottom: 8px; }

.cat-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px; height: 76px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--green-dark) 0%, var(--green-deep) 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(77, 184, 64, 0.32);
}
.cat-hero-icon svg { width: 36px; height: 36px; }

/* ============================================================
   Series list
   ============================================================ */
.series-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 14px;
}

.series-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 104px;
  padding: 22px 46px 22px 24px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease),
              background 0.28s var(--ease);
}
.bg-alt .series-card { background: var(--bg); }

.series-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.09);
}

.series-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
}

.series-sub {
  margin-top: 5px;
  font-size: 14px;
  color: var(--text-2);
}

.series-tag {
  display: inline-block;
  align-self: flex-start;
  margin-top: 8px;
  padding: 4px 11px;
  border-radius: 980px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
}

.series-go {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  line-height: 1;
  color: var(--text-3);
  transition: color 0.24s var(--ease), transform 0.24s var(--ease);
}
.series-card:hover .series-go {
  color: var(--green-dark);
  transform: translateY(-50%) translateX(3px);
}

.series-note {
  margin-top: 26px;
  max-width: 68ch;
}

@media (max-width: 734px) {
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .cat-card { min-height: 186px; padding: 24px 12px 20px; }
  .cat-icon { width: 50px; height: 50px; }
  .cat-icon svg { width: 24px; height: 24px; }
  .cat-name { font-size: 15px; }
  .series-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Brand cards
   ============================================================ */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 16px;
}

.brand-card {
  display: flex;
  flex-direction: column;
  padding: 32px 26px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  min-height: 300px;
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease);
}
.bg-alt .brand-card { background: var(--bg); }
.brand-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0,0,0,0.10); }

.brand-mark {
  display: flex;
  align-items: center;
  height: 52px;
  margin-bottom: 22px;
}
.brand-mark img { max-height: 44px; width: auto; object-fit: contain; }

.wordmark {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.wordmark-samsung { color: #1428a0; letter-spacing: -0.045em; }
.wordmark-maxhub  { color: #1d1d1f; letter-spacing: 0.01em; }
.wordmark-imin    { color: #e60012; letter-spacing: -0.01em; }

.brand-tag {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.brand-blurb {
  font-size: 16px;
  line-height: 1.62;
  color: var(--text-2);
}

.brand-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 22px;
  font-size: 14px;
  color: var(--text-3);
}
.brand-go { font-size: 22px; line-height: 1; color: var(--green-dark); transition: transform 0.24s var(--ease); }
.brand-card:hover .brand-go { transform: translateX(4px); }

.brand-hero-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  margin-bottom: 22px;
}
.brand-hero-mark img { max-height: 60px; width: auto; }
.brand-hero-mark .wordmark { font-size: 44px; }

/* ============================================================
   Model cards (products with photos)
   ============================================================ */
.mgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.mcard {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 22px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--hairline-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
              border-color 0.3s var(--ease);
}
.bg-alt .mcard { background: var(--bg); border-color: transparent; }

.mcard:hover {
  transform: translateY(-5px);
  border-color: transparent;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.10);
}

.mcard-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 172px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--bg-alt);
  overflow: hidden;
}
.mcard-media img {
  max-height: 88%;
  max-width: 88%;
  width: auto;
  object-fit: contain;
  transition: transform 0.42s var(--ease);
}
.mcard:hover .mcard-media img { transform: scale(1.06); }
.mcard-noimg { font-size: 13px; color: var(--text-3); }

.mcard-brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 5px;
}

.mcard-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
}

.mcard-desc {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mcard-go {
  margin-top: auto;
  padding-top: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--green-dark);
}

/* Series blocks inside a category page */
.series-block { margin-bottom: 54px; }
.series-block:last-of-type { margin-bottom: 0; }

.series-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline-soft);
}

/* Breadcrumb links inside eyebrows */
.crumb { color: var(--green-dark); }
.crumb:hover { text-decoration: underline; }

/* Product hero sits on the light ground */
.product-hero { padding-bottom: 0; }
.product-hero .hero-stage img { max-height: min(48vh, 400px); }

@media (max-width: 734px) {
  .mgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .mcard { padding: 14px 14px 16px; }
  .mcard-media { height: 128px; }
  .mcard-name { font-size: 15px; }
  .mcard-desc { display: none; }
  .brand-card { min-height: 250px; padding: 28px 22px 22px; }
}

/* ============================================================
   Grouped tech specs
   ============================================================ */
.specset { position: relative; }
.specset-block { margin-bottom: 34px; }
.specset-block:last-child { margin-bottom: 0; }

.specset-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  padding-bottom: 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--hairline);
}

.specset.specs-collapsed { max-height: 460px; overflow: hidden; }
.specset.specs-collapsed::after {
  content: '';
  position: absolute; inset: auto 0 0 0; height: 170px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--bg) 84%);
  pointer-events: none;
}
.bg-alt .specset.specs-collapsed::after {
  background: linear-gradient(to bottom, rgba(245,245,247,0), var(--bg-alt) 84%);
}

/* Footer: office column runs wider than the link columns */
.footer-col-wide { grid-column: span 2; }
@media (max-width: 734px) { .footer-col-wide { grid-column: span 1; } }

/* ============================================================
   About / capabilities
   ============================================================ */
.about-split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: start;
}
.about-copy .t-body { margin-top: 16px; }

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.cap-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px 18px;
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.cap-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--green-dark);
}
.cap-icon svg { width: 20px; height: 20px; }

.cap-title { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.008em; }
.cap-sub   { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--text-2); }

/* ============================================================
   How we work
   ============================================================ */
.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.step-card {
  padding: 26px 22px 24px;
  border-radius: var(--radius);
  background: var(--bg);
}

.step-num {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--green-dark);
  margin-bottom: 12px;
}

.step-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.step-th    { font-size: 14px; color: var(--green-dark); margin-top: 2px; }
.step-body  { font-size: 14px; line-height: 1.6; color: var(--text-2); margin-top: 9px; }

/* ============================================================
   Works
   ============================================================ */
.work-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.work-hero {
  width: 100%;
  max-height: 62vh;
  overflow: hidden;
  background: var(--bg-alt);
}
.work-hero img { width: 100%; height: 100%; object-fit: cover; max-height: 62vh; }

.work-title-th { font-size: 19px; color: var(--text-2); margin-top: 6px; }

.work-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  margin-top: 34px;
  background: var(--hairline-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.work-fact { background: var(--bg); padding: 20px 22px; }
.work-fact dt { font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.work-fact dd { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

.work-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.work-shot {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  aspect-ratio: 4 / 3;
}
.work-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.work-shot:hover img { transform: scale(1.04); }

/* Contact card extras */
.contact-detail {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}
.contact-detail a { color: #fff; text-decoration: underline; }

@media (max-width: 900px) {
  .about-split { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 734px) {
  .capability-grid { grid-template-columns: 1fr; }
  .work-facts { grid-template-columns: 1fr; }
}

/* ============================================================
   "More brands" card + supply grid
   ============================================================ */
.brand-card.is-more {
  border: 1.5px dashed var(--hairline);
  background: transparent;
}
.bg-alt .brand-card.is-more { background: transparent; }
.brand-card.is-more:hover {
  border-color: var(--green);
  background: var(--green-tint);
  box-shadow: none;
  transform: translateY(-6px);
}

.more-dots { display: flex; align-items: center; gap: 9px; }
.more-dots i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--hairline);
  transition: background 0.28s var(--ease), transform 0.28s var(--ease);
}
.brand-card.is-more:hover .more-dots i { background: var(--green); }
.brand-card.is-more:hover .more-dots i:nth-child(2) { transform: scale(1.25); }

.supply-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.supply-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 104px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--bg);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.supply-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0,0,0,0.09); }

.supply-name {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}

.supply-sub {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.supply-card.is-note {
  background: transparent;
  border: 1.5px dashed var(--hairline);
}
.supply-card.is-note:hover { border-color: var(--green); box-shadow: none; }
.supply-card.is-note .supply-name { color: var(--green-dark); }

/* A sourced brand with its own catalogue on this site */
.supply-link {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green-dark);
}

/* ============================================================
   Contact card buttons — one uniform treatment
   Every action in a contact card gets the same fill, border and
   width, so a row of them reads as equal boxes.
   ============================================================ */
.contact-card .contact-actions .btn,
.contact-card .contact-actions .btn-primary,
.contact-card .contact-actions .btn-ghost {
  min-width: 216px;
  background: #fff;
  color: var(--green-deep);
  border: 1px solid #fff;
}

.contact-card .contact-actions .btn:hover,
.contact-card .contact-actions .btn-primary:hover,
.contact-card .contact-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(255, 255, 255, 0.86);
  color: var(--green-deep);
}

@media (max-width: 734px) {
  .contact-card .contact-actions { flex-direction: column; align-items: stretch; }
  .contact-card .contact-actions .btn,
  .contact-card .contact-actions .btn-primary,
  .contact-card .contact-actions .btn-ghost { min-width: 0; width: 100%; }
}

/* ============================================================
   Quote request drawer
   ============================================================ */
.quote-root { position: fixed; inset: 0; z-index: 1200; pointer-events: none; }

.quote-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.42s var(--ease);
}

.quote-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 75%;
  max-width: 1080px;
  height: 100%;
  background: var(--bg);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.22);
  border-radius: 22px 0 0 22px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.46s var(--ease);
  outline: none;
}

body.quote-open .quote-root { pointer-events: auto; }
body.quote-open .quote-overlay { opacity: 1; }
body.quote-open .quote-drawer { transform: none; }
body.quote-open { overflow: hidden; }

.quote-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 42px 22px;
  border-bottom: 1px solid var(--hairline-soft);
  flex-shrink: 0;
}

.quote-close {
  font-size: 30px;
  line-height: 1;
  color: var(--text-3);
  padding: 4px 10px;
  border-radius: 50%;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.quote-close:hover { background: var(--bg-alt); color: var(--text); }

.quote-body {
  padding: 26px 42px 42px;
  overflow-y: auto;
  flex: 1;
}

.quote-intro { margin-bottom: 26px; max-width: 62ch; }

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px 22px;
}

.qf { display: flex; flex-direction: column; }
.qf-full { grid-column: 1 / -1; margin-top: 18px; }

.qf-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
  margin-bottom: 7px;
}
.qf-sub { font-weight: 400; color: var(--text-2); }

.req { color: var(--green-dark); }

.qf input,
.qf select,
.qf textarea {
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 15px;
  width: 100%;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.qf textarea { resize: vertical; line-height: 1.6; }

.qf input:focus,
.qf select:focus,
.qf textarea:focus {
  outline: none;
  background: var(--bg);
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-glow);
}

.qf input[readonly] { color: var(--text-2); }

.qf-err {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: #d13b30;
}
.qf.is-bad input { border-color: #d13b30; background: #fdf3f2; }
.qf.is-bad .qf-err { display: block; }

.qf-set {
  border: none;
  margin-top: 26px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.qf-set legend { padding: 0; }
.qf-set .qf input { background: var(--bg); }

.quote-related {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.qchk {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--bg);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.qchk:hover { background: var(--green-tint); }
.qchk input { accent-color: var(--green); width: 16px; height: 16px; flex-shrink: 0; }

.quote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.quote-foot { margin-top: 18px; color: var(--text-2); }
.quote-foot a { color: var(--green-dark); }
.quote-foot a:hover { text-decoration: underline; }

.quote-done { padding: 30px 0; max-width: 60ch; }
.quote-done-mark {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--green-dark);
  color: #fff;
  font-size: 27px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.quote-done .t-body { margin-top: 10px; }
.quote-done a { color: var(--green-dark); }

@media (max-width: 900px) {
  .quote-drawer { width: 92%; border-radius: 18px 0 0 18px; }
  .quote-head { padding: 24px 24px 18px; }
  .quote-body { padding: 22px 24px 36px; }
}
@media (max-width: 734px) {
  .quote-drawer { width: 100%; border-radius: 0; }
  .quote-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .quote-drawer, .quote-overlay { transition: none; }
}

/* ============================================================
   Phone: swipe rows
   ------------------------------------------------------------
   On a phone the home page is a very long vertical scroll, so each
   card section turns into one horizontal row instead. Cards are
   sized below 100% width on purpose: the next card peeks in at the
   right edge, which is what tells a visitor the row keeps going.
   Desktop and tablet are untouched - everything here is inside the
   phone media query, and the desktop grid rules still apply above it.
   ============================================================ */
/* the swipe hint only ever shows on a phone (set to block below) */
.swipe-hint { display: none; }

@media (max-width: 734px) {
  .swipe-row {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;        /* drop the desktop column track */
    grid-template-rows: auto;
    grid-auto-columns: 76%;             /* ~24% of the next card shows */
    gap: 12px;

    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;     /* don't rubber-band the whole page */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    /* bleed out of .wrap so the row runs edge to edge, while the
       first card still lines up with the text above it */
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    padding-bottom: 16px;
    scroll-padding-inline: var(--gutter);
  }

  .swipe-row > * {
    scroll-snap-align: start;
    min-width: 0;                       /* let long words wrap inside a card */
  }

  /* keyboard users get the same access as a swipe (WCAG 2.1.1),
     and need to see where focus landed */
  .swipe-row:focus-visible {
    outline: 2px solid var(--green-dark);
    outline-offset: 3px;
    border-radius: var(--radius);
  }

  /* thin, unobtrusive scrollbar where the platform draws one */
  .swipe-row { scrollbar-width: thin; scrollbar-color: var(--hairline) transparent; }
  .swipe-row::-webkit-scrollbar { height: 4px; }
  .swipe-row::-webkit-scrollbar-thumb {
    background: var(--hairline);
    border-radius: 999px;
  }

  /* Per-row card widths: wider cards for image-led rows, narrower
     for compact ones, each still leaving a visible peek. */
  .brand-grid.swipe-row      { grid-auto-columns: 78%; }
  .mgrid.swipe-row           { grid-auto-columns: 58%; gap: 10px; }
  .capability-grid.swipe-row { grid-auto-columns: 62%; }
  .step-grid.swipe-row       { grid-auto-columns: 70%; }
  .works-grid.swipe-row      { grid-auto-columns: 84%; gap: 14px; }
  .support-grid.swipe-row    { grid-auto-columns: 66%; gap: 16px; }

  /* cards in a swipe row stretch to equal height */
  .swipe-row .brand-card,
  .swipe-row .mcard,
  .swipe-row .step-card,
  .swipe-row .work-card,
  .swipe-row .cap-item,
  .swipe-row .support-item { height: 100%; }

  /* these were tuned for a vertical stack */
  .brand-card { min-height: 0; }
  .support-grid.swipe-row { text-align: left; }
  .support-grid.swipe-row .support-item svg { margin-left: 0; margin-right: 0; }

  /* the hint line under each section heading */
  .swipe-hint {
    display: block;
    font-size: 12px;
    color: var(--text-2);
    margin: 10px 0 2px;
  }
}


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

/* Honeypot: off-screen, never shown, never focusable by a person.
   display:none is avoided because some bots skip hidden inputs. */
.quote-botcheck {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Failed-send panel */
.quote-done-mark.is-fail {
  background: #fdecec;
  color: #b3261e;
}

/* ============================================================
   Phone: tap targets
   ------------------------------------------------------------
   An audit found 20 links and buttons under 32px on a phone - the
   burger was 33x24 and the ribbon's phone link only 17px tall.
   Apple and WCAG both put the comfortable minimum near 44px.
   These rules grow the *hit area* without moving the layout:
   padding expands the box, and a negative margin of the same size
   pulls the neighbours back where they were.
   ============================================================ */
@media (max-width: 734px) {
  /* burger: 33x24 -> 44x44 hit area, icon stays put */
  .nav-burger {
    padding: 14px 12px;
    margin: -14px -12px -14px auto;
  }

  /* ribbon phone number: 17px tall -> 44px */
  .ribbon a {
    display: inline-block;
    padding-block: 13px;
    margin-block: -13px;
  }

  /* hero / section call-to-action links: 30px -> 44px */
  .link,
  .cta-row .link-lg {
    padding-block: 7px;
    margin-block: -7px;
  }

  /* footer link lists: 15-22px rows -> 44px, and spaced apart so
     neighbouring links are not hit by mistake */
  .footer-col li { margin-bottom: 2px; }
  .footer-col a,
  .footer-legal a {
    display: inline-block;
    padding-block: 11px;
    margin-block: -5px;
  }

  /* contact block inside the green card */
  .contact-detail a { display: inline-block; padding-block: 8px; margin-block: -4px; }
}

/* ============================================================
   Consent banner (see js/consent.js)
   A bar at the bottom rather than a full-screen modal: it does
   not block the page, and PDPA does not require it to. Refuse and
   accept are the same size and sit together, because a refusal
   that is harder to find is not a free choice.
   ============================================================ */
.consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1200;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--hairline);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.07);
  animation: consent-rise 0.32s var(--ease) both;
}

@keyframes consent-rise {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.consent-inner {
  max-width: var(--page-wide);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}

.consent-copy { flex: 1 1 auto; min-width: 0; }
.consent-title { font-size: 14px; font-weight: 600; color: var(--text); }
.consent-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
  margin-top: 3px;
  max-width: 76ch;
}

.consent-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
}
.consent-actions .btn { font-size: 14px; padding: 10px 22px; }

/* keep the bar clear of the page's own bottom edge content */
body.has-consent-bar { scroll-padding-bottom: 120px; }

@media (max-width: 734px) {
  .consent-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom));
  }
  .consent-actions { gap: 10px; }
  /* both buttons share the row evenly - neither is the easy one */
  .consent-actions .btn { flex: 1 1 0; text-align: center; }
  .consent-text { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .consent { animation: none; }
}

/* "คุณรู้จักเราจากที่ไหน?" - matches the other quote fields, with a
   chevron drawn in CSS because a normalised select loses its own. */
.qf select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 42px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
}
.qf select:focus { background-color: var(--bg); }
