/* ============================================================
   MEMORIES OF HER
   Black. White. Helvetica. Whitespace.
   ============================================================ */

:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #b0b0b0;
  --line: #1c1c1c;

  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --pad-x: clamp(1.25rem, 5vw, 4rem);
  --maxw: 1400px;
  --read: 40rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* safety net against accidental horizontal scroll.
     `clip` (unlike hidden) does not break position: sticky descendants. */
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 4px;
}

/* ---------- Accessibility utilities ---------- */

/* visually hidden but available to screen readers / SEO */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* keyboard skip link — hidden until focused */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-120%);
  z-index: 200;
  background: var(--text);
  color: var(--bg);
  padding: 0.85rem 1.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
}

/* ---------- Shared utility type ---------- */

.label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ============================================================
   TOP NAVIGATION  (every page except home)
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.15rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav__brand {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s ease;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--text);
}

/* mobile nav: brand stays, links wrap with comfortable tap targets */
@media (max-width: 640px) {
  .nav__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .nav__links {
    gap: 0 1.4rem;
    flex-wrap: wrap;
  }
  .nav__links a {
    font-size: 0.68rem;
    min-height: 44px; /* WCAG touch target */
    padding: 0.25rem 0;
  }
  .nav__brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* ============================================================
   PAGE SHELL
   ============================================================ */

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 7rem) var(--pad-x) clamp(4rem, 10vw, 8rem);
}

.page--narrow {
  max-width: calc(var(--read) + var(--pad-x) * 2);
}

/* ============================================================
   HOME  (cover page — no top nav)
   ============================================================ */

.home {
  min-height: 100vh;
  min-height: 100dvh;
}

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 var(--pad-x);
  position: relative;
  text-align: center;
}

.hero__title {
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.92;
  font-size: clamp(2.8rem, 15vw, 16rem);
  /* 15vw keeps the longest word ("MEMORIES") inside the viewport at every
     width from 320px up, while remaining the dominant element. */
  max-width: 100%;
  overflow-wrap: break-word;
}

.hero__arrow {
  position: absolute;
  bottom: clamp(1.5rem, 5vh, 3rem);
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  color: var(--muted);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.15; transform: translateX(-50%) translateY(0); }
  50%      { opacity: 1;    transform: translateX(-50%) translateY(4px); }
}

/* the "ENTER" reveal that appears after scroll */
.enter {
  min-height: 70vh;
  min-height: 70dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.enter__btn {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  background: transparent;
  border: 1px solid var(--text);
  color: var(--text);
  padding: 1.1rem 3rem;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.enter__btn:hover {
  background: var(--text);
  color: var(--bg);
}

.enter__btn.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* home footer — minimal, centered */
.home-footer {
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) var(--pad-x);
  border-top: 1px solid var(--line);
}

.home-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.home-footer a {
  display: inline-block;
  padding: 0.45rem 0;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s ease;
}

.home-footer a:hover { color: var(--text); }

/* ============================================================
   PERFUMES  (collection — single tile)
   ============================================================ */

.collection {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}

.tile {
  display: block;
}

.tile__img {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #0a0a0a;
  overflow: hidden;
}

.tile__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.tile:hover .tile__img img {
  transform: scale(1.015);
}

.tile__meta {
  margin-top: 1.5rem;
}

.tile__name {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.notes {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 1.5rem;
}

.notes li {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.9;
}

.tile__spec {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.tile__spec span { display: block; }

/* ============================================================
   PRODUCT  (Vol. I — gallery led)
   ============================================================ */

.gallery {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 2vw, 1rem);
}

.gallery__item {
  position: relative;
  width: 100%;
  background: #0a0a0a;
  overflow: hidden;
}

/* Natural aspect ratio — never crop, stretch, or distort the photography.
   JS sets width/height attributes so the browser reserves space (no layout shift). */
.gallery__item img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery__empty {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.product-meta {
  max-width: var(--read);
  margin: clamp(3rem, 8vw, 6rem) 0 0;
}

.product-meta__name {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.product-meta__spec {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  margin: 0 0 2.5rem;
}

.product-meta__spec span { display: block; }

.ingredients-title {
  margin: 0 0 1.25rem;
}

.product-meta .notes {
  margin-bottom: 3rem;
}

/* ============================================================
   BUTTONS  (shared)
   ============================================================ */

.btn {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--text);
  color: var(--text);
  padding: 1rem 2.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn:hover {
  background: var(--text);
  color: var(--bg);
}

/* ============================================================
   ABOUT
   ============================================================ */

.about h1 {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 3rem;
}

.about p {
  font-size: clamp(1rem, 2.2vw, 1.18rem);
  line-height: 1.85;
  max-width: var(--read);
  margin: 0 0 1.75rem;
}

.about__release {
  margin-top: 4rem;
}

.about__release .label { display: block; margin-bottom: 0.75rem; }

.about__release strong {
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ============================================================
   BLOG INDEX
   ============================================================ */

.blog-head {
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.blog-head h1 {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}

.archive {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.archive li { border-bottom: 1px solid var(--line); }

.archive a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding: 1.75rem 0;
  transition: padding-left 0.4s ease, color 0.4s ease;
}

.archive a:hover {
  padding-left: 0.75rem;
}

.archive__title {
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  letter-spacing: 0.01em;
}

.archive__date {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
  text-transform: uppercase;
}

.archive__empty {
  padding: 3rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ============================================================
   ARTICLE  (publication reading experience)
   ============================================================ */

.article {
  max-width: var(--read);
  margin: 0 auto;
}

.article__back {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 3rem;
}

.article__back:hover { color: var(--text); }

.article__date {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.article h1 {
  font-size: clamp(1.7rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.005em;
  margin: 0 0 2.5rem;
}

.article__body {
  font-size: clamp(1.02rem, 2.2vw, 1.18rem);
  line-height: 1.85;
  color: #ededed;
}

.article__body p { margin: 0 0 1.6rem; }

.article__body h2 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 3rem 0 1.25rem;
}

.article__body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
}

.article__body a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--muted);
}

.article__body a:hover { text-decoration-color: var(--text); }

.article__body blockquote {
  margin: 2.5rem 0;
  padding-left: 1.5rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-style: normal;
}

.article__body ul,
.article__body ol {
  margin: 0 0 1.6rem;
  padding-left: 1.25rem;
}

.article__body li { margin-bottom: 0.6rem; }

.article__related {
  margin-top: clamp(4rem, 9vw, 7rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.article__related .label { display: block; margin-bottom: 1.5rem; }

.article__related ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article__related li { margin-bottom: 1rem; }

.article__related a {
  font-size: 1rem;
  color: var(--muted);
  transition: color 0.3s ease;
}

.article__related a:hover { color: var(--text); }

/* ============================================================
   INQUIRE  (private contact form)
   ============================================================ */

.inquire h1 {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.inquire__intro {
  color: var(--muted);
  max-width: var(--read);
  margin: 0 0 3.5rem;
  font-size: 0.95rem;
  line-height: 1.8;
}

.form {
  max-width: var(--read);
  display: grid;
  gap: 2rem;
}

.field {
  display: grid;
  gap: 0.6rem;
}

.field label {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem 0;
  transition: border-color 0.3s ease;
  border-radius: 0;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--text);
}

/* keyboard users still get a clear focus ring */
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 3px;
}

/* Chrome/Safari autofill paints a light box by default — keep it black */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  caret-color: var(--text);
  transition: background-color 99999s ease-out;
}

.field textarea {
  resize: vertical;
  min-height: 5rem;
}

.form__submit {
  justify-self: start;
  margin-top: 0.5rem;
  background: transparent;
  border: 1px solid var(--text);
  color: var(--text);
  padding: 1rem 2.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease;
}

.form__submit:hover { background: var(--text); color: var(--bg); }
.form__submit:disabled { opacity: 0.4; cursor: default; }

.form__status {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.2em;
}

.form__success {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  line-height: 1.6;
}

.form__success span { display: block; }

.is-hidden { display: none !important; }

/* ============================================================
   GLOBAL FOOTER  (all pages except home)
   ============================================================ */

.footer {
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 8vw, 5rem) var(--pad-x);
}

.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  gap: 2.5rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.footer__col h2 {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
  font-weight: 400;
}

.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__col li { margin-bottom: 0.35rem; }

.footer__col a,
.footer__col p {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 0;
}

.footer__col a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--muted);
  transition: color 0.3s ease;
}
.footer__col a:hover { color: var(--text); }

/* ============================================================
   PRODUCT CAROUSEL — one image, left ~45%, text right
   Arrows + dots + click-to-advance, infinite loop.
   Mobile: stacks, finger-swipeable.
   ============================================================ */

/* Two-column on the product page (modern browsers) */
@media (min-width: 760px) {
  .page:has(.gallery) {
    display: grid;
    grid-template-columns: 45fr 55fr;
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: stretch; /* let the text column fill the row height so it can self-center */
  }
  .page:has(.gallery) .gallery {
    align-self: start; /* image stays at the top of the row */
  }
  .page:has(.gallery) .product-meta {
    margin-top: 0;
    max-width: var(--read);
    /* vertically center the text against the image */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* keep children (esp. the button) at natural width */
  }
}

/* ---- Carousel shell ---- */
.gallery {
  position: relative;
  width: 100%;
}

/* viewport: clips to one frame. Fixed ratio keeps the frame steady so the
   layout never jumps when slides have different proportions. */
.gallery__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;        /* steady portrait frame for all slides */
  overflow: hidden;
  background: #0a0a0a;
  touch-action: pan-y;        /* allow vertical page scroll; we handle horizontal */
}

/* track: all slides in a row, moved via transform */
.gallery__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.gallery__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* image fits inside the steady frame without cropping or distortion */
.gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;        /* show the whole image, never crop */
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* ---- Arrows ---- */
.gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* reset iOS/Safari default button chrome so our SVG renders clean */
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text);
  line-height: 0;
  transition: background 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.gallery__arrow svg {
  display: block;
}
.gallery__arrow:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.6);
}
.gallery__arrow--prev { left: 0.75rem; }
.gallery__arrow--next { right: 0.75rem; }

/* ---- Dots ---- */
.gallery__dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
}
.gallery__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--muted);
  background: transparent;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.gallery__dot.is-active {
  background: var(--text);
  border-color: var(--text);
  transform: scale(1.15);
}

/* hide arrows/dots gracefully if only one image */
.gallery[data-count="1"] .gallery__arrow,
.gallery[data-count="1"] .gallery__dots {
  display: none;
}

/* keep the quiet placeholder behaviour */
.gallery__empty {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@supports not (selector(:has(*))) {
  .gallery { max-width: 460px; }
  .product-meta { margin-top: clamp(2rem, 5vw, 3rem); }
}
