/* ==========================================================================
   Dan’s LAB Coffee · Basel
   Design plan (from the café, attitude from Caffè Gilli):
   - Façade pink: the dusty-rose ground floor at Totentanz 10 (pastel ground)
   - Shutter green: the green window shutters + the sage parasol (deep tone)
   - Lamp orange: the orange pendant lamp inside (accent)
   - Matcha, bamboo, cocoa: what is on the tables
   Concept: a coffee "LAB" – element tiles, sample labels, A/B test, vial and
   petri-dish frames; Gilli’s cinematic reveals and centred uppercase statements.
   Type: Syne (wide display) + Instrument Sans (text) + DM Mono (lab labels).
   ========================================================================== */
:root {
  --pink: #f2d8cd;
  --pink-2: #e9c4b6;
  --cream: #fbf2ed;
  --green: #1e4a40;
  --green-2: #143630;
  --green-ink: #173b33;
  --green-dim: rgba(23, 59, 51, .72);
  --lamp: #e4572e;
  --matcha: #b3c26c;
  --bamboo: #dcaa66;
  --cocoa: #6b4436;

  --f-display: "Syne", "Arial Black", sans-serif;
  --f-text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "DM Mono", ui-monospace, Menlo, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(16px, 3.4vw, 56px);
  --bar-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--pink);
  color: var(--green-ink);
  font-family: var(--f-text);
  font-size: clamp(1rem, .96rem + .2vw, 1.14rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, ol, ul, table { margin: 0; }
ol, ul { list-style: none; padding: 0; }
address { font-style: normal; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px dashed var(--lamp); outline-offset: 4px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 300; background: var(--green); color: var(--pink); padding: .6rem 1rem; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }

.mono { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1.5; }
.label { color: var(--green-dim); display: inline-block; }
.label--light { color: rgba(242, 216, 205, .75); }
.h2 { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; font-size: clamp(2.2rem, 1rem + 4vw, 5.6rem); line-height: .95; letter-spacing: -.02em; margin-top: .4em; hyphens: manual; }
.h2--light { color: var(--pink); }
.body { margin-top: 1.4rem; max-width: 38ch; color: var(--green-dim); }
.body--small { font-size: 1rem; max-width: 24ch; }
.split-line-mask { padding-top: .14em; margin-top: -.14em; padding-bottom: .04em; margin-bottom: -.04em; }

/* ---------- loader ---------- */
.loader { display: none; }
.js .loader { display: grid; place-items: center; position: fixed; inset: 0; z-index: 200; background: var(--pink); }
.no-anim .loader { display: none !important; }
.tile-el {
  position: relative; width: clamp(180px, 20vw, 260px); aspect-ratio: 1;
  background: var(--green); color: var(--pink);
  border-radius: 6px;
  display: grid; grid-template-rows: auto 1fr auto; padding: 16px 18px;
  box-shadow: 0 30px 60px -30px rgba(20, 54, 48, .6);
}
.tile-el__no { font-family: var(--f-mono); font-size: .9rem; }
.tile-el__mass { position: absolute; right: 18px; top: 16px; font-family: var(--f-mono); font-size: .9rem; color: var(--matcha); }
.tile-el__sym { font-family: var(--f-display); font-weight: 800; font-size: clamp(4rem, 8vw, 6.4rem); line-height: 1; align-self: center; letter-spacing: -.03em; }
.tile-el__name { font-weight: 600; font-size: .95rem; }

/* ---------- bar (header) ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--bar-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding-inline: var(--gutter);
  color: var(--green-ink);
  transition: color .5s var(--ease), height .5s var(--ease);
}
.bar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(242, 216, 205, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); opacity: 0; transition: opacity .4s, background-color .5s; }
.bar.is-solid::before, .no-anim .bar::before, html:not(.js) .bar::before { opacity: 1; }
.bar.is-dark { color: var(--pink); }
.bar.is-dark::before { background: rgba(20, 54, 48, .9); }
.bar__brand { display: inline-flex; align-items: baseline; gap: .7rem; text-decoration: none; white-space: nowrap; }
.bar__word { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: 1.1rem; letter-spacing: -.01em; }
.bar__sub { font-family: var(--f-mono); font-size: .7rem; text-transform: uppercase; opacity: .7; }
.bar__status { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .4; }
.bar__status.is-open .dot { background: var(--lamp); opacity: 1; box-shadow: 0 0 0 4px rgba(228, 87, 46, .2); }
.bar__nav { justify-self: end; display: flex; align-items: center; gap: 1.6rem; }
.bar__nav a { text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; }
.bar__nav a:not(.bar__cta):hover { color: var(--lamp); }
.bar__cta { padding: .6rem 1rem; border-radius: 999px; background: var(--green); color: var(--pink); transition: background-color .3s; }
.bar.is-dark .bar__cta { background: var(--pink); color: var(--green); }
.bar__cta:hover { background: var(--lamp) !important; color: var(--pink) !important; }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--green-2); }
.hero__pin { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.hero__photo { position: absolute; inset: 0; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; transform-origin: 50% 50%; }
.hero__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 54, 48, .25) 0%, rgba(20, 54, 48, 0) 30%, rgba(20, 54, 48, 0) 60%, rgba(20, 54, 48, .55) 100%); }
.hero__fallback { position: absolute; left: var(--gutter); bottom: clamp(24px, 6vh, 64px); color: var(--pink); }
.hero__fb-word { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(3rem, 12vw, 10rem); line-height: .85; letter-spacing: -.02em; }
.js:not(.no-anim) .hero__fallback { display: none; }
.veil { display: none; }
.js .veil { display: block; position: absolute; inset: 0; color: var(--green-ink); }
.no-anim .veil { display: none !important; }
.veil__svg { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 50% 50%; will-change: transform; }
.veil__fill { fill: var(--pink); }
.veil__txt { font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em; }
.veil__top, .veil__bottom { position: absolute; left: 0; right: 0; text-align: center; }
.veil__top { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.6rem, 1rem + 2.6vw, 3.8rem); line-height: 1; letter-spacing: .02em; }
.veil__left { position: absolute; left: var(--gutter); bottom: clamp(20px, 4vh, 40px); font-size: .98rem; max-width: 30ch; line-height: 1.4; }
.veil__right { position: absolute; right: var(--gutter); bottom: clamp(20px, 4vh, 40px); display: flex; align-items: baseline; gap: .5rem; }
.veil__right strong { font-family: var(--f-text); font-weight: 700; font-size: 1.9rem; letter-spacing: -.03em; }
.hero__caption { position: absolute; left: var(--gutter); bottom: clamp(20px, 4vh, 40px); color: var(--pink); opacity: 0; text-shadow: 0 1px 10px rgba(0, 0, 0, .4); }
.no-anim .hero__caption { opacity: 1; display: none; }

/* ---------- statement ---------- */
.statement { padding: clamp(110px, 22vh, 240px) var(--gutter); text-align: center; }
.statement__fig { max-width: 1200px; margin-inline: auto; }
.statement blockquote { margin: 0; }
.statement__text { font-family: var(--f-display); font-weight: 600; text-transform: uppercase; font-size: clamp(1.6rem, .9rem + 3vw, 4rem); line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
.statement__text .w { display: inline-block; }
.statement figcaption { margin-top: 2rem; color: var(--green-dim); }

/* ---------- story ---------- */
.story { padding: 0 var(--gutter) clamp(110px, 18vh, 220px); }
.story__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); align-items: start; }
.story__a { grid-column: 1 / span 5; align-self: center; }
.story__b { grid-column: 6 / span 4; }
.story__c { grid-column: 10 / span 3; align-self: end; }
.frame { position: relative; overflow: hidden; background: var(--pink-2); }
.frame img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; }
.story__b.frame { aspect-ratio: 3 / 5; border-radius: 999px; } /* the vial */
.frame--round { aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 10px var(--cream), 0 0 0 11px var(--green-dim); margin: 12px 12px 1.6rem; } /* the petri dish */

/* ---------- periodic table ---------- */
.table { position: relative; background: var(--green); color: var(--pink); padding: clamp(96px, 16vh, 190px) var(--gutter); overflow: clip; }
.table__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: end; margin-bottom: clamp(36px, 7vh, 80px); }
.table__head .label { grid-column: 1 / -1; }
.table__head .h2 { grid-column: 1 / span 8; }
.legend { grid-column: 9 / span 4; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; color: rgba(242, 216, 205, .8); }
.legend li { display: flex; align-items: center; gap: .5rem; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend .g-kaffee { background: var(--bamboo); } .legend .g-matcha { background: var(--matcha); } .legend .g-kueche { background: var(--lamp); } .legend .g-kuchen { background: var(--pink); }
.elements { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(8px, 1vw, 16px); }
.el {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 1; border-radius: 6px;
  padding: clamp(10px, 1vw, 16px);
  display: grid; grid-template-rows: auto 1fr auto;
  color: var(--green-2);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
  cursor: default;
}
.el.g-kaffee { background: var(--bamboo); }
.el.g-matcha { background: var(--matcha); }
.el.g-kueche { background: var(--lamp); }
.el.g-kuchen { background: var(--pink); }
.el__no { font-family: var(--f-mono); font-size: .76rem; }
.el__sym { font-family: var(--f-display); font-weight: 800; font-size: clamp(2rem, 1rem + 2.8vw, 4.6rem); line-height: 1; align-self: center; letter-spacing: -.03em; }
.el__name { font-weight: 600; font-size: clamp(.78rem, .7rem + .25vw, .98rem); line-height: 1.2; }
.el::after { /* microscope lens: the photo opens from the cursor */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--img, none) center / cover;
  clip-path: circle(0% at var(--mx, 50%) var(--my, 50%));
  transition: clip-path .7s var(--ease);
}
.el.has-img:hover::after { clip-path: circle(150% at var(--mx, 50%) var(--my, 50%)); z-index: 1; }
.el.has-img:hover { color: #fff; }
.el.has-img:hover > span { position: relative; z-index: 2; text-shadow: 0 1px 12px rgba(0, 0, 0, .55); }
.el:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .55); }
/* periodic-table silhouette: a gap in the first row */
@media (min-width: 901px) {
  .elements li:nth-child(4) { grid-column: 6; }
}
.table__note { margin-top: clamp(28px, 5vh, 48px); color: rgba(242, 216, 205, .78); max-width: 60ch; }
.el-float { display: none; }

/* ---------- A / B ---------- */
.ab { position: relative; background: var(--green-2); }
.ab__pin { position: relative; height: 100svh; min-height: 560px; overflow: hidden; }
.ab__img { position: absolute; inset: 0; margin: 0; }
.ab__img img { width: 100%; height: 100%; object-fit: cover; }
.ab__img--in img { object-position: 50% 38%; }
.ab__img--out img { object-position: 50% 58%; }
.ab__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 54, 48, 0) 50%, rgba(20, 54, 48, .7) 100%); pointer-events: none; }
.ab__img figcaption { position: absolute; bottom: clamp(24px, 6vh, 64px); z-index: 2; color: var(--pink); display: grid; gap: .4rem; max-width: min(92vw, 1000px); }
.ab__img--in figcaption { left: var(--gutter); }
.ab__img--out figcaption { right: var(--gutter); text-align: right; justify-items: end; }
.ab__word { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.6rem, 1rem + 6vw, 8rem); line-height: .9; letter-spacing: -.02em; }
.ab__txt { font-size: 1.02rem; max-width: 34ch; }
.ab__line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--pink); z-index: 3; display: none; }
.ab__line span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--pink); color: var(--green-2); padding: .5rem .8rem; border-radius: 999px; white-space: nowrap; }
.js:not(.no-anim) .ab__line { display: block; }
.no-anim .ab__pin { height: auto; }
.no-anim .ab__img { position: relative; height: 90svh; }

/* ---------- samples ---------- */
.samples { padding: clamp(110px, 18vh, 220px) var(--gutter); overflow: clip; }
.samples__head { margin-bottom: clamp(40px, 8vh, 96px); }
.samples__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 48px); align-items: start; }
.col { display: grid; gap: clamp(16px, 3vw, 48px); }
.col:nth-child(2) { margin-top: clamp(40px, 14vh, 180px); }
.col:nth-child(3) { margin-top: clamp(20px, 6vh, 80px); }
.sample { position: relative; }
.sample img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
.sample figcaption { margin-top: .8rem; display: flex; align-items: center; gap: .6rem; color: var(--green-dim); }
.sample figcaption::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--lamp); flex: none; }

/* ---------- voices ---------- */
.voices { background: var(--cream); padding: clamp(110px, 18vh, 220px) var(--gutter); }
.voices__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 120px); align-items: start; }
.voices__score { position: sticky; top: 120px; }
.score { display: flex; align-items: flex-start; font-family: var(--f-text); font-weight: 700; font-size: clamp(6rem, 3rem + 10vw, 14rem); line-height: .82; letter-spacing: -.04em; color: var(--lamp); margin: 1rem 0 .8rem; }
.score__star { font-size: .28em; color: var(--green); margin-left: .12em; letter-spacing: 0; }
.voices__h { font-size: clamp(1.8rem, 1rem + 2.2vw, 3.4rem); margin-top: clamp(28px, 6vh, 64px); }
.v { padding-block: clamp(26px, 4.6vh, 50px); border-top: 1px solid rgba(23, 59, 51, .18); }
.v:last-child { border-bottom: 1px solid rgba(23, 59, 51, .18); }
.v blockquote { margin: 0; }
.v p { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.3rem, .9rem + 1.3vw, 2.2rem); line-height: 1.18; letter-spacing: -.015em; text-wrap: pretty; }
.v figcaption { margin-top: 1rem; color: var(--green-dim); }

/* ---------- visit ---------- */
.visit { background: var(--green); color: var(--pink); padding: clamp(110px, 18vh, 220px) var(--gutter); }
.visit__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 140px); }
.visit__addr { margin-top: 1.8rem; font-size: clamp(1.3rem, 1rem + 1vw, 1.9rem); line-height: 1.3; }
.visit__geo { margin-top: 1rem; color: rgba(242, 216, 205, .7); }
.visit__ctas { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2.2rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 1rem 1.4rem; border-radius: 999px; text-decoration: none; font-family: var(--f-display); font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .02em; transition: background-color .35s, color .35s; will-change: transform; }
.btn--pink { background: var(--pink); color: var(--green-2); }
.btn--pink:hover { background: var(--lamp); color: var(--pink); }
.btn--line { box-shadow: inset 0 0 0 1px rgba(242, 216, 205, .5); color: var(--pink); }
.btn--line:hover { background: var(--pink); color: var(--green-2); }
.hours { width: 100%; border-collapse: collapse; margin-top: 1.2rem; }
.hours th, .hours td { padding: .9rem .2rem; border-bottom: 1px solid rgba(242, 216, 205, .2); font-weight: 400; text-align: left; }
.hours td { text-align: right; font-family: var(--f-mono); font-size: .9rem; }
.hours tr.is-closed td { color: rgba(242, 216, 205, .5); }
.hours tr.is-today th, .hours tr.is-today td { color: var(--green-2); background: var(--pink); }
.hours tr.is-today th { padding-left: .8rem; border-radius: 6px 0 0 6px; font-weight: 600; }
.hours tr.is-today td { padding-right: .8rem; border-radius: 0 6px 6px 0; }
.hours tr.is-today th::after { content: " · heute"; color: var(--lamp); font-weight: 400; }
.visit__note { margin-top: 1.6rem; color: var(--matcha); }

/* ---------- footer ---------- */
.foot { padding: clamp(64px, 12vh, 140px) var(--gutter) 28px; overflow: hidden; }
.foot__word { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.4rem, 10.2vw, 13rem); line-height: .86; letter-spacing: -.03em; white-space: nowrap; text-align: center; }
.foot__row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: clamp(28px, 6vh, 64px); padding-top: 16px; border-top: 1px solid rgba(23, 59, 51, .25); }
.foot__row a { text-decoration: none; }
.foot__credit { margin-top: 1.2rem; font-size: .84rem; color: var(--green-dim); max-width: 75ch; }
.foot__credit a { color: var(--lamp); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .bar__status { display: none; }
  .bar { grid-template-columns: 1fr auto; }
  .legend { grid-column: 1 / -1; grid-template-columns: repeat(4, auto); justify-content: start; }
  .table__head .h2 { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  :root { --bar-h: 58px; }
  .bar__nav a:not(.bar__cta) { display: none; }
  .bar__sub { display: none; }
  .veil__left { display: none; }
  .veil__right { right: auto; left: var(--gutter); }
  .story__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .story__a, .story__b, .story__c { grid-column: 1; }
  .story__b { width: min(70vw, 360px); justify-self: center; }
  .story__c { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 20px; }
  .story__c .body { margin: 0; }
  .legend { grid-template-columns: repeat(2, auto); }
  .elements { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .el__sym { font-size: 2.2rem; }
  .ab__pin { height: auto; min-height: 0; }
  .ab__img { position: relative; height: 82svh; overflow: hidden; }
  .js:not(.no-anim) .ab__line { display: none; }
  .ab__img figcaption { max-width: 88vw; }
  .ab__word { font-size: clamp(2rem, 10.4vw, 4rem); }
  .ab__img--out figcaption { right: auto; left: var(--gutter); text-align: left; justify-items: start; }
  .samples__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col:nth-child(3) { display: none; }
  .voices__grid, .visit__grid { grid-template-columns: minmax(0, 1fr); }
  .voices__score { position: static; }
  .foot__word { font-size: 10.4vw; }
}
@media (max-width: 420px) {
  .btn { width: 100%; }
  .legend { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .loader, .veil { display: none !important; }
  .hero__fallback { display: block !important; }
  .ab__line { display: none !important; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Kera QA: nothing may push the page wider than the phone screen (slide-in reveals, rotated badges).
   overflow-x: clip does not create a scroll container, so sticky/pinned sections keep working. */
html, body { overflow-x: clip; }
@supports not (overflow: clip) { html, body { overflow-x: hidden; } }
