:root {
  --ink: #141414;
  --ink-soft: #4a4a47;
  --paper: #f4f1ec;
  --paper-deep: #ebe6dd;
  --white: #ffffff;
  --line: #ddd7cc;
  --wine: #7a1f2b;
  --wine-deep: #621620;
  --shadow: 22px 30px 60px -36px rgba(20, 20, 20, .55);
  --r: 2px;
  --gut: clamp(1.1rem, 4vw, 3.5rem);
  --max: 1400px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --hdr-h: 64px;
  font-synthesis: none;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: "Space Grotesk", "Manrope", sans-serif; line-height: 1.04; letter-spacing: -.02em; font-weight: 600; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

.ital { font-style: italic; font-weight: 500; letter-spacing: -.01em; }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: .7rem 1.1rem; border-radius: var(--r);
}
.skip:focus { left: 1rem; top: 1rem; }

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

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 1.9rem; border-radius: var(--r);
  font-weight: 600; font-size: .94rem; letter-spacing: .01em;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--wine); }
.btn--ghost { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.6); }
.btn--ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

/* ---------- announce ---------- */
.announce {
  background: var(--ink); color: var(--paper);
  text-align: center; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .55rem 1rem;
}
.announce p { font-weight: 500; }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 241, 236, .82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.hdr__in {
  max-width: var(--max); margin: 0 auto;
  height: var(--hdr-h); padding: 0 var(--gut);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
}
.logo { justify-self: center; }
.logo svg { width: 168px; height: 22px; display: block; }
.logo__txt { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 21px; letter-spacing: .04em; fill: var(--ink); }
.logo__txt--light { fill: var(--paper); }
.logo__bar { fill: var(--wine); }

.nav { display: none; }
.nav a { font-size: .9rem; font-weight: 600; letter-spacing: .01em; position: relative; padding: .3rem 0; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1.5px; background: var(--ink); transition: width .3s var(--ease); }
.nav a:hover::after { width: 100%; }
.nav__sale { color: var(--wine); }
.nav__sale::after { background: var(--wine); }

.hdr__act { display: flex; align-items: center; gap: .35rem; justify-self: end; }
.iconbtn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--r);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.iconbtn:hover { background: var(--paper-deep); }
.iconbtn:active { transform: scale(.92); }
.iconbtn svg { width: 21px; height: 21px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.iconbtn--cart { position: relative; }
.cart-count {
  position: absolute; top: 3px; right: 1px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--wine); color: var(--white);
  font-size: 10.5px; font-weight: 700; border-radius: 9px;
  display: grid; place-items: center;
  transform: scale(0); transition: transform .3s var(--ease);
}
.cart-count.on { transform: scale(1); }

.burger { width: 42px; height: 42px; display: grid; place-items: center; gap: 4px; justify-self: start; }
.burger span { display: block; width: 20px; height: 1.6px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s var(--ease); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

.searchbar {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gut) .9rem;
  display: flex; gap: .5rem;
}
.searchbar[hidden] { display: none; }
.searchbar input {
  flex: 1; height: 46px; padding: 0 1rem; font: inherit;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink);
}
.searchbar input::placeholder { color: var(--ink-soft); }
.searchbar button { padding: 0 1.4rem; background: var(--ink); color: var(--paper); border-radius: var(--r); font-weight: 600; }

/* ---------- mobile nav drawer ---------- */
@media (max-width: 1023px) {
  .nav {
    position: fixed; inset: 0; top: 0; z-index: 99;
    background: var(--paper);
    flex-direction: column; justify-content: center; gap: 1.4rem;
    padding: 0 var(--gut);
    transform: translateX(-100%); transition: transform .4s var(--ease);
    display: flex;
  }
  .nav.open { transform: translateX(0); }
  .nav a { font-family: "Space Grotesk", sans-serif; font-size: clamp(2rem, 9vw, 3.4rem); font-weight: 600; }
  .nav a::after { bottom: .1rem; height: 2px; }
}
@media (prefers-reduced-motion: reduce) { .nav { transition: none; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: calc(100dvh - var(--hdr-h)); display: flex; align-items: flex-end; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,20,20,.15) 0%, rgba(20,20,20,.05) 40%, rgba(20,20,20,.72) 100%); }
.hero__in { position: relative; z-index: 1; max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 var(--gut) clamp(2.5rem, 7vh, 5rem); color: var(--white); }
.hero__eyebrow { font-size: .76rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; margin-bottom: 1rem; opacity: .9; }
.hero__h1 { font-size: clamp(2.7rem, 9vw, 6.2rem); font-weight: 600; letter-spacing: -.03em; }
.hero__sub { max-width: 44ch; margin: 1.3rem 0 0; font-size: clamp(1rem, 1.7vw, 1.15rem); color: rgba(255,255,255,.92); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* ---------- section heads ---------- */
section { scroll-margin-top: var(--hdr-h); }
.sec-head {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gut);
  display: flex; align-items: end; justify-content: space-between; gap: 1rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.6rem);
}
.sec-head h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); }
.sec-head--center { justify-content: center; text-align: center; }
.sec-link { font-weight: 600; font-size: .9rem; border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; transition: color .2s var(--ease), border-color .2s var(--ease); white-space: nowrap; }
.sec-link:hover { color: var(--wine); border-color: var(--wine); }
.eyebrow { font-size: .76rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; color: var(--wine); margin-bottom: 1rem; }

/* ---------- categories ---------- */
.cats { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.cats__grid {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gut);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(.6rem, 1.5vw, 1rem);
}
.tile { position: relative; overflow: hidden; border-radius: var(--r); aspect-ratio: 4/5; display: block; background: var(--paper-deep); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.tile:hover img { transform: scale(1.06); }
.tile__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.1rem 1.2rem; color: var(--white);
  background: linear-gradient(0deg, rgba(20,20,20,.7), transparent);
  display: flex; align-items: center; justify-content: space-between;
  font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: clamp(1.1rem, 2.4vw, 1.5rem);
}
.tile__cap .arr { font-style: normal; transition: transform .35s var(--ease); }
.tile:hover .tile__cap .arr { transform: translateX(6px); }

/* ---------- catalog grid ---------- */
.catalog { padding: 0 0 clamp(3.5rem, 8vw, 6.5rem); }
.grid {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gut);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(.9rem, 2vw, 1.8rem) clamp(.6rem, 1.5vw, 1.1rem);
}
.card { position: relative; }
.card__media {
  position: relative; overflow: hidden; aspect-ratio: 500/650; background: var(--paper-deep); border-radius: var(--r);
  display: block;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .5s var(--ease); }
.card__img2 { position: absolute; inset: 0; opacity: 0; }
.card:hover .card__img1 { transform: scale(1.04); }
.card:hover .card__img2 { opacity: 1; }
.card:hover .card__media .card__img1 { opacity: 0; }

.badge {
  position: absolute; top: .7rem; left: .7rem; z-index: 2;
  background: var(--wine); color: var(--white);
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .3rem .55rem; border-radius: var(--r);
}
.badge--new { background: var(--ink); }

.card__add {
  position: absolute; left: .7rem; right: .7rem; bottom: .7rem; z-index: 2;
  height: 44px; background: var(--ink); color: var(--paper);
  border-radius: var(--r); font-weight: 600; font-size: .88rem;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s var(--ease);
}
.card:hover .card__add, .card:focus-within .card__add { opacity: 1; transform: translateY(0); }
.card__add:hover { background: var(--wine); }
.card__add:active { transform: scale(.98); }

.card__info { padding: .8rem .1rem 0; }
.card__brand { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--ink-soft); }
.card__name { font-size: .95rem; font-weight: 500; margin-top: .15rem; line-height: 1.3; }
.card__price { margin-top: .45rem; display: flex; align-items: baseline; gap: .5rem; }
.card__now { font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 1.02rem; }
.card__old { font-size: .85rem; color: var(--ink-soft); text-decoration: line-through; }
.card__sale .card__now { color: var(--wine); }

/* touch: always show add button */
@media (hover: none) {
  .card__add { opacity: 1; transform: none; }
  .card__img2 { display: none; }
}

/* ---------- brands marquee ---------- */
.brands { padding: clamp(2rem, 5vw, 3.5rem) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-deep); }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; gap: clamp(2.5rem, 6vw, 5rem); width: max-content; animation: scroll 38s linear infinite; }
.marquee__track span { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: clamp(1.3rem, 3vw, 2.1rem); letter-spacing: .02em; color: var(--ink); white-space: nowrap; opacity: .82; }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: 100%; } }

/* ---------- lookbook ---------- */
.lookbook {
  max-width: var(--max); margin: 0 auto; padding: clamp(3.5rem, 9vw, 7rem) var(--gut);
  display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.lookbook__media { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.6rem, 1.5vw, 1.1rem); }
.lookbook__media img { aspect-ratio: 4/5; object-fit: cover; border-radius: var(--r); width: 100%; }
.lookbook__media--offset { margin-top: clamp(1.5rem, 5vw, 3.5rem); }
.lookbook__text h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 1.2rem; }
.lookbook__text p { color: var(--ink-soft); max-width: 52ch; margin-bottom: 1rem; }
.lookbook__text .btn { margin-top: .8rem; }

/* ---------- perks ---------- */
.perks { background: var(--ink); color: var(--paper); padding: clamp(3rem, 7vw, 5.5rem) 0; }
.perks__grid { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.8rem, 4vw, 3rem); }
.perk svg { width: 30px; height: 30px; fill: none; stroke: var(--wine); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 1rem; }
.perk h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.perk p { color: rgba(244,241,236,.66); font-size: .92rem; max-width: 32ch; }

/* ---------- reviews ---------- */
.reviews { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.reviews__grid { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); display: grid; grid-template-columns: 1fr; gap: clamp(1rem, 2.5vw, 1.6rem); }
.review { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1.6rem, 3vw, 2.2rem); }
.stars { color: var(--wine); letter-spacing: .15em; font-size: 1rem; }
.stars .star-off { color: var(--line); }
.review blockquote { font-size: 1.04rem; line-height: 1.55; margin: 1rem 0 1.4rem; }
.review figcaption { font-weight: 700; font-size: .92rem; display: flex; flex-direction: column; }
.review figcaption span { font-weight: 500; color: var(--ink-soft); font-size: .82rem; margin-top: .1rem; }

/* ---------- newsletter ---------- */
.news { padding: 0 0 clamp(3.5rem, 8vw, 6rem); }
.news__in {
  max-width: var(--max); margin: 0 auto; padding: clamp(2.5rem, 6vw, 4rem) var(--gut);
  background: var(--wine); color: var(--paper); border-radius: var(--r);
  display: grid; grid-template-columns: 1fr; gap: 1.8rem; align-items: center;
  margin-left: var(--gut); margin-right: var(--gut);
}
.news__copy h2 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); margin-bottom: .7rem; }
.news__copy p { color: rgba(244,241,236,.8); max-width: 40ch; }
.news__form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.field input {
  height: 50px; padding: 0 1rem; font: inherit;
  background: var(--paper); color: var(--ink); border: 1px solid transparent; border-radius: var(--r);
  transition: border-color .2s var(--ease);
}
.field input::placeholder { color: var(--ink-soft); }
.field input:focus { border-color: var(--ink); outline: none; }
.field input.invalid { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.field__err { min-height: 1.1em; font-size: .82rem; font-weight: 600; color: var(--paper); }
.news__form .btn--solid { background: var(--ink); color: var(--paper); }
.news__form .btn--solid:hover { background: var(--paper); color: var(--wine); }

/* ---------- footer ---------- */
.ftr { background: var(--ink); color: var(--paper); padding: clamp(3rem, 7vw, 5rem) 0 2rem; }
.ftr__top { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); display: grid; grid-template-columns: 1fr; gap: 2.4rem; }
.ftr__brand svg { width: 180px; height: 22px; margin-bottom: 1rem; }
.ftr__brand p { color: rgba(244,241,236,.6); font-size: .9rem; max-width: 34ch; }
.ftr__col { display: flex; flex-direction: column; gap: .6rem; }
.ftr__col h3 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: rgba(244,241,236,.5); margin-bottom: .3rem; }
.ftr__col a { font-size: .92rem; color: rgba(244,241,236,.85); width: fit-content; transition: color .2s var(--ease); }
.ftr__col a:hover { color: var(--white); }
.social { display: flex; gap: .5rem; margin-top: .6rem; }
.social a { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(244,241,236,.18); border-radius: var(--r); transition: background .2s var(--ease), border-color .2s var(--ease); }
.social a:hover { background: var(--wine); border-color: var(--wine); }
.social svg { width: 18px; height: 18px; fill: none; stroke: var(--paper); stroke-width: 1.4; stroke-linejoin: round; }

.ftr__bottom { max-width: var(--max); margin: 2.5rem auto 0; padding: 1.6rem var(--gut) 0; border-top: 1px solid rgba(244,241,236,.14); display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.ftr__bottom p { font-size: .82rem; color: rgba(244,241,236,.55); }
.pay { display: flex; gap: .5rem; }
.pay svg { width: 40px; height: 24px; }
.pay rect { fill: rgba(244,241,236,.1); }
.pay__t { fill: var(--paper); font-size: 9px; font-weight: 700; text-anchor: middle; font-family: "Space Grotesk", sans-serif; }
.pay__mc1 { fill: rgba(244,241,236,.55); }
.pay__mc2 { fill: var(--wine); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 300;
  transform: translate(-50%, 150%);
  background: var(--ink); color: var(--paper);
  padding: .85rem 1.3rem; border-radius: var(--r);
  font-size: .92rem; font-weight: 600;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: .6rem;
  transition: transform .45s var(--ease);
  max-width: calc(100vw - 2rem);
}
.toast.show { transform: translate(-50%, 0); }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--wine); flex: none; }
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity .2s; transform: translate(-50%, 0); opacity: 0; } .toast.show { opacity: 1; } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============ breakpoints ============ */
@media (min-width: 768px) {
  :root { --hdr-h: 72px; }
  .cats__grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; }
  .tile--tall { grid-row: span 2; aspect-ratio: 4/5; }
  .cats__grid { grid-template-rows: auto auto; }
  .tile { aspect-ratio: auto; }
  .tile--tall { aspect-ratio: 3/5; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .perks__grid { grid-template-columns: repeat(4, 1fr); }
  .reviews__grid { grid-template-columns: repeat(3, 1fr); }
  .lookbook { grid-template-columns: 1.05fr .95fr; }
  .news__in { grid-template-columns: 1.1fr 1fr; gap: 3rem; }
  .ftr__top { grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2rem; }
}

@media (min-width: 1024px) {
  .nav { display: flex; gap: clamp(1.4rem, 2.5vw, 2.4rem); position: static; transform: none; background: none; flex-direction: row; padding: 0; }
  .burger { display: none; }
  .hdr__in { grid-template-columns: auto 1fr auto; gap: 2.5rem; }
  .logo { justify-self: start; }
  .nav { justify-self: center; }
  .grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1280px) {
  .cats__grid { grid-template-columns: repeat(4, 1fr); }
}
