/* พายช้า — canal café demo
   Palette: mist (sky), klong (canal water), teak (wood/text), cha-yen (Thai-tea orange). */

:root {
  --mist: #E5ECE3;
  --klong: #23493F;
  --klong-2: #2F5D50;
  --teak: #3A2518;
  --teak-deep: #2B1A10;
  --chayen: #E8782A;
  --chayen-ink: #A84B14;
  --chayen-soft: #F2A65E;
  --milk: #FBFBF7;
  --muted: #4F5E56;
  --reed: #C9D8CF;
  --line-green: #06C755;

  --display: "Chonburi", "IBM Plex Sans Thai Looped", Georgia, serif;
  --body: "IBM Plex Sans Thai Looped", "Noto Sans Thai", "Thonburi", system-ui, sans-serif;

  --gutter: 16px;
  --max: 1200px;
  --h2: clamp(1.95rem, 1.45rem + 2.2vw, 2.85rem);
  --h3: clamp(1.45rem, 1.25rem + 0.9vw, 1.8rem);
  --focus: var(--teak);
}

@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--milk);
  color: var(--teak);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.35;
  margin: 0;
  color: var(--klong);
}

p { margin: 0 0 1em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

[id] { scroll-margin-top: 16px; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--teak);
  color: var(--milk);
  padding: 10px 16px;
  border-radius: 8px;
  --focus: var(--chayen-soft);
}
.skip:focus { left: 16px; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid transparent;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.5;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn svg { flex: none; }
.btn--sm { min-height: 44px; padding: 8px 14px; font-size: 1rem; }

.btn--tea { background: var(--chayen); color: var(--teak-deep); }
.btn--tea:hover { background: var(--chayen-soft); }

.btn--ghost { border-color: var(--reed); color: var(--milk); }
.btn--ghost:hover { background: rgba(229, 236, 227, .1); }

.btn--klong { background: var(--klong); color: var(--milk); }
.btn--klong:hover { background: var(--klong-2); }

.btn--outline { border-color: var(--klong); color: var(--klong); }
.btn--outline:hover { background: var(--mist); }

.btn--line { background: var(--line-green); color: #0F2417; }
.btn--line:hover { background: #2fd472; }

.btn--teak { background: var(--teak); color: var(--milk); }
.btn--teak:hover { background: var(--teak-deep); }

/* ---------- Concept badge + header ---------- */

.concept {
  background: var(--mist);
  text-align: center;
  padding: 10px var(--gutter) 0;
}
.concept span {
  display: inline-block;
  font-size: .875rem;
  line-height: 1.6;
  padding: 2px 12px;
  border: 1px solid rgba(58, 37, 24, .4);
  border-radius: 999px;
  color: var(--teak);
}

.site-head { background: var(--mist); }
.site-head__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--klong);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1.3;
}

.nav { display: none; }
.head-line { display: none; }

.head-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-weight: 600;
  color: var(--klong);
  text-underline-offset: 4px;
}

@media (min-width: 900px) {
  .head-link { display: none; }
  .head-line { display: inline-flex; }
  .nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
  }
  .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    color: var(--teak);
  }
  .nav a:hover { background: rgba(35, 73, 63, .08); color: var(--klong); }
}

/* ---------- Hero ---------- */

.hero { --mark: clamp(4rem, 25vw, 12rem); }

.hero__sky {
  display: flow-root;
  background: var(--mist);
  padding-top: 4px;
}

.hero__photo {
  margin: 0 calc(-1 * var(--gutter)) 20px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--reed);
}
.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 600px) and (max-width: 899px) {
  .hero__photo { aspect-ratio: 16 / 9; }
}

.hero__where {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
}

/* The wordmark: its baseline sits on the waterline (Chonburi: ascent .95em, descent .25em). */
.mark {
  font-size: var(--mark);
  line-height: 1.2;
  white-space: nowrap;
  color: var(--klong);
  margin: 0 0 -.22em;
}

.hero__water {
  display: flow-root;
  position: relative;
  background: var(--klong);
  color: var(--mist);
  padding-bottom: 56px;
  --focus: var(--chayen-soft);
}

.wave {
  position: absolute;
  left: 0;
  top: -12px;
  width: 100%;
  height: 14px;
  z-index: 2;
  pointer-events: none;
}

/* Mirrored name in the water, broken into ripples by two striped layers */
.reflect {
  position: relative;
  font-family: var(--display);
  font-size: var(--mark);
  line-height: 1.2;
  height: .85em;
  margin-top: -.23em;
  overflow: hidden;
  color: #86AC9C;
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9) 25%, transparent 92%);
          mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9) 25%, transparent 92%);
}
.reflect span {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  transform: scaleY(-1);
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0 .05em, transparent .05em .08em);
          mask-image: repeating-linear-gradient(to bottom, #000 0 .05em, transparent .05em .08em);
}
.reflect span + span {
  -webkit-mask-image: repeating-linear-gradient(to bottom, transparent 0 .05em, #000 .05em .08em);
          mask-image: repeating-linear-gradient(to bottom, transparent 0 .05em, #000 .05em .08em);
  opacity: .7;
}

@media (prefers-reduced-motion: no-preference) {
  .reflect span { animation: ripple-a 6s ease-in-out infinite; }
  .reflect span + span { animation: ripple-b 6s ease-in-out infinite; }
}

@keyframes ripple-a {
  0%, 100% { transform: translateX(-.018em) scaleY(-1); }
  50%      { transform: translateX(.018em) scaleY(-1); }
}
@keyframes ripple-b {
  0%, 100% { transform: translateX(.024em) scaleY(-1); }
  50%      { transform: translateX(-.024em) scaleY(-1); }
}

.hero__lede {
  max-width: 34rem;
  font-size: 1.125rem;
  line-height: 1.75;
  margin: 4px 0 24px;
  color: var(--mist);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero__actions .btn { flex: 1 1 140px; }

@media (min-width: 560px) {
  .hero__actions .btn { flex: 0 0 auto; }
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 0;
  font-weight: 600;
  color: var(--reed);
}
.status[hidden] { display: none; }
.status__dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--chayen-soft);
}
.status.is-open .status__dot { background: #7BD389; }

.status--light { color: var(--teak); margin: 0 0 12px; }
.status--light .status__dot { background: var(--chayen-ink); }
.status--light.is-open .status__dot { background: #2F8A55; }

@media (min-width: 900px) {
  .hero { --mark: clamp(7rem, 12.5vw, 10.5rem); }

  .hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    column-gap: 56px;
  }
  .hero__sky { padding-top: 40px; }

  .hero__photo {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    position: relative;
    z-index: 3;
    margin: 0 0 -240px;
    aspect-ratio: 4 / 5;
    border: 10px solid var(--teak);
  }
  .hero__sky .hero__text {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .hero__water .hero__text { grid-column: 1; }
  .hero__water { padding-bottom: 88px; }
  .hero__lede { font-size: 1.1875rem; }
}

/* ---------- Sections ---------- */

.sec { padding-block: clamp(56px, 9vw, 112px); }

.sec-head {
  max-width: 40rem;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.sec-head h2 { font-size: var(--h2); margin-bottom: 10px; }
.sec-head p { margin: 0; color: var(--muted); }

/* ---------- Menu ---------- */

.menu { background: var(--milk); }

.menu-group {
  display: grid;
  gap: 20px;
  padding-block: 36px;
  border-top: 1px solid rgba(58, 37, 24, .14);
}
.menu-group:first-of-type { border-top: 0; padding-top: 0; }
.menu-group:last-of-type { padding-bottom: 0; }

.menu-group__pic {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 6px;
  background: var(--mist);
}
.menu-group__pic img,
.menu-group__pic svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-group__body h3 { font-size: var(--h3); }
.menu-group__note {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 1rem;
}

.items { list-style: none; margin: 0; padding: 0; }
.item { padding-block: 12px; }
.item + .item { border-top: 1px solid rgba(58, 37, 24, .08); }

.item__row {
  display: flex;
  align-items: baseline;
  align-items: last baseline;
  gap: 10px;
}
.item__name {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.6;
}
.lead {
  flex: 1 1 20px;
  min-width: 20px;
  border-bottom: 2px dotted rgba(58, 37, 24, .35);
  transform: translateY(-.35em);
}
.price {
  flex: none;
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--chayen-ink);
  white-space: nowrap;
}
.price small {
  font-family: var(--body);
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  margin-right: 2px;
}
.item__desc {
  margin: 2px 0 0;
  max-width: 44rem;
  font-size: 1rem;
  color: var(--muted);
}

@media (min-width: 900px) {
  .menu-group {
    grid-template-columns: 5fr 7fr;
    gap: 56px;
    align-items: start;
    padding-block: 56px;
  }
  .menu-group:nth-of-type(even) .menu-group__pic { order: 2; }
  .menu-group__pic { aspect-ratio: 4 / 3; }
}

/* ---------- Story ---------- */

.story { background: var(--mist); }

.story__grid { display: grid; gap: 32px; }

.story__pic { margin: 0; }
.story__pic img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}
.story__pic figcaption {
  margin-top: 10px;
  font-size: .9375rem;
  color: var(--muted);
}

.story__text { max-width: 38rem; }
.story__text h2 { font-size: var(--h2); margin-bottom: 20px; }
.story__sign {
  font-weight: 600;
  color: var(--klong);
}

.timeline {
  list-style: none;
  margin: 32px 0 0;
  padding: 0 0 0 20px;
  border-left: 3px solid var(--klong);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 12px;
  padding-block: 8px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 1.05em;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--mist);
  border: 3px solid var(--klong);
}
.timeline__year {
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--chayen-ink);
}

@media (min-width: 900px) {
  .story__grid {
    grid-template-columns: 5fr 7fr;
    gap: 64px;
    align-items: center;
  }
  .story__pic img { aspect-ratio: 4 / 5; }
}

/* ---------- Gallery ---------- */

.gallery { background: var(--milk); }

.gallery__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gallery__grid figure {
  position: relative;
  margin: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background: var(--mist);
}
.gallery__grid figure:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}
.gallery__grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery__grid figcaption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--milk);
  color: var(--teak);
  font-size: .875rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .gallery__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  .gallery__grid figure:first-child {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
  }
  .gallery__grid figcaption { left: 12px; bottom: 12px; }
}

/* ---------- Reviews ---------- */

.reviews {
  background: var(--klong);
  color: var(--mist);
  --focus: var(--chayen-soft);
}
.reviews h2 { color: var(--milk); font-size: var(--h2); }

.reviews__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 32px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.score {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
}
.score__num {
  font-family: var(--display);
  font-size: 3rem;
  line-height: 1.2;
  color: var(--chayen-soft);
}
.score__text { max-width: 12rem; color: var(--reed); line-height: 1.6; }

.reviews__list { display: grid; gap: 36px; }

.review { margin: 0; }
.stars {
  margin: 0 0 10px;
  color: var(--chayen-soft);
  letter-spacing: 3px;
  font-size: 1.125rem;
}
.stars__off { color: rgba(201, 216, 207, .35); }
.review blockquote { margin: 0; }
.review blockquote p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--milk);
}
.review figcaption {
  margin-top: 14px;
  font-weight: 600;
  color: var(--milk);
}
.review figcaption span {
  display: block;
  font-weight: 400;
  color: var(--reed);
}

@media (min-width: 900px) {
  .reviews__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
  .review {
    padding: 0 32px;
    border-left: 1px solid rgba(201, 216, 207, .3);
  }
  .review:first-child { padding-left: 0; border-left: 0; }
  .review:last-child { padding-right: 0; }
}

/* ---------- Visit: hours, map, order ---------- */

.visit { background: var(--milk); }

.visit__grid { display: grid; gap: 48px; }
.visit h2 { font-size: var(--h2); margin-bottom: 16px; }

.hours__table {
  width: 100%;
  border-collapse: collapse;
}
.hours__table th,
.hours__table td {
  padding: 12px 0;
  border-bottom: 1px solid rgba(58, 37, 24, .12);
  text-align: left;
  font-weight: 400;
}
.hours__table td { text-align: right; font-variant-numeric: tabular-nums; }
.hours__table tr.is-closed { color: var(--muted); }
.hours__table tr.is-today th,
.hours__table tr.is-today td {
  font-weight: 600;
  color: var(--klong);
}
.hours__table tr.is-today th::after {
  content: "วันนี้";
  display: inline-block;
  margin-left: 10px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--mist);
  font-size: .875rem;
  line-height: 1.7;
}
.hours__note {
  margin: 16px 0 0;
  font-size: 1rem;
  color: var(--muted);
}

.where address {
  font-style: normal;
  font-size: 1.125rem;
  margin-bottom: 20px;
}
.where__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.where__btns .btn { flex: 1 1 220px; }

.ways {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ways li {
  padding-block: 12px;
  border-top: 1px solid rgba(58, 37, 24, .12);
}
.ways strong {
  display: block;
  color: var(--klong);
}

@media (min-width: 900px) {
  .visit__grid {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
  }
}

.order {
  display: grid;
  gap: 24px;
  margin-top: clamp(48px, 7vw, 88px);
  padding: clamp(24px, 4vw, 48px);
  border-radius: 16px;
  background: var(--chayen);
  color: var(--teak-deep);
  --focus: var(--teak-deep);
}
.order h2 { color: var(--teak-deep); font-size: var(--h2); margin-bottom: 12px; }
.order__text p:last-child { margin-bottom: 0; }
.order__note { font-size: 1rem; }

.order__btns {
  display: grid;
  gap: 12px;
}
@media (min-width: 480px) {
  .order__btns { grid-template-columns: 1fr 1fr; }
}
.order__demo {
  margin: 12px 0 0;
  font-size: 1rem;
  font-weight: 600;
}

@media (min-width: 900px) {
  .order {
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
    align-items: center;
  }
}

/* ---------- FAQ ---------- */

.faq { background: var(--mist); }

.faq__list { max-width: 48rem; }
.faq details { border-top: 1px solid rgba(58, 37, 24, .2); }
.faq details:last-child { border-bottom: 1px solid rgba(58, 37, 24, .2); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 12px 0;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--klong);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(3px) rotate(225deg); }
.faq details p {
  margin: 0;
  padding: 0 0 22px;
  max-width: 42rem;
}

/* ---------- Footer ---------- */

.site-foot {
  background: var(--klong);
  color: var(--reed);
  padding-block: 48px 40px;
  --focus: var(--chayen-soft);
}
.foot__grid { display: grid; gap: 24px; }
.foot__logo {
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1.3;
  color: var(--milk);
  margin: 0 0 6px;
}
.foot__brand p:last-child { margin: 0; }
.foot__links { list-style: none; margin: 0; padding: 0; }
.foot__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--milk);
  text-underline-offset: 4px;
}
.foot__copy {
  margin: 0;
  font-size: .9375rem;
  border-top: 1px solid rgba(201, 216, 207, .25);
  padding-top: 20px;
}

@media (min-width: 900px) {
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__copy { grid-column: 1 / -1; }
}

/* ---------- PV Dev strip (kept neutral, outside the café's look) ---------- */

.pvdev {
  background: #262626;
  color: #E8E8E8;
  font-family: system-ui, -apple-system, "Segoe UI", "IBM Plex Sans Thai Looped", sans-serif;
  font-size: .9375rem;
  line-height: 1.6;
  --focus: #F2A65E;
}
.pvdev p {
  margin: 0;
  padding: 6px var(--gutter);
  text-align: center;
}
.pvdev a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Mobile contact dock ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--milk);
  border-top: 1px solid rgba(58, 37, 24, .15);
  box-shadow: 0 -6px 18px rgba(35, 73, 63, .12);
}
.dock a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 6px;
  border-radius: 10px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}
.dock .dock__line { background: var(--line-green); color: #0F2417; }
.dock .dock__call { border-color: var(--klong); color: var(--klong); }
.dock .dock__main { background: var(--chayen); color: var(--teak-deep); }

@media (min-width: 900px) {
  .dock { display: none; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
