/* Cal's Care. The site is a pool of serum; everything else floats in it. */

:root {
  --amber-dark: #2E170A;
  --espresso: #2A160C;
  --caramel: #C98A55;
  --caramel-deep: #7E4A1F;
  --caramel-text: #87501F;
  --blush: #EEDCCD;
  --blush-deep: #E0C2AD;
  --milk: #F8F0E8;
  --sage: #2E463B;
  --sage-ink: #D6E0D2;

  --display: "Gloock", Georgia, serif;
  --sans: "Schibsted Grotesk", system-ui, sans-serif;
  --ethiopic: "Noto Serif Ethiopic", serif;

  --gut: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--amber-dark);
  scrollbar-width: thin;
  scrollbar-color: var(--caramel) var(--amber-dark);
}

body {
  margin: 0;
  color: var(--milk);
  background: transparent;
  font-family: var(--sans);
  font-size: clamp(1rem, .95rem + .2vw, 1.1rem);
  line-height: 1.5;
  overflow-x: clip;
}

h1, h2, h3, p, dl, dd, ol { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: .95; }
p, dd { text-wrap: pretty; }
a { color: inherit; }

::selection { background: var(--caramel); color: var(--espresso); }

:focus-visible { outline: 2px solid var(--caramel); outline-offset: 5px; border-radius: 6px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: fixed; left: 16px; top: -80px; z-index: 300;
  background: var(--milk); color: var(--espresso);
  padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 16px; }

/* Loader */

.loader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: var(--amber-dark);
}
.loader-drop { width: 64px; height: auto; overflow: visible; }
html:not(.js) .loader { display: none; }

/* The pool sits behind everything and shows through the hero and the visit section */

.pool {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  display: block;
}

main { position: relative; z-index: 1; }

/* Cursor: a drop that stretches as it moves. Only for mouse and trackpad. */

.cursor { display: none; }

@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
  html.has-cursor .cursor {
    display: block;
    position: fixed; left: 0; top: 0; z-index: 150;
    pointer-events: none;
  }
  .cursor-drop {
    position: absolute;
    width: 16px; height: 16px; margin: -8px 0 0 -8px;
    border-radius: 50%;
    background: var(--espresso);
    box-shadow: 0 0 0 1.5px var(--milk);
    transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .3s, box-shadow .3s;
  }
  .cursor-label {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: .8rem; font-weight: 500;
    color: var(--espresso);
    opacity: 0;
    transition: opacity .2s;
    white-space: nowrap;
  }
  /* In the serum the cursor is just a ring; the ripple is the real cursor */
  .cursor.in-pool .cursor-drop {
    width: 34px; height: 34px; margin: -17px 0 0 -17px;
    background: transparent;
    box-shadow: 0 0 0 1px rgba(248,240,232,.7);
  }
  .cursor.on-link .cursor-drop {
    width: 76px; height: 76px; margin: -38px 0 0 -38px;
    background: var(--milk);
    box-shadow: 0 0 0 1px var(--caramel);
  }
  .cursor.on-link .cursor-label { opacity: 1; }
}

/* Top bar */

.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: max(16px, env(safe-area-inset-top)) var(--gut) 16px;
  pointer-events: none;
  color: var(--milk);
  transition: color .3s;
}
.bar.on-light { color: var(--espresso); }
.bar a { pointer-events: auto; text-decoration: none; color: inherit; }
.mark { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 1.3rem; }
.mark svg { width: 16px; height: 16px; fill: currentColor; }
.bar-visit { font-weight: 500; font-size: .95rem; padding: 8px 0; border-bottom: 1.5px solid currentColor; }

/* 1. Hero */

.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 520px;
}
.hero-fallback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

html.no-gl .hero {
  background: radial-gradient(120% 90% at 30% 25%, #B26B33, #6A3615 55%, var(--amber-dark));
  display: grid; place-items: center;
}
html.no-gl .hero-fallback {
  position: static; width: auto; height: auto; clip-path: none;
  font-size: clamp(4rem, 17vw, 16rem);
  color: var(--milk); text-align: center; line-height: .85;
}

.hero-foot {
  position: absolute; left: var(--gut); bottom: max(28px, env(safe-area-inset-bottom));
  max-width: 24rem;
}
.hero-am { font-family: var(--ethiopic); font-size: 1.15rem; color: #F3D3B5; }
.hero-line { margin-top: 6px; font-size: 1.05rem; }
.hero-hint { margin-top: 18px; font-size: .85rem; color: rgba(248,240,232,.62); }
.hint-touch { display: none; }
@media (pointer: coarse) { .hint-fine { display: none; } .hint-touch { display: inline; } }

.hero-where {
  position: absolute; right: var(--gut); bottom: max(28px, env(safe-area-inset-bottom));
  font-size: .9rem; color: rgba(248,240,232,.75);
  text-align: right; max-width: 12rem;
}

/* 2. Split: one drop into four skin types */

.split { background: var(--sage); color: var(--milk); }
.split-pin {
  position: relative;
  height: 100vh; height: 100svh;
  overflow: hidden;
}

.split-title {
  position: absolute; left: 0; right: 0; top: clamp(72px, 11vh, 120px);
  text-align: center;
  font-size: clamp(2rem, 1rem + 2.6vw, 3.6rem);
  padding: 0 var(--gut);
}
.split-title span { display: block; }
.split-b { color: var(--caramel); }

.split-svg {
  position: absolute; left: 50%; top: 58%;
  width: min(70vh, 62vw); height: min(70vh, 62vw);
  transform: translate(-50%, -50%);
  overflow: visible;
}
.s { opacity: 0; }

.types { position: absolute; inset: 0; pointer-events: none; }
.type { position: absolute; width: min(22rem, 24vw); }
.type dt { font-family: var(--display); font-size: clamp(1.8rem, 1rem + 2vw, 3rem); line-height: 1; }
.type dd { margin-top: 10px; color: var(--sage-ink); font-size: .98rem; }
.t1 { left: var(--gut); top: 38vh; }
.t2 { right: var(--gut); top: 38vh; text-align: right; }
.t3 { left: var(--gut); bottom: 13vh; }
.t4 { right: var(--gut); bottom: 13vh; text-align: right; }

.split-note {
  position: absolute; left: 0; right: 0; bottom: max(22px, env(safe-area-inset-bottom));
  text-align: center; font-size: .85rem; color: #A9BBA6;
  padding: 0 var(--gut);
}

/* 3. Ten down to three */

.ten { background: var(--blush); color: var(--espresso); }
.ten-pin {
  position: relative;
  height: 100vh; height: 100svh;
  overflow: hidden;
  padding: clamp(80px, 12vh, 130px) var(--gut) 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  grid-template-rows: auto 1fr;
  column-gap: 48px;
}
.ten-title {
  grid-column: 1 / -1;
  font-family: var(--sans); font-weight: 500;
  font-size: 1.05rem; line-height: 1.3;
  color: var(--caramel-text);
  margin-bottom: 2vh;
}
.ten-list {
  list-style: none; padding: 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 6.6vh, 6rem);
  line-height: 1;
  align-self: start;
}
.ten-list li { display: flex; align-items: baseline; gap: .35em; overflow: hidden; padding: .02em 0; }
.ten-list .w { position: relative; display: inline-block; }
.ten-list .n {
  font-family: var(--sans); font-weight: 500;
  font-size: .3em; color: var(--caramel-text);
  width: 1.6em; flex: none;
  opacity: 0;
}
.ten-list .cut { padding-left: calc(.3em * 1.6 + .35em); }
.ten-list .cut i {
  position: absolute; left: -.06em; right: -.06em; top: 55%;
  height: .09em; background: var(--caramel-deep);
  transform: scaleX(0); transform-origin: left center;
}
.ten-after {
  align-self: end;
  font-size: 1.1rem; max-width: 22rem;
  opacity: 0;
}

/* 4. Shelf, scrolled sideways */

.shelf { background: var(--espresso); }
.shelf-pin {
  position: relative;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.shelf-track { display: flex; height: 100%; width: max-content; will-change: transform; }

.bay {
  position: relative;
  min-width: 78vw; height: 100%;
  flex: none;
  padding: clamp(84px, 13vh, 130px) 10vw 0 var(--gut);
}
.bay-1 { background: var(--sage); color: var(--milk); }
.bay-2 { background: var(--blush); color: var(--espresso); }
.bay-3 { background: var(--milk); color: var(--espresso); }
.bay-4 { background: #9A5A27; color: var(--milk); }

.bay-word {
  font-size: clamp(3.4rem, 11vw, 13rem);
  line-height: .85;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.bay-bottle {
  position: absolute;
  right: 16%;
  bottom: calc(18vh + 2px);
  height: 46vh; width: auto;
  filter: drop-shadow(0 24px 20px rgba(0,0,0,.25));
}
.bay-bottle.wide { height: 26vh; }
.bay-text {
  position: absolute;
  left: var(--gut);
  bottom: calc(18vh + 28px);
  max-width: 21rem;
  font-size: 1.05rem;
}

.plank {
  position: absolute; left: 0; right: 0; bottom: 18vh;
  height: clamp(14px, 2.4vh, 26px);
  background: linear-gradient(#B4743F, #7E4A1F);
  box-shadow: 0 20px 30px -16px rgba(0,0,0,.6);
  overflow: hidden;
}
.plank-run {
  position: absolute; inset: 0;
  width: 400%;
  background: repeating-linear-gradient(90deg, transparent 0 60px, rgba(42,22,12,.22) 60px 62px, transparent 62px 170px, rgba(248,240,232,.12) 170px 171px, transparent 171px 260px);
}
.shelf-brands {
  position: absolute; left: var(--gut); right: var(--gut); bottom: max(5vh, 20px);
  color: var(--blush-deep);
  font-size: .95rem;
  transition: color .3s;
}
.shelf-pin.on-light .shelf-brands { color: var(--caramel-text); }

/* 5. Visit: the pool comes back */

.visit {
  position: relative;
  min-height: 130vh; min-height: 130svh;
  display: flex; flex-direction: column; justify-content: flex-end;
}
html.no-gl .visit { background: radial-gradient(120% 90% at 70% 20%, #9A5A27, #4A2610 60%, var(--amber-dark)); }

.visit-body {
  padding: 44vh var(--gut) 8vh;
  background: linear-gradient(transparent, rgba(30,14,5,.78) 45%);
}
.visit h2 {
  font-size: clamp(2.6rem, 1rem + 6vw, 7.5rem);
  max-width: 13ch;
}
address {
  margin-top: 28px;
  font-style: normal; line-height: 1.6;
  color: #EBD2BD;
}
.visit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 36px; }
.pill {
  display: inline-block; text-decoration: none;
  background: var(--milk); color: var(--espresso);
  font-weight: 500;
  padding: 16px 28px;
  border-radius: 999px 999px 999px 8px;
  transition: border-radius .35s var(--ease), background-color .25s;
}
.pill:hover { border-radius: 8px 999px 999px 999px; background: var(--blush-deep); }
.under {
  font-weight: 500; text-decoration: underline;
  text-decoration-thickness: 1.5px; text-underline-offset: 6px;
  text-decoration-color: var(--caramel);
}

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px;
  padding: 28px var(--gut) max(28px, env(safe-area-inset-bottom));
  background: rgba(30,14,5,.92);
}
.foot-tag { font-family: var(--display); font-size: clamp(1.6rem, 1rem + 2vw, 2.8rem); }
.foot-small { font-size: .85rem; color: #C9A98F; }

/* Tablet and phone */

@media (max-width: 760px) {
  .bar-visit { font-size: .9rem; }
  .hero-where { display: none; }


  .ten-pin { padding-top: 84px; }

  .bay { min-width: 100vw; }
  .bay-word { font-size: 20vw; }
  .bay-bottle { right: 10%; height: 46vh; }
  .bay-bottle.wide { height: 24vh; }
  .bay-text { right: 46%; max-width: none; font-size: .95rem; }

  .visit-body { padding-bottom: 6vh; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 760px) and (max-height: 700px) {
  .type dd { font-size: .78rem; }
  .split-title { top: 66px; }
}

/* Stacked skin-type scene: phones, tablets held upright, and short landscape screens */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1100px), (max-height: 560px) {
  .split-pin {
    display: flex; flex-direction: column; justify-content: center;
    padding: 70px 0 max(16px, env(safe-area-inset-bottom));
  }
  .split-title, .split-svg, .types, .split-note { position: static; transform: none; }
  .split-title { font-size: clamp(1.7rem, 5.6vw, 3.4rem); }
  .split-svg { width: 100vw; height: 50vw; max-height: 34vh; margin: 3vh 0 2vh; flex: none; }
  .types {
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px clamp(16px, 4vw, 48px);
    padding: 0 var(--gut);
    max-width: 900px; margin: 0 auto; width: 100%;
  }
  .type { position: static; width: auto; text-align: left !important; }
  .type dt { font-size: clamp(1.5rem, 3.6vw, 2.4rem); }
  .type dd { font-size: clamp(.84rem, 1.8vw, 1rem); line-height: 1.4; margin-top: 6px; }
  .split-note { margin-top: 3vh; }

  /* Upright screens: the list fills the height, and stays centred as items drop out */
  .ten-pin {
    display: flex; flex-direction: column;
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }
  .ten-list {
    flex: 1;
    display: flex; flex-direction: column; justify-content: center;
    font-size: min(7.4svh, 12.6vw);
    line-height: 1.02;
  }
  .ten-after { align-self: flex-start; margin-top: 3vh; font-size: clamp(1rem, 2.4vw, 1.25rem); }
}

/* Phones turned sideways: one line of title, four columns of types */
@media (max-height: 560px) and (orientation: landscape) {
  .split-pin { padding-top: 56px; }
  .split-title { font-size: clamp(1.3rem, 3.4vw, 2rem); }
  .split-title span { display: inline; }
  .split-svg { height: 30vh; margin: 1vh 0; }
  .types { grid-template-columns: repeat(4, 1fr); max-width: none; gap: 12px 20px; }
  .type dt { font-size: 1.2rem; }
  .type dd { font-size: .74rem; }
  .split-note { margin-top: 2vh; font-size: .72rem; }

  .ten-pin { display: grid; padding-top: 60px; grid-template-columns: minmax(0, 1fr) minmax(0, 18rem); grid-template-rows: auto 1fr; }
  .ten-list { display: block; font-size: clamp(1.3rem, 7.4vh, 2.4rem); }
  .ten-title { margin-bottom: 1vh; }

  .hero { min-height: 0; }
  .bay { padding-top: 60px; }
  .bay-bottle { height: 40vh; }
  .bay-bottle.wide { height: 22vh; }
  .bay-text { font-size: .85rem; right: 40%; }
  .visit-body { padding-top: 20vh; }
}

/* Hover looks only where there's a real hover; on touch they'd stick after a tap */
@media (hover: none) {
  .pill:hover { border-radius: 999px 999px 999px 8px; background: var(--milk); }
}

/* Without motion: no pinning, everything shown in its finished state */
@media (prefers-reduced-motion: reduce) {
  .s { opacity: 1; }
  .g { display: none; }
  .ten-list .cut { opacity: .3; }
  .ten-list .cut i { transform: scaleX(1); }
  .ten-list .n, .ten-after { opacity: 1; }
  .shelf-pin { height: auto; }
  .shelf-track { flex-direction: column; width: 100%; }
  .bay { width: 100%; height: 100svh; }
  .plank { display: none; }
  .pill { transition: none; }
}
