/* ==========================================================================
   Pages — section layouts per template
   (Future WordPress: front-page.php, page-about.php, page-best-sellers.php,
   page-contact.php, archive-product.php)
   ========================================================================== */

/* ==========================================================================
   HOME — Hero
   ========================================================================== */

/* The hero is a "scene". Today it is one viewport tall.
   When the 3D animation arrives, .hero gets a taller height (e.g. 400vh)
   and .hero__sticky stays pinned (position: sticky; top: var(--header-h))
   while scroll progress drives the media inside .stage__media.
   The chapter list (.hero__chapters) can follow the same progress.
   No layout rebuild is needed. */
.hero { position: relative; }

/* Two balanced columns inside the page container: copy | framed stage */
.hero__sticky {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(2rem, 6vw, 7.5rem);
  max-width: 1760px; /* a little wider than the rest of the page on large screens */
  min-height: calc(100svh - var(--header-h));
  margin-inline: auto;
  padding: clamp(0.75rem, 1.5vw, 1.5rem) var(--gutter) clamp(1.5rem, 3vw, 3rem);
}

/* Copy column: label at the top, headline block centred, chapters at the foot */
.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-5);
  padding-top: clamp(1.5rem, 5vh, 4rem);
}

.hero__label {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.hero__label::after {
  content: "";
  width: 48px;
  height: 1px;
  background: currentColor;
}

/* 6.9em: wide enough for "REMEMBERED", narrow enough to keep three lines */
.hero__title { max-width: 6.9em; }
.hero__text {
  max-width: 34ch;
  margin-top: var(--s-5);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-5);
}

/* Chapter index — mirrors the future scroll story */
.hero__chapters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.hero__chapters li {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: -1px;
  padding-top: var(--s-2);
  border-top: 1px solid transparent;
  color: var(--ink-50);
}
.hero__chapters li + li { padding-left: var(--s-2); }
.hero__chapters li.is-active { color: var(--ink); border-top-color: var(--ink); }

/* ---------- 3D stage ---------- */

.stage {
  /* The photo / 3D stage is always dark, whatever the page theme */
  --ink: var(--c-black);
  --paper: var(--c-white);
  --paper-70: rgba(255, 255, 255, 0.7);
  --paper-line: rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(70% 55% at 55% 38%, rgba(255, 255, 255, 0.11), transparent 70%),
    var(--ink);
  color: var(--paper);
}

/* Slot for the future <video> / <canvas>. Fills the stage. */
.stage__media {
  position: absolute;
  inset: 0;
}
.stage__media > video,
.stage__media > canvas,
.stage__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Still portrait (stand-in until the 3D video): keep face + necklace in view */
.stage__media > img { object-position: 50% 28%; animation: stage-in 1.4s var(--ease-out) both; }
@keyframes stage-in { from { opacity: 0; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .stage__media > img { animation: none; } }

/* Fine framing line */
.stage__frame {
  position: absolute;
  inset: clamp(0.75rem, 1.6vw, 1.5rem);
  border: 1px solid var(--paper-line);
  pointer-events: none;
}

.stage__mark,
.stage__scroll {
  position: absolute;
  left: clamp(1.75rem, 3.2vw, 3rem);
  color: var(--paper-70);
}
.stage__mark { top: clamp(1.75rem, 3.2vw, 3rem); }
.stage__scroll {
  bottom: clamp(1.75rem, 3.2vw, 3rem);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.stage__scroll::after {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
}

@media (max-width: 900px) {
  .hero__sticky {
    grid-template-columns: 1fr;
    row-gap: var(--s-5);
    min-height: 0;
    padding-top: var(--s-5);
  }
  .hero__title { font-size: clamp(2.75rem, 12.5vw, 5.5rem); }
  .hero__copy { padding-top: 0; gap: var(--s-5); }
  .hero__chapters { order: 3; }
  .stage { aspect-ratio: 4 / 5; max-height: 82svh; }
}
@media (max-width: 520px) {
  .hero__chapters { grid-template-columns: 1fr 1fr; row-gap: var(--s-2); }
  .hero__chapters li + li { padding-left: 0; }
  .hero__chapters li:nth-child(even) { padding-left: var(--s-2); }
  .hero__chapters li:nth-child(n + 3) { border-top-color: var(--line); }
}

/* ==========================================================================
   HOME — Notes strip
   ========================================================================== */

.notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}
.note {
  display: flex;
  gap: var(--s-2);
  align-items: flex-start;
  padding: var(--s-4) var(--gutter);
}
.note + .note { border-left: 1px solid var(--line); }
.note svg { flex: none; width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1; margin-top: 0.1rem; }
.note p { margin-top: 0.3rem; font-size: var(--fs-small); color: var(--ink-70); line-height: 1.5; }

@media (max-width: 900px) {
  .notes { grid-template-columns: 1fr 1fr; }
  .note:nth-child(3) { border-left: 0; }
  .note:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .notes { grid-template-columns: 1fr; }
  .note + .note { border-left: 0; border-top: 1px solid var(--line); }
}

/* ==========================================================================
   Split editorial block (image / text)
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: min(88vh, 860px);
}
.split__media .ph { width: 100%; height: 100%; min-height: 420px; }
.split__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s-7) clamp(1.5rem, 7vw, 8rem);
}
.split__copy .label { margin-bottom: var(--s-4); }
.split__copy p { max-width: 40ch; margin-top: var(--s-4); }
.split__copy .btn,
.split__copy .link-line { margin-top: var(--s-5); align-self: flex-start; }

.split--reverse .split__media { order: 2; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; min-height: 0; }
  .split--reverse .split__media { order: 0; }
  .split__media .ph { min-height: 0; aspect-ratio: 4 / 5; }
  .split__copy { padding: var(--s-6) var(--gutter); }
}

/* ==========================================================================
   HOME — Category triptych
   ========================================================================== */

.triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.5rem, 1vw, 1rem);
}
.tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.tile .ph { position: absolute; inset: 0; transition: transform var(--t-slow) var(--ease-out); }
.tile .ph__icon { width: clamp(48px, 18%, 96px); }
.tile:hover .ph { transform: scale(1.035); }
.tile__copy {
  position: absolute;
  left: clamp(1rem, 2vw, 1.75rem);
  bottom: clamp(1rem, 2vw, 1.75rem);
  color: var(--paper);
}
.tile__copy .h3 { margin-bottom: var(--s-2); }
.tile:hover .link-line { background-size: 35% 1px; }

@media (max-width: 700px) {
  .triptych { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile__copy .h3 { font-size: 1.05rem; margin-bottom: var(--s-1); }
  .tile__copy .link-line { font-size: var(--fs-micro); }
}

/* ==========================================================================
   Newsletter / connect band
   ========================================================================== */

.connect {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: var(--s-5);
}
.connect p { margin-top: var(--s-2); max-width: 36ch; }
.connect__form { display: flex; align-items: flex-end; gap: var(--s-3); }
.connect__form .field { flex: 1; }

@media (max-width: 1080px) {
  .connect { grid-template-columns: 1fr; gap: var(--s-4); }
  .connect .seal { display: none; }
}
@media (max-width: 520px) {
  .connect__form { flex-direction: column; align-items: stretch; }
}

/* ==========================================================================
   Inner page intro (About, Best Sellers, Shop, Contact)
   ========================================================================== */

.page-intro {
  padding-top: clamp(4rem, 2rem + 7vw, 9rem);
  padding-bottom: clamp(3rem, 2rem + 4vw, 6rem);
}
.page-intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  align-items: end;
  gap: var(--s-5);
}
.page-intro .label { margin-bottom: var(--s-4); }
.page-intro p { max-width: 38ch; }

@media (max-width: 900px) {
  .page-intro__grid { grid-template-columns: 1fr; gap: var(--s-4); }
}

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

.about-hero-media .ph { aspect-ratio: 21 / 9; width: 100%; }
@media (max-width: 700px) { .about-hero-media .ph { aspect-ratio: 4 / 5; } }
.about-hero-media__img { display: block; width: 100%; height: auto; background: #000; }

.story {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 1fr) minmax(0, 6fr);
  gap: var(--s-5);
}
.story__aside { grid-column: 1; }
.story__aside .label { position: sticky; top: calc(var(--header-h) + var(--s-4)); }
.story__body { grid-column: 3; }
.story__body .h2 { margin-bottom: var(--s-5); }
.story__body p + p { margin-top: var(--s-3); }
.story__body p { max-width: 58ch; }

@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; gap: var(--s-3); }
  .story__body { grid-column: 1; }
}

.placeholder-text {
  display: inline;
  padding: 0 0.25em;
  border: 1px dashed var(--line);
  color: var(--ink-50);
  font-size: 0.92em;
}

.pull-quote {
  max-width: 22ch;
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: var(--fs-quote);
  line-height: 1.12;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: var(--tracking-display);
}
.pull-quote em { text-transform: none; }

.duo {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: clamp(1rem, 3vw, 3rem);
  align-items: end;
}
.duo .ph:first-child { aspect-ratio: 4 / 5; }
.duo .ph:last-child { aspect-ratio: 3 / 4; margin-bottom: 18%; }
@media (max-width: 700px) {
  .duo { grid-template-columns: 1fr 1fr; }
  .duo .ph:last-child { margin-bottom: 0; }
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.principle { padding: var(--s-4) var(--s-4) 0 0; }
.principle + .principle { padding-left: var(--s-4); border-left: 1px solid var(--line); }
.principle__num {
  display: block;
  margin-bottom: var(--s-5);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-style: italic;
}
.principle .h3 { margin-bottom: var(--s-2); }
.principle p { color: var(--ink-70); max-width: 34ch; }

@media (max-width: 900px) {
  .principles { grid-template-columns: 1fr; }
  .principle,
  .principle + .principle { padding: var(--s-4) 0; border-left: 0; }
  .principle + .principle { border-top: 1px solid var(--line); }
  .principle__num { margin-bottom: var(--s-3); }
}

/* ==========================================================================
   BEST SELLERS — Why choose / Why jewellery matters
   ========================================================================== */

.why {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 7vw, 8rem);
}
.why__head .label { margin-bottom: var(--s-4); }
.why__head p { margin-top: var(--s-4); max-width: 36ch; }
.why__list li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: var(--s-2);
  padding-block: var(--s-4);
  border-top: 1px solid var(--paper-line);
}
.why__list li:last-child { border-bottom: 1px solid var(--paper-line); }
.why__list .num { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; }
.why__list h3 { margin-bottom: var(--s-1); }
.why__list p { color: var(--paper-70); max-width: 46ch; }

@media (max-width: 900px) {
  .why { grid-template-columns: 1fr; }
}

.matters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
}
.matters__media .ph { aspect-ratio: 4 / 5; }
.matters__copy .label { margin-bottom: var(--s-4); }
.matters__lines { margin-bottom: var(--s-5); }
.matters__lines span { display: block; }
.matters__lines span + span { margin-top: 0.1em; }
.matters__copy p { max-width: 42ch; }
.matters__copy p + p { margin-top: var(--s-3); }
.matters__sign { margin-top: var(--s-5); }

@media (max-width: 900px) {
  .matters { grid-template-columns: 1fr; }
  .matters__media { order: 2; }
}

/* ==========================================================================
   SHOP
   ========================================================================== */

.shop-grid .product-card[hidden] { display: none; }

.shop-empty {
  padding-block: var(--s-7);
  text-align: center;
  color: var(--ink-50);
}

/* ==========================================================================
   CONTACT
   ========================================================================== */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 8vw, 9rem);
}
.contact__details dl { display: grid; gap: var(--s-4); margin: var(--s-6) 0 0; }
.contact__details dt { margin-bottom: 0.35rem; color: var(--ink-50); }
.contact__details dd { margin: 0; font-size: var(--fs-lead); }
.contact__details dd a {
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: background-size var(--t-med) var(--ease-out);
}
.contact__details dd a:hover { background-size: 30% 1px; }

.contact__form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}
.contact__form .form-row .field + .field { margin-top: 0; }
.contact__form .form-row + .field { margin-top: var(--s-4); }
.contact__form .btn { margin-top: var(--s-5); }

.preview-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--s-5);
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  color: var(--ink-70);
}
.preview-flag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid currentColor;
}

@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .contact__form .form-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   HOME — About (reuses .page-intro / .about-hero-media / .story from ABOUT),
   Best Sellers and All Stock
   ========================================================================== */

.story__more { margin-top: var(--s-5); }

/* Hairline pause between About and Best Sellers */
.section-break { padding-block: clamp(1.5rem, 0.5rem + 4vw, 5rem); }
.section-break span {
  display: block;
  height: 1px;
  background: var(--line);
}

.section-head__text { max-width: 36ch; }
@media (max-width: 700px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
}

.home-stock__more {
  margin-top: var(--s-6);
  text-align: center;
}

.section--ruled { border-top: 1px solid var(--line); }


/* Category tiles stay black on the black home page; a fine light border
   keeps each tile distinct */
.home-categories .triptych {
  --ink: var(--c-black);
  --paper: var(--c-white);
  --paper-70: rgba(255, 255, 255, 0.7);
  --glow: rgba(255, 255, 255, 0.09);
}
.home-categories .tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
  transition: border-color var(--t-med) var(--ease);
}
.home-categories .tile:hover::after { border-color: rgba(255, 255, 255, 0.45); }

/* Home: header follows the wider hero so menu and headline stay aligned */
.page-home .site-header__inner { max-width: 1760px; }

/* Home About — "Checkmate" statement */
.home-about .page-intro__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.home-about__title { font-weight: 700; }
.home-about .page-intro .home-about__copy p { max-width: 46ch; }
.home-about__copy > * + * { margin-top: var(--s-3); }
.home-about .page-intro .home-about__sign {
  margin-top: var(--s-4);
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  color: var(--ink);
}
.home-about__sign em { font-style: italic; text-transform: none; }
@media (max-width: 900px) { .home-about .page-intro__grid { grid-template-columns: 1fr; } }
