/* ==========================================================================
   KEDAI KOPI GIMBO — single-card editorial landing page
   Pure HTML + CSS (the temporary preview gate lives in gate.js / gate.css).
   ========================================================================== */

:root {
  --aksen: #005437;
  --kertas: #FDFAF7;
  --tinta: #1A1A1A;
  --redup: #6B6B6B;
  --garis: #E8E0D8;
  --putih: #FFFFFF;
  --nav-h: 64px;
  --serif: "Fraunces", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Karla", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* derived */
  --halaman: #F3F0EA;
  --aksen-gelap: #00432C;
  --aksen-tipis: rgba(0, 84, 55, 0.06);
  --ease: cubic-bezier(0.22, 0.61, 0.12, 1);
  --ease-out: cubic-bezier(0.16, 0.84, 0.24, 1);

  --card-r: 28px;
  --media-r: 18px;
  --tab-r: 18px;
  --gutter: clamp(24px, 3vw, 44px);
  --pad-y: 6vh;
  --pad-x: 4vw;
  /* the body's real top + bottom padding, safe areas (notch, home bar) included */
  --pads: calc(max(var(--pad-y), env(safe-area-inset-top, 0px)) + max(var(--pad-y), env(safe-area-inset-bottom, 0px)));
  /* one spacing rhythm for every view inside the card (hero and panels):
     the gap under the nav equals the side and bottom gutter */
  --space-top: var(--gutter);
  /* headline trim: 0.84 ≈ 1rem smaller on desktop, the same proportion elsewhere */
  --h1-scale: 0.84;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* the scrollbar's space is always reserved (equally on both sides), so the
     card never shifts when a long panel opens */
  scrollbar-gutter: stable both-edges;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding:
    max(var(--pad-y), env(safe-area-inset-top))
    max(var(--pad-x), env(safe-area-inset-right))
    max(var(--pad-y), env(safe-area-inset-bottom))
    max(var(--pad-x), env(safe-area-inset-left));
  background: var(--halaman);
  color: var(--tinta);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--aksen);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   Card
   ========================================================================== */

.card {
  position: relative;
  width: min(92vw, 1440px);
  /* capped so very tall screens don't turn the photo into a narrow sliver */
  min-height: min(88vh, 980px);
  display: grid;
  grid-template-rows: var(--nav-h) 1fr;
  /* minmax(0, …): wide content (the photo strip) can never stretch the card */
  grid-template-columns: minmax(0, 1fr);
  padding: 0 var(--gutter);
  background: var(--kertas);
  border: 1px solid var(--garis);
  border-radius: var(--card-r);
  box-shadow:
    0 1px 2px rgba(26, 26, 26, 0.03),
    0 30px 70px -40px rgba(70, 48, 26, 0.22);
  overflow: hidden;
  overflow: clip; /* clips like hidden, but lets the nav stay sticky */
  isolation: isolate;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--nav-h);
  border-bottom: 1px solid var(--garis);
  background: var(--kertas);
}

.logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  animation: fade 0.9s var(--ease) 0.1s both;
}

.logo__img {
  width: 36px;
  height: 36px;
  flex: none;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo__sub {
  margin-bottom: 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--aksen);
}

.logo__mark {
  font-family: var(--serif);
  font-weight: 560;
  font-size: 21px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tinta);
}

.nav__links {
  display: flex;
  gap: clamp(24px, 3vw, 44px);
  animation: fade 0.9s var(--ease) 0.25s both;
}

.nav__links a {
  position: relative;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tinta);
  transition: color 0.4s var(--ease);
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--aksen);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}

.nav__links a:hover { color: var(--aksen); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Order — the one nav item that asks for attention: a tinted pill with a live dot */
.nav__links .nav__order {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: -6px 0;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  background: rgba(0, 84, 55, 0.09);
  color: var(--aksen);
  font-weight: 600;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

.nav__links .nav__order::after { display: none; }

.nav__links .nav__order:hover {
  background: var(--aksen);
  color: var(--putih);
}

.nav__links .nav__order:hover .nav__order-dot { background: var(--putih); }

.nav__order-dot {
  position: relative;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aksen);
}

/* a slow ripple — calm, but enough to catch the eye */
.nav__order-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--aksen);
  animation: ripple 2.4s var(--ease-out) 1.6s infinite;
}

.nav__links .nav__order:hover .nav__order-dot::before { background: var(--putih); }

/* Home is marked while no panel is open */
.card:not(:has(.panel:target)) .nav__links a[href="#top"] { color: var(--aksen); }
.card:not(:has(.panel:target)) .nav__links a[href="#top"]::after { transform: scaleX(1); }

/* the open panel's link stays marked */
.card:has(#about:target)      .nav__links a[href="#about"],
.card:has(#experience:target) .nav__links a[href="#experience"],
.card:has(#location:target)   .nav__links a[href="#location"] { color: var(--aksen); }

.card:has(#about:target)      .nav__links a[href="#about"]::after,
.card:has(#experience:target) .nav__links a[href="#experience"]::after,
.card:has(#location:target)   .nav__links a[href="#location"]::after { transform: scaleX(1); }

.nav__links .nav__links-cta { display: none; }

.nav__cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--aksen);
  color: var(--putih);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background-color 0.4s var(--ease);
  animation: fade 0.9s var(--ease) 0.25s both;
}

.nav__cta:hover { background: var(--aksen-gelap); }

.arrow {
  display: inline-block;
  transition: transform 0.45s var(--ease);
}

.nav__cta:hover .arrow,
.btn--primary:hover .arrow { transform: translateX(4px); }

/* Mobile menu buttons (hidden on desktop) */
.nav__burger { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr) 48px;
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "copy media rail"
    "meta media rail";
  column-gap: 0;
  padding: var(--space-top) 0 var(--gutter);
  min-height: 0;
}

/* ---- Photograph -------------------------------------------------------- */

.hero__media {
  grid-area: media;
  position: relative;
  margin: 0;
  min-height: 440px;
  border-radius: var(--media-r);
  overflow: hidden;
  background: #D9CFC2;
  animation: media-in 1.6s var(--ease) 0.3s both;
}

.hero__media picture {
  position: absolute;
  inset: 0;
  animation: settle 2.6s var(--ease-out) 0.3s both;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 44% 52%;
  transform: scale(1);
  transition: transform 2.4s var(--ease-out);
}

/* the only "movement" on the photo: a slow, slight drift on hover */
.hero__media:hover img { transform: scale(1.025) translate3d(-0.6%, -0.4%, 0); }

/* ---- Copy -------------------------------------------------------------- */

.hero__copy {
  grid-area: copy;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  /* the eyebrow sits on the photo's top line, one gutter under the nav;
     the headline block floats in the space below it */
  justify-content: flex-start;
  padding: 0 32px 0 0;
}

.hero__copy .headline { margin-top: auto; }
.hero__copy .actions { margin-bottom: auto; }

/* Cream "tabs" — the copy is set on paper that cuts into the photograph */
.tab {
  display: inline-block;
  background: var(--kertas);
}

.eyebrow {
  display: flex;
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--aksen);
  animation: rise 0.9s var(--ease) 0.45s both;
}

.eyebrow .tab {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  padding: 0 16px 0 0;
  border-radius: 0 var(--tab-r) 0 0;
}

.eyebrow .tab::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--aksen);
}

.eyebrow i { font-style: normal; color: var(--redup); }

.headline {
  width: max-content;
  margin: 0;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  /* follows width, but never outgrows a short screen */
  font-size: calc(clamp(2rem, min(6.6vw, 12.5vh), 7.1rem) * var(--h1-scale));
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--tinta);
}

.headline .line { display: block; }

.headline .tab {
  overflow: hidden;
  padding: 0.06em 0.26em 0.04em 0;
  vertical-align: top;
}

.headline .tab { border-radius: 0 var(--tab-r) var(--tab-r) 0; }

.headline .reveal {
  display: inline-block;
  animation: reveal 1.2s var(--ease-out) 0.55s both;
}

.headline .line--accent .reveal { animation-delay: 0.72s; }

.headline em {
  font-style: italic;
  font-weight: 340;
  letter-spacing: -0.015em;
  color: var(--aksen);
}

.lede {
  max-width: 34ch;
  margin: 30px 0 38px;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.65;
  color: var(--redup);
  animation: rise 1s var(--ease) 1s both;
}

/* ---- Buttons ----------------------------------------------------------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: rise 1s var(--ease) 1.2s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid var(--aksen);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease);
}

.btn--primary { background: var(--aksen); color: var(--putih); }
.btn--primary:hover { background: var(--aksen-gelap); border-color: var(--aksen-gelap); }

.btn--ghost { background: transparent; color: var(--aksen); }
.btn--ghost:hover { background: var(--aksen-tipis); }

/* ---- Supporting 3D object: a single coffee bean ----------------------- */

.orbit {
  grid-area: copy;
  align-self: end;
  justify-self: end;
  position: relative;
  z-index: 1;
  width: 100px;
  height: 100px;
  margin: 0 40px 0 0;
  border: 1px solid var(--garis);
  border-radius: 50%;
  display: grid;
  place-items: center;
  animation: fade 1.4s var(--ease) 1.4s both;
}

/* a short green arc travelling very slowly around the ring */
.orbit::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: rgba(0, 84, 55, 0.55);
  animation: spin 24s linear infinite;
}

/* one bean, floating in the ring */
.orbit { --bw: 36px; } /* bean width; the bean scales from it */

.bean-wrap {
  perspective: 220px;
  animation: float 4.6s ease-in-out infinite alternate;
}

/* the light on the bean follows its turn (animatable via @property) */
@property --lx {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 30%;
}

.bean {
  position: relative;
  width: var(--bw);
  height: calc(var(--bw) * 1.39);
  border-radius: 50% 50% 48% 52% / 55% 55% 45% 45%;
  background:
    radial-gradient(120% 90% at var(--lx) 22%, #A9774F 0%, #6E432A 36%, #3D2315 74%, #26150B 100%);
  box-shadow:
    inset -5px -7px 12px rgba(18, 8, 2, 0.5),
    inset 3px 4px 8px rgba(255, 214, 170, 0.24);
  transform-style: preserve-3d;
  animation: turn 8.4s ease-in-out infinite;
}

/* centre crease */
.bean::before,
.bean::after {
  content: "";
  position: absolute;
  top: 9%;
  left: 50%;
  width: 33%;
  height: 82%;
  margin-left: -25%;
  border-radius: 50%;
  border-right: max(1.4px, calc(var(--bw) * 0.07)) solid rgba(24, 10, 3, 0.9);
  transform: rotate(7deg);
}

.bean::after {
  margin-left: -19%;
  border-right: 1px solid rgba(255, 210, 168, 0.28);
}

/* floor shadow — shrinks and fades as the bean rises */
.bean-shadow {
  position: absolute;
  bottom: 18%;
  left: 50%;
  width: calc(var(--bw) * 0.84);
  height: 6px;
  margin-left: calc(var(--bw) * -0.42);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(40, 26, 14, 0.26), transparent);
  animation: shadow 4.6s ease-in-out infinite alternate;
}


/* ---- Editorial details ------------------------------------------------- */

.meta {
  grid-area: meta;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding-top: 18px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--redup);
  animation: fade 1.2s var(--ease) 1.5s both;
}

.meta b { font-weight: 600; color: var(--tinta); white-space: nowrap; }

.meta span { display: inline-flex; align-items: center; gap: 14px; }

.meta span::before {
  content: "";
  width: 1px;
  height: 28px;
  background: var(--garis);
}

.meta a {
  color: var(--aksen);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.5s var(--ease);
}

.meta a:hover { background-size: 100% 1px; }

.rail {
  grid-area: rail;
  align-self: center;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--redup);
  animation: fade 1.2s var(--ease) 1.5s both;
}

.rail__line {
  width: 1px;
  height: 48px;
  background: var(--aksen);
  opacity: 0.45;
}

/* ==========================================================================
   In-card panels (About · Experience · Location)
   Opened by :target. The open panel takes the hero's place inside the card
   and the card grows with it, so the page scrolls normally on every device —
   no nested scroll areas.
   ========================================================================== */

.panel {
  display: none;
  flex-direction: column;
  min-width: 0;
  padding: var(--space-top) 0 var(--gutter);
  /* land exactly where the card first opened: no jump when a panel opens */
  scroll-margin-top: calc(max(var(--pad-y), env(safe-area-inset-top)) + var(--nav-h) + 1px);
}

.panel:target {
  display: flex;
  animation: panel-in 0.7s var(--ease-out) both;
}

/* while a panel is open, the hero steps aside */
.card:has(.panel:target) .hero { display: none; }

/* Close returns to the card top without shifting it */
.card { scroll-margin-top: max(var(--pad-y), env(safe-area-inset-top)); }

.panel__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--garis);
}

.panel__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--aksen);
}

.panel__eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--aksen);
}

.panel__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.8vw, 3.9rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.panel__title em {
  font-style: italic;
  font-weight: 340;
  color: var(--aksen);
}

.panel__close {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--garis);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tinta);
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease);
}

.panel__close span { font-size: 16px; line-height: 1; letter-spacing: 0; }
.panel__close:hover { border-color: var(--aksen); color: var(--aksen); }

.panel__intro {
  max-width: 60ch;
  margin: -4px 0 24px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--redup);
}

/* shared caption "tab" — same paper cut as the hero headline */
.cap {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 9px 14px 0 0;
  background: var(--kertas);
  border-radius: 0 14px 0 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tinta);
}

/* fact lists */
.facts {
  margin: 32px 0 0;
  border-top: 1px solid var(--garis);
}

.facts div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--garis);
}

.facts dt {
  padding-top: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--aksen);
}

.facts dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--tinta);
}

.facts a {
  color: var(--aksen);
  border-bottom: 1px solid rgba(0, 84, 55, 0.3);
  transition: border-color 0.4s var(--ease);
}

.facts a:hover { border-color: var(--aksen); }

.facts--lg { margin-top: 0; }
.facts--lg dd { font-size: 16px; }

/* ---- About ------------------------------------------------------------- */

.about {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 4vw, 64px);
}

.about__text { align-self: center; max-width: 46ch; }

.about__text p {
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--redup);
}

.about__text .about__lead {
  margin-bottom: 20px;
  font-family: var(--serif);
  font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.45;
  color: var(--tinta);
}

.collage {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  min-height: 300px; /* otherwise it stretches to fill the card */
}

.collage figure {
  position: relative;
  margin: 0;
}

/* only the photo is clipped to the rounded corner — the caption tab sits
   above it, so its first letters are never cut off */
.collage__img {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #D9CFC2;
}

.collage__a { grid-row: 1 / 3; }

.collage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 2.4s var(--ease-out);
}

.collage figure:hover img { transform: scale(1.03); }

.collage__a img { object-position: 50% 40%; }
.collage__c img { object-position: 50% 62%; }

/* ---- Experience — one horizontal carousel ------------------------------
   Desktop: the carousel takes exactly the space left in the card (it is a
   size container), and the photo height is derived from that space, so the
   card keeps the same size as every other view.
   Touch: a natural swipe strip, the next photo peeking in as a hint.
   gallery.js adds arrows, jump chips, mouse drag and the progress bar;
   without it the strip still scrolls. */

.carousel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 18px;
  min-height: 330px;
  container-type: size;
}

.carousel__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.carousel__chips {
  display: flex;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--garis);
  border-radius: 999px;
  background: transparent;
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease), color 0.4s var(--ease);
}

.chip span { color: var(--redup); letter-spacing: 0.08em; transition: color 0.4s var(--ease); }
.chip:hover { border-color: var(--aksen); color: var(--aksen); }

.chip.is-active {
  border-color: var(--aksen);
  background: var(--aksen);
  color: var(--putih);
}

.chip.is-active span { color: rgba(255, 255, 255, 0.7); }

.carousel__tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel__btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--garis);
  border-radius: 50%;
  background: transparent;
  color: var(--tinta);
  cursor: pointer;
  transition: border-color 0.4s var(--ease), color 0.4s var(--ease), opacity 0.4s var(--ease);
}

.carousel__btn svg { width: 14px; height: 14px; }
.carousel__btn:hover:not(:disabled) { border-color: var(--aksen); color: var(--aksen); }
.carousel__btn:disabled { opacity: 0.35; cursor: default; }

.carousel__order {
  height: 40px;
  margin-left: 8px;
  padding: 0 18px;
  font-size: 11px;
}

/* the end-of-gallery copy of the button is for stacked (mobile) layouts only */
.carousel__order--end { display: none; }

/* controls that need gallery.js stay hidden until it runs */
.carousel:not(.is-enhanced) .carousel__chips,
.carousel:not(.is-enhanced) .carousel__btn,
.carousel:not(.is-enhanced) .carousel__progress { display: none; }

.carousel__track {
  /* tile photo height: what the container leaves after bar, captions, gaps */
  /* bar + gaps + progress + a caption whose name may run to two lines */
  --tile-h: max(150px, calc(100cqh - 208px));
  flex: 1;
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
  outline-offset: 6px;
}

.carousel__track::-webkit-scrollbar { display: none; }

.carousel__track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}

.carousel__track > li {
  flex: none;
  width: calc(var(--tile-h) * 0.75);
  scroll-snap-align: start;
}

.carousel__track > .is-wide { width: calc(var(--tile-h) * 1.5); }

.tile__img {
  position: relative;
  height: var(--tile-h);
  overflow: hidden;
  border-radius: 14px;
  background: #D9CFC2;
}

.tile__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform 2.4s var(--ease-out);
}

.carousel__track > li:hover .tile__img img { transform: scale(1.035); }

.tile__label {
  display: block;
  margin-top: 14px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--aksen);
}

.carousel__track h4 {
  margin: 6px 0 4px;
  font-family: var(--serif);
  font-weight: 400;
  /* scales with the tile so names stay within two lines */
  font-size: clamp(15px, calc(var(--tile-h) * 0.075), 20px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.carousel__track p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--redup);
}

/* a text "cover" tile opens each group inside the strip */
.carousel__track > .tile-cover {
  width: calc(var(--tile-h) * 0.62);
  min-width: 190px;
}

.tile-cover__body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: var(--tile-h);
  padding: 22px 20px;
  border: 1px solid var(--garis);
  border-radius: 14px;
}

.tile-cover__body h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.tile-cover__body h3 em { display: block; font-style: italic; font-weight: 340; color: var(--aksen); }
.tile-cover__body p { margin: 0; }

.carousel__progress {
  height: 2px;
  border-radius: 2px;
  background: var(--garis);
  overflow: hidden;
}

.carousel__progress span {
  display: block;
  height: 100%;
  background: var(--aksen);
  transform-origin: left;
  transform: scaleX(0.2);
  transition: transform 0.25s linear;
}

/* ---- Location ---------------------------------------------------------- */

.location {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 4vw, 64px);
}

.location__info { align-self: center; }

.actions--static {
  margin-top: 30px;
  animation: none;
}

.map {
  position: relative;
  min-height: 300px; /* otherwise it stretches to fill the card */
  overflow: hidden;
  border: 1px solid var(--garis);
  border-radius: var(--media-r);
  background: #E9E3DA;
}

.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(0.8);
}

/* external-link icon (SVG — the ↗ character renders as an emoji on iOS) */
.i-ext {
  display: inline-block;
  flex: none;
  width: 0.85em;
  height: 0.85em;
  vertical-align: -0.05em;
  transition: transform 0.45s var(--ease);
}

.btn:hover .i-ext,
.nav__order:hover .i-ext { transform: translate(2px, -2px); }

/* ==========================================================================
   Motion
   ========================================================================== */

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes reveal {
  from { transform: translateY(108%); }
  to   { transform: none; }
}

@keyframes media-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes settle {
  from { transform: scale(1.06); }
  to   { transform: none; }
}

@keyframes float {
  from { transform: translateY(-7px); }
  to   { transform: translateY(6px); }
}

/* bean high → shadow small and faint; bean low → shadow wide and dark */
@keyframes shadow {
  from { transform: scale(0.7); opacity: 0.45; }
  to   { transform: scale(1.12); opacity: 1; }
}


/* a slow tumble on three axes, the highlight sliding as it turns */
@keyframes turn {
  0%   { transform: rotate(-28deg) rotateY(-30deg) rotateX(10deg);  --lx: 44%; }
  25%  { transform: rotate(-20deg) rotateY(0deg)   rotateX(-4deg);  --lx: 30%; }
  50%  { transform: rotate(-10deg) rotateY(28deg)  rotateX(-10deg); --lx: 18%; }
  75%  { transform: rotate(-20deg) rotateY(4deg)   rotateX(6deg);   --lx: 32%; }
  100% { transform: rotate(-28deg) rotateY(-30deg) rotateX(10deg);  --lx: 44%; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes ripple {
  0%        { transform: scale(1);   opacity: 0.55; }
  70%, 100% { transform: scale(3.4); opacity: 0; }
}

/* ==========================================================================
   RESPONSIVE LAYER
   Layout is decided by shape, not width alone:
     · landscape            → photo and type side by side
     · portrait or < 560px  → stacked: photo, then type
     · short landscape      → side by side, compacted (phones on their side)
     · ≤ 900px              → burger menu
   ========================================================================== */

/* ---- Landscape, short-ish screens (laptops, landscape tablets) ---------- */

@media (orientation: landscape) and (max-height: 880px) {
  .orbit { display: none; }
  .panel__head { padding-bottom: 16px; margin-bottom: 20px; }
  .panel__eyebrow { margin-bottom: 10px; }
  .panel__title { font-size: clamp(1.8rem, 3vw, 2.8rem); }
  .panel__intro { margin-bottom: 16px; }
  .carousel { min-height: 280px; }
  .facts { margin-top: 22px; }
  .facts div { padding: 11px 0; }
  .facts--lg dd { font-size: 15px; line-height: 1.55; }
  .location { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .actions--static { margin-top: 22px; }
  .about__text p { margin-bottom: 12px; }
}

/* laptops ≤ 800px tall: the photos get the intro's space */
@media (orientation: landscape) and (max-height: 800px) {
  #experience .panel__intro { display: none; }
}

@media (orientation: landscape) and (max-height: 760px) {
  :root { --gutter: clamp(20px, 2.4vw, 32px); }
  .about__text .about__lead { font-size: 18px; margin-bottom: 14px; }
  .about__text p { font-size: 14.5px; line-height: 1.6; }
  .lede { margin: 22px 0 28px; }
}

/* ---- Landscape, quite short (small laptop windows, 541–680px tall) ----- */

@media (orientation: landscape) and (max-height: 680px) and (min-height: 541px) {
  .headline { font-size: calc(clamp(2rem, min(6.4vw, 11vh), 7.1rem) * var(--h1-scale)); }
  :root { --gutter: 22px; }
  .eyebrow { margin-bottom: 16px; }
  .lede { margin: 16px 0 22px; }
  .btn { height: 48px; }
  .meta { padding-top: 10px; }
}

/* ---- Landscape, narrower (small laptops, landscape tablets & phones) ---- */

@media (orientation: landscape) and (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 47fr) minmax(0, 53fr) 0; }
  .hero__copy { padding-right: 20px; }
  .rail { display: none; }
}

/* ==========================================================================
   Compact navigation — burger + in-card sheet
   ========================================================================== */

@media (max-width: 900px) {
  :root {
    --card-r: 24px;
    --media-r: 16px;
    --tab-r: 16px;
    --gutter: 24px;
  }

  .nav { grid-template-columns: 1fr auto auto; gap: 16px; }

  /* burger — two links: one opens the #nav-sheet target, one clears it */
  .nav__burger {
    order: 3;
    display: grid;
    align-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0 11px;
    border-radius: 50%;
    animation: fade 0.9s var(--ease) 0.25s both;
  }

  .nav__burger span {
    display: block;
    height: 1.5px;
    background: var(--tinta);
  }

  .nav__burger--close span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav__burger--close span:last-child  { transform: translateY(-3.75px) rotate(-45deg); }

  .nav__burger--close,
  .card:has(#nav-sheet:target) .nav__burger--open { display: none; }
  .card:has(#nav-sheet:target) .nav__burger--close { display: grid; }

  .nav__cta { order: 2; height: 38px; padding: 0 16px; font-size: 11px; }

  /* menu sheet — lives inside the card */
  .nav__links {
    /* hangs from the (sticky) nav and spans the card's full width; it is
       made generously tall and the card's own clipping trims it to the card */
    position: absolute;
    z-index: 20;
    top: 100%;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    /* fills the screen under the (sticky) nav; if the links don't fit — tiny
       landscape phones — the sheet scrolls on its own, so every link is reachable */
    height: calc(100vh - var(--nav-h) - var(--pad-y));
    height: calc(100svh - var(--nav-h) - var(--pad-y));
    overflow-y: auto;
    overscroll-behavior: contain;
    flex-direction: column;
    gap: 0;
    padding: var(--space-top) var(--gutter) var(--gutter);
    background: var(--kertas);
    /* opens with the card exactly where it was — no jump */
    scroll-margin-top: calc(max(var(--pad-y), env(safe-area-inset-top)) + var(--nav-h) + 1px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0s linear 0.5s;
    animation: none;
  }

  .nav__links:target {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), visibility 0s;
  }

  .nav__links a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0;
    border-bottom: 1px solid var(--garis);
    font-family: var(--serif);
    font-size: 19px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .nav__links a::after { display: none; }

  /* Order in the sheet: a regular row, still flagged by its live dot */
  .nav__links .nav__order,
  .nav__links .nav__order:hover {
    gap: 12px;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--aksen);
    font-weight: 400;
  }

  .nav__links .nav__order .nav__order-dot,
  .nav__links .nav__order:hover .nav__order-dot,
  .nav__links .nav__order:hover .nav__order-dot::before { width: 8px; height: 8px; background: var(--aksen); }

  .nav__links .nav__links-cta {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    border-bottom: 0;
    font-style: italic;
    color: var(--aksen);
  }
}

/* ==========================================================================
   Stacked hero — portrait screens of any size, and every narrow screen
   ========================================================================== */

@media (orientation: portrait), (max-width: 559px) {
  :root {
    --pad-y: clamp(10px, 2.4vw, 28px);
    --pad-x: clamp(10px, 2.4vw, 28px);
    --pads: calc(max(var(--pad-y), env(safe-area-inset-top, 0px)) + var(--pad-y) + env(safe-area-inset-bottom, 0px));
    --scroll-end: 28px;
  }

  /* scroll end: the card's bottom edge always clears the home bar and any
     browser / in-app toolbar that sits over the page, with room to spare */
  body { padding-bottom: calc(var(--pad-y) + var(--scroll-end) + env(safe-area-inset-bottom, 0px)); }

  .card {
    width: 100%;
    min-height: calc(100vh - var(--pads));
    min-height: calc(100svh - var(--pads));
  }

  /* hero stacks: photo → headline → copy → actions → hours */
  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "media media"
      "copy  copy"
      "meta  meta";
  }

  .hero__media {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .hero__media img { object-position: 48% 55%; }

  /* the copy is pulled up so its paper tabs bite into the photo's lower edge */
  .hero__copy {
    --h1: calc(clamp(2.6rem, 9vw, 4.6rem) * var(--h1-scale));
    margin-top: calc(-1 * (12px + 22px + 0.62 * var(--h1)));
    padding: 0;
  }

  .eyebrow { margin-bottom: 0; }
  .eyebrow .tab { padding: 12px 18px 10px 0; }

  .headline { font-size: var(--h1); }
  .headline .line:first-child .tab { border-radius: 0 var(--tab-r) 0 0; padding-top: 0.12em; }

  .lede { margin: 22px 0 30px; max-width: 38ch; }

  /* the bean sits beside the Visit us button, centred on the same line */
  .orbit {
    --orbit: 84px;
    --btn-h: 52px;
    display: grid;
    grid-area: copy;
    align-self: end;
    justify-self: end;
    z-index: 3;
    width: var(--orbit);
    height: var(--orbit);
    margin: 0 4px calc((var(--btn-h) - var(--orbit)) / 2) 0;
  }

  /* Visit us fits its label, leaving the right side for the bean */
  .hero .actions .btn { flex: none; width: auto; padding: 0 30px; }

  .orbit { --bw: 28px; }

  .meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 32px;
    padding: 2px 0 2px 16px;
    border-left: 1px solid var(--garis);
  }

  .meta span { display: block; }
  .meta span::before { display: none; }

  .rail { display: none; }

  /* panels — single column */
  .panel__head { align-items: flex-start; padding-bottom: 20px; margin-bottom: 24px; }
  .panel__title { font-size: clamp(1.9rem, 7vw, 3.4rem); }
  .panel__close { height: 36px; padding: 0 14px; }

  .about,
  .location {
    flex: none;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* the map takes any spare height, so it always ends on the bottom gutter */
  .location { flex: 1 1 auto; grid-template-rows: auto 1fr; }

  .about__text { max-width: 60ch; }

  .collage { min-height: 0; height: clamp(360px, 70vw, 640px); }

  .panel__intro { margin-bottom: 24px; }

  .carousel {
    flex: 1 1 auto;
    min-height: 0;
    container-type: normal;
  }

  /* full-bleed swipe strip; the next photo peeks in as a hint */
  .carousel__track {
    --tile-h: clamp(260px, 78vw, 440px);
    flex: none;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 4px;
    scroll-padding-inline: var(--gutter);
    scroll-snap-type: x mandatory;
  }

  .carousel__track > .is-wide { width: min(calc(var(--tile-h) * 1.5), calc(100vw - 4 * var(--gutter))); }

  .carousel__chips {
    flex: 1 1 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .carousel__chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  /* order button moves below the gallery, after the progress bar */
  .carousel__tools .carousel__order { display: none; }

  .carousel .carousel__order--end {
    display: inline-flex;
    flex: none;
    align-self: flex-start;
    height: 50px;
    /* auto: on tall screens the button settles on the card's bottom gutter */
    margin: auto 0 0;
    padding: 0 28px;
    font-size: 11.5px;
  }

  .map { height: auto; min-height: clamp(300px, 60vw, 520px); }
}

/* ==========================================================================
   Short landscape — phones on their side, small windows
   ========================================================================== */

@media (orientation: landscape) and (max-height: 540px) and (min-width: 560px) {
  :root {
    --nav-h: 52px;
    --pad-y: 10px;
    --pad-x: 12px;
    --gutter: 16px;
    --card-r: 20px;
    --media-r: 14px;
    --tab-r: 14px;
  }

  .card {
    width: 100%;
    min-height: calc(100vh - var(--pads));
    min-height: calc(100svh - var(--pads));
  }

  /* same scroll-end room as portrait phones */
  body { padding-bottom: calc(var(--pad-y) + 28px + env(safe-area-inset-bottom, 0px)); }

  .logo__img { width: 30px; height: 30px; }
  .logo__mark { font-size: 18px; }

  .hero__media { min-height: 0; }
  .hero__copy { padding: 0 18px 0 0; }

  .eyebrow { margin-bottom: 12px; font-size: 10.5px; letter-spacing: 0.2em; }
  .eyebrow .tab { gap: 10px; padding-top: 2px; padding-bottom: 2px; }
  .eyebrow .tab::before { width: 18px; }

  /* the headline follows the short screen height; the lede flows in two lines */
  .headline { font-size: calc(clamp(1.9rem, min(6vw, 11vh), 3rem) * var(--h1-scale)); }
  .eyebrow { margin-bottom: 8px; }
  .lede { max-width: none; margin: 10px 0 14px; font-size: 14px; line-height: 1.5; }
  .lede br { display: none; }

  .btn { height: 44px; padding: 0 20px; font-size: 11px; letter-spacing: 0.14em; }

  .meta { padding-top: 8px; font-size: 9.5px; letter-spacing: 0.18em; }
  .meta span::before { height: 18px; }

  .panel__head { padding-bottom: 16px; margin-bottom: 22px; }
  .panel__eyebrow { margin-bottom: 8px; }
  .panel__title { font-size: clamp(1.6rem, 5vw, 2.4rem); }
  .panel__intro { margin-bottom: 24px; }

  .collage { min-height: 280px; }
  .map { min-height: 280px; }
  .carousel { min-height: 370px; }
}

/* smallest sideways phones (iPhone SE, compact Androids) */
@media (orientation: landscape) and (max-height: 540px) and (max-width: 760px) {
  .eyebrow { font-size: 9.5px; letter-spacing: 0.14em; }
  .eyebrow .tab { gap: 8px; }
  .eyebrow .tab::before { display: none; }
  .hero__media img { object-position: 60% 50%; }

  /* every pixel counts here: Instagram is one tap away in the menu panels */
  .headline { font-size: calc(clamp(1.75rem, min(5.6vw, 10vh), 2.6rem) * var(--h1-scale)); }
  .lede { font-size: 13px; margin: 8px 0 12px; }
  .hero .actions .btn { height: 40px; }
  .meta { padding-top: 6px; }
  .meta a { display: none; }
}

/* the burger sheet on a phone held sideways — tighter rows so all links fit */
@media (orientation: landscape) and (max-height: 540px) and (max-width: 900px) {
  .nav__links a { min-height: 44px; font-size: 17px; }
  .nav__links .nav__links-cta { margin-top: 4px; }
}

/* ==========================================================================
   Phones (portrait)
   ========================================================================== */

@media (max-width: 560px) {
  :root {
    --card-r: 20px;
    --media-r: 14px;
    --tab-r: 14px;
    --gutter: 16px;
    --pad-y: 10px;
    --pad-x: 10px;
  }

  .nav { grid-template-columns: 1fr auto; }
  .nav__cta { display: none; }

  .logo { gap: 10px; }
  .logo__img { width: 32px; height: 32px; }
  .logo__mark { font-size: 17px; }

  /* a natural square photo — the page simply scrolls to the rest of the card */
  .hero__media { aspect-ratio: 1 / 1; }
  .hero__media img { object-position: 51% 55%; }

  .hero__copy { --h1: calc(min(10.4vw, 3rem) * var(--h1-scale)); }

  .eyebrow { font-size: 10.5px; letter-spacing: 0.2em; }
  .eyebrow .tab { gap: 10px; padding: 10px 14px 8px 0; }
  .eyebrow .tab::before { width: 18px; }

  .lede { font-size: 15px; margin: 18px 0 26px; }

  .actions { gap: 10px; }
  .btn { flex: 1 1 0; height: 50px; padding: 0 12px; font-size: 11.5px; letter-spacing: 0.13em; }

  .meta { margin-top: 26px; font-size: 10px; letter-spacing: 0.18em; }
  .orbit { --orbit: 76px; --btn-h: 50px; --bw: 26px; }

  .collage { height: 118vw; gap: 10px; grid-template-columns: 1fr 1fr; grid-template-rows: 1.4fr 1fr; }
  .collage__a { grid-row: auto; grid-column: 1 / 3; }

  .carousel__track h4 { font-size: 18px; }
  .carousel__track p { font-size: 13px; }
  .carousel .carousel__order--end { flex: none; align-self: stretch; }

  .facts div { grid-template-columns: 92px 1fr; gap: 12px; }
  .facts dd { font-size: 14.5px; }
  .facts--lg dd { font-size: 15px; }
}

/* buttons that carry longer labels stack before they get cramped */
@media (max-width: 420px) {
  .actions--static { flex-direction: column; }
  .actions--static .btn { flex: none; width: 100%; }
}

/* ==========================================================================
   Small phones (≤ 360px — iPhone SE 1st gen, compact Androids)
   ========================================================================== */

@media (max-width: 360px) {
  .logo__mark { font-size: 16px; }
  .logo__sub { letter-spacing: 0.34em; }

  .hero__copy { --h1: calc(10.6vw * var(--h1-scale)); }

  .eyebrow { font-size: 9.5px; letter-spacing: 0.16em; }
  .eyebrow .tab::before { display: none; }

  .lede { font-size: 14.5px; }


  .meta { font-size: 9.5px; letter-spacing: 0.14em; }

  .panel__head { flex-direction: column-reverse; align-items: flex-start; gap: 14px; }
  .panel__close { align-self: flex-end; }

  .facts div { grid-template-columns: 1fr; gap: 4px; }

  .chip { height: 34px; padding: 0 12px; gap: 6px; font-size: 10.5px; letter-spacing: 0.12em; }
}

/* ==========================================================================
   Wide screens — keep the line length and photo proportions in check
   ========================================================================== */

@media (min-width: 1800px) {
  .lede { font-size: 18px; }
  .nav__links a { font-size: 12.5px; }
}

/* touch screens swipe — the arrow buttons are for mouse and trackpad */
@media (hover: none) {
  .carousel__btn { display: none; }
}

/* ==========================================================================
   Reduced motion — everything simply appears, nothing drifts
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .hero__media:hover img { transform: none; }
}
