/* Fonts are self-hosted (no requests to Google). */
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/jost-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/jost-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/jost-latin-500-normal.woff2") format("woff2"); }

/* Layout: deep navy page, ivory type, gold for buttons and hairlines; generous space, few elements. */
:root {
  --paper: #0F1C38;
  --surface: #152648;
  --ink: #F4F1EA;
  --muted: #A7B0C3;
  --line: #2A3B60;
  --accent: #C9A961;
  --on-accent: #0F1C38;
  --gold: #C9A961;
  --band: #091329;
  --display: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --body: "Jost", "Futura", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 300 1.0625rem/1.7 var(--body); }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.1; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.25rem; }
p { margin: 0; }
.wrap {
  max-width: 1080px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main.wrap { display: grid; gap: 5rem; padding-block: 3rem 5rem; }
.label { font-size: .72rem; font-weight: 400; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.label a { text-decoration: none; }
.small { font-size: .875rem; color: var(--muted); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 44ch; }
.price { font-variant-numeric: tabular-nums; color: var(--muted); letter-spacing: .03em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.btn {
  display: inline-block; border: 0; padding: .9rem 1.8rem; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  font: 400 .78rem var(--body); letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
}
.btn:hover { background: color-mix(in srgb, var(--accent) 85%, var(--ink)); }

/* Header & footer */
.site-header, main, .site-footer { position: relative; z-index: 1; }

/* Countdown banner */
.ticker {
  position: relative; z-index: 1; overflow: hidden; white-space: nowrap;
  background: var(--band); color: var(--ink); border-bottom: 1px solid var(--line);
  font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; padding-block: .6rem;
}
.ticker-track { display: inline-block; animation: ticker-scroll 60s linear infinite; will-change: transform; }
.ticker-track span { display: inline-block; padding-inline: 1.4em; }
.ticker-track .ticker-dot { color: var(--gold); padding-inline: 0; font-size: .85em; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }
.bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.5rem; }
.brand { font-family: var(--display); font-size: 1.5rem; font-weight: 500; text-decoration: none; }
.brand span { font-style: italic; color: var(--gold); }
nav { display: flex; gap: 1.75rem; }
nav a { text-decoration: none; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; }
nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 7px; }
.site-footer { border-top: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 2rem; }

/* Home */
.hero { display: grid; gap: 1.5rem; justify-items: start; padding-block: 3rem 1rem; }
.hero h1 { max-width: 14ch; }
.rule { width: 2.5rem; height: 1px; background: var(--gold); border: 0; margin: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.5rem; }
.section-head a { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; }

/* Featured ring */
.carousel { display: grid; justify-items: center; gap: 1.75rem; text-align: center; }
.ring {
  --size: clamp(190px, 30vw, 320px); --step: calc(var(--size) * .78); --drop: calc(var(--size) * .1);
  position: relative; width: 100%; height: calc(var(--size) * 1.12); margin: 0; padding: 0; list-style: none;
  overflow: hidden; touch-action: pan-y;
}
.disc-item {
  position: absolute; left: 50%; top: calc(var(--size) * .06); width: var(--size); aspect-ratio: 1;
  transform: translateX(-50%) translateX(calc(var(--d) * var(--step))) translateY(calc(var(--ad) * var(--drop))) scale(calc(1 - var(--ad) * .24));
  z-index: calc(10 - var(--ad)); opacity: calc(1 - var(--ad) * .38);
  transition: transform .7s cubic-bezier(.22, .7, .2, 1), opacity .5s;
}
.disc-item.is-hidden { opacity: 0; pointer-events: none; }
.disc {
  display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 50%; overflow: hidden; cursor: pointer;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .6s, transform .6s;
}
.disc .art { display: grid; width: 100%; height: 100%; aspect-ratio: auto; }
.disc .art svg { width: 50%; }
.is-centre .disc {
  transform: translateY(calc(var(--size) * -.05));
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 7px var(--paper), 0 0 0 8px color-mix(in srgb, var(--gold) 45%, transparent),
              0 28px 48px -12px rgb(0 0 0 / .65);
}
.ring-controls { display: grid; grid-template-columns: auto minmax(0, 22rem) auto; align-items: center; gap: 1.5rem; }
.ring-caption { display: grid; gap: .2rem; min-height: 5.5rem; align-content: start; }
.ring-caption h3 { font-size: 1.4rem; }
.ring-caption .price span { color: var(--ink); }
.arrow {
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center; cursor: pointer; border-radius: 50%;
  background: none; color: var(--ink); border: 1px solid var(--line); font: 300 1.1rem var(--body);
}
.arrow:hover { border-color: var(--gold); color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .disc-item, .disc { transition: none; } }

/* All designs */
.designs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 3rem 1.75rem; }
.design { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.design-body { display: grid; gap: .45rem; }
.design .price span { color: var(--ink); }
.note { font-size: .9rem; color: var(--gold); }
.sold .art { opacity: .45; }
.design.is-target h3 { color: var(--gold); }

/* How to order */
.order { display: grid; gap: 1.25rem; justify-items: start; max-width: 40rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding-left: 2.25rem; color: var(--muted); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: .05em; font-family: var(--display); font-size: 1.6rem; line-height: 1; color: var(--gold); }
.steps strong { font-weight: 400; color: var(--ink); }
.art {
  aspect-ratio: 4 / 5; max-width: 100%; display: grid; place-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--tint) 8%, var(--surface));
}
.art svg { width: 56%; height: auto; }
.art img { width: 100%; height: 100%; object-fit: cover; }

/* Designs page header and filters */
.shop-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.filters { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.filters button {
  border: 0; background: none; padding: 0; color: var(--muted); cursor: pointer;
  font: 400 .78rem var(--body); letter-spacing: .2em; text-transform: uppercase;
}
.filters button[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 7px; }

/* Snowfall (homepage) */
#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

/* Text pages (404) */
.text-page { display: grid; gap: 1rem; max-width: 62ch; }
.text-page h2 { font-size: 1.4rem; margin-top: 1rem; }
.text-page ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.text-page a { text-decoration-color: var(--gold); text-underline-offset: 3px; }

@media (max-width: 760px) {
  .ring { --size: 210px; --step: calc(var(--size) * .7); }
  .ring-controls { gap: .75rem; }
  .designs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 1rem; }
  .design h3 { font-size: 1.1rem; }
  .design-body { font-size: .95rem; }
}
.foot a { text-decoration: none; border-bottom: 1px solid var(--line); }
.foot a:hover { border-color: var(--gold); }

/* Opening animation (js/loader.js) */
.loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: hidden;
  background: #0D1A35; cursor: pointer; transition: opacity .6s ease, visibility .6s;
}
.loader video { display: block; pointer-events: none; }
.loader-wide video { width: 100%; height: 100%; object-fit: cover; }
.loader-tall video {
  width: 100%; max-height: 100%; height: auto; object-fit: contain;
  /* fade the top and bottom of the crop into the background so there's no visible edge */
  -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
          mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-skip {
  position: absolute;
  right: calc(max(16px, env(safe-area-inset-right, 0px)) + 4px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  padding: .6rem 1rem; border: 1px solid rgb(244 241 234 / .25); background: none; cursor: pointer;
  color: rgb(244 241 234 / .7); font: 400 .72rem var(--body); letter-spacing: .22em; text-transform: uppercase;
}
.loader-skip:hover { color: var(--gold); border-color: var(--gold); }
html.intro, html.intro body { overflow: hidden; }
html.no-intro .loader { display: none; }
