/*
Theme Name: Zivara Atelier
Theme URI: https://zivara.aurelux.in
Author: Aurelux
Description: Editorial flagship theme for Zivara — handloom sarees, lehengas, suits and kurtis. White paper, forest green, antique gold.
Version: 0.1.0
Requires at least: 7.0
Requires PHP: 8.1
Text Domain: zivara-atelier
*/

/* ---------------------------------------------------------------- tokens */
:root {
  --gold-ink: #7E5F22;   /* small caps on white: 5.4:1, the display gold is only 3.3:1 */
  --paper: #FFFFFF;
  --paper-2: #F7F5F1;
  --ink: #14100E;
  --muted: #6F6A63;
  --line: #E6E1D8;
  --forest: #0F3D2E;
  --forest-deep: #0A2A20;
  --gold: #A5803C;
  --gold-soft: #C9A15C;

  --serif: "Marcellus", "Times New Roman", serif;
  --sans: "Work Sans", system-ui, -apple-system, sans-serif;

  --pad: clamp(20px, 5vw, 80px);
  --section: clamp(64px, 9vw, 132px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  overflow-x: clip;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }

.script { font-style: italic; color: var(--gold); letter-spacing: 0; }

/* ------------------------------------------------------------- announce */
.announce {
  background: var(--forest);
  color: #F3EFE6;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  overflow: hidden;
  height: 34px;
  display: flex;
  align-items: center;
}

.announce__track {
  display: flex;
  gap: 42px;
  white-space: nowrap;
  animation: slide 38s linear infinite;
  padding-left: 42px;
}

.announce__track span::after {
  content: " ◆";
  color: var(--gold-soft);
  margin-left: 42px;
}

@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

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

/* ----------------------------------------------------------------- nav */
.nav {
  position: fixed;
  inset: 34px 0 auto;
  z-index: 60;
  height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad);
  color: #fff;
  transition: background 0.45s var(--ease), color 0.45s var(--ease), inset 0.45s var(--ease);
}

.nav--solid {
  inset: 0 0 auto;
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

/* inner pages: no hero photograph behind the bar, so the nav is solid and pinned
   to the very top, and the announcement marquee stays on the home page only */
body.zv-inner .announce { display: none; }

body.zv-inner .nav {
  inset: 0 0 auto;
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

body.zv-inner { padding-top: 0 !important; }
body.zv-inner main { padding-top: 76px; }

/* ------------------------------------------------------- mobile menu */
.nav__toggle { display: none; }

/* the drawer must not exist at all on a wide screen — it is only styled
   inside the phone breakpoint */
.menu { display: none; }

@media (max-width: 900px) {
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 4px;
    background: none;
    border: 0;
    font: inherit;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: inherit;
    cursor: pointer;
  }

  .nav__toggle-bar,
  .nav__toggle-bar::before,
  .nav__toggle-bar::after {
    display: block;
    width: 20px;
    height: 1.5px;
    background: currentColor;
  }
  .nav__toggle-bar { position: relative; }
  .nav__toggle-bar::before,
  .nav__toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav__toggle-bar::before { top: -6px; }
  .nav__toggle-bar::after { top: 6px; }

  /* the drawer sits under the header so the Menu button stays reachable
     and doubles as the close control */
  .menu {
    display: block;
    position: fixed;
    inset: 0 0 auto;
    z-index: 55;
    transform: translateY(-102%);
    transition: transform 0.5s var(--ease);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 92px var(--pad) 28px;
    min-height: 100svh;
    overflow-y: auto;
  }

  .menu.is-open { transform: none; }

  .menu__links { display: flex; flex-direction: column; }
  .menu__links a {
    display: flex;
    align-items: center;
    min-height: 56px;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: 22px;
  }

  .menu__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 24px;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .menu__foot a { display: inline-flex; align-items: center; min-height: 44px; }

  body.menu-open { overflow: hidden; }

  body.menu-open .nav {
    inset: 0 0 auto;
    background: var(--paper);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }

  body.menu-open .nav__toggle-bar { background: transparent; }
  body.menu-open .nav__toggle-bar::before { transform: translateY(6px) rotate(45deg); }
  body.menu-open .nav__toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }
}

@media (max-width: 900px) {
  body.zv-inner main { padding-top: 104px; }
}

@media (max-width: 420px) {
  body.zv-inner main { padding-top: 100px; }
}

/* comfortable tap targets on a phone */
.pcard__wish {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

@media (max-width: 900px) {
  .nav__tools a { min-height: 44px; display: inline-flex; align-items: center; }
  .chip { min-height: 40px; display: inline-flex; align-items: center; }
  .pcard__name { font-size: 13px; letter-spacing: 0.04em; }
  .pcard__price { font-size: 13px; }
}

.brand { line-height: 1; }
.brand__name {
  display: inline-block;
  padding: 8px 0;
  font-family: var(--serif);
  font-size: clamp(20px, 1.9vw, 26px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.brand__sub {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  opacity: 0.8;
}

.nav__links {
  display: flex;
  gap: clamp(18px, 2.4vw, 38px);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav__links a { position: relative; padding: 6px 0; }

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: currentColor;
  transition: right 0.4s var(--ease);
}

.nav__links a:hover::after,
.nav__links a:focus-visible::after { right: 0; }

.nav__tools {
  justify-self: end;
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav__tools a { display: inline-flex; align-items: center; gap: 7px; }

.count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gold);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0;
}

/* ------------------------------------------------------- story (hero) */
.story { position: relative; height: 300vh; }

.story__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  color: #fff;
}

.story__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 0%;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  will-change: opacity, transform;
}

.story__img--2 { object-position: 50% 50%; }
.story__img--3 { object-position: 50% 20%; }

.story__img.is-active { opacity: 1; transform: scale(1); }

.story__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(8, 26, 20, 0.86) 0%, rgba(8, 26, 20, 0.62) 34%, rgba(8, 26, 20, 0.16) 62%, rgba(8, 26, 20, 0.04) 82%),
              linear-gradient(to top, rgba(8, 26, 20, 0.62), transparent 46%);
  pointer-events: none;
}

.story__copy {
  position: absolute;
  left: var(--pad);
  bottom: clamp(96px, 13vw, 150px);
  max-width: 640px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  pointer-events: none;
}

.story__copy.is-active { opacity: 1; transform: none; pointer-events: auto; }

.story__title {
  font-family: var(--serif);
  font-size: clamp(44px, 6.6vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
  font-weight: 400;
}

.story__title em { font-style: italic; color: var(--gold-soft); }

.story__sub {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.84);
  margin: 0 0 16px;
}

.story__desc {
  max-width: 430px;
  margin: 0 0 34px;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 14px rgba(8, 26, 20, 0.45);
}

.story__actions { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }

.story__caption {
  position: absolute;
  bottom: clamp(110px, 15vw, 170px);
  max-width: 460px;
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 2vw, 27px);
  line-height: 1.45;
  color: #fff;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  text-shadow: 0 2px 20px rgba(8, 26, 20, 0.55);
}

.story__caption--2 { left: var(--pad); }
.story__caption--3 { right: var(--pad); text-align: right; }
.story__caption.is-active { opacity: 1; transform: none; }

.story__caption p { margin: 0 0 18px; }

.story__shop {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-family: var(--sans);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.story__shop:hover { color: var(--gold-soft); border-color: var(--gold-soft); }

.story__progress {
  position: absolute;
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
  z-index: 3;
}

.story__progress span {
  width: 26px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.4s var(--ease), width 0.4s var(--ease);
}

.story__progress span.is-active { background: var(--gold-soft); width: 40px; }

.story__trust {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  list-style: none;
  margin: 0;
  padding: 18px var(--pad);
  display: flex;
  flex-wrap: wrap;
  gap: 14px 48px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(10, 30, 24, 0.35);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.story__trust li { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}

.btn--gold { background: var(--gold); color: #fff; }
.btn--gold:hover { background: var(--gold-soft); transform: translateY(-2px); }

.btn--ghost { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }

.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-soft); }

@media (prefers-reduced-motion: reduce) {
  .story { height: auto; }
  .story__pin { position: relative; height: 92svh; }
  .story__img--2, .story__img--3 { display: none; }
}

/* ------------------------------------------------------------- marquee */
.marquee {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
  height: 48px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.marquee__track {
  display: flex;
  min-width: max-content;
  gap: 30px;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: clamp(14px, 1.5vw, 19px);
  color: var(--ink);
  animation: slide 46s linear infinite;
  padding-left: 30px;
}

.marquee__track span::after { content: " ✦"; color: var(--gold); margin-left: 30px; }

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

/* ---------------------------------------------------------- categories */
.categories { padding: clamp(44px, 5.5vw, 84px) var(--pad) var(--section); }

.section-head {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(24px, 5vw, 90px);
  align-items: end;
  margin-bottom: clamp(30px, 4vw, 58px);
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
  text-transform: uppercase;
}

.section-title .script { text-transform: none; font-size: 0.78em; }

.section-note {
  max-width: 430px;
  justify-self: end;
  color: var(--muted);
  margin: 0 0 6px;
  text-wrap: pretty;
}

.cat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(10px, 1.2vw, 18px);
}

.cat { position: relative; }

.cat__frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 210px 210px 6px 6px;
  background: var(--paper-2);
}

.cat__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 0.9s var(--ease);
}

.cat:hover .cat__img,
.cat:focus-within .cat__img { transform: scale(1.05); }

.cat__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.3s var(--ease);
}

.cat:hover .cat__label { color: var(--forest); }

.cat__arrow { opacity: 0; transform: translateX(-6px); transition: all 0.35s var(--ease); }
.cat:hover .cat__arrow { opacity: 1; transform: translateX(0); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .nav__links { gap: 16px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  /* two rows on a phone: brand + menu, then the small tools row — otherwise
     the tools spill out of the fixed-height bar and land on the page title */
  .nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    height: auto;
    min-height: 64px;
    padding: 10px var(--pad) 0;
    gap: 0;
  }
  .nav__toggle { order: 2; }
  .nav__tools {
    order: 3;
    width: 100%;
    justify-content: flex-end;
    gap: 18px;
    padding: 2px 0 10px;
    font-size: 11px;
  }
  .nav__links { display: none; }
  .section-head { grid-template-columns: 1fr; }
  .section-note { justify-self: start; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__inner { max-width: none; padding-bottom: 110px; }
}

@media (max-width: 560px) {
  .cat-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 62%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .cat { scroll-snap-align: start; }
  .cat__frame { border-radius: 160px 160px 6px 6px; }
  .hero { min-height: 88svh; }
  .hero__trust { gap: 10px 20px; font-size: 9.5px; }
}


/* ------------------------------------------- hero on a phone (portrait)
   A phone is not a small desktop. The pinned three-stage story only works
   when there is a tall frame to scroll through, so on a phone the hero is a
   stacked page: photograph, then the words on white paper, then the three
   promises as a proper list. Nothing is written over her face. */
@media (max-width: 700px) {
  /* the floating announcement strip is desktop furniture */
  .announce { display: none; }

  body.home .nav {
    inset: 0 0 auto;
    background: var(--paper);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    height: 64px;
  }

  body.home main#main { padding-top: 64px; }

  .story { height: auto; }

  .story__pin {
    position: relative;
    height: auto;
    display: block;
    padding: 0;
  }

  .story__img {
    position: relative;
    inset: auto;
    width: 100%;
    height: clamp(230px, 42svh, 400px);
    object-fit: cover;
    object-position: 62% 12%;
    opacity: 1;
    transform: none;
  }

  .story__img--2,
  .story__img--3,
  .story__veil,
  .story__progress,
  .story__caption { display: none !important; }

  .story__copy {
    position: relative;
    inset: auto;
    max-width: none;
    padding: 24px var(--pad) 2px;
    color: var(--ink);
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .story__copy .eyebrow {
    color: var(--gold-ink);
    text-shadow: none;
    letter-spacing: 0.22em;
    font-size: 11px;
  }

  .story__title {
    color: var(--forest);
    font-size: clamp(32px, 10vw, 44px);
    line-height: 1.04;
    margin: 12px 0 10px;
  }

  .story__title em,
  .story__title .script {
    color: var(--gold);
    text-shadow: none;
  }

  /* the eyebrow already says this — one small caps line, not two */
  .story__sub { display: none; }

  .story__desc {
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.62;
    max-width: 38ch;
    margin: 12px 0 20px;
  }

  .story__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 22px;
  }

  .story__actions .btn {
    width: 100%;
    justify-content: center;
    padding: 16px 22px;
    font-size: 11px;
  }

  .story__actions .btn--gold {
    background: var(--gold-ink);
    border-color: var(--gold-ink);
  }

  .story__actions .btn--ghost {
    border-color: rgba(15, 61, 46, 0.32);
    color: var(--forest);
  }

  .story__trust {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 var(--pad) 30px;
    background: var(--paper);
    color: var(--forest);
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  .story__trust li {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
  }

  .story__trust li:first-child { border-top: 1px solid var(--line); }

  .story__trust .dot { background: var(--gold); }
}

/* short phones: keep the photograph from eating the whole first screen */
@media (max-width: 700px) and (max-height: 700px) {
  .story__img { height: 230px; }
  .story__title { font-size: 30px; }
  .story__desc { font-size: 13.5px; line-height: 1.55; margin: 10px 0 16px; }
}


/* on the home page the header floats over the photograph — give it a soft
   wash so two rows of type stay legible on a bright frame */
@media (max-width: 900px) {
  body.home:not(.menu-open) .nav {
    background: linear-gradient(to bottom, rgba(8, 26, 20, 0.78) 0%, rgba(8, 26, 20, 0.42) 62%, rgba(8, 26, 20, 0) 100%);
    padding-bottom: 12px;
  }
}


/* ------------------------------------------------------- utility icons
   words on a wide screen, three icons on a phone */
.nav__tools .tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.tool__icon { display: none; width: 21px; height: 21px; flex: none; }

@media (max-width: 900px) {
  .nav__tools { gap: 6px; }

  .nav__tools .tool {
    width: 44px;
    height: 44px;
    justify-content: center;
    gap: 0;
  }

  .tool__icon { display: block; }
  .tool__text { display: none; }

  .nav__tools .count {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 16px;
  }
}


@media (max-width: 900px) {
  .tool__icon { width: 24px; height: 24px; stroke-width: 1.6; }

  .nav__tools .count {
    top: 5px;
    right: 1px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92);
    font-weight: 600;
  }

  body.zv-inner .nav__tools .count { box-shadow: 0 0 0 2px var(--paper); }
}


/* very small phones: one compact row so the header does not eat the hero,
   and the model's head keeps clear air beneath it */
@media (max-width: 480px) {
  .nav {
    flex-wrap: nowrap;
    gap: 6px;
    padding: 8px var(--pad) 8px;
    min-height: 56px;
  }

  .nav__toggle { order: 3; min-height: 44px; padding: 0 2px; }
  .nav__toggle-text { display: none; }

  .nav__tools {
    order: 2;
    width: auto;
    margin-left: auto;
    padding: 0;
    gap: 2px;
  }

  .nav__tools .tool { width: 44px; height: 44px; }
  .tool__icon { width: 23px; height: 23px; }

  body.zv-inner main { padding-top: 84px; }
}


/* ================================== the six categories on a phone
   A side-scrolling row hid four of the six tiles behind a swipe, and a tile
   inside a snapping rail can also lose its tap to the gesture. On a phone the
   six tiles are simply a two-column grid: all of them visible, nothing to
   swipe, every one of them a plain tap. */
@media (max-width: 700px) {
  .cat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 14px;
    overflow: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .cat { scroll-snap-align: none; }

  .cat a,
  .edit a {
    display: block;
    touch-action: manipulation;
  }

  .cat__label { font-size: 12px; }
}
