@import url("theme.css");
/* ========================================
   GENERAL
======================================== */

body {
  background: var(--cg-bg);
  color: var(--cg-text);
  font-family: var(--font-body);
  font-weight: 300;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
}

.eyebrow {
  font-size: .75rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--cg-gold);
  font-weight: 500;
}

.section-head {
  max-width: 560px;
}

.section-head h2 {
  font-size: 2.2rem;
}


/* ========================================
   HERO SECTION — fits exactly one screen
   ----------------------------------------
   Height = browser window minus the sticky header. index.php measures the
   header and publishes it as --cg-header-h (fallback: 108px).

   Desktop layout (≥ 992px):
     ┌──────────────── WORDMARK ────────────────┐
     │                              TAGLINE     │
     │ COLLECTION        [ photo ]              │
     │ copy + button                 RINGS   →  │
     │                               EARRINGS → │
     └──────────────────────────────────────────┘
======================================== */

:root {
  --cg-header-h: 108px;
}

.hero-section {
  position: relative;
  isolation: isolate;
  display: grid;
  height: calc(100vh - var(--cg-header-h));
  height: calc(100svh - var(--cg-header-h));
  min-height: 480px;
  overflow: hidden;
  background: var(--cg-bg);
  color: var(--cg-text);
}

/* Media and content share one grid cell, so they overlap */
.hero-media,
.hero-inner {
  grid-area: 1 / 1;
}

/* Faint stars + gold glow behind everything */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1px 1px at 12% 22%, rgba(var(--cg-text-rgb), .55) 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 68%, rgba(var(--cg-text-rgb), .35) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 34%, var(--cg-gold) 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 18%, rgba(var(--cg-text-rgb), .4) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 74% 58%, var(--cg-gold) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 30%, rgba(var(--cg-text-rgb), .5) 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 84%, rgba(var(--cg-text-rgb), .3) 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 88%, rgba(var(--cg-text-rgb), .35) 50%, transparent 51%),
    radial-gradient(700px 460px at 50% 62%, var(--cg-gold-wash), transparent 70%);
  pointer-events: none;
}

/* ---------- Photograph ---------- */

.hero-media {
  position: relative;
  z-index: 0;
  pointer-events: none;
}

.hero-img {
  position: absolute;
  left: 50%;
  top: 7%;
  height: 104%;
  width: auto;
  max-width: none;
  /* the pendant sits slightly left of the photo's centre */
  transform: translateX(-48%);

  /* feather the photo's edges into the night-sky background */
  -webkit-mask-image: radial-gradient(closest-side at 48% 50%, #000 62%, transparent 100%);
  mask-image: radial-gradient(closest-side at 48% 50%, #000 62%, transparent 100%);

  filter: drop-shadow(0 0 40px var(--cg-gold-glow));
  animation: heroFloat 1.4s cubic-bezier(.2, .7, .2, 1) both;
}

/* ---------- Light mode ("Pearl") ----------
   Swap to a ring photographed on a pale background and let the hero use
   the light palette from theme.css like the rest of the page. */

.hero-img--light {
  display: none;
}

:root[data-theme="light"] .hero-img--dark {
  display: none;
}

:root[data-theme="light"] .hero-img--light {
  display: block;
  top: 15%;
  height: 92%;
  transform: translateX(-53%);
  animation-name: heroFloatLight;

  /* brighten the grey studio backdrop and multiply it into the ivory page */
  filter: brightness(1.17) contrast(1.06) saturate(.9);
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(closest-side at 53% 52%, #000 70%, transparent 100%);
  mask-image: radial-gradient(closest-side at 53% 52%, #000 70%, transparent 100%);
}

/* Night-sky stars don't belong on ivory; keep only the gold sparkle + glow */
:root[data-theme="light"] .hero-section::before {
  background:
    radial-gradient(1.5px 1.5px at 38% 34%, var(--cg-gold) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 74% 58%, var(--cg-gold) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 18% 80%, var(--cg-gold) 50%, transparent 51%),
    radial-gradient(800px 480px at 50% 62%, var(--cg-gold-wash), transparent 70%);
}

@keyframes heroFloatLight {
  from {
    opacity: 0;
    transform: translate(-53%, 18px);
  }

  to {
    opacity: 1;
    transform: translate(-53%, 0);
  }
}

@keyframes heroFloat {
  from {
    opacity: 0;
    transform: translate(-48%, 18px);
  }

  to {
    opacity: 1;
    transform: translate(-48%, 0);
  }
}

/* ---------- Content grid ---------- */

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 0;

  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas:
    "mark mark  mark"
    "left .     tag"
    "left .     ."
    "left .     links";
  column-gap: 2rem;

  padding-top: clamp(.75rem, 2.4vh, 2rem);
  padding-bottom: clamp(1rem, 4vh, 3rem);
}

/* ---------- Wordmark ---------- */

.hero-wordmark-wrap {
  grid-area: mark;
  container-type: inline-size;
  text-align: center;
}

.hero-rule {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(var(--cg-text-rgb), .45) 12%,
      rgba(var(--cg-text-rgb), .45) 88%,
      transparent);
}

.hero-wordmark {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: .22em;

  margin: clamp(.35rem, 1.6vh, 1rem) 0 clamp(.25rem, 1.2vh, .8rem);

  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .035em;
  line-height: .86;
  color: var(--cg-text);
  white-space: nowrap;

  /* Span the full content width (100cqi), but never let it eat more than
     ~19% of the window height on short / wide screens. */
  font-size: min(calc(100cqi / 7.9), 19vh);
}

.hw-word {
  display: inline-block;
}

.hw-letter {
  position: relative;
}

/* 4-point star tucked inside the open bowl of the C and the G */
.hero-spark {
  position: absolute;
  top: 50%;
  left: 58%;
  width: .24em;
  height: .24em;
  transform: translate(-50%, -50%);
  color: var(--cg-gold);
  filter: drop-shadow(0 0 .08em var(--cg-gold-glow));
}

/* ---------- Tagline (top right) ---------- */

.hero-tagline {
  grid-area: tag;
  justify-self: end;
  margin: clamp(.6rem, 2.2vh, 1.6rem) 0 0;

  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.15rem, 3.4vh, 1.8rem);
  line-height: 1.12;
  white-space: nowrap;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-align: right;
  color: var(--cg-text);
}

/* ---------- Collection blurb (left) ---------- */

.hero-col-left {
  grid-area: left;
  align-self: center;
  max-width: 360px;
  margin-top: clamp(.5rem, 3vh, 2rem);
}

.hero-col-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 7vh, 3.6rem);
  line-height: .98;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--cg-text);
  margin-bottom: clamp(.6rem, 2vh, 1.1rem);
}

.hero-col-text {
  color: rgba(var(--cg-text-rgb), .82);
  font-size: clamp(.85rem, 1.9vh, .98rem);
  line-height: 1.55;
  margin-bottom: clamp(1rem, 3.2vh, 1.9rem);
}

.hero-btn {
  padding: .7rem 1.5rem;
}

.long-arrow {
  flex: none;
  width: 30px;
  height: 12px;
}

/* ---------- Quick category links (bottom right) ---------- */

.hero-cat-links {
  grid-area: links;
  justify-self: end;
  width: min(100%, 300px);

  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(var(--cg-text-rgb), .35);
}

.hero-cat-links li {
  border-bottom: 1px solid rgba(var(--cg-text-rgb), .35);
}

.hero-cat-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(.45rem, 1.45vh, .85rem) 0;

  font-family: var(--font-body);
  font-weight: 500;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cg-text);
  text-decoration: none;

  transition: color .25s, padding-left .25s;
}

.hero-cat-links a .long-arrow {
  color: var(--cg-gold);
  transition: transform .25s;
}

.hero-cat-links a:hover {
  color: var(--cg-gold);
  padding-left: .35rem;
}

.hero-cat-links a:hover .long-arrow {
  transform: translateX(4px);
}

/* ---------- Tablet & mobile: stack, photo in the middle ----------
   wordmark → tagline → photo → collection copy → category links      */

@media (max-width: 991.98px) {
  .hero-section {
    height: auto;
    min-height: calc(100vh - var(--cg-header-h));
    min-height: calc(100svh - var(--cg-header-h));
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(230px, 1fr) auto auto;
    text-align: center;
  }

  /* Its children become rows of the section's grid */
  .hero-inner {
    display: contents;
  }

  .hero-wordmark-wrap,
  .hero-tagline,
  .hero-col-left,
  .hero-cat-links {
    position: relative;
    z-index: 1;
    width: calc(100% - 40px);
    max-width: 640px;
    justify-self: center;
  }

  .hero-wordmark-wrap {
    grid-area: 1 / 1;
    max-width: 720px;
    margin-top: 1.25rem;
  }

  .hero-wordmark {
    font-size: calc(100cqi / 7.9);
  }

  .hero-tagline {
    grid-area: 2 / 1;
    text-align: center;
    font-size: clamp(1rem, 4.2vw, 1.4rem);
    margin-top: 1rem;
  }

  .hero-media {
    grid-area: 3 / 1;
    min-height: 230px;
  }

  .hero-img {
    top: 50%;
    height: 125%;
    transform: translate(-48%, -50%);
    animation: none;
  }

  :root[data-theme="light"] .hero-img--light {
    top: 50%;
    height: 115%;
    transform: translate(-53%, -50%);
  }

  .hero-col-left {
    grid-area: 4 / 1;
    align-self: start;
    margin-top: 0;
  }

  .hero-col-heading {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .hero-col-text {
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cat-links {
    grid-area: 5 / 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
    margin: 1.75rem 0 2rem;
    border-top: none;
  }

  .hero-cat-links li:nth-child(-n+2) {
    border-top: 1px solid rgba(var(--cg-text-rgb), .35);
  }
}

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


/* ========================================
   HERO BUTTONS
======================================== */

.btn-gold {
  --bs-btn-color: var(--cg-bg);
  --bs-btn-bg: var(--cg-gold);
  --bs-btn-border-color: var(--cg-gold);

  --bs-btn-hover-bg: var(--cg-gold-light);
  --bs-btn-hover-border-color: var(--cg-gold-light);
  --bs-btn-hover-color: var(--cg-bg);

  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;

  border-radius: 4px;
}

.btn-link-underline {
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;

  color: var(--cg-text);

  border-bottom: 1px solid var(--cg-muted);

  padding-bottom: 2px;

  text-decoration: none;

  transition:
    border-color .25s,
    color .25s;
}

.btn-link-underline:hover {
  color: var(--cg-gold);
  border-color: var(--cg-gold);
}


/* ========================================
   TRUST STRIP
======================================== */

.trust-strip {
  border-top: 1px solid var(--cg-hair);
  border-bottom: 1px solid var(--cg-hair);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.trust-icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--cg-gold);
}

.trust-item span {
  font-size: .82rem;
  color: var(--cg-muted);
  line-height: 1.3;
}


/* ========================================
   SHOP BY CATEGORY — fits exactly one screen
   ----------------------------------------
   Heading row + 2 × 2 photo grid share the window height below the sticky
   header. Each card is a full-bleed photo with the category name and a
   hairline laid over its top edge.
======================================== */

.shop-section {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--cg-header-h));
  height: calc(100svh - var(--cg-header-h));
  min-height: 480px;
  scroll-margin-top: var(--cg-header-h);
}

.shop-head {
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: clamp(1rem, 3.4vh, 2.25rem);
  padding-bottom: clamp(.85rem, 2.6vh, 1.6rem);
}

.shop-head h2 {
  font-size: clamp(1.6rem, 4.4vh, 2.3rem);
}

.shop-head .btn-link-underline {
  flex: none;
  margin-bottom: .35rem;
}

.shop-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: var(--cg-hair);
  border-top: 1px solid var(--cg-hair);
}

.shop-card {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  background: var(--cg-bg-alt);
  color: var(--cg-text);
  text-decoration: none;
}

.shop-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

/* Soft scrim behind the label so it stays readable on any photo */
.shop-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom,
      rgba(var(--cg-bg-rgb), .78) 0%,
      rgba(var(--cg-bg-rgb), .35) 26%,
      transparent 52%);
  pointer-events: none;
  transition: opacity .4s;
}

.shop-card-head {
  position: absolute;
  z-index: 2;
  top: 0;
  left: clamp(1.25rem, 3.4vw, 3rem);
  right: clamp(1.25rem, 3.4vw, 3rem);

  display: flex;
  align-items: center;
  gap: 1rem;

  padding: clamp(1rem, 3vh, 1.9rem) 0 clamp(.6rem, 1.6vh, 1rem);
  border-bottom: 1px solid rgba(var(--cg-text-rgb), .4);
}

.shop-card-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 4.2vh, 2.3rem);
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--cg-text);
  transition: color .25s;
}

.shop-arrow {
  width: 34px;
  height: 13px;
  color: var(--cg-gold);
  transition: transform .3s;
}

.shop-card:hover .shop-card-img {
  transform: scale(1.05);
}

.shop-card:hover .shop-card-head h3 {
  color: var(--cg-gold);
}

.shop-card:hover .shop-arrow {
  transform: translateX(6px);
}

.shop-card:focus-visible {
  outline-offset: -3px;
}

@media (max-width: 767.98px) {
  .shop-head .btn-link-underline {
    display: none;
  }

  .shop-card-head {
    gap: .6rem;
  }

  .shop-card-head h3 {
    font-size: clamp(1.05rem, 5vw, 1.4rem);
  }

  .shop-arrow {
    width: 22px;
  }
}


/* ========================================
   SERVICES — full-bleed image grid
======================================== */

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--cg-hair);
}

.service-photo-card {
  border-left: 1px solid var(--cg-hair);
}

.service-photo-card:last-child {
  border-right: 1px solid var(--cg-hair);
}

.service-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.service-photo-card:hover .service-img img {
  transform: scale(1.05);
}

.service-body {
  padding: 2rem 2.25rem 2.5rem;
}

.service-body h3 {
  font-size: 1.5rem;
  margin-bottom: .6rem;
}

.service-body p {
  color: var(--cg-text-soft);
  font-size: .95rem;
  margin-bottom: 1.25rem;
}

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

  .service-photo-card {
    border-right: 1px solid var(--cg-hair);
  }
}


/* ========================================
   ACCESSIBILITY
======================================== */

:focus-visible {
  outline: 1px solid var(--cg-gold);
  outline-offset: 3px;
}


/* ========================================
   OUR STORY
======================================== */

.origin-art {
  position: relative;

  min-height: 220px;

  background:
    radial-gradient(1px 1px at 20% 30%,
      var(--cg-gold) 50%,
      transparent 51%),
    radial-gradient(1px 1px at 65% 20%,
      var(--cg-text) 50%,
      transparent 51%),
    radial-gradient(1.5px 1.5px at 80% 60%,
      var(--cg-gold) 50%,
      transparent 51%),
    radial-gradient(1px 1px at 40% 75%,
      var(--cg-text) 50%,
      transparent 51%),
    radial-gradient(1px 1px at 55% 50%,
      var(--cg-muted) 50%,
      transparent 51%),
    radial-gradient(1px 1px at 15% 65%,
      var(--cg-text) 50%,
      transparent 51%),
    linear-gradient(135deg,
      var(--cg-bg-alt),
      var(--cg-bg));
}

.origin-art svg {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  opacity: .55;
}


/* ========================================
   TABLET
   992px and below
======================================== */

@media (max-width: 991.98px) {

  .section-head {
    max-width: 100%;
  }
}


/* ========================================
   MOBILE
   576px and below
======================================== */

@media (max-width: 575.98px) {

  .trust-item {
    justify-content: center;
    text-align: left;
  }

  .service-body {
    padding: 1.75rem;
  }
}
