/* ==========================================================================
   MELOANA - Direction B  ("Editorial Gallery")
   References in genre only: sadh (home), janet&janet (shop), polene (pdp).
   Fonts: Cormorant Garamond (serif accents) + Jost (geometric sans / UI).
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  --paper:    #f5f2ec;  /* warm off-white page background            */
  --paper-2:  #efeadf;  /* slightly deeper warm band                */
  --tile:     #ece7dd;  /* product tile (gray-beige)                */
  --ink:      #191710;  /* near-black warm text                     */
  --ink-soft: #514c40;  /* muted body copy                          */
  --muted:    #938c7d;  /* captions, meta, hairline labels          */
  --line:     #ddd7ca;  /* hairline borders                         */
  --black:    #14130f;  /* footer black                             */
  --sale:     #9a4436;  /* tasteful terracotta for sale price       */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Jost', system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --pad:   clamp(22px, 6vw, 120px);   /* generous text-section side padding */
}

/* ---- Reset / base ------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  font-size: 15px;
  overflow-x: hidden;   /* never allow horizontal page scroll */
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* small uppercase label used everywhere (nav, captions, eyebrows) */
.eyebrow,
.nav a,
.caption,
.tab,
.meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 400;
}

/* editorial serif display */
.display { font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: 0.01em; }

/* the MELOANA wordmark = letter-spaced Jost, kept consistent as the "logo" */
.wordmark {
  font-family: var(--sans);
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.34em;
}

/* ---- Shared: newsletter form + inline thank-you ------------------------- */
.news-form { display: flex; align-items: flex-end; gap: 0; max-width: 420px; }
.news-form input {
  flex: 1;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: inherit;
  background: transparent;
  border: none;
  border-bottom: 1px solid currentColor;
  padding: 8px 4px;
  outline: none;
}
.news-form input::placeholder { color: currentColor; opacity: 0.55; text-transform: uppercase; letter-spacing: 0.16em; font-size: 10px; }
.news-form button {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 8px 4px 8px 18px;
  border-bottom: 1px solid currentColor;
  white-space: nowrap;
}
.news-msg { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; margin-top: 12px; opacity: 0; transition: opacity 0.4s; }
.news-msg.show { opacity: 0.8; }

/* ==========================================================================
   HEADER (three variants share tokens)
   ========================================================================== */
.site-header { width: 100%; z-index: 50; }

/* -- Home header: overlay on hero, nav top-LEFT, wordmark top-RIGHT ------ */
.header--home {
  position: absolute; top: 0; left: 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 30px var(--pad);
  color: #fff;                       /* over dark hero photo            */
  mix-blend-mode: difference;        /* stays legible over light/dark   */
}
.header--home .nav { display: flex; flex-direction: column; gap: 7px; }
.header--home .wordmark { font-size: clamp(24px, 3vw, 42px); font-weight: 500; letter-spacing: 0.36em; }

/* -- Shop header: promo bar + wordmark LEFT, links RIGHT ----------------- */
.promo-bar {
  background: var(--black); color: var(--paper);
  text-align: center; padding: 9px 16px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.22em;
}
.header--shop {
  position: sticky; top: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header--shop .wordmark { font-size: 22px; }
.header--shop .nav { display: flex; align-items: center; gap: 26px; }

/* -- PDP header: thin, centered wordmark, tiny links both sides ---------- */
.header--pdp {
  position: sticky; top: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 20px var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header--pdp .nav-left { display: flex; gap: 24px; }
.header--pdp .nav-right { display: flex; gap: 24px; justify-content: flex-end; }
.header--pdp .wordmark { font-size: 21px; text-align: center; }

.nav a { color: inherit; transition: opacity 0.2s; }
.nav a:hover { opacity: 0.55; }

/* mobile nav toggle (hidden on desktop) */
.nav-toggle { display: none; font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; }

/* ==========================================================================
   HOME  (sadh genre: gallery, huge negative space)
   ========================================================================== */

/* full-bleed hero photo, near-100vh */
.hero {
  position: relative;
  width: 100%; height: 92vh; min-height: 560px;
  overflow: hidden;
}
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero .hero-tag {
  position: absolute; left: var(--pad); bottom: 34px;
  color: #fff; mix-blend-mode: difference;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.22em;
}

/* ABOUT band: tiny label left, right-aligned uppercase column, whitespace */
.about {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: start;
  padding: clamp(80px, 15vh, 190px) var(--pad);
  gap: 40px;
}
.about .eyebrow { color: var(--muted); }
.about .about-copy {
  justify-self: end; max-width: 30ch;
  text-align: right;
  text-transform: uppercase;
  font-size: clamp(12px, 1vw, 14px);
  letter-spacing: 0.12em;
  line-height: 1.9;
  color: var(--ink);
}
.about .about-copy .sign { display: block; margin-top: 22px; color: var(--muted); letter-spacing: 0.2em; font-size: 11px; }

/* full-bleed media block (edge to edge, no side padding) */
.bleed { width: 100%; }
.bleed img { width: 100%; height: clamp(520px, 88vh, 900px); object-fit: cover; }
.bleed--tall img { height: clamp(560px, 96vh, 1000px); }

/* thin gallery caption strip under a bleed photo (name / price / link) */
.caption-strip {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px;
  padding: 16px var(--pad) 60px;
  border-bottom: 1px solid transparent;
}
.caption-strip .cs-name { color: var(--ink); }
.caption-strip .cs-price { color: var(--muted); }
.caption-strip .cs-link { color: var(--ink); position: relative; }
.caption-strip .cs-link::after {
  content: ''; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.3s;
}
.caption-strip .cs-link:hover::after { transform: scaleX(1); }

/* quiet section intro (uppercase eyebrow centered) */
.section-intro { text-align: center; padding: clamp(70px,12vh,150px) var(--pad) 34px; }
.section-intro .eyebrow { color: var(--muted); display: block; margin-bottom: 18px; }
.section-intro h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4vw, 56px); line-height: 1.05; }

/* -- Home footer (minimal: links left, newsletter right, tiny bottom) --- */
.footer--min {
  padding: clamp(70px,10vh,120px) var(--pad) 34px;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
}
.footer--min .f-links { display: flex; flex-direction: column; gap: 9px; }
.footer--min .f-links a { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-soft); }
.footer--min .f-links a:hover { color: var(--ink); }
.footer--min .f-news { justify-self: end; width: min(100%, 420px); }
.footer--min .f-news .eyebrow { color: var(--muted); display: block; margin-bottom: 16px; }
.footer-bar {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 26px var(--pad);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted);
  border-top: 1px solid var(--line); margin-top: 60px;
}

/* ==========================================================================
   SHOP  (janet genre: promo bar, sticky tabs, gray-tile grid)
   ========================================================================== */

/* sticky category tab bar */
.cat-bar {
  position: sticky; top: 66px;      /* sits under the sticky header      */
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  gap: clamp(14px, 2.4vw, 40px);
  padding: 15px var(--pad);
  overflow-x: auto;                 /* scrolls on mobile, page never does */
}
.cat-bar .tab {
  color: var(--muted); white-space: nowrap; padding-bottom: 3px;
  border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.cat-bar .tab:hover { color: var(--ink); }
.cat-bar .tab.active { color: var(--ink); border-color: var(--ink); }
.cat-bar .tab--filter { margin-left: auto; color: var(--ink); }

/* centered page title */
.shop-title { text-align: center; padding: clamp(46px,7vh,86px) var(--pad) clamp(30px,4vh,50px); }
.shop-title h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5vw, 60px); line-height: 1; }
.shop-title p { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; margin-top: 16px; }

/* product grid */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.4vw, 22px) clamp(10px, 1.2vw, 18px);
  padding: 0 var(--pad) clamp(50px,7vh,90px);
  max-width: 1500px; margin: 0 auto;
}
.card { display: block; }
.card .card-media {
  position: relative;
  background: var(--tile);
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.card .card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1), opacity 0.4s;
}
.card:hover .card-media img { transform: scale(1.04); }
/* second image swap on hover if present */
.card .card-media .img-alt { position: absolute; inset: 0; opacity: 0; }
.card:hover .card-media .img-alt { opacity: 1; }
.card .badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--black); color: var(--paper);
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.16em;
  padding: 4px 9px;
}
.card .card-body { text-align: center; padding: 16px 8px 4px; }
.card .card-name { font-size: 12px; letter-spacing: 0.06em; color: var(--ink); }
.card .card-price { margin-top: 7px; font-size: 12px; letter-spacing: 0.06em; color: var(--ink-soft); }
.card .card-price .old { color: var(--muted); text-decoration: line-through; margin-right: 8px; }
.card .card-price .now-sale { color: var(--sale); }
.card.is-hidden { display: none; }

/* pagination */
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 10px var(--pad) clamp(80px,10vh,130px); }
.pager button {
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 12px; color: var(--muted);
  display: grid; place-items: center; transition: color 0.2s, background 0.2s;
}
.pager button.active { background: var(--ink); color: var(--paper); }
.pager button:hover:not(.active) { color: var(--ink); }

/* pre-footer full-bleed campaign photo */
.prefooter-bleed { width: 100%; }
.prefooter-bleed img { width: 100%; height: clamp(420px, 66vh, 720px); object-fit: cover; }

/* -- Giant black footer (janet genre) ----------------------------------- */
.footer--giant { background: var(--black); color: var(--paper); padding: clamp(56px,8vh,90px) var(--pad) 40px; }
.footer--giant .giant-word {
  font-family: var(--sans); font-weight: 600; text-transform: uppercase;
  line-height: 0.84; letter-spacing: -0.03em;
  font-size: clamp(64px, 21vw, 320px);
  color: var(--paper);
}
.footer--giant .giant-word span { display: block; }
.footer--giant .g-cols {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.4fr; gap: 34px;
  margin-top: clamp(40px,6vh,72px); padding-top: 40px; border-top: 1px solid rgba(255,255,255,0.16);
}
.footer--giant .g-col h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.2em; opacity: 0.6; margin-bottom: 16px; font-weight: 500; }
.footer--giant .g-col a, .footer--giant .g-col p { display: block; font-size: 12px; letter-spacing: 0.04em; color: rgba(255,255,255,0.82); margin-bottom: 9px; }
.footer--giant .g-col a:hover { color: #fff; }
.footer--giant .g-news .news-form { color: var(--paper); }
.footer--giant .g-bottom {
  display: flex; justify-content: space-between; gap: 16px; margin-top: 46px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: rgba(255,255,255,0.5);
}

/* ==========================================================================
   PDP  (polene genre: airy, serif, sticky rail)
   ========================================================================== */
.breadcrumb { padding: 22px var(--pad) 0; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }

.pdp {
  display: grid; grid-template-columns: 1fr 0.82fr;
  gap: clamp(24px, 4vw, 70px);
  padding: 26px var(--pad) clamp(60px,8vh,110px);
  align-items: start;
}
/* LEFT: tall editorial photo stack */
.pdp-media { display: flex; flex-direction: column; gap: clamp(10px,1.4vw,20px); }
.pdp-media figure { background: var(--tile); overflow: hidden; }
.pdp-media img { width: 100%; height: auto; display: block; }
.pdp-media .packshot { background: #fff; }
.pdp-media .packshot img { padding: clamp(30px,6vw,90px); }

/* RIGHT: sticky product rail */
.pdp-rail { position: sticky; top: 96px; align-self: start; }
.pdp-rail .eyebrow { color: var(--muted); }
.pdp-name { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.05; margin: 12px 0 6px; }
.pdp-sub { color: var(--ink-soft); font-size: 14px; font-style: italic; font-family: var(--serif); font-size: 17px; }
.pdp-price { font-size: 17px; letter-spacing: 0.04em; margin: 22px 0 26px; }

/* variant / related thumbnails row */
.pdp-thumbs { display: flex; gap: 10px; margin-bottom: 26px; }
.pdp-thumbs button {
  width: 54px; height: 68px; background: var(--tile); overflow: hidden;
  border: 1px solid transparent; transition: border-color 0.2s;
}
.pdp-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumbs button.active { border-color: var(--ink); }

/* size pills */
.pdp-sizes { margin-bottom: 24px; }
.pdp-sizes .eyebrow { display: block; color: var(--muted); margin-bottom: 12px; }
.pdp-sizes .sizes { display: flex; gap: 8px; }
.pdp-sizes .size {
  min-width: 46px; padding: 11px 4px; text-align: center;
  border: 1px solid var(--line); font-size: 12px; letter-spacing: 0.08em;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.pdp-sizes .size:hover { border-color: var(--ink); }
.pdp-sizes .size.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* add to cart (dead link, demo) */
.btn-cart {
  display: block; width: 100%; text-align: center;
  background: var(--ink); color: var(--paper);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em;
  padding: 18px; transition: background 0.25s;
}
.btn-cart:hover { background: #000; }
.pdp-desc { color: var(--ink-soft); font-size: 14px; line-height: 1.75; margin: 26px 0 4px; }

/* accordions */
.accordion { border-top: 1px solid var(--line); }
.accordion:last-of-type { border-bottom: 1px solid var(--line); }
.accordion summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .plus { transition: transform 0.3s; font-size: 15px; line-height: 1; }
.accordion[open] summary .plus { transform: rotate(45deg); }
.accordion .acc-body { padding: 0 2px 20px; font-size: 13px; line-height: 1.75; color: var(--ink-soft); }
.accordion .acc-body p { margin-bottom: 10px; }

/* full-bleed lifestyle below columns */
.pdp-lifestyle img { width: 100%; height: clamp(460px, 78vh, 860px); object-fit: cover; }

/* 50/50 brand story */
.story { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.story .story-text { padding: clamp(50px,9vh,120px) var(--pad); display: flex; flex-direction: column; justify-content: center; }
.story .story-text .eyebrow { color: var(--muted); margin-bottom: 22px; }
.story .story-text h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px,3.4vw,50px); line-height: 1.08; margin-bottom: 22px; }
.story .story-text p { color: var(--ink-soft); font-size: 14px; line-height: 1.8; max-width: 42ch; margin-bottom: 16px; }
.story .story-text .link-underline { margin-top: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; border-bottom: 1px solid currentColor; padding-bottom: 3px; align-self: flex-start; }
.story .story-photo img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; }

/* newsletter band (shared, on paper) */
.news-band { text-align: center; padding: clamp(60px,9vh,120px) var(--pad); border-top: 1px solid var(--line); }
.news-band .eyebrow { color: var(--muted); display: block; margin-bottom: 16px; }
.news-band h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px,3.2vw,44px); margin-bottom: 26px; }
.news-band .news-form { margin: 0 auto; }
.news-band .news-msg { text-align: center; }

/* quiet PDP footer columns */
.footer--quiet { border-top: 1px solid var(--line); padding: clamp(50px,7vh,84px) var(--pad) 34px; }
.footer--quiet .q-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; }
.footer--quiet .q-brand .wordmark { font-size: 22px; }
.footer--quiet .q-brand p { color: var(--muted); font-size: 12px; margin-top: 16px; max-width: 26ch; line-height: 1.7; }
.footer--quiet .q-col h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); margin-bottom: 16px; font-weight: 500; }
.footer--quiet .q-col a, .footer--quiet .q-col p.line { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 9px; }
.footer--quiet .q-col a:hover { color: var(--ink); }
.footer--quiet .q-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 26px; }
  .about .about-copy { justify-self: start; text-align: left; max-width: 40ch; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .footer--giant .g-cols { grid-template-columns: 1fr 1fr; }
  .footer--quiet .q-cols { grid-template-columns: 1fr 1fr; }
  .pdp { grid-template-columns: 1fr; }
  .pdp-rail { position: static; margin-top: 8px; }
  .story { grid-template-columns: 1fr; }
  .story .story-photo { order: -1; }
  .story .story-photo img { min-height: 360px; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  /* header: collapse nav to a toggle where it crowds */
  .header--home { padding: 20px var(--pad); }
  .header--home .nav { display: none; }
  .header--shop .nav a:not(.nav-cart), .header--pdp .nav-left, .header--pdp .nav-right { display: none; }
  .nav-toggle { display: block; }
  .header--pdp { grid-template-columns: 1fr auto 1fr; }
  .header--pdp .wordmark { font-size: 18px; }

  .cat-bar { justify-content: flex-start; top: 58px; }
  .cat-bar .tab--filter { position: sticky; right: 0; background: var(--paper); padding-left: 12px; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px 8px; }
  .footer--min { grid-template-columns: 1fr; }
  .footer--min .f-news { justify-self: start; }
  .footer--giant .g-cols { grid-template-columns: 1fr; }
  .footer--quiet .q-cols { grid-template-columns: 1fr 1fr; }
  .footer-bar, .footer--giant .g-bottom, .footer--quiet .q-bottom { flex-direction: column; gap: 6px; }
  .caption-strip { flex-wrap: wrap; }
  .hero { height: 78vh; min-height: 460px; }
}

/* very small (390px guard): keep 2-col grid usable, stack pdp */
@media (max-width: 400px) {
  :root { --pad: 18px; }
  .card .card-name, .card .card-price { font-size: 11px; }
}
