:root {
  --zato-red: #e2231a;
  --zato-dark: #111;
}

html { scroll-behavior: smooth; }

body {
  /* Latin renders in Arial; Thai glyphs fall through to Noto Sans Thai automatically */
  font-family: "Arial", "Helvetica", "Noto Sans Thai", sans-serif;
  color: var(--zato-dark);
}

/* offset anchor targets so the sticky navbar doesn't cover them */
#story, #products, #drinking, #csr { scroll-margin-top: 90px; }

/* ===== Logo ===== */
.zato-logo-img { height: 90px; width: auto; }
.zato-footer-logo { height: 60px; width: auto; }

/* ===== Navbar ===== */
.zato-navbar .nav-link {
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--zato-dark);
}
.zato-lang { font-size: 1rem; letter-spacing: 1px; }

/* ===== Hero ===== */
.zato-hero { padding-top: 1rem; }
.zato-new-flavor {
  color: var(--zato-red);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: .8rem;
}
.zato-hero-img { width: 100%; height: auto; display: block; }
.zato-hero-title {
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 1px;
  margin: 0;
}

/* ===== Feature sections ===== */
.zato-feature-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}
.zato-feature-title {
  font-weight: 300;
  font-size: clamp(2.0rem, 2.8vw, 1rem);
  line-height: 1.2;
  letter-spacing: 1px;
}
.zato-feature-title strong { font-weight: 900; }

.zato-arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-top: 1rem;
  border: 1px solid var(--zato-dark);
  border-radius: 50%;
  color: var(--zato-dark);
  font-size: 1.1rem;
  transition: .2s;
}
.zato-arrow-btn:hover {
  background: var(--zato-dark);
  color: #fff;
}

/* ===== Product cards ===== */
.zato-product-img {
  width: 100%;
  height: auto;
}
.zato-product-name {
  font-size: 1.2rem;
  font-weight: 700;
  /* letter-spacing: 1px; */
}
.zato-product-desc {
  color: #555;
  font-size: 1rem;
}

/* ===== Feature 3 — text overlay on image ===== */
.zato-overlay-wrap { position: relative; }
.zato-overlay-img { width: 100%; display: block; }

/* Text sits over the left side of the image on all screen sizes */
.zato-overlay-text {
  position: absolute;
  top: 50%;
  left: 5%;
  transform: translateY(-50%);
  max-width: 35%;
}

/* Mobile / tablet:
   - short text  -> stays overlaid on the image, font scaled down to fit
   - long text   -> js adds .is-stacked, text drops onto its own line below the image */
@media (max-width: 991.98px) {
  .zato-overlay-wrap:not(.is-stacked) .zato-overlay-text { max-width: 42%; }
  .zato-overlay-wrap:not(.is-stacked) .zato-feature-title {
    font-size: clamp(.8rem, 2.3vw, 1.15rem);
    line-height: 1.2;
  }
  .zato-overlay-wrap:not(.is-stacked) .zato-arrow-btn {
    width: 32px;
    height: 32px;
    font-size: .9rem;
    margin-top: .5rem;
  }

  /* long-text sections: image stays as-is, text flows below at normal size */
  .zato-overlay-wrap.is-stacked .zato-overlay-text {
    position: static;
    transform: none;
    max-width: 100%;
    margin-top: 1rem;
  }
}
@media (max-width: 575.98px) {
  .zato-overlay-wrap:not(.is-stacked) .zato-overlay-text { max-width: 46%; }
  .zato-overlay-wrap:not(.is-stacked) .zato-feature-title {
    font-size: clamp(.6rem, 3vw, .9rem);
    line-height: 1.15;
  }
  .zato-overlay-wrap:not(.is-stacked) .zato-arrow-btn {
    width: 26px;
    height: 26px;
    font-size: .75rem;
    margin-top: .35rem;
  }
}

/* ===== Bubbles on image hover ===== */
/* wrapper injected around each .js-bubble image so bubbles layer + clip over it */
.zato-bubble-host {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 8px;
  line-height: 0;
}
.zato-bubble-host > img { display: block; max-width: 100%; height: auto; }

/* a single rising bubble — clear / glassy water bubble */
.zato-bubble {
  position: absolute;
  top: 100%;                       /* starts just below the image, rises via transform */
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%,
              rgba(255,255,255,.75) 0%,
              rgba(255,255,255,.18) 42%,
              rgba(255,255,255,0)   72%);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: inset 0 0 6px rgba(255,255,255,.65),
              0 0 4px rgba(255,255,255,.45);
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  animation-name: zato-bubble-up;
  animation-timing-function: cubic-bezier(.33, 0, .25, 1);  /* smooth, slight ease */
  animation-iteration-count: 1;
}
/* rises by --rise px (image height, set per-bubble in JS) using GPU transform for smoothness */
@keyframes zato-bubble-up {
  0%   { transform: translate3d(0, 0, 0) scale(.5);  opacity: 0; }
  12%  { opacity: .85; }
  85%  { opacity: .85; }
  100% { transform: translate3d(var(--sway, 12px), calc(var(--rise, 300px) * -1), 0) scale(1.08); opacity: 0; }
}

/* ===== Product cards — zoom whole card on hover ===== */
.zato-product-card {
  transition: transform .4s ease, filter .4s ease;
  will-change: transform;
}
.zato-product-card:hover {
  transform: scale(1.05);
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 16px 28px rgba(0,0,0,.14));
}

@media (prefers-reduced-motion: reduce) {
  .zato-bubble { animation: none; display: none; }
  .zato-product-card { transition: none; }
  .zato-product-card:hover { transform: none; }
}

/* ===== Footer ===== */
.zato-footer-nav .nav-link {
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--zato-dark);
  font-size: .95rem;
}
.zato-social {
  color: var(--zato-dark);
  font-size: 1.2rem;
  margin-left: .6rem;
}
.zato-social:hover { color: var(--zato-red); }

/* ===== Age verification gate ===== */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: #e9f2f6;
  background-image: url("../images/bg-age-confirm.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.age-gate.is-hidden { display: none; }

/* no card chrome — the white circle is part of the background image, so the
   content just sits inside it and is sized as a fraction of that circle.
   The bg is 16:9 and `cover`, so the circle's on-screen diameter is
   ~49% of the rendered image width => max(49vw, 87vh). */
.age-gate { --age-circle: max(49vw, 87vh); }

.age-card {
  /* 70% of the circle keeps the block inside the curve on every side */
  width: min(calc(var(--age-circle) * .70), 560px);
  /* everything below scales from this, so the text grows with the circle */
  font-size: clamp(14px, calc(var(--age-circle) / 33), 23px);
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  /* Thai has no spaces — let long runs wrap instead of spilling past the edge */
  overflow-wrap: break-word;
  word-break: break-word;
}
.age-card-inner {
  width: 100%;
  background: transparent;
  border-radius: 0;
  text-align: center;
  padding: 0;
}
.age-state { width: 100%; }

/* proportions follow the reference: big logo, oversized title, rule + bubble,
   small body copy, medium question, wide buttons */
.age-logo { height: 5.4em; width: auto; margin-bottom: .5em; }
.age-title {
  font-weight: 800;
  letter-spacing: .05em;
  font-size: 3em;
  line-height: 1.1;
  margin: 0 0 .12em;
}
/* — • — divider under the title */
.age-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7em;
  color: var(--zato-dark);
  font-size: .8em;
  margin: 0 0 1.1em;
}
.age-dot::before,
.age-dot::after {
  content: "";
  height: 1px;
  width: 4em;
  background: currentColor;
  opacity: .5;
}
.age-text {
  font-size: .74em;
  color: #333;
  line-height: 1.9;
  margin: 0 0 1.6em;
}
.age-question {
  font-size: 1.12em;
  letter-spacing: .01em;
  line-height: 1.55;
  margin: 0 0 1.1em;
}
.age-sub {
  font-weight: 700;
  letter-spacing: 1px;
  font-size: .98em;
  line-height: 1.6;
  margin: 0 0 .9em;
}
.age-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  font-size: .74em;
  color: #333;
  margin: 0 0 2em;
  cursor: pointer;
}
.age-check input { flex: 0 0 auto; width: 1.15em; height: 1.15em; }
.age-check a, .age-links a { color: inherit; }

.age-actions { display: flex; gap: .7em; justify-content: center; }
.age-btn {
  min-width: 8em;
  padding: .85em 1em;
  font-weight: 700;
  letter-spacing: .12em;
  font-size: .78em;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity .2s, background .2s, color .2s;
}
.age-btn-outline {
  background: #fff;
  color: var(--zato-dark);
  border: 1px solid var(--zato-dark);
}
.age-btn-outline:hover { background: #f2f2f2; }
.age-btn-solid {
  background: var(--zato-dark);
  color: #fff;
  border: 1px solid var(--zato-dark);
}
.age-btn-solid:hover { background: #000; }
.age-btn-solid:disabled {
  background: #bdbdbd;
  border-color: #bdbdbd;
  cursor: not-allowed;
}
.age-links {
  font-size: .85em;
  margin: 0 0 1.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
}
.age-links a { text-decoration: underline; }
.age-links-sep { color: #bbb; }
.age-exit { margin-top: .2em; }

/* Phones / phablets: the circle is zoomed past the screen edges here, so the
   screen — not the circle — is the limit. Use fixed sizes that fill it nicely. */
@media (max-width: 600px) {
  .age-gate { overflow-y: auto; padding: 16px; }
  .age-card {
    width: 100%;
    max-width: 360px;
    margin: auto;            /* center, but allow the gate to scroll if ever too tall */
    font-size: 1rem;         /* stop the circle-based scale on phones */
  }

  /* same proportions as the reference, just capped to the screen */
  .age-logo { height: 74px; margin-bottom: .5rem; }
  .age-title { font-size: 2.4rem; letter-spacing: .05em; }
  .age-dot { font-size: .8rem; margin-bottom: 1rem; }
  .age-text { font-size: .74rem; line-height: 1.8; margin-bottom: 1.3rem; }
  .age-question { font-size: .95rem; line-height: 1.55; margin-bottom: 1rem; }
  .age-sub { font-size: .9rem; margin-bottom: .9rem; }
  .age-check { font-size: .7rem; margin-bottom: 1.5rem; }
  .age-actions { gap: .6rem; }
  .age-btn { min-width: 120px; padding: .8rem .8rem; font-size: .74rem; letter-spacing: .12em; }
  .age-links { font-size: .78rem; margin-bottom: 1.1rem; }
}

/* lock scrolling while the gate is open */
body.age-locked { overflow: hidden; }
