/* =====================================================================
   Google Fitbit Air — reseller landing page
   Design tokens first, then components. Mobile-first throughout.
   ===================================================================== */

:root {
  /* Color tokens — monochrome, matching the Fito wordmark.
     Deliberately almost colourless: the ONLY saturated colour on the
     page is the LINE green / Messenger blue on the order buttons, so
     the eye goes straight to the action. */
  --color-primary: #1A1A1D;
  --color-primary-dark: #000000;
  --color-on-primary: #FFFFFF;
  --color-accent: #0369A1;      /* focus rings only — needs to be visible */
  --color-bg: #FFFFFF;
  --color-bg-tint: #F4F4F2;     /* the soft studio grey from the logo */
  --color-surface: #FFFFFF;
  --color-fg: #17171A;
  --color-fg-soft: #6B6B71;
  --color-border: #E6E6E3;
  --color-border-teal: #C9C9C4;  /* kept name so nothing else breaks */
  --color-warn-bg: #FFFBEB;
  --color-warn-border: #FCD34D;
  --color-warn-fg: #92400E;
  --color-line: #06C755;      /* LINE brand green */
  --color-messenger: #0084FF; /* Messenger brand blue */

  /* Type & spacing */
  --font-head: "Prompt", "Sarabun", system-ui, sans-serif;
  --font-body: "Sarabun", system-ui, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.05);
  --container: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-fg);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  /* room for the mobile sticky CTA bar */
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; }

h1 { font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 4vw, 2rem); font-weight: 600; margin-bottom: 0.5rem; }
h3 { font-size: 1.1rem; font-weight: 600; }

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

.section { padding: 56px 0; }
.section-tint { background: var(--color-bg-tint); }
.section-sub { color: var(--color-fg-soft); margin-bottom: 1.5rem; }

.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon-xs { width: 15px; height: 15px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px;
}
/* Brand lockup — SVG wordmark + superscript locale tag */
.brand {
  display: inline-flex; align-items: flex-start; gap: 4px;
  color: var(--color-fg); text-decoration: none;
}
.brand:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 4px; border-radius: 4px; }
.brand-mark { height: 19px; width: auto; display: block; }
.brand-dot {
  font-family: var(--font-head);
  color: var(--color-fg-soft); font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.12em; line-height: 1;
}

/* Micro-type used across the brand: wide-tracked uppercase, like the logo */
.eyebrow {
  font-family: var(--font-head);
  font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--color-fg-soft);
}

/* Footer brand lockup: wordmark, hairline rule, tagline */
.brand-lockup { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 28px; }
.brand-lockup .brand-mark { height: 30px; margin-bottom: 2px; }
.brand-rule { width: 56px; height: 1px; background: currentColor; opacity: 0.3; }
.brand-tagline, .brand-locale { text-align: center; }
.brand-locale { font-size: 0.6rem; letter-spacing: 0.34em; opacity: 0.75; margin-top: -4px; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- Language toggle ---------- */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-fg-soft);
  font-family: var(--font-head); font-size: 0.85rem; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.lang-toggle:hover { background: var(--color-bg-tint); color: var(--color-primary); border-color: var(--color-border-teal); }
.lang-toggle:active { transform: scale(0.97); }
.lang-toggle:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: none;
  font-family: var(--font-head); font-size: 1rem; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: 0.9rem; }
.btn-line { background: var(--color-line); color: #fff; }
.btn-messenger { background: var(--color-messenger); color: #fff; }

/* Outline variant, used for the Facebook page link in the top bar.
   Quiet on purpose — see the note in index.html. */
.btn-fb-outline {
  background: var(--color-surface);
  color: var(--color-messenger);
  border: 1px solid var(--color-border);
  font-weight: 600;
}
.btn-fb-outline:hover { background: #F0F5FF; border-color: var(--color-messenger); }

/* ---------- Hero ---------- */
.hero { padding: 44px 0 56px; background: linear-gradient(180deg, var(--color-bg-tint) 0%, var(--color-bg) 100%); }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  font-family: var(--font-head); font-size: 0.82rem; font-weight: 500;
  margin-bottom: 14px;
}
.badge-new {
  background: var(--color-surface); color: var(--color-fg);
  border: 1px solid var(--color-border);
  letter-spacing: 0.04em;
}
.tagline { color: var(--color-fg-soft); font-size: 1.08rem; margin: 12px 0 18px; max-width: 46ch; }

.price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.price {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.4rem); color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}
.price-note { color: var(--color-fg-soft); font-size: 0.95rem; }

/* Reference price — deliberately quiet. The strikethrough does the work;
   making it big and red would read as a sales gimmick and undercut the
   honest tone the rest of the page depends on. */
.price-was {
  color: var(--color-fg-soft); font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  text-decoration-thickness: 1px;
}
.save-badge {
  font-family: var(--font-head); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: #166534;                     /* only saving-related green on the page */
  background: #F0FDF4; border: 1px solid #BBF7D0;
  border-radius: 999px; padding: 3px 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price-was[hidden], .save-badge[hidden] { display: none; }

/* Pre-order notice — informational, not alarming. Kept visually distinct
   from the amber import-warning further down so the two don't read as the
   same kind of message: one is a caveat, this is just a date. */
.preorder-note {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 0 0 20px; padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-fg);
  border-radius: 10px;
  background: var(--color-bg-tint);
  font-size: 0.92rem; line-height: 1.55; color: var(--color-fg);
  max-width: 46ch;
}
.preorder-note .icon { flex: none; margin-top: 3px; color: var(--color-fg-soft); }
.preorder-note[hidden] { display: none; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-center { justify-content: center; }

.hero-trust {
  list-style: none; display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 22px; color: var(--color-fg-soft); font-size: 0.9rem;
}
.hero-trust li { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust .icon-xs { color: var(--color-primary); }

/* ---------- Media placeholders ---------- */
.media-frame {
  border-radius: var(--radius);
  /* Soft studio backdrop, like the product-on-podium brand photography */
  background:
    radial-gradient(120% 120% at 25% 8%, #FFFFFF 0%, transparent 60%),
    linear-gradient(160deg, #F7F7F5 0%, #E8E8E4 100%);
  border: 1px dashed #B4B4AE;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: #85857F; text-align: center;
  font-size: 0.85rem; padding: 16px;
  overflow: hidden; position: relative;
}
.media-frame.has-image { border-style: solid; border-color: var(--color-border); padding: 0; }
.media-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-hero { aspect-ratio: 4 / 3; }
.media-hero.has-image { aspect-ratio: auto; }
.media-hero.has-image img { height: auto; }
.media-frame svg { width: 44px; height: 44px; opacity: 0.6; }

/* ---------- Motion ----------
   Scroll reveal: elements start slightly low and faded, then settle
   as they enter the viewport. `--stagger` offsets siblings so a row
   of cards or photos arrives in sequence rather than all at once. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--stagger, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Photos fade up as they decode, so no hard pop-in */
.media-frame img {
  opacity: 0;
  transition: opacity 0.5s ease-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.media-frame img.is-loaded { opacity: 1; }

/* Hero: slow drift plus an almost-imperceptible zoom, so the product
   feels alive without pulling attention away from the price and CTA */
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
@keyframes hero-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.05); }
}
.hero-media { animation: hero-float 7s ease-in-out infinite; }
.media-hero.has-image img.is-loaded {
  animation: hero-zoom 18s ease-in-out infinite alternate;
}

/* Gallery: lift and zoom on hover (pointer devices only) */
@media (hover: hover) {
  .gallery .media-frame {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease;
  }
  .gallery .media-frame:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
  }
  .gallery .media-frame:hover img.is-loaded { transform: scale(1.08); }
  .card { transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1); }
}

/* ---------- Why cards ---------- */
.card-grid { display: grid; gap: 16px; margin-top: 1.4rem; }
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--color-bg-tint); color: var(--color-fg);
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.card-icon .icon { width: 24px; height: 24px; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--color-fg-soft); font-size: 0.95rem; }

/* ---------- Variants ---------- */
.variant-list { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.variant {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 10px 18px; min-height: 48px;
  font-family: var(--font-head); font-weight: 500; font-size: 0.95rem;
  box-shadow: var(--shadow-card);
}
.variant-swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.12);
}
.variant-status { font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.variant.in-stock .variant-status { background: #DCFCE7; color: #166534; }
.variant.out-of-stock { opacity: 0.55; }
.variant.out-of-stock .variant-status { background: #F1F5F9; color: #64748B; }

/* ---------- Honesty notice ---------- */
.notice {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--color-warn-bg);
  border: 1px solid var(--color-warn-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--color-warn-fg);
  font-size: 0.95rem; line-height: 1.6;
}
.notice .icon { margin-top: 3px; }

/* ---------- Product detail ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 1.4rem 0 2rem; }
.gallery .media-frame { aspect-ratio: 1; font-size: 0.78rem; }
.gallery .media-frame svg { width: 32px; height: 32px; }

.video-wrap {
  margin: 0 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  aspect-ratio: 16 / 9;
  background: #0F172A;
}
.video-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

.detail-grid { display: grid; gap: 28px; }
.detail-block h3 { margin-bottom: 12px; }

.spec-list { display: grid; gap: 0; border-top: 1px solid var(--color-border); }
.spec-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--color-border); }
.spec-row dt { color: var(--color-fg-soft); font-size: 0.9rem; }
.spec-row dd { font-size: 0.95rem; }

.included-list { list-style: none; display: grid; gap: 10px; }
.included-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.included-list li::before {
  content: ""; flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px;
  background: var(--color-primary);
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" d="M20 6L9 17l-5-5"/></svg>') center / contain no-repeat;
}
.detail-price { margin-top: 22px; display: flex; align-items: baseline; gap: 10px; }

/* ---------- Order steps ---------- */
.steps { list-style: none; counter-reset: step; display: grid; gap: 14px; margin: 1.4rem 0 2rem; }
.steps li {
  counter-increment: step;
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}
.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--color-primary); color: var(--color-on-primary);
  font-family: var(--font-head); font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.steps .step-title { font-family: var(--font-head); font-weight: 600; display: block; }
.steps .step-detail { color: var(--color-fg-soft); font-size: 0.93rem; }

.payment-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.payment-copy p { color: var(--color-fg-soft); font-size: 0.95rem; margin-top: 6px; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; margin-top: 1.2rem; }
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; min-height: 48px;
  font-family: var(--font-head); font-weight: 500;
  transition: background 0.15s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--color-bg-tint); }
.faq-item summary:focus-visible { outline: 3px solid var(--color-accent); outline-offset: -3px; }
.faq-item summary .icon { color: var(--color-fg-soft); transition: transform 0.2s ease; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item .faq-answer { padding: 0 18px 16px; color: var(--color-fg-soft); font-size: 0.95rem; }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 30px 0 40px;
  text-align: center;
}
.footer-contact { font-size: 0.95rem; margin-bottom: 12px; }
.footer-sep { margin: 0 8px; color: var(--color-fg-soft); }
.footer a { color: var(--color-accent); }
.footer a:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.footer-disclaimer { color: #94A3B8; font-size: 0.8rem; max-width: 620px; margin: 0 auto; }

/* ---------- Mobile sticky bottom CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--color-border);
}
.sticky-price {
  font-family: var(--font-head); font-weight: 700; color: var(--color-primary);
  font-size: 1.05rem; margin-right: auto; font-variant-numeric: tabular-nums;
}
.sticky-cta .btn { flex-shrink: 0; }

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
  .section { padding: 72px 0; }
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 48px; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .detail-grid { grid-template-columns: 1.2fr 1fr; gap: 48px; }
  .sticky-cta { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    animation: none !important;
  }
  /* Never leave content stuck mid-reveal for these users */
  .reveal { opacity: 1 !important; transform: none !important; }
  .media-frame img { opacity: 1 !important; transform: none !important; }
}
