/* NOTA — mineral vitrine */
:root {
  --ink: #141816;
  --ink-2: #4a524e;
  --line: color-mix(in srgb, var(--ink) 16%, transparent);
  --gold: #b08d57;
  --serif: "Bodoni Moda", "Didot", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --paper: #e6ede8; --deep: #1f5a48; --soft: #cfdcd4;
}
[data-palette="selva"],    [data-tone="selva"]    { --paper: #e6ede8; --deep: #1f5a48; --soft: #d3e0d8; }
[data-palette="oltremare"],[data-tone="oltremare"]{ --paper: #e7ebf3; --deep: #23408a; --soft: #d3dbec; }
[data-palette="terra"],    [data-tone="terra"]    { --paper: #f1eae1; --deep: #8a531f; --soft: #e6d8c6; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color .9s ease;
}
img, svg { display: block; max-width: 100%; height: auto; }
/* Blend needs a painted backdrop inside the page, not the canvas */
main, .foot { background: var(--paper); transition: background-color .9s ease; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--deep); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  transition: background-color .9s ease;
}
.logo svg { width: 96px; height: auto; color: var(--ink); }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 34px); font-size: 15px; }
.nav a { text-decoration: none; }
.nav a:hover, .foot a:hover { text-decoration: underline; text-underline-offset: 4px; }
.selection-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--deep); color: #fff; font-size: 12px; line-height: 20px; text-align: center; transition: background-color .9s; }

/* Watches: photo + wordmark share one SVG coordinate space */
.watch { width: 100%; height: auto; }
/* The photo is multiplied onto a rect painted in the page colour, so its white studio
   background disappears into whatever surface the watch sits on. */
.watch-bg { fill: var(--surface, var(--paper)); transition: fill .9s ease; }
.watch-photo { mix-blend-mode: multiply; filter: brightness(1.03); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gutter);
  align-items: center; min-height: calc(100svh - 72px);
  padding: 0 var(--gutter) 32px;
}
/* Low optical size = sturdier hairlines; the display cut (opsz 96) is too fragile on screen */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; font-optical-sizing: none; font-variation-settings: "opsz" 14; margin: 0; line-height: 1.04; letter-spacing: -.015em; }
.collection-name {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin: 0 0 22px; font-family: var(--serif); font-weight: 500; font-variation-settings: "opsz" 14;
  font-size: clamp(26px, 2.4vw, 34px); color: var(--deep); transition: color .9s;
}
.collection-name span { font-family: var(--sans); font-size: 15px; font-weight: 400; color: var(--ink-2); }
.piece-kicker { margin: 0 0 6px; font-size: 14px; color: var(--deep); font-weight: 500; }
h1 { font-size: clamp(52px, 7.6vw, 120px); font-weight: 500; font-variation-settings: "opsz" 18; }
.lede { max-width: 34ch; margin: 28px 0 40px; font-size: 19px; color: var(--ink-2); }

.stone-picker { border: 0; padding: 0; margin: 0; }
.stone-picker legend { padding: 0; margin-bottom: 14px; font-size: 15px; color: var(--ink-2); }
.stones { display: flex; gap: clamp(14px, 2vw, 26px); flex-wrap: wrap; }
.stone { display: grid; justify-items: center; gap: 10px; font-size: 15px; }
.stone img {
  width: clamp(64px, 6.2vw, 88px); aspect-ratio: 1; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .3s, transform .3s;
}
.stone:hover img { transform: scale(1.04); }
.stone[aria-pressed="true"] img { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--deep); }
.stone[aria-pressed="true"] span { font-weight: 600; }
.stone-note { min-height: 1.6em; margin: 18px 0 0; font-size: 15px; color: var(--ink-2); }

.hero-stage { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.hero-watch { display: block; max-height: 78svh; }
.hero-watch .watch { max-height: 78svh; width: auto; margin-inline: auto; animation: settle .9s cubic-bezier(.2,.8,.2,1) backwards; }
.hero-watch:nth-child(2) .watch { animation-delay: .08s; }
@keyframes settle { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.stage-names { font-weight: 500; grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; margin: 6px 0 0; text-align: center; font-family: var(--serif); font-size: 22px; }

/* Intro */
.intro { padding: clamp(72px, 12vw, 160px) var(--gutter); border-top: 1px solid var(--line); }
.intro p { font-weight: 500; font-variation-settings: "opsz" 14; max-width: 26ch; margin: 0 auto; text-align: center; font-family: var(--serif); font-size: clamp(28px, 3.6vw, 50px); line-height: 1.22; }

/* Sections */
.section-title { font-size: clamp(36px, 5vw, 72px); max-width: 16ch; }
.section-sub { max-width: 52ch; margin: 18px 0 0; color: var(--ink-2); }

.collections { padding: clamp(64px, 9vw, 120px) var(--gutter); background: #fff; }
.col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); margin-top: clamp(40px, 6vw, 72px); }
.col { display: flex; flex-direction: column; }
.col-watch { display: block; background: var(--paper); border-radius: 4px; padding: 4% 0; transition: background-color .9s; }
.col-watch .watch { max-height: 640px; width: auto; margin-inline: auto; }
.col h3 { font-size: clamp(32px, 3.4vw, 48px); margin-top: 28px; }
.col > p { max-width: 46ch; margin: 12px 0 24px; color: var(--ink-2); }

.specs { margin: 0; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.specs dt { color: var(--ink-2); }
.specs dd { margin: 0; }

/* Stones */
.stones-section { padding: clamp(64px, 9vw, 120px) var(--gutter); }
.stone-rows { margin-top: clamp(40px, 6vw, 72px); display: grid; gap: 16px; }
.stone-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 56px); align-items: center;
  padding: clamp(20px, 3vw, 36px); background: var(--soft); border-radius: 4px;
}
.stone-disc { width: clamp(120px, 14vw, 200px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; box-shadow: inset 0 0 0 1px #0002; }
.stone-copy h3 { font-size: clamp(32px, 3.6vw, 52px); color: var(--deep); }
.mineral { margin: 6px 0 14px; font-weight: 500; }
.stone-copy p:last-child { max-width: 40ch; margin: 0; color: var(--ink-2); }
.stone-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.thumb { display: grid; gap: 8px; justify-items: center; padding: 10px 0 14px; background: color-mix(in srgb, #fff 55%, var(--soft)); border-radius: 3px; font-size: 15px; transition: background-color .25s; }
.thumb:hover { background: #fff; }
.thumb .watch { max-height: 260px; width: auto; --surface: color-mix(in srgb, #fff 55%, var(--soft)); }
.thumb:hover .watch { --surface: #fff; }

/* Composition */
.composition { padding: clamp(80px, 13vw, 180px) var(--gutter); background: var(--deep); color: #f4f5f2; transition: background-color .9s; }
.quote { font-weight: 500; font-variation-settings: "opsz" 14; max-width: 24ch; margin: 0; font-family: var(--serif); font-size: clamp(32px, 4.6vw, 66px); line-height: 1.14; }
.quote-tail { margin: 32px 0 0; font-size: 19px; opacity: .8; }

/* Footer */
.foot { padding: clamp(48px, 7vw, 96px) var(--gutter) 28px; }
.foot-mark { width: 100%; height: auto; color: var(--ink); }
.foot-row { display: grid; grid-template-columns: 1.4fr auto auto; gap: 24px 48px; align-items: start; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.foot-row p { margin: 0; max-width: 46ch; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot nav a { text-decoration: none; color: var(--ink); }
.foot nav button { color: var(--ink); }
.foot nav button:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Dialogs */
.sheet {
  width: min(1040px, calc(100% - 32px)); max-height: calc(100svh - 32px); padding: 0; border: 0; border-radius: 6px;
  background: var(--paper); color: var(--ink); overflow: auto;
}
.sheet::backdrop { background: #0d100e99; backdrop-filter: blur(3px); }
.sheet[open] { animation: rise .35s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.close { position: absolute; top: 12px; right: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; font-size: 26px; line-height: 1; }
.close:hover { background: #0000000d; }
.piece { display: grid; grid-template-columns: 1.05fr 1fr; }
.piece-watch { background: #fff; display: grid; place-items: center; }
.piece-watch .watch { max-height: min(78svh, 640px); width: auto; --surface: #fff; }
.piece-info { padding: clamp(28px, 4vw, 48px); }
.piece-info h2 { font-size: clamp(34px, 3.6vw, 50px); padding-right: 40px; }
.piece-info > p { margin: 14px 0 26px; color: var(--ink-2); max-width: 44ch; }
.choice { margin-bottom: 20px; }
.choice-label { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip, .chip-stone { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; }
.chip { padding: 8px 16px; }
.chip-stone img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.chip[aria-pressed="true"], .chip-stone[aria-pressed="true"] { border-color: var(--ink); background: #fff; font-weight: 600; }
.piece-info .specs { margin-top: 26px; }
.piece-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.btn { padding: 13px 22px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 500; font-size: 15px; }
.btn:hover { background: var(--deep); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }

.sheet.narrow { width: min(560px, calc(100% - 32px)); padding: clamp(24px, 4vw, 40px); }
.sheet.narrow h2 { font-size: 38px; margin-bottom: 20px; }
.saved-list { list-style: none; margin: 0; padding: 0; }
.saved-list li { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.saved-thumb { background: #fff; border-radius: 3px; }
.saved-thumb .watch { max-height: 110px; width: auto; margin: 0 auto; --surface: #fff; }
.saved-name { font-weight: 500; margin: 0; font-family: var(--serif); font-size: 22px; }
.remove { font-size: 14px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.empty { margin: 0; color: var(--ink-2); }
.fine { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.sheet.narrow > .fine { margin-top: 20px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px);
  padding: 11px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 24px; }
  .hero-stage { order: -1; }
  .hero-watch .watch { max-height: 52svh; }
  .stone-row { grid-template-columns: auto 1fr; }
  .stone-pair { grid-column: 1 / -1; }
  .piece { grid-template-columns: 1fr; }
  .piece-watch .watch { max-height: 46svh; }
  .foot-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav a { display: none; }
  .col-grid { grid-template-columns: 1fr; gap: 56px; }
  .stone-row { grid-template-columns: 1fr; }
  .stone-disc { width: 120px; }
  .stage-names { font-size: 18px; }
  .specs div { grid-template-columns: 6.5em 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
