/* Kopi & Kaya homepage. One layout that reflows from phone to desktop.
   Colours, fonts and look follow the Figma design; the sizes are tuned so the
   hero and photos fit a laptop screen (about 1440 x 700). */
:root {
  --page: #f7f0df;
  --sage: #3e5a42;
  --red: #b23223;
  --red-hover: #8f2418;
  --cream: #f5ead3;
  --card: #fffef8;
  --ink: #38251c;
  --brown: #341f16;
  --grey: #6b6866;
  --line: rgba(56, 37, 28, 0.55);
}
* {
  box-sizing: border-box;
}
html {
  background: var(--page);
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font:
    400 17px/1.5 "Figtree",
    system-ui,
    sans-serif;
  overflow-x: hidden;
  padding-bottom: 84px;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}
ul {
  list-style: none;
  padding: 0;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
}
[id] {
  scroll-margin-top: 16px;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}
.sec {
  padding: 48px 0;
}
.center {
  text-align: center;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 18px;
  border: 2px solid transparent;
  font:
    700 17px/1.2 "Figtree",
    sans-serif;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.wide {
  width: 100%;
}
.red {
  background: var(--red);
  color: var(--cream);
}
.red:hover,
.red:active {
  background: var(--red-hover);
}
.green {
  background: var(--sage);
  color: var(--cream);
}
.green:hover {
  background: #2f4733;
}
.outline-green {
  border-color: var(--sage);
  color: var(--sage);
  background: transparent;
}
.outline-green:hover {
  background: rgba(62, 90, 66, 0.08);
}
.outline-light {
  border-color: var(--cream);
  color: var(--cream);
  background: transparent;
  min-height: 44px;
  padding: 0 18px;
  font-size: 16px;
}
.outline-light:hover {
  background: rgba(245, 234, 211, 0.14);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 5;
  background: var(--sage);
  color: var(--cream);
  padding-bottom: 44px;
}
.bar {
  display: flex;
  flex-wrap: wrap; /* phone and tablet: logo and Order now on the first row, the page links on a second row */
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}
.logo {
  display: block;
  position: relative;
  width: 112px;
  height: 84px;
  overflow: hidden;
}
.logo img {
  position: absolute;
  top: 0;
  left: -6.11%;
  width: 111.67%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.nav {
  display: contents; /* its children (links box and Order now) sit directly in .bar */
}
/* phone: the page links hide behind the menu button and open as a list under the top row */
.nav-links {
  display: none;
  flex: 0 0 100%;
  flex-direction: column;
  order: 3;
  margin-top: 6px;
  border-top: 1px solid rgba(245, 234, 211, 0.3);
}
.nav-links.open {
  display: flex;
}
.nav-links .nav-link {
  min-height: 48px;
  padding: 0 4px;
  border-bottom: 1px solid rgba(245, 234, 211, 0.15);
}
.nav > .btn {
  display: none; /* phone: no "Order now" in the top bar (the order bar at the bottom does that job) */
}
.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-left: auto; /* the menu button sits on the right */
  padding: 0;
  border: 1px solid var(--cream);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
}
.menu-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.menu-btn .cross,
.menu-btn[aria-expanded="true"] .bars {
  display: none;
}
.menu-btn[aria-expanded="true"] .cross {
  display: inline;
}
/* tablet and up: no menu button, the links sit in a row */
@media (min-width: 640px) {
  .menu-btn {
    display: none;
  }
  .nav > .btn {
    display: inline-flex; /* tablet and desktop: "Order now" is back */
  }
  .nav-links {
    display: flex;
    flex-direction: row;
    gap: 24px;
    margin-top: 0;
    padding-bottom: 8px;
    border-top: 0;
  }
  .nav-links .nav-link {
    min-height: 44px;
    padding: 0;
    border-bottom: 0;
  }
}
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* easy to tap */
  font:
    600 16px/1.2 "Figtree",
    sans-serif;
  text-decoration: none;
}
.nav-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.hero h1 {
  margin-top: 20px;
  font:
    400 clamp(44px, 13.4vw, 64px)/0.92 "Caprasimo",
    serif;
  text-wrap: balance;
}
.hero .sub {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.4;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}
.hero-cta {
  display: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1.5px solid rgba(245, 234, 211, 0.65);
  border-radius: 999px;
  font:
    600 15px/1 "Figtree",
    sans-serif;
  color: var(--cream);
}
.photos {
  position: relative;
  height: clamp(250px, 72vw, 340px);
  margin-top: 24px;
}
.photos img {
  position: absolute;
  width: 47%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  will-change: transform;
}
/* hover: the photo comes to the front and grows, so overlapped photos can be seen in full.
   Uses the separate scale property so it stacks with the scroll animation transform. */
.photos img {
  transition:
    scale 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.35s ease;
}
@media (hover: hover) {
  .photos img:not(.flying):hover {
    z-index: 10;
    scale: 1.14;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    cursor: zoom-in;
  }
}
.p-a {
  left: 0;
  top: 14%;
  transform: rotate(3.85deg);
}
.p-b {
  left: 25%;
  top: 40%;
  transform: rotate(-8.92deg);
  z-index: 2;
}
.p-c {
  right: 0;
  top: 0;
  transform: rotate(-2.03deg);
}

/* ---------- signatures ---------- */
.sig-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.eyebrow {
  margin-bottom: 4px;
  font:
    500 18px/1.4 "Figtree",
    sans-serif;
  color: var(--red);
}
.h2 {
  font:
    400 40px/0.95 "Caprasimo",
    serif;
}
.t-green {
  color: var(--sage);
}
.t-red {
  color: var(--red);
}
.t-brown {
  color: var(--brown);
}
.cards {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}
.card {
  position: relative;
  padding: 20px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  text-align: center;
}
/* footer links jump straight to these cards: leave room above them */
#sig-cold,
#sig-coffee {
  scroll-margin-top: 150px;
}
.card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 25px;
}
.card h3 {
  margin-top: 16px;
  font:
    400 28px/1.2 "Caprasimo",
    serif;
  letter-spacing: -0.3px;
  color: var(--red);
}
.card p {
  margin-top: 8px;
  font:
    500 17px/1.5 "Figtree",
    sans-serif;
  text-wrap: balance;
}
.price {
  display: flex; /* the small note lines up with the middle of the price, not its baseline */
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 6px;
  margin-top: 12px;
  font:
    600 26px/1.5 "Fraunces",
    serif;
  font-variation-settings:
    "SOFT" 0,
    "WONK" 1;
  letter-spacing: -0.3px;
  color: var(--sage);
}
.price small {
  font:
    500 16px "Inter",
    sans-serif;
  letter-spacing: 0;
  color: var(--ink);
}
/* "· iced +RM1" sits beside the price; in a narrow card it drops under the price instead of breaking the line */
.price .note::before {
  content: "· ";
}
.price .note {
  transform: translateY(-4px); /* optical centring against the big numerals */
}
.card {
  container-type: inline-size;
}
@container (max-width: 260px) {
  .price .note {
    flex-basis: 100%;
    text-align: center;
    font-size: 14px;
    transform: none;
  }
  .price .note::before {
    content: none;
  }
}
.tag {
  position: absolute;
  left: 0;
  top: 34px;
  z-index: 6;
  padding: 8px 18px 8px 16px;
  background: var(--cream);
  border-radius: 0 22px 22px 0;
  font:
    400 20px/1.1 "Caprasimo",
    serif;
  color: var(--red);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* ---------- pitch + order slip ---------- */
.order-grid {
  display: grid;
}
.bottle {
  width: 100%;
  margin-top: 20px;
  aspect-ratio: 454 / 598;
  object-fit: cover;
  object-position: 55% 50%;
}
/* ---------- our story band (between the signatures and the order slip): photo beside the words ---------- */
.about {
  background: var(--cream);
}
/* the photo runs edge to edge on the left, the words sit on the right */
.about .about-in {
  display: grid;
  max-width: none;
  margin: 0;
  padding: 0;
}
.about figure {
  position: relative;
  margin: 0;
}
.about figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 50%;
}
.about-in > div {
  align-self: center;
  padding: 40px 20px 48px;
}
.about h2 {
  font:
    400 36px/1.1 "Caprasimo",
    serif;
  color: var(--sage);
}
/* the greeting types itself in three languages (script.js); the screen-reader text above it never changes */
.greeting {
  min-height: 1.4em; /* keeps the height steady when the Chinese font is taller */
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.caret {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  margin-left: 4px;
  vertical-align: -0.05em;
  background: var(--sage);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .caret {
    display: none;
  }
}
.about-text {
  max-width: 52ch;
  margin-top: 14px;
  font:
    500 18px/1.6 "Figtree",
    sans-serif;
}
.about-facts strong {
  font-weight: 700;
}
.about-facts {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(56, 37, 28, 0.22);
}
.about-facts li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(56, 37, 28, 0.22);
  font:
    500 17px/1.5 "Figtree",
    sans-serif;
}
.about-facts .star {
  width: 14px;
  height: 16px;
  flex: none;
  margin-top: 4px;
  color: var(--sage);
}
.order h2 {
  text-align: center;
  font:
    400 32px/1.1 "Caprasimo",
    serif;
}

.closer {
  margin: 16px 0 32px;
  text-align: center;
  font:
    400 28px/1.1 "Caprasimo",
    serif;
  color: var(--sage);
}
/* tablet (640 to 899px): one column, so keep the photo and the slip a sensible size and centred */
@media (min-width: 640px) and (max-width: 899px) {
  .order .bottle {
    display: block;
    max-width: 440px;
    margin: 20px auto 0;
  }
  .order .slip {
    width: 100%;
    max-width: 540px;
    margin-inline: auto;
  }
}
.slip {
  position: relative;
  padding: 20px 20px 24px;
  background: #fff;
  filter: drop-shadow(0 4px 4px rgba(134, 131, 131, 0.25));
}
.slip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 9px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='9' viewBox='0 0 16 9'><path d='M0 0H16L8 9Z' fill='%23fff'/></svg>")
    0 0 / 16px 9px repeat-x;
}
.slip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
}
.slip-head h3 {
  font:
    400 24px/1.3 "Caprasimo",
    serif;
}
.slip-head img {
  width: 84px;
  height: 56px;
  object-fit: cover;
}
.field {
  padding: 16px 0;
  border-top: 0.5px solid var(--line);
}
.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.lbl {
  display: block;
  font:
    700 17px/1.4 "Figtree",
    sans-serif;
}
.meta {
  font:
    500 14px/1.4 "Figtree",
    sans-serif;
  color: var(--grey);
}
.stepper {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 10px 0 8px;
}
.stepper button {
  width: 44px;
  height: 46px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.stepper button img {
  width: 100%;
  height: 100%;
}
.stepper output {
  min-width: 2ch;
  text-align: center;
  font:
    700 28px/1.2 "Figtree",
    sans-serif;
}
input[type="date"] {
  cursor: pointer; /* the whole field opens the calendar */
}
.field select,
.field input {
  display: block;
  width: 100%;
  height: 52px;
  margin-top: 8px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font:
    500 16px "Figtree",
    sans-serif;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background: #fff url("images/icon-chevron.svg") no-repeat right 16px center /
    17px 9px;
}
.field input::placeholder {
  color: var(--ink);
  opacity: 0.75;
}
/* Delivery / Pickup switch */
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.seg label {
  position: relative;
}
.seg input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  font:
    600 16px "Figtree",
    sans-serif;
}
.seg input:checked + span {
  background: var(--ink);
  color: #fbf6ea;
}
.seg input:focus-visible + span {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
}
.pair.single {
  grid-template-columns: minmax(0, 1fr);
}
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.pair select,
.pair input {
  padding: 0 12px;
}
.pair select {
  background-position: right 12px center;
  padding-right: 32px;
}
.total {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sum {
  display: block;
  font:
    400 34px/1.2 "Caprasimo",
    serif;
}
/* Bottles stepper and total share one row; the stepper is tighter so both fit on a phone */
.bottles .stepper {
  gap: 8px;
  margin: 8px 0 0;
}
.bottles .stepper button {
  width: 40px;
}
.bottles .fee {
  display: block;
  font-weight: 700; /* the fee is part of the price, so it reads as clearly as the line above it */
  color: var(--ink);
}
.bottles .fee[hidden] {
  display: none;
}
.bottles .sum {
  margin-top: 8px;
}
.pair .full {
  grid-column: 1 / -1;
  margin-top: -4px;
}
.pair .err {
  color: var(--red);
  font-weight: 700;
}
.pair .err[hidden] {
  display: none;
}
.preview-lbl {
  margin-top: 4px;
  font:
    700 14px/1.4 "Figtree",
    sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
}
.preview {
  white-space: pre-line;
  margin: 8px 0 16px;
  padding: 14px 16px;
  background: var(--cream);
  border-radius: 4px 16px 16px 16px;
  font:
    500 16px/1.5 "Figtree",
    sans-serif;
}
.slip .btn {
  min-height: 52px;
}
.note {
  margin-top: 12px;
  text-align: center;
  font:
    400 14px/1.4 "Figtree",
    sans-serif;
  color: #5f5651;
}

/* ---------- marquee ---------- */
.marquee {
  display: flex;
  align-items: center;
  height: 56px;
  overflow: hidden;
  background: var(--sage);
  white-space: nowrap;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: slide 40s linear infinite;
}
.mq {
  display: flex;
  flex: none;
}
.mq span {
  font:
    700 18px/1 "Figtree",
    sans-serif;
  color: #eee3cf;
}
.mq span::after {
  content: "·";
  margin: 0 22px;
}
@keyframes slide {
  to {
    transform: translateX(-25%); /* one of the four copies */
  }
}

/* ---------- reviews ---------- */
.reviews {
  margin-top: 24px;
  padding: 16px;
  background: var(--card);
  border-radius: 20px;
}
.rv-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0 16px;
  text-align: center;
}
.rv-summary b {
  font:
    600 18px "Figtree",
    sans-serif;
  letter-spacing: 0.02em;
}
.stars {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 2px;
  color: var(--sage);
}
.rv-summary small {
  font-size: 14px;
  color: var(--grey);
}
.rv-summary strong {
  color: var(--ink);
}
.g {
  font:
    600 22px "Figtree",
    sans-serif;
  color: var(--sage);
}
.rv-wrap {
  position: relative;
  min-width: 0;
}
.rv-track {
  display: flex;
  gap: 12px;
  margin: 0 -16px;
  padding: 0 16px;
  scroll-padding: 0 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.rv-track::-webkit-scrollbar {
  display: none;
}
.rv-card {
  flex: 0 0 82%;
  min-height: 200px;
  padding: 16px;
  scroll-snap-align: start;
  background: var(--page);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rv-card header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rv-card header div {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.rv-card b {
  font:
    600 15px/1.25 "Figtree",
    sans-serif;
}
.rv-card time {
  font-size: 14px;
  color: #6a5a4e;
}
.rv-av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-weight: 600;
}
.rv-s {
  color: var(--sage);
  letter-spacing: 2px;
  font-size: 16px;
}
.rv-card p {
  font-size: 15px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rv-card.open p {
  -webkit-line-clamp: unset;
}
.rv-more {
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 0;
  border: 0;
  background: none;
  font:
    500 14px "Figtree",
    sans-serif;
  color: #6a5a4e;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.rv-arrow {
  display: none;
}

/* ---------- instagram ---------- */
/* the desktop .sec rule puts 72px back, so these two are written as .sec.xxx to win */
.sec.ig-sec {
  padding-top: 0;
}
.sec.rv-sec {
  padding-bottom: 24px;
}
.ig {
  padding: 20px;
  background: var(--card);
  border-radius: 25px;
}
.ig-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.ig-head img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}
.ig-who {
  flex: 1;
  min-width: 180px;
}
.ig-who b {
  display: block;
  font-size: 18px;
}
.ig-who span {
  font-size: 15px;
  line-height: 1.35;
}
.ig-head .btn {
  width: 100%;
}
.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.ig-grid a {
  position: relative; /* anchors the "opens in a new tab" badge */
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: #e2d3b3;
}
/* "Opens in a new tab" badge, top right. Drawn in CSS so the HTML stays the same. */
.ig-grid a::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sage)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5ead3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3C/svg%3E")
    center / 18px no-repeat;
  box-shadow: 0 2px 8px rgba(43, 29, 20, 0.3);
  opacity: 0;
  transform: translateY(-4px) scale(0.9);
  transition:
    opacity 0.2s,
    transform 0.2s;
  pointer-events: none; /* the whole photo is the link; the badge is only a hint */
}
.ig-grid a:focus-visible::after {
  opacity: 1;
  transform: none;
}
@media (hover: hover) {
  .ig-grid a:hover::after {
    opacity: 1;
    transform: none;
  }
}
.ig-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}
.ig-grid a:hover img {
  transform: scale(1.04);
}

/* ---------- visit ---------- */
.shop {
  height: 300px;
  background: url("images/interior.webp") 50% 48% / cover;
}
.visit-grid {
  display: grid;
  gap: 20px;
  margin-top: -56px;
  padding-bottom: 28px;
  position: relative;
}
.hours {
  padding: 22px 20px;
  background: #fae4b7;
  border-radius: 20px;
  box-shadow: 0 4px 9.3px rgba(0, 0, 0, 0.25);
  color: var(--brown);
}
.hours h2 {
  font:
    400 32px/1.15 "Caprasimo",
    serif;
}
/* hand-drawn line under the title: draws itself when the card scrolls into view (script.js) */
.scribble {
  display: block;
  width: min(260px, 70%);
  height: 14px;
  margin: 4px 0 2px;
  overflow: visible;
}
.scribble path {
  fill: none;
  stroke: #607c63;
  stroke-width: 3.5;
  stroke-linecap: round;
}
.scribble.ready path {
  transition: stroke-dashoffset 1s cubic-bezier(0.65, 0, 0.35, 1);
}
.tapau {
  display: block;
  width: max-content;
  margin: 6px 0 14px;
  transform: rotate(-3deg);
  font:
    500 18px "Figtree",
    sans-serif;
  color: rgba(52, 31, 22, 0.8);
}
.hours-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--sage);
  color: #fbf6ea;
  box-shadow: 0 2px 6px rgba(52, 31, 22, 0.22);
  font:
    700 16px/1.3 "Figtree",
    sans-serif;
}
.hours-status::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: #fbf6ea;
}
.hours-status:empty {
  display: none;
}
/* closed: red fill and a hollow dot, so the state does not rely on colour alone */
.hours-status.closed {
  background: var(--red);
}
.hours-status.closed::before {
  background: transparent;
  box-shadow: inset 0 0 0 2px #fbf6ea;
}
.hr {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font:
    600 18px/1.4 "Figtree",
    sans-serif;
}
.sun {
  padding-bottom: 14px;
  border-bottom: 0.5px solid var(--line);
  font-weight: 500;
}
.sun span:last-child {
  opacity: 0.75;
}
.addr {
  margin-top: 14px;
  font:
    600 18px/1.4 "Figtree",
    sans-serif;
}
.small {
  margin-top: 2px;
  font:
    400 16px/1.5 "Figtree",
    sans-serif;
}
.park {
  font:
    400 16px/1.4 "Figtree",
    sans-serif;
}
/* Open / closed sign (script.js fills it in, Malaysia time): hangs under "Order now" on tablet and desktop, sits beside the badge on phones */
.bar {
  position: relative;
}
.sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 16px 8px;
  background: var(--cream);
  color: var(--ink);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.sign b {
  font:
    400 22px/1 "Caprasimo",
    serif;
  color: var(--sage);
}
.sign.closed b {
  color: var(--red);
}
.sign span {
  font:
    600 14px/1.2 "Figtree",
    sans-serif;
}
.sign-nav {
  display: none;
}
.sign-hero {
  padding: 5px 10px 6px;
}
.sign-hero b {
  font-size: 20px;
}
.sign-hero span {
  font-size: 13px;
}
@media (min-width: 640px) {
  .sign-hero {
    display: none;
  }
  .sign-nav {
    display: flex;
    position: absolute;
    right: 0;
    top: 72px;
    z-index: 6;
  }
}
.hours {
  position: relative;
}
.hours-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: 18px;
}
.hours .btn {
  border-width: 1px;
  border-radius: 25px;
  min-width: 214px;
}
.map {
  position: relative;
  height: 280px;
  overflow: hidden;
  border-radius: 12px;
  background: #e8e0cc;
}
.map iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- footer ---------- */
.foot {
  padding: 40px 0 28px;
  background: var(--brown);
  color: var(--cream);
}
.foot-grid {
  display: grid;
  gap: 28px;
}
.wordmark {
  width: 180px;
  height: auto;
}
.socials {
  display: flex;
  gap: 4px;
  margin: 12px 0 0 -10px;
}
.socials a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--cream);
}
.socials svg {
  width: 28px;
  height: 28px;
}
.foot h4 {
  margin-bottom: 8px;
  font:
    700 17px/1.2 "Figtree",
    sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.foot li a {
  display: block;
  font-size: 17px;
  line-height: 44px;
  color: var(--cream);
  text-decoration: none;
}
.foot li a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.foot p {
  font:
    500 17px/1.55 "Figtree",
    sans-serif;
}
.foot-info {
  display: grid;
  gap: 18px;
}
/* address, hours and parking: an icon instead of a heading (Lucide line icons, ISC licence) */
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.info-ico {
  width: 24px;
  height: 24px;
  flex: none;
  margin-top: 3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.foot .sample-note {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.9;
}
.legal {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 0.5px solid rgba(245, 234, 211, 0.35);
  font-size: 14px;
  opacity: 0.9;
}

/* ---------- fixed order bar (phones and small tablets) ---------- */
.orderbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  background: var(--card);
  border-top: 2px solid #e2d3b3;
  box-shadow: 0 -6px 20px rgba(43, 29, 20, 0.12);
  transition: transform 0.3s ease;
}
.orderbar.hide {
  transform: translateY(110%);
}
.bar-price {
  font:
    500 14px/1.25 "Figtree",
    sans-serif;
}
.bar-price b {
  font:
    600 22px "Fraunces",
    serif;
  font-variation-settings:
    "SOFT" 0,
    "WONK" 1;
  color: var(--sage);
}

/* ---------- scroll animation state (desktop only, set by script.js) ---------- */
.anim .card:not(.feat) img,
.anim .card.feat img {
  visibility: hidden;
}
.anim .tag {
  opacity: 0;
  transform: translateX(-16px);
}
.anim .tag.show {
  opacity: 1;
  transform: none;
}

/* =====================================================================
   Tablet
   ===================================================================== */
@media (min-width: 640px) {
  .wrap {
    padding: 0 32px;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .rv-card {
    flex-basis: 46%;
  }
  .ig-head .btn {
    width: auto;
  }
  .photos {
    height: 340px;
  }
}

/* =====================================================================
   Desktop (laptop first: hero and photos fit about 1440 x 700)
   ===================================================================== */
@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }
  .wrap {
    padding: 0 48px;
  }
  .sec {
    padding: 72px 0;
  }
  .orderbar {
    display: none;
  }

  /* hero */
  .hero {
    padding-bottom: 56px;
  }
  .bar {
    flex-wrap: nowrap;
    min-height: 0;
    height: 80px;
  }
  .logo {
    width: 120px;
    height: 80px;
  }
  .nav {
    display: flex;
    align-items: center;
    gap: 32px;
  }
  .nav-links {
    flex: none;
    order: 0;
    gap: 32px;
    padding-bottom: 0;
  }
  .nav-link {
    min-height: 0;
  }
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "h1 h1" "copy photos";
    column-gap: 40px;
    row-gap: 20px;
    align-items: start;
  }
  .hero h1 {
    grid-area: h1;
    margin-top: 60px;
    font-size: clamp(52px, 6.5vw, 84px);
    line-height: 0.95;
    max-width: 14em;
  }
  .hero-copy {
    grid-area: copy;
    padding-top: 10px;
  }
  .hero .sub {
    margin-top: 0;
    max-width: 24em;
    font-size: 20px;
  }
  .hero-actions {
    margin-top: 40px;
    gap: 20px;
  }
  .hero-cta {
    display: inline-flex;
  }
  /* Hero photos, positioned from the Figma frame (1440 wide, photos 275px):
       cold brew  left 523  top 479
       toast      left 816  top 596
       coffee     left 1119 top 392
     Converted to multiples of the photo size --u so the group keeps its shape at any width. */
  .photos {
    --u: clamp(150px, 14vw, 250px);
    grid-area: photos;
    justify-self: end;
    width: calc(var(--u) * 3.167);
    height: calc(var(--u) * 1.742);
    margin-top: calc(var(--u) * -0.3); /* coffee cup rises beside the heading */
    margin-right: min(
      0px,
      calc(612px - 50vw)
    ); /* reaches toward the window edge on wide screens */
    margin-bottom: calc(
      var(--u) * -0.35
    ); /* toast overlaps into the next section, like the Figma */
  }
  .photos img {
    width: var(--u);
    border-radius: 24px;
  }
  /* --down / --right: extra pixels to nudge a photo. Change these numbers to move them. */
  .p-a {
    --down: 25px;
    --right: 0px;
    left: var(--right);
    top: calc(var(--u) * 0.316 + var(--down));
  } /* cold brew */
  .p-b {
    --down: 0px;
    --right: 20px;
    left: calc(var(--u) * 1.065 + var(--right));
    top: calc(var(--u) * 0.742 + var(--down));
  } /* toast */
  .p-c {
    left: auto;
    right: 0;
    top: 0;
  } /* coffee */

  /* signatures */
  .sig-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    text-align: left;
  }
  .h2 {
    font-size: 38px;
  }
  /* menu block narrower than the page so the cards and photos sit at a comfortable size */
  .sig-head,
  .cards {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
  }
  .cards {
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: 24px;
    margin-top: 32px;
    align-items: start;
  }
  .card p {
    font-size: 16px;
  }
  .price {
    font-size: 23px;
  }
  .card.feat {
    margin-top: -14px;
    padding: 24px;
  }
  .card h3 {
    font-size: 24px;
  }

  /* pitch + order slip */
  .order-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "left slip";
    column-gap: 64px;
    align-items: start;
  }
  /* our story band: photo on the left half, words on the right half */
  .about .about-in {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .about figure {
    min-height: 520px;
  }
  .about figure img {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
    object-position: 55% 50%; /* keeps the three faces, trims the left edge (chalkboard) */
  }
  .about-in > div {
    padding: 72px 48px;
  }
  .about-in > div > * {
    max-width: 520px;
    margin-inline: auto; /* centres the text block in the right half, also on very wide screens */
  }
  .about h2 {
    font-size: 44px;
  }
  .about-text {
    font-size: 19px;
  }
  .order-left {
    grid-area: left;
    align-self: center; /* the left column sits level with the middle of the order slip */
  }
  .order h2 {
    text-align: center;
  }
  .bottle {
    display: block;
    max-width: 440px;
    margin: 24px auto 0;
  }
  .closer {
    max-width: 440px;
    margin: 16px auto 32px;
    text-align: center;
  }
  .slip {
    grid-area: slip;
    max-width: 540px;
    padding: 28px 28px 32px;
  }

  /* reviews */
  .reviews {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    margin-top: 32px;
    padding: 28px;
  }
  .rv-summary {
    padding: 0;
  }
  .rv-track {
    margin: 0;
    padding: 2px;
    gap: 16px;
  }
  .rv-card {
    flex: 0 0 calc((100% - 32px) / 3);
    min-height: 210px;
  }
  .rv-arrow {
    display: grid;
    place-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 32px;
    height: 32px;
    padding: 0 0 2px;
    border: 1px solid #ddd2b8;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(43, 29, 20, 0.12);
  }
  .rv-arrow.prev {
    left: -16px;
  }
  .rv-arrow.next {
    right: -16px;
  }
  .rv-wrap.fits .rv-arrow {
    display: none;
  }

  /* instagram */
  .ig {
    padding: 32px;
  }
  .ig-head {
    flex-wrap: nowrap;
    gap: 20px;
    margin-bottom: 24px;
  }
  .ig-head img {
    width: 88px;
    height: 88px;
  }
  .ig-who b {
    font-size: 20px;
  }
  .ig-who span {
    font-size: 16px;
  }
  .ig-grid {
    gap: 16px;
    margin-top: 0;
  }
  .ig-grid a {
    border-radius: 20px;
  }
  .ig-grid a::after {
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    background-size: 20px;
  }

  /* visit */
  .shop {
    height: 460px;
  }
  .visit-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    margin-top: -96px;
    padding-bottom: 72px;
    align-items: stretch;
  }
  .hours {
    padding: 32px;
    align-self: start;
  }
  .hours h2 {
    font-size: 36px;
  }
  .tapau {
    position: absolute;
    top: 66px;
    right: 33px;
    width: auto;
    margin: 0;
    transform: rotate(-4.24deg);
    font-size: 20px;
  }
  .hours .hr:first-of-type {
    margin-top: 16px;
  }
  .scribble {
    width: min(260px, 44%);
  }
  .map {
    height: auto;
    min-height: 380px;
    border-radius: 16px;
    align-self: stretch;
  }

  /* footer */
  .foot {
    padding: 56px 0 32px;
  }
  .foot-grid {
    grid-template-columns: 1.1fr 0.8fr 1fr 1.3fr;
    gap: 40px;
  }
  .legal {
    flex-direction: row;
    justify-content: space-between;
    margin-top: 40px;
  }
}

@media (min-width: 1200px) {
  .hero h1 {
    max-width: none;
  }
}
@media (min-width: 1300px) {
  .photos {
    --u: clamp(200px, 16.5vw, 250px);
  } /* bigger photos where there is room */
}

@media (prefers-reduced-motion: reduce) {
  html,
  .rv-track {
    scroll-behavior: auto;
  }
  .marquee-track {
    animation: none;
  }
  .orderbar,
  .tag,
  .ig-grid a::after {
    transition: none;
  }
  .ig-grid a::after {
    transform: none;
  }
}

/* mid-size desktops: the card is too narrow for the Tapau line to sit beside the drawn line, so it moves under it */
@media (min-width: 900px) and (max-width: 1199px) {
  .tapau {
    position: static;
    display: block;
    width: max-content;
    margin: 6px 0 14px;
    transform: rotate(-3deg);
  }
  .hours .hr:first-of-type {
    margin-top: 0;
  }
  .scribble {
    width: min(260px, 70%);
  }
}

/* ---------- floating WhatsApp button (desktop and tablet) ---------- */
.wa-float {
  display: none;
}
@media (min-width: 900px) {
  .wa-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 22px 0 18px;
    border-radius: 999px;
    background: var(--red);
    color: var(--cream);
    text-decoration: none;
    font:
      700 16px/1 "Figtree",
      sans-serif;
    box-shadow: 0 10px 24px rgba(52, 31, 22, 0.28);
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      background 0.15s;
  }
  .wa-float svg {
    width: 24px;
    height: 24px;
    flex: none;
  }
  .wa-float.show {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .wa-float:hover {
    background: var(--red-hover);
  }
}

/* ---------- nav jumps: hide the flying photos during the trip, show them at the end ---------- */
/* no opacity fade here: when the trip ends, the flying photo and the card's own photo swap in the same frame,
   so the card never shows an empty gap (that gap was the flash) */
.photos img {
  transition:
    scale 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.35s ease;
}
.anim.jumping .photos img {
  opacity: 0;
  transition: none;
}
.anim.jumping .card img {
  visibility: visible;
}
@media (prefers-reduced-motion: reduce) {
  .wa-float {
    transition: none;
  }
}

.socials svg {
  width: 24px;
  height: 24px;
}

/* ---------- phone tidy-up (under 640px): hero badge and sign, the Jom breakfast card ---------- */
@media (max-width: 639px) {
  .hero-actions {
    gap: 10px;
  }
  .sign-hero {
    padding: 5px 8px 6px;
  }
  .sign-hero b {
    font-size: 19px;
  }
  .sign-hero span {
    font-size: 12px;
  }
  .hours {
    padding: 20px 18px;
  }
  .hours h2 {
    font-size: clamp(24px, 7vw, 30px);
  }
  .tapau {
    margin: 4px 0 10px;
    font-size: 16px;
  }
  .hours-status {
    margin-top: 12px;
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 14px;
  }
  .hours-status::before {
    width: 8px;
    height: 8px;
  }
  .hr {
    font-size: 16px;
  }
  .hr span:last-child {
    white-space: nowrap; /* "7:30am–4pm" never splits */
  }
  .addr {
    margin-top: 10px;
    font-size: 16px;
  }
  .park {
    font-size: 15px;
  }
  .hours-foot {
    gap: 10px 14px;
    margin-top: 14px;
  }
  .hours .btn {
    min-width: 0;
    padding-inline: 18px;
  }
}
