/* The background of olive leaf shadows on a sunlit wall: the hero of a skincare brand on warm plaster. The WebGL
   canvas fills the stage and draws the wall, the patch of afternoon sun with the window frame, the sheer curtain and
   the leaf shadows; the words sit on top and cast a faint shadow of their own, turned by the sun.
   Without WebGL a CSS patch of light takes its place. */
:root {
  --shade: #d3c6b2;         /* the wall in the shade */
  --sun: #fff4de;           /* the wall in the sun */
  --cool: #b7b2b6;          /* the cool tint of the leaf shadows */
  --fringe: #ffb46a;        /* the warm edge of the light */
  --ink: #2a231e;           /* the heading */
  --muted: #6c6054;         /* the small words */
  --line: rgba(42, 35, 30, 0.14); /* thin edges */
  --olive: #3b4729;         /* the button */
  --olive-ink: #f7f0e2;     /* the words on the button */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  background: var(--shade);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 320px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
  background: var(--shade);
  --sx: 3px;
  --sy: 4px;
}

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

/* the light without WebGL */
.patch {
  position: absolute;
  inset: 6% 4% 4% 14%;
  z-index: 0;
  display: none;
  background: linear-gradient(110deg, transparent 0 8%, color-mix(in srgb, var(--sun) 80%, transparent) 14% 90%, transparent 96%);
  transform: skewX(-14deg);
  filter: blur(6px);
}

.no-gl .patch {
  display: block;
}

.bar,
.hero,
.hint {
  position: relative;
  z-index: 2;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(12px, 3vh, 22px) clamp(16px, 4vw, 40px) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: 19px;
  font-weight: 480;
  font-variation-settings: 'opsz' 36, 'SOFT' 80;
  letter-spacing: -0.01em;
}

.brand__mark {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--olive);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link,
.bag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.bag {
  color: var(--ink);
  background: rgba(255, 250, 240, 0.42);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

@media (hover: hover) {
  .nav__link:hover {
    color: var(--ink);
  }
  .bag:hover {
    background: rgba(255, 250, 240, 0.7);
  }
}

.bag__icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.bag__count {
  display: inline-block;
  height: 1.2em;
  line-height: 1.2em;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  font-weight: 560;
}

.bag__roll {
  display: flex;
  flex-direction: column;
}

.hero {
  align-self: center;
  justify-self: center;
  width: min(100%, 720px);
  padding: 0 clamp(16px, 5vw, 40px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  background: rgba(255, 250, 240, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 18px -10px rgba(60, 45, 30, 0.35);
  transition: color 0.3s;
}

.chip__new {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 620;
  letter-spacing: 0.02em;
  color: var(--olive-ink);
  background: var(--olive);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.chip__arrow {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .chip:hover {
    color: var(--ink);
  }
  .chip:hover .chip__arrow {
    transform: translateX(2px);
  }
}

/* the heading: Fraunces with a soft optical size; its faint shadow turns with the sun (--sx, --sy from the script) */
.title {
  margin: clamp(10px, 2.6vh, 20px) 0 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(30px, min(9.4vw, 9.6vh), 88px);
  line-height: 1;
  font-weight: 380;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 0;
  letter-spacing: -0.03em;
  text-wrap: balance;
  text-shadow: var(--sx) var(--sy) 7px rgba(70, 50, 30, 0.16);
}

.title__line {
  display: inline-block;
}

.title__line:last-child {
  font-style: italic;
  font-weight: 340;
}

.lede {
  margin: clamp(10px, 2.2vh, 16px) 0 0;
  max-width: 40ch;
  font-size: clamp(13px, min(3.6vw, 2.2vh), 16px);
  line-height: 1.5;
  color: var(--muted);
}

.actions {
  margin-top: clamp(14px, 3.4vh, 26px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  height: clamp(42px, 7vh, 54px);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--olive-ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* the face: olive with a light top edge and a two-layer shadow cast in the sun's direction */
.btn__face {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 100%;
  padding: 0 clamp(18px, 4.4vw, 24px);
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--olive) 86%, #fff), var(--olive) 60%, color-mix(in srgb, var(--olive) 88%, #000));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(40, 30, 15, 0.25),
    calc(var(--sx) * 2) calc(var(--sy) * 2.4) 22px -8px rgba(60, 45, 25, 0.5);
  transition: box-shadow 0.4s;
}

/* a soft band of sun that slides across the face when it is pressed or hovered */
.btn__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 238, 200, 0.28) 48%, transparent 66%);
  transform: translateX(-110%);
  pointer-events: none;
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn__words {
  position: relative;
  font-size: 14.5px;
  font-weight: 600;
  font-variation-settings: 'wdth' 100;
  white-space: nowrap;
  transition: font-variation-settings 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .btn:hover .btn__words {
    font-variation-settings: 'wdth' 110;
  }
}

.btn__icon {
  position: relative;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.btn__check {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.ghost {
  height: clamp(42px, 7vh, 54px);
  display: inline-flex;
  align-items: center;
  padding: 0 clamp(16px, 4vw, 20px);
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 540;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 250, 240, 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: background-color 0.3s, box-shadow 0.3s;
}

@media (hover: hover) {
  .ghost:hover {
    background: rgba(255, 250, 240, 0.65);
    box-shadow: inset 0 0 0 1px rgba(42, 35, 30, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }
}

.note {
  margin: clamp(10px, 2vh, 14px) 0 0;
  font-size: 11.5px;
  color: color-mix(in srgb, var(--muted) 85%, transparent);
  letter-spacing: 0.01em;
}

.hint {
  margin: 0;
  padding: 0 16px clamp(10px, 3vh, 22px);
  text-align: center;
  font-size: 11.5px;
  color: color-mix(in srgb, var(--muted) 75%, transparent);
  letter-spacing: 0.01em;
}

@media (max-height: 480px) {
  .hint {
    display: none;
  }
}

@media (max-height: 420px) {
  .note {
    display: none;
  }
}

@media (max-width: 380px) {
  .nav__link--wide {
    display: none;
  }
}

[data-in],
.title__line {
  opacity: 0;
}
