/* She & Her Jewellery (demo). One bold element: the velvet tray. Everything else stays quiet. */

:root {
  --velvet: #0f3d44;
  --velvet-deep: #0a2c31;
  --pearl: #f1f0f4;
  --paper: #fbfafc;
  --ink: #2b2130;
  --ink-soft: #62576a;
  --thread: #d6d1da;
  --gold: #b48a3c;
  --gold-soft: #ecdfc1;
  --sindoor: #b8322a;

  --display: "Marcellus", "Iowan Old Style", Georgia, serif;
  --text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* A classical scale (Bringhurst), anchored on 17px body text */
  --s-1: 0.8125rem;   /* 13 */
  --s0: 1.0625rem;    /* 17 */
  --s1: 1.3125rem;    /* 21 */
  --s2: 1.75rem;      /* 28 */
  --s3: 2.25rem;      /* 36 */
  --s4: 3rem;         /* 48 */
  --s5: 4rem;         /* 64 */

  --page: min(1240px, 100% - 2 * clamp(1.25rem, 4vw, 3rem));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--pearl);
  color: var(--ink);
  font: 400 var(--s0)/1.55 var(--text);
  font-feature-settings: "kern", "liga";
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--velvet); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; line-height: 1.1; margin: 0; }
p { margin: 0 0 1em; }
.wrap { width: var(--page); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Demo notice */
.demo-note { background: var(--velvet-deep); color: #d9e6e7; font-size: var(--s-1); }
.demo-note .wrap { padding: 0.55rem 0; }
.demo-note a { color: #fff; }

/* Header */
.site-head { border-bottom: 1px solid var(--thread); background: var(--pearl); }
.site-head .wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; padding: 1.1rem 0; }
.brand { text-decoration: none; display: grid; line-height: 1; }
.brand b { font: 400 1.875rem/1 var(--display); letter-spacing: -0.01em; }
.brand span { font-size: var(--s-1); color: var(--ink-soft); margin-top: 0.3rem; letter-spacing: 0.02em; }
.nav { display: flex; gap: 1.6rem; justify-content: center; flex-wrap: wrap; }
.nav a { text-decoration: none; font-weight: 500; font-size: 0.9375rem; padding: 0.3rem 0; border-bottom: 1px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { border-bottom-color: var(--ink); color: var(--ink); }
.bag-link { text-decoration: none; font-weight: 500; font-size: 0.9375rem; display: inline-flex; gap: 0.45rem; align-items: center; }
.bag-link .count { min-width: 1.5rem; height: 1.5rem; border-radius: 999px; display: inline-grid; place-items: center; background: var(--velvet); color: #fff; font-size: 0.75rem; padding: 0 0.35rem; }

/* Hero: copy on pearl, the velvet tray beside it */
.hero { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero h1 { font-size: clamp(2.5rem, 5.4vw, var(--s5)); max-width: 12ch; }
.hero .lede { font-size: var(--s1); line-height: 1.5; color: var(--ink-soft); max-width: 34ch; margin: 1.4rem 0 2rem; }
.actions { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }

.button { appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--velvet); color: #fff; font: 500 1rem/1 var(--text); padding: 1rem 1.6rem; border-radius: 4px; text-decoration: none; }
.button:hover { background: var(--velvet-deep); color: #fff; }
.button[disabled] { background: #9a95a0; cursor: not-allowed; }
.button.wide { width: 100%; }
.text-link { font-weight: 500; }

.tray {
  position: relative; aspect-ratio: 7 / 5; border-radius: 22px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(120, 190, 196, 0.16), transparent 60%),
    var(--velvet);
  box-shadow:
    inset 0 0 0 12px var(--velvet),
    inset 0 0 0 13px rgba(236, 223, 193, 0.38),
    inset 0 18px 40px rgba(0, 0, 0, 0.28),
    0 30px 60px -30px rgba(15, 61, 68, 0.55);
  overflow: hidden;
}
.tray::after { /* the nap of the velvet */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.35; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.tray .piece { position: absolute; width: 38%; text-decoration: none; color: var(--ink); z-index: 1; }
.tray .piece img { width: 100%; }
.tray .piece:nth-child(1) { left: -3%; top: -4%; width: 54%; transform: rotate(-7deg); }
.tray .piece:nth-child(2) { left: 29%; top: 22%; width: 50%; transform: rotate(3deg); }
.tray .piece:nth-child(3) { right: -5%; top: -9%; width: 50%; transform: rotate(-3deg); }

/* The tie-on price tag: used on the tray and the product page only */
.tag { position: relative; display: inline-grid; white-space: nowrap; gap: 0.1rem; background: var(--paper); color: var(--ink);
  padding: 0.5rem 0.8rem 0.5rem 1.6rem; font-size: var(--s-1); line-height: 1.25;
  clip-path: polygon(0.9rem 0, 100% 0, 100% 100%, 0.9rem 100%, 0 50%); box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.tag::before { content: ""; position: absolute; left: 0.7rem; top: 50%; width: 0.4rem; height: 0.4rem; margin-top: -0.2rem; border-radius: 50%; background: var(--velvet); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.tag strong { font-weight: 600; font-size: 0.9375rem; }
.tag s { color: var(--ink-soft); }
.tray .tag { position: absolute; left: 50%; bottom: 14%; transform: rotate(8deg); }
.tray .tag::after { content: ""; position: absolute; left: -2.2rem; top: 50%; width: 2.2rem; height: 1px; background: var(--gold-soft); transform: rotate(-24deg); transform-origin: right; }
.tray .piece:nth-child(2) .tag { left: 60%; bottom: 16%; transform: rotate(-5deg); }
.tray .piece:nth-child(3) .tag { left: 30%; bottom: 12%; transform: rotate(5deg); }

@media (prefers-reduced-motion: no-preference) {
  .tray .piece { animation: lay-down 900ms cubic-bezier(.2, .7, .2, 1) both; }
  .tray .piece:nth-child(2) { animation-delay: 160ms; }
  .tray .piece:nth-child(3) { animation-delay: 320ms; }
  @keyframes lay-down { from { opacity: 0; translate: 0 -18px; } to { opacity: 1; translate: 0 0; } }
}

/* Offer line */
.offer { background: var(--gold-soft); }
.offer .wrap { padding: 0.85rem 0; display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.offer p { margin: 0; }
.offer code { font: 600 0.95em var(--text); letter-spacing: 0.04em; background: var(--paper); padding: 0.1rem 0.45rem; border-radius: 3px; }

/* Sections */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.75rem; }
.section-head h2 { font-size: clamp(1.75rem, 3vw, var(--s3)); }

/* Categories as velvet swatches */
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.swatch { text-decoration: none; }
.swatch .pad { background: var(--velvet); border-radius: 6px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.swatch .pad img { width: 92%; }
.swatch span { display: block; font: 400 var(--s1)/1.2 var(--display); margin-top: 0.7rem; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.25rem 1.25rem; }
.item { text-decoration: none; display: grid; gap: 0.75rem; align-content: start; }
.item img { border-radius: 4px; aspect-ratio: 1; object-fit: cover; background: var(--velvet); }
.item .name { font-weight: 500; line-height: 1.3; }
.item:hover .name { text-decoration: underline; }
.price { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; font-size: 0.9375rem; }
.price .now { font-weight: 600; }
.price .now.sale { color: var(--sindoor); }
.price s { color: var(--ink-soft); }
.price .state { color: var(--ink-soft); font-size: var(--s-1); }

/* Materials band */
.made { background: var(--paper); border-block: 1px solid var(--thread); }
.made .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 5rem); padding: clamp(3rem, 6vw, 5rem) 0; }
.made h2 { font-size: clamp(1.75rem, 3vw, var(--s3)); }
.made dl { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem 1.6rem; margin: 0; align-items: start; }
.made dt { width: 3.2rem; }
.made dd { margin: 0; }
.made dd b { display: block; font-weight: 600; margin-bottom: 0.2rem; }
.hallmark { width: 3.2rem; height: auto; color: var(--gold); }

/* Collection */
.page-head { padding: clamp(2rem, 4vw, 3.25rem) 0 1.5rem; }
.page-head h1 { font-size: clamp(2.25rem, 4.5vw, var(--s4)); }
.page-head p { color: var(--ink-soft); max-width: 60ch; margin-top: 0.8rem; }
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 2rem; }
.filters a { text-decoration: none; font-size: 0.9375rem; padding: 0.45rem 0.9rem; border: 1px solid var(--thread); border-radius: 999px; background: var(--paper); }
.filters a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Product page */
.crumbs { font-size: var(--s-1); color: var(--ink-soft); padding-top: 1.5rem; }
.crumbs a { color: inherit; }
.product { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 4.5rem); padding: 1.25rem 0 clamp(3rem, 6vw, 5rem); align-items: start; }
.product .photo img { border-radius: 4px; width: 100%; background: var(--velvet); }
.thumbs { display: flex; gap: 0.6rem; margin-top: 0.75rem; }
.thumbs a { width: 4.5rem; border-radius: 3px; overflow: hidden; outline: 1px solid transparent; outline-offset: 2px; }
.thumbs a[aria-current="true"] { outline-color: var(--ink); }
.buy h1 { font-size: clamp(2.25rem, 4vw, var(--s4)); }
.buy .tag { margin: 1.25rem 0 0.5rem; font-size: 0.9375rem; padding: 0.7rem 1rem 0.7rem 1.9rem; }
.buy .tag strong { font-size: var(--s1); }
.sale-note { color: var(--sindoor); font-size: var(--s-1); margin: 0 0 1rem; }
.blurb { color: var(--ink-soft); max-width: 46ch; }
fieldset { border: 0; padding: 0; margin: 1.5rem 0 0; }
legend { font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.6rem; padding: 0; }
legend span { font-weight: 400; color: var(--ink-soft); }
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-size: 0.9375rem; padding: 0.5rem 0.85rem; border: 1px solid var(--thread); border-radius: 4px; background: var(--paper); }
.chip[aria-current="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.chip.out { color: var(--ink-soft); text-decoration: line-through; }
.metal { width: 1rem; height: 1rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.metal.gold { background: linear-gradient(135deg, #ffecb0, #d6a74e 55%, #8a6420); }
.metal.rose { background: linear-gradient(135deg, #ffdccc, #db9880 55%, #8e5546); }
.metal.silver { background: linear-gradient(135deg, #fcfcff, #c4c6d2 55%, #7d7f8c); }
.metal.oxidised { background: linear-gradient(135deg, #c4c0c8, #706c74 55%, #2c2a30); }
.stock { margin: 1.5rem 0 1rem; font-size: 0.9375rem; }
.stock.out { color: var(--sindoor); }
.qty { display: inline-flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.qty select { font: inherit; padding: 0.5rem; border: 1px solid var(--thread); border-radius: 4px; background: var(--paper); }
.facts { margin: 2.25rem 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.55rem 1.5rem; font-size: 0.9375rem; border-top: 1px solid var(--thread); padding-top: 1.25rem; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; }
.promise { margin-top: 1.5rem; font-size: 0.9375rem; color: var(--ink-soft); }
.promise p { margin: 0 0 0.4rem; }

/* Bag and order */
.bag { display: grid; grid-template-columns: 1fr 22rem; gap: clamp(2rem, 5vw, 4rem); padding-bottom: 5rem; align-items: start; }
.lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--thread); }
.line { display: grid; grid-template-columns: 5.5rem 1fr auto; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px solid var(--thread); align-items: center; }
.line img { border-radius: 3px; }
.line .what a { font-weight: 500; text-decoration: none; }
.line .what small { display: block; color: var(--ink-soft); font-size: var(--s-1); margin-top: 0.2rem; }
.line form { display: inline; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--thread); border-radius: 4px; margin-top: 0.6rem; background: var(--paper); }
.stepper button { appearance: none; border: 0; background: none; font: inherit; width: 2.2rem; height: 2.2rem; cursor: pointer; }
.stepper span { min-width: 1.6rem; text-align: center; font-size: 0.9375rem; }
.remove { appearance: none; border: 0; background: none; font: inherit; font-size: var(--s-1); color: var(--ink-soft); text-decoration: underline; cursor: pointer; margin-left: 0.75rem; }
.line .sum { text-align: right; font-weight: 600; }
.summary { background: var(--paper); border: 1px solid var(--thread); border-radius: 6px; padding: 1.5rem; position: sticky; top: 1.5rem; }
.summary h2 { font-size: var(--s2); margin-bottom: 1rem; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; margin: 1rem 0; font-size: 0.9375rem; }
.totals dd { margin: 0; text-align: right; }
.totals .grand { font-weight: 600; font-size: var(--s0); border-top: 1px solid var(--thread); padding-top: 0.7rem; margin-top: 0.3rem; }
.codeform { display: flex; gap: 0.5rem; }
.codeform input { flex: 1; min-width: 0; font: inherit; padding: 0.6rem 0.75rem; border: 1px solid var(--thread); border-radius: 4px; background: #fff; text-transform: uppercase; }
.codeform input::placeholder { text-transform: none; }
.codeform button { appearance: none; font: 500 0.9375rem var(--text); border: 1px solid var(--ink); background: none; border-radius: 4px; padding: 0 0.9rem; cursor: pointer; }
.msg { font-size: var(--s-1); margin: 0.5rem 0 0; }
.msg.bad { color: var(--sindoor); }
.fine { font-size: var(--s-1); color: var(--ink-soft); margin-top: 1rem; }
.empty { padding: 2rem 0 5rem; }
.empty p { color: var(--ink-soft); }
.confirm { max-width: 44rem; padding: 3rem 0 5rem; }
.confirm h1 { font-size: clamp(2.25rem, 4vw, var(--s4)); }

/* Plain pages */
.prose { max-width: 40rem; padding-bottom: 5rem; }
.prose h2 { font-size: var(--s2); margin: 2.25rem 0 0.75rem; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; margin: 1rem 0; }
.prose th, .prose td { text-align: left; padding: 0.55rem 0.75rem 0.55rem 0; border-bottom: 1px solid var(--thread); }
.prose code { background: var(--paper); border: 1px solid var(--thread); padding: 0.05rem 0.35rem; border-radius: 3px; font-size: 0.9em; }

/* Footer */
.site-foot { background: var(--velvet-deep); color: #cfdfe1; font-size: 0.9375rem; }
.site-foot .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding: 3.5rem 0 2.5rem; }
.site-foot h2 { font: 400 var(--s1)/1.2 var(--display); color: #fff; margin-bottom: 0.9rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-foot a { color: #cfdfe1; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot .small { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.25rem; font-size: var(--s-1); color: #9fbcc0; }

/* Demo log (VPN only) */
.log { font-size: 0.875rem; width: 100%; border-collapse: collapse; }
.log th, .log td { text-align: left; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--thread); vertical-align: top; }
.log th { font-weight: 600; }
.log .ok { color: var(--velvet); font-weight: 600; }

@media (max-width: 960px) {
  .hero, .product, .bag, .made .wrap { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .swatches { grid-template-columns: repeat(3, 1fr); }
  .site-foot .wrap { grid-template-columns: 1fr 1fr; }
  .summary { position: static; }
}
@media (max-width: 640px) {
  .site-head .wrap { grid-template-columns: 1fr auto; gap: 0.75rem 1rem; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; gap: 1.1rem; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
  .line { grid-template-columns: 4.25rem 1fr; }
  .line .sum { grid-column: 2; text-align: left; }
  .tray .tag { font-size: 0.6875rem; }
}
