/* SMELLS — black, Archivo-like grotesque in capitals, difference-blend type (after almirakho.com).
   Fonts: fonts.css. Layout: 12 columns; the home screen is a hero + a chain of notes + a lede. */

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --fg: #fafafa;
  --soft: #d4d4d4;
  --muted: #a6a6a6;
  --line: rgb(250 250 250 / 0.2);
  --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --margin: 1.25rem;
  --gutter: 1.25rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --item-h: clamp(12rem, 34svh, 21rem);
  --label: 0.8125rem;
  --statement: clamp(1.625rem, 3vw, 2.5rem);
  --body: clamp(1rem, 1.15vw, 1.125rem);
}

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

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 500;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
picture { display: contents; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

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

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--fg);
  color: var(--bg);
  font-size: var(--label);
  text-transform: uppercase;
  translate: 0 -200%;
}
.skip-link:focus { translate: 0 0; }

#main:focus { outline: none; }

/* ---------- intro curtain ---------- */

.curtain {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  animation: curtain-gone 0s linear 1.3s forwards;
}
.curtain i {
  flex: 1 1 0;
  background: var(--bg);
  outline: 1px solid var(--bg);
  transform-origin: center bottom;
  animation: curtain-up 0.7s cubic-bezier(0.7, 0, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms + 0.15s);
}
.curtain i:nth-child(1) { --i: 0; }
.curtain i:nth-child(2) { --i: 1; }
.curtain i:nth-child(3) { --i: 2; }
.curtain i:nth-child(4) { --i: 3; }
.curtain i:nth-child(5) { --i: 4; }
.curtain i:nth-child(6) { --i: 5; }
.curtain i:nth-child(7) { --i: 6; }
.curtain i:nth-child(8) { --i: 7; }
.curtain i:nth-child(9) { --i: 8; }
.curtain i:nth-child(10) { --i: 9; }

@keyframes curtain-up { to { transform: scaleY(0); } }
@keyframes curtain-gone { to { visibility: hidden; } }

/* ---------- header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  column-gap: var(--gutter);
  padding: var(--margin);
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  font-size: var(--label);
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
}
.header > * { pointer-events: auto; }
.header a { text-decoration: none; }
.header a:hover, .header a:focus-visible { text-decoration: underline; text-underline-offset: 0.25em; }

.brand { grid-column: 1 / 3; font-weight: 600; letter-spacing: 0.02em; }

.menu-btn {
  grid-column: 3 / 7;
  justify-self: start;
  margin: -0.15em 0 0 0;
  padding: 0;
  border: 0;
  background: none;
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  font-weight: 500;
  line-height: 0.9;
  text-transform: uppercase;
  cursor: pointer;
}
.menu-btn:hover { text-decoration: underline; text-underline-offset: 0.12em; text-decoration-thickness: 2px; }

.header__links {
  grid-column: 7 / 13;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

/* ---------- home screen ---------- */

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow: hidden;
}

.hero {
  position: relative;
  flex: 1 1 auto;
  width: 60%;
  min-height: 22rem;
  overflow: hidden;
  background: #000;
}

.visual {
  position: absolute;
  inset: 0;
  background: radial-gradient(75% 80% at 50% 56%, var(--tint, #141414), var(--bg));
}
.visual__img {
  position: absolute;
  left: 50%;
  top: 54%;
  translate: -50% -50%;
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 66%;
  filter: drop-shadow(0 2rem 2.5rem rgb(0 0 0 / 0.55));
}
@media (prefers-reduced-motion: no-preference) {
  .visual__img { animation: float 9s ease-in-out infinite alternate; }
}
html[data-motion="off"] .visual__img { animation: none; }
@keyframes float { from { translate: -50% -52%; } to { translate: -50% -48%; } }

.hero__caption {
  position: absolute;
  left: var(--margin);
  bottom: var(--margin);
  z-index: 3;
  display: grid;
  gap: 0.3rem;
  max-width: 24rem;
  color: #fff;
  mix-blend-mode: difference;
  font-size: var(--label);
  line-height: 1.25;
  text-transform: uppercase;
}
.hero__caption span:first-child { opacity: 0.75; }
.hero__caption strong { font-weight: 600; }
.hero__caption span:last-child { text-transform: none; font-weight: 400; }

/* shutter: nine vertical strips that open one after another (as on the reference) */
.shutters { position: absolute; inset: 0; z-index: 2; display: flex; pointer-events: none; }
.shutter {
  position: relative;
  flex: 1 1 0;
  overflow: hidden;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.28s ease-out;
  transition-delay: calc(var(--n) * 26ms);
  background: var(--bg);
}
.shutters.is-open .shutter { transform: scaleX(1); }
.shutter .visual { left: calc(var(--n) * -100%); width: 900%; right: auto; }
.shutter .visual__img { animation: none; }

/* the chain of notes */
.strip {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: 1;
  width: 40%;
  overflow-y: auto;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 12%, var(--line) 88%, transparent);
  pointer-events: none;
}
/* clip, not hidden: the browser must never scroll the chain itself when a note takes focus */
.strip.is-enhanced { overflow: clip; cursor: grab; touch-action: pan-y; }
.strip.is-dragging { cursor: grabbing; }
.strip__track { position: relative; will-change: transform; }

.note { position: relative; height: var(--item-h); }
.note__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.note__btn:focus-visible { outline-offset: -6px; }
.note__img {
  width: auto;
  height: calc(var(--item-h) * 0.78);
  max-width: 70%;
  object-fit: contain;
  rotate: var(--tilt, 0deg);
  filter: drop-shadow(0 1rem 1.25rem rgb(0 0 0 / 0.6));
  transition: scale 0.5s var(--ease);
  -webkit-user-drag: none;
  user-select: none;
}
.note__btn:hover .note__img, .note__btn:focus-visible .note__img { scale: 1.08; }

.note__label {
  position: absolute;
  inset: auto 0 0.4rem 0;
  text-align: center;
  font-size: var(--label);
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
  opacity: 0;
  translate: 0 0.3rem;
  transition: opacity 0.25s, translate 0.25s var(--ease);
  text-shadow: 0 0 0.75rem #000, 0 0 0.25rem #000;
}
.note__idx { color: var(--muted); margin-inline-end: 0.35em; }
.note__btn:hover .note__label, .note__btn:focus-visible .note__label, .note.is-current .note__label {
  opacity: 1;
  translate: 0 0;
}
@media (hover: none) {
  .note__label { opacity: 1; translate: 0 0; }
}

.motion-btn {
  position: absolute;
  right: var(--margin);
  bottom: var(--margin);
  z-index: 5;
  min-height: 2.75rem;
  margin: -0.75rem -0.5rem;
  padding: 0.75rem 0.5rem;
  border: 0;
  background: none;
  color: #fff;
  mix-blend-mode: difference;
  font-size: var(--label);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}
.motion-btn:hover { text-decoration: underline; text-underline-offset: 0.25em; }
@media (prefers-reduced-motion: reduce) { .motion-btn { display: none; } }

body:has(dialog[open]) { overflow: hidden; }

.lede {
  position: relative;
  z-index: 4;
  flex: none;
  width: 100%;
  padding: var(--margin);
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}
.lede__text {
  max-width: 66%;
  font-size: var(--statement);
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  text-wrap: balance;
}

/* ---------- sections ---------- */

.block {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding: clamp(5rem, 11vw, 10rem) var(--margin) 0;
  scroll-margin-top: 0;
}
.block__label {
  grid-column: 3 / 7;
  align-self: start;
  position: sticky;
  top: 4.5rem;
  font-size: var(--label);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}
.block__body { grid-column: 7 / 13; }
.block__body--after { margin-top: clamp(2rem, 4vw, 3.5rem); }

.statement {
  margin-bottom: 2rem;
  font-size: var(--statement);
  font-weight: 500;
  line-height: 1.04;
  text-transform: uppercase;
  text-wrap: balance;
}
.statement--small { font-size: clamp(1.375rem, 2.2vw, 1.875rem); line-height: 1.1; }
.statement--huge { font-size: clamp(2.25rem, 4.6vw, 4.25rem); line-height: 0.98; }

.body-text {
  max-width: 62ch;
  margin-bottom: 1.5rem;
  color: var(--soft);
  font-size: var(--body);
  font-weight: 400;
  line-height: 1.55;
  text-wrap: pretty;
}

.mini-label {
  margin: clamp(2.5rem, 5vw, 4rem) 0 1rem;
  color: var(--muted);
  font-size: var(--label);
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
}

.plain-list { border-top: 1px solid var(--line); margin-bottom: 1.5rem; }
.plain-list li {
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.3;
}
.plain-list--text li {
  max-width: 62ch;
  color: var(--soft);
  font-size: var(--body);
  font-weight: 400;
  line-height: 1.5;
  text-wrap: pretty;
}

.steps { border-top: 1px solid var(--line); }
.step {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.step__n { color: var(--muted); font-size: var(--label); font-weight: 600; line-height: 1.9; }
.step p { font-size: clamp(1.25rem, 2vw, 1.75rem); line-height: 1.15; text-wrap: pretty; }

.quotes li {
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 400;
  line-height: 1.25;
}
.quotes { margin-bottom: 2rem; }
.quotes li:last-child { border-bottom: 1px solid var(--line); }

.paths { display: grid; gap: var(--gutter); margin: 2rem 0 0; }
.path { padding: 1.5rem; border: 1px solid var(--line); }
.path__title {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  font-weight: 600;
  line-height: 1.15;
}
.path__title span { color: var(--muted); }
.path__list { padding-inline-start: 1.25rem; list-style: decimal; color: var(--soft); font-weight: 400; line-height: 1.5; }
.path__list li { margin-bottom: 0.65rem; padding-inline-start: 0.25rem; text-wrap: pretty; }
.path__list li::marker { color: var(--muted); }

.income { margin-top: clamp(3rem, 6vw, 5rem); }
.income__sum { margin-bottom: 0.5rem; font-size: clamp(3.5rem, 9vw, 8rem); font-weight: 500; line-height: 0.9; letter-spacing: -0.02em; }

.callout { margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1rem; border-top: 1px solid var(--line); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  margin-top: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  font-size: var(--label);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.btn::after { content: "→" / ""; }
.btn:hover { background: var(--fg); color: var(--bg); }
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid:hover { background: transparent; color: var(--fg); }
.btn--solid:focus-visible { outline-offset: 4px; }

.text-link { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }

.contact__links { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2rem; margin-top: 1rem; }
.contact__links .text-link { font-size: clamp(1.125rem, 1.6vw, 1.375rem); font-weight: 600; }

/* ---------- catalogue: every bottle with its brand and name ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filters[hidden] { display: none; }
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--line);
  background: none;
  font-size: var(--label);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--fg); }
.chip[aria-pressed="true"] { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.chip__n { font-weight: 500; opacity: 0.6; }

.catalog {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1.5rem, 2.5vw, 2.5rem) var(--gutter);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.product[hidden] { display: none; }
.product__link { position: relative; display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.product__media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: radial-gradient(65% 55% at 50% 55%, #222, #0f0f0f 75%);
}
.product__media img {
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 78%;
  filter: drop-shadow(0 1.25rem 1.5rem rgb(0 0 0 / 0.55));
  transition: scale 0.5s var(--ease);
}
.product__link:hover .product__media img, .product__link:focus-visible .product__media img { scale: 1.06; }
.product__link:focus-visible { outline-offset: 4px; }
.product__tag {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}
.product__brand {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: var(--label);
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
}
.product__name { margin-top: 0.3rem; font-size: 1rem; font-weight: 500; line-height: 1.25; text-wrap: balance; }
.product__link:hover .product__name { text-decoration: underline; text-underline-offset: 0.2em; }

@media (max-width: 1200px) { .catalog { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- footer ---------- */

.footer {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  margin-top: clamp(6rem, 12vw, 11rem);
  padding: 1.5rem var(--margin) 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--label);
  font-weight: 500;
  text-transform: uppercase;
}
.footer p:first-child { grid-column: 1 / 3; }
.footer p:nth-child(2) { grid-column: 3 / 10; }
.footer a { grid-column: 11 / 13; justify-self: end; }

/* ---------- reveal on scroll ---------- */

.js [data-reveal] { opacity: 0; translate: 0 1.5rem; transition: opacity 0.7s var(--ease), translate 0.7s var(--ease); }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; translate: 0 0; transition: none; }
}

/* ---------- dialogs: menu and note ---------- */

dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--bg);
  color: var(--fg);
  overflow: auto;
}
dialog::backdrop { background: #000; }
dialog[open] { animation: dialog-in 0.35s var(--ease); }
@keyframes dialog-in { from { opacity: 0; translate: 0 1rem; } }
@media (prefers-reduced-motion: reduce) { dialog[open] { animation: none; } }

.menu__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--margin);
  font-size: var(--label);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}
.menu__close, .note-dialog__close {
  padding: 0;
  border: 0;
  background: none;
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  font-weight: 500;
  line-height: 0.9;
  text-transform: uppercase;
  cursor: pointer;
}
.menu__close:hover, .note-dialog__close:hover { text-decoration: underline; text-underline-offset: 0.12em; text-decoration-thickness: 2px; }

.menu__nav { padding: clamp(2rem, 8vh, 6rem) var(--margin) var(--margin) calc(var(--margin) + 16.66%); }
.menu__nav a {
  display: block;
  padding: 0.25rem 0;
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 0.95;
  text-decoration: none;
  text-transform: uppercase;
  transition: opacity 0.2s;
}
.menu__nav ul:hover a:not(:hover):not(:focus-visible) { opacity: 0.35; }

.note-dialog__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 100%;
}
.note-dialog__close { position: absolute; top: var(--margin); right: var(--margin); z-index: 5; mix-blend-mode: difference; color: #fff; }
.note-dialog__visual { position: relative; min-height: 60svh; overflow: hidden; background: #000; }
.note-dialog__visual .visual__img { max-width: 78%; max-height: 74%; }
.note-dialog__text { display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(6rem, 12vh, 9rem) var(--margin) var(--margin); }
.note-dialog__text .mini-label { margin-top: 0; }
.note-dialog__title {
  margin: 0 0 1.5rem;
  font-size: clamp(2.5rem, 6.5vw, 6rem);
  font-weight: 500;
  line-height: 0.92;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.note-dialog__text .btn { align-self: flex-start; }
.note-dialog__nav { display: flex; gap: 0.75rem; margin-top: 2rem; }
.note-dialog__nav button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  background: none;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.note-dialog__nav button:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); }

/* ---------- utility ---------- */

.vh {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* ---------- narrow screens ---------- */

@media (max-width: 900px) {
  :root { --margin: 1rem; --gutter: 0.75rem; --item-h: 11rem; }

  .header { grid-template-columns: 1fr auto; }
  .brand { grid-column: 1; }
  .menu-btn { grid-column: 2; }
  .header__links { display: none; }

  .stage { min-height: 100svh; }
  .hero { flex: none; width: 100%; height: 54svh; min-height: 18rem; }
  .visual__img { max-width: 78%; max-height: 64%; }

  .strip {
    position: relative;
    inset: auto;
    width: 100%;
    flex: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    border-block: 1px solid var(--line);
  }
  .strip::before { inset: 50% 0 auto 0; width: auto; height: 1px; background: var(--line); }
  .strip__track { display: flex; width: max-content; }
  .note { flex: 0 0 min(40vw, 12rem); height: 11.5rem; scroll-snap-align: center; }
  .note__img { height: 7.25rem; max-width: 80%; }

  .motion-btn { top: calc(54svh - 3.5rem); bottom: auto; }

  .lede { padding-block: 2rem 1.5rem; }
  .lede__text { max-width: 100%; }

  .block { grid-template-columns: minmax(0, 1fr); row-gap: 1.5rem; padding-top: 4.5rem; }
  .block__label, .block__body { grid-column: 1; }
  .block__label { position: static; }
  .catalog { grid-column: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product__name { font-size: 0.9375rem; }
  .paths { grid-template-columns: minmax(0, 1fr); }

  .menu__nav { padding-left: var(--margin); }
  .note-dialog__inner { grid-template-columns: minmax(0, 1fr); }
  .note-dialog__visual { min-height: 46svh; }
  .note-dialog__text { padding-top: 2rem; }

  .footer { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0.75rem; }
  .footer p:first-child, .footer p:nth-child(2) { grid-column: 1 / -1; }
  .footer a { grid-column: 1 / -1; justify-self: start; }
}

@media (min-width: 901px) {
  .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .curtain { display: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
