@font-face {
  font-family: 'Selectric Century';
  src: url('assets/fonts/SelectricCentury-Medium8.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sirca';
  src: url('assets/fonts/SircaTrial-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --quiet: #9a9a9a;
  --serif: 'Selectric Century', 'Times New Roman', serif;
  --grotesk: 'Sirca', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.4;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── top / wordmark ─── */

.top {
  padding: 3rem 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.wordmark { display: block; width: 5.75rem; }
.wordmark svg { width: 100%; height: auto; display: block; }
.wordmark svg path { fill: var(--ink); }

.tagline {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--quiet);
  letter-spacing: 0.005em;
  text-align: center;
}

/* ─── shop ─── */

.shop {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.5rem 6rem;
  gap: 1.25rem;
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}

/* ─── bottles ─── */

.bottles-wrap {
  position: relative;
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
}

.bottles {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1.25rem;
  width: 100%;
}

.bottle {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  animation: bottle-in 1400ms ease-out backwards;
}

.bottle:nth-child(1) { animation-delay: 200ms; }
.bottle:nth-child(2) { animation-delay: 300ms; }
.bottle:nth-child(3) { animation-delay: 400ms; }

@keyframes bottle-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .bottle { animation: none; }
}

.bottle img {
  width: 100%;
  height: auto;
  pointer-events: none;
}

.bottle-image {
  position: relative;
  display: block;
  width: 100%;
}
.bottle-image img { display: block; }

.bottle-plus {
  position: absolute;
  bottom: calc(33% - 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  width: 1.5rem;
  height: 1.5rem;
  color: var(--ink);
  pointer-events: none;
  display: block;
  z-index: 1;
}
.bottle-plus svg { width: 100%; height: 100%; display: block; }

.bottle:active .bottle-plus { transform: translateX(-50%) scale(0.9); }

.bottle-name {
  font-family: var(--grotesk);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
}

.bottle-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--quiet);
  text-align: center;
  margin-top: -0.2rem;
}

/* ─── splash (price callout over bottles) ─── */

.splash {
  position: absolute;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 2;
  color: var(--ink);
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 600ms var(--ease);
}
.splash.is-visible { opacity: 1; }

.splash > * { grid-area: 1 / 1; }

.splash-shape {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.splash-text {
  text-align: center;
  line-height: 1.1;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 1;
}

/* Solid black oval — only at n === 2 ("3 for DKK 350"), floats in the right-side gap between bottles. */
.splash--three {
  width: 100px;
  height: 58px;
  top: 205px;
  left: 147px;
  right: auto;
  transform: rotate(-10deg);
}
.splash--three .splash-text {
  color: var(--bg);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

/* White 12-point starburst, bigger, spinning — n >= 3 ("6 for DKK 600"), sits in the left-side gap above the plus icons. */
.splash--six {
  width: 122px;
  height: 122px;
  top: 50px;
  left: 32px;
  right: auto;
}
.splash--six .splash-shape {
  animation: splash-spin 24s linear infinite;
  transform-origin: center;
}
.splash--six .splash-text {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

@keyframes splash-spin {
  to { transform: rotate(-360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .splash--six .splash-shape { animation: none; }
}

/* ─── basket area ─── */

.basket-area {
  width: 100%;
  max-width: 22rem;
  min-height: 4.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hint {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  text-align: center;
  animation: hint-in 700ms 550ms var(--ease) backwards;
}

@keyframes hint-in {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hint[hidden] { display: none; }

.basket {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.basket-line {
  display: grid;
  grid-template-columns: 1fr 2.5rem auto 1.5rem;
  align-items: center;
  gap: 0.6rem 1.1rem;
  font-family: var(--serif);
  font-size: 0.95rem;
  padding: 0.7rem 0.15rem;
  border-bottom: 1px solid #f1f1f1;
}

.basket-line-name { letter-spacing: 0.005em; }

.basket-line-count {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-align: right;
  letter-spacing: 0.02em;
  display: inline-block;
  transform-origin: center right;
}

.basket-line-price {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: var(--quiet);
  text-align: right;
}

.basket-line-remove {
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  -webkit-tap-highlight-color: transparent;
  transition: transform 150ms var(--ease), opacity 150ms var(--ease);
}
.basket-line-remove svg {
  width: 100%;
  height: 100%;
  display: block;
}
.basket-line-remove:hover { transform: scale(1.06); }
.basket-line-remove:active { transform: scale(0.92); }

.basket-line-summary .basket-line-name {
  color: var(--quiet);
}

.basket-line-discount .basket-line-name,
.basket-line-discount .basket-line-price {
  font-style: italic;
}

.basket-line-total {
  border-bottom: 0;
  border-top: 1px solid var(--ink);
  margin-top: 0.5rem;
  padding-top: 0.9rem;
}
.basket-line-total .basket-line-name {
  color: var(--ink);
  font-size: 1.1rem;
}
.basket-line-total .basket-line-price {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
}

/* ─── story (below the shop) ─── */

.story {
  padding: 1.5rem 1.5rem 9rem;
  background: var(--bg);
}

.story-icon {
  display: block;
  width: 3.25rem;
  height: auto;
  margin: 0 auto 1.25rem;
  opacity: 0.9;
  mix-blend-mode: multiply;
}

.story-description {
  max-width: 28rem;
  margin: 0 auto 3.5rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: center;
  color: var(--ink);
}

.story-carousel {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 1.5rem;
  margin: 0 -1.5rem;
  scrollbar-width: none;
}
.story-carousel::-webkit-scrollbar { display: none; }

.photo-placeholder {
  flex: 0 0 72%;
  aspect-ratio: 4 / 5;
  background: #ededed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.photo-placeholder span {
  font-family: var(--grotesk);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--quiet);
}

/* ─── made on ─── */

.made-on {
  padding: 0 1.5rem 4rem;
  background: var(--bg);
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

.made-on-statement {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ink);
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
}

/* Wide-aspect placeholder used by both made-on and the variants comparison. */
.photo-placeholder--wide {
  width: 100%;
  aspect-ratio: 3 / 2;
  flex: none;
  scroll-snap-align: none;
}

@media (min-width: 760px) {
  .made-on {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 4rem;
  }
  .made-on-statement {
    text-align: left;
    max-width: none;
    margin: 0;
  }
}

/* ─── variants ─── */

.variants {
  padding: 0 1.5rem 8rem;
  background: var(--bg);
  max-width: 1100px;
  margin: 0 auto;
}

.variants-label {
  margin: 0 0 1.5rem;
  font-family: var(--grotesk);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--quiet);
  text-align: center;
}

.variants-comparison {
  margin-bottom: 3.5rem;
}

.variant-carousel {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 1.5rem;
  margin: 0 -1.5rem 2.25rem;
  scrollbar-width: none;
}
.variant-carousel::-webkit-scrollbar { display: none; }

.variant-slide {
  flex: 0 0 78%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.variant-slide .variant-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
}

.variant-photo {
  background: var(--accent, #ededed);
}

.variant-photo span {
  color: rgba(0, 0, 0, 0.55);
}

.variant-caption {
  max-width: 28rem;
  margin: 0 auto;
  text-align: center;
  min-height: 7.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.variant-caption .variant-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.005em;
  color: var(--ink);
  transition: opacity 200ms var(--ease);
}

.variant-caption .variant-note {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
  transition: opacity 200ms var(--ease);
}

.variant-caption.is-swapping .variant-name,
.variant-caption.is-swapping .variant-note {
  opacity: 0.25;
}

@media (min-width: 760px) {
  .variant-slide { flex: 0 0 52%; }
}

/* ─── foot: sticky delivery + checkout (floats with fade) ─── */

.foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 3.5rem 1.5rem 1.25rem;
  background: linear-gradient(to top, var(--bg) 0%, var(--bg) 55%, rgba(255, 255, 255, 0) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  transition: padding 500ms var(--ease), background 500ms var(--ease);
}
.foot > * {
  width: 100%;
  max-width: 22rem;
  pointer-events: auto;
}

/* Compact state — when the user has scrolled into the story section. */
.foot.is-compact {
  padding: 0.7rem 1rem 0.85rem;
  background: var(--bg);
  border-top: 1px solid var(--rule, rgba(10, 10, 10, 0.08));
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}
.foot.is-compact > * {
  width: auto;
  max-width: none;
}
/* Delivery line — present in both states, fades + collapses in compact. */
.delivery {
  opacity: 1;
  max-height: 3em;
  overflow: hidden;
  transition:
    opacity 320ms var(--ease) 80ms,
    max-height 450ms var(--ease),
    margin 450ms var(--ease);
}
.foot.is-compact .delivery {
  position: absolute;
  opacity: 0;
  max-height: 0;
  margin: 0;
  pointer-events: none;
  transition:
    opacity 220ms var(--ease),
    max-height 450ms var(--ease) 100ms,
    margin 450ms var(--ease) 100ms;
}

.foot.is-compact .checkout {
  padding: 0.65rem 1.1rem;
  font-size: 0.95rem;
}
.foot.is-compact .checkout-label { font-size: 0.95rem; }
.foot.is-compact .checkout-price { font-size: 0.78rem; }
.checkout {
  transition: padding 450ms var(--ease), font-size 450ms var(--ease),
              opacity 200ms var(--ease), transform 200ms var(--ease);
}
.checkout-label, .checkout-price {
  transition: font-size 450ms var(--ease);
}

/* Back-to-basket — always present; fades + collapses to 0 width in normal state. */
.back-to-basket {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink);
  background: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  letter-spacing: 0.01em;
  overflow: hidden;

  opacity: 0;
  max-width: 0;
  max-height: 0;
  padding: 0;
  transition:
    opacity 220ms var(--ease),
    max-width 450ms var(--ease),
    max-height 450ms var(--ease),
    padding 450ms var(--ease);
}
.foot.is-compact .back-to-basket {
  opacity: 1;
  max-width: 14rem;
  max-height: 3rem;
  padding: 0.5rem 0.85rem;
  transition:
    opacity 320ms var(--ease) 140ms,
    max-width 450ms var(--ease),
    max-height 450ms var(--ease),
    padding 450ms var(--ease);
}
.back-to-basket:hover { opacity: 0.7; }

.upsell {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink);
  text-align: center;
  animation: line-in 280ms var(--ease);
}
.upsell[hidden] { display: none; }

.delivery {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--quiet);
  text-align: center;
}

.checkout {
  width: 100%;
  padding: 1.1rem 1.5rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  border-radius: 999px;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.45rem;
  white-space: nowrap;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}

.checkout:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.checkout:not(:disabled):hover { transform: translateY(-1px); }
.checkout:not(:disabled):active { transform: translateY(1px); }

.checkout-label {
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.checkout-price {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}
.checkout-price:empty { display: none; }

/* ─── responsive ─── */

@media (min-width: 600px) {
  .top { padding-top: 2rem; }
  .wordmark { width: 6.75rem; }
  .shop { padding-top: 3rem; gap: 2rem; }
  .bottles { gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
