/* Shared look for the shop, the customer account and the admin desk: midnight navy, brass and gold foil. */
:root {
  --paper: #0D1730;
  --surface: #14224A;
  --panel: #182A58;
  --ink: #F2ECDF;
  --muted: #A9B4CE;
  --gold: #D4B474;
  --gold-hi: #F0D9A0;
  --line: rgba(242, 236, 223, 0.14);
  --ok: #7FCBA4;
  --warn: #F2B36B;
  --bad: #EE8A8A;
  --brass-hi: #E9D19C;
  --brass-lo: #8A6B37;
  --foil: linear-gradient(100deg, #8a6a2a 0%, #c9a253 22%, #fff1c4 42%, #e3c47e 52%, #a9843d 70%, #f3dc9c 86%, #8a6a2a 100%);
  --foil-silver: linear-gradient(100deg, #6f747d 0%, #b9bec7 22%, #ffffff 42%, #d4d8df 52%, #8d929b 70%, #eef0f4 86%, #6f747d 100%);
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --body: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --sgraffito: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 20'%3E%3Cpath d='M0 10L12.5 2L25 10M0 10L12.5 18L25 10' fill='none' stroke='black' stroke-width='1.4'/%3E%3Ccircle cx='12.5' cy='10' r='1.9'/%3E%3C/svg%3E");
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; overflow-x: clip; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; text-wrap: balance; margin: 0; line-height: 1.08; }
p { margin: 0; }
a { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold); }
.band { height: 16px; background: var(--gold); -webkit-mask: var(--sgraffito) repeat-x center / 25px 16px; mask: var(--sgraffito) repeat-x center / 25px 16px; }
.h2, .section-head h2 { font-size: clamp(34px, 4.6vw, 52px); margin-top: 12px; }
.lede { margin-top: 16px; max-width: 48ch; color: var(--muted); font-size: 17px; }

/* Header */
header.site { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(13, 23, 48, 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.wordmark { display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; line-height: 1; }
.wordmark small { font-size: 9px; font-weight: 500; letter-spacing: 0.6em; color: var(--gold); }
.wordmark span { font-family: var(--display); font-size: 26px; letter-spacing: 0.1em; }
nav.links { display: flex; gap: 24px; font-size: 14px; }
nav.links a { text-decoration: none; color: var(--muted); position: relative; }
nav.links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform 0.25s ease; }
nav.links a:hover { color: var(--ink); }
nav.links a:hover::after { transform: scaleX(1); }
@media (max-width: 880px) { nav.links { display: none; } }
.head-actions { display: flex; gap: 8px; align-items: center; }
@media (max-width: 420px) { .wordmark span { font-size: 21px; } .head-actions { gap: 6px; } .head-actions .ghost, .head-actions .cart-btn { padding: 0 12px; font-size: 13px; } .head-actions .cart-btn { gap: 6px; } }
.cart-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 1px solid var(--gold); border-radius: 999px; background: transparent; cursor: pointer; font-size: 14px; }
.cart-btn .count { min-width: 22px; height: 22px; border-radius: 11px; background: var(--gold); color: var(--paper); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.cart-btn.bump { animation: bump 0.5s ease; }
@keyframes bump { 40% { transform: scale(1.12); } }

/* Buttons and fields */
.primary { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border: 0; border-radius: 999px; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #0D1730; font-weight: 500; letter-spacing: 0.06em; cursor: pointer; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 6px 18px rgba(212, 180, 116, 0.22); position: relative; overflow: hidden; }
.primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,0.55), rgba(255,255,255,0)); transform: skewX(-20deg); transition: left 0.6s ease; }
.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(212, 180, 116, 0.34); }
.primary:hover::after { left: 120%; }
.primary:active { transform: translateY(1px); }
.primary[disabled] { opacity: 0.5; cursor: progress; }
.ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; font-size: 14px; text-decoration: none; transition: border-color 0.2s ease; }
.ghost.big { min-height: 52px; padding: 0 24px; font-size: 15px; }
.ghost:hover { border-color: var(--gold); }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; font-size: 26px; line-height: 1; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field .label { font-size: 12px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }
.hint { font-size: 13px; color: var(--muted); }
.hint.warn { color: var(--gold-hi); }
.text-input { min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); font-size: 17px; width: 100%; transition: border-color 0.2s ease; }
.text-input:focus { border-color: var(--gold); outline: none; }
.row-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.row-label output, .color-name { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.seg button { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; font-size: 14px; }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold-hi); }
.seg .f-serif { font-family: var(--display); font-size: 19px; font-weight: 600; }
.seg .f-script { font-family: var(--script); font-size: 22px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--c) center / 260% auto; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); transition: transform 0.2s ease; }
.swatch:hover { transform: translateY(-2px); }
.swatch[aria-pressed="true"]::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--gold); }
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 6px; }
.price { font-family: var(--display); font-size: 34px; font-variant-numeric: tabular-nums; }
.price small { display: block; font-family: var(--body); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.err { font-size: 13px; color: var(--gold-hi); }
.demo-note { font-size: 12px; color: var(--muted); }

/* The real card photo under the foil die */
.bench { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.stage { position: relative; width: min(480px, 100%); padding-top: 84px; perspective: 1400px; touch-action: pan-y; }
.tilt { transform-style: preserve-3d; transition: transform 0.25s ease-out; }
.die { position: absolute; top: 0; left: var(--die-x, 50%); width: 112px; height: 52px; margin-left: -56px; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--brass-hi), var(--brass-lo)); box-shadow: 0 6px 14px rgba(0,0,0,0.35); z-index: 6; }
.die::before { content: ""; position: absolute; left: 50%; top: -400px; width: 18px; height: 400px; margin-left: -9px; background: linear-gradient(90deg, #4f5563, #a3a9b8, #4f5563); }
.die::after { content: "HOT FOIL · 120 °C"; position: absolute; inset: auto 0 6px; text-align: center; font-size: 7.5px; letter-spacing: 0.28em; color: rgba(40, 28, 10, 0.75); }
.foil { position: absolute; left: -6%; right: -6%; top: var(--foil-y, 80%); height: var(--foil-h, 40px); margin-top: calc(var(--foil-h, 40px) / -2); z-index: 5; background: var(--foil); background-size: 200% 100%; opacity: 0; transform: translateX(110%); box-shadow: 0 4px 10px rgba(0,0,0,0.35); pointer-events: none; }
.card3d { position: relative; width: 100%; aspect-ratio: 900 / 632; transform-style: preserve-3d; transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.card3d.flipped { transform: rotateY(180deg); }
/* The photos are cut out along the card's own edge (transparent around it), so the shadow follows the card, not a box. */
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--c-face) center / 100% 100% no-repeat; filter: drop-shadow(0 24px 26px rgba(0, 0, 0, 0.5)); container-type: inline-size; }
.face::after { content: ""; position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255,255,255,0.12), rgba(255,255,255,0) 40%); pointer-events: none; -webkit-mask: var(--c-face) center / 100% 100% no-repeat; mask: var(--c-face) center / 100% 100% no-repeat; }
.back { transform: rotateY(180deg); background: none; }
.back .photo { position: absolute; inset: 0; background: var(--c-face) center / 100% 100% no-repeat; transform: scaleX(-1); }
.stage.draggable { cursor: grab; }
.stage.dragging { cursor: grabbing; }
.stage.dragging .card3d { transition: none; }
.rotate-hint { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.rotate-hint svg { width: 18px; height: 18px; stroke: var(--gold); fill: none; stroke-width: 1.8; stroke-linecap: round; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
.back .rfid { position: absolute; left: 50%; top: 62%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; color: rgba(255,255,255,0.7); mix-blend-mode: overlay; z-index: 2; font-size: 10px; letter-spacing: 0.4em; margin-right: -0.4em; }
.back .rfid svg { width: 34px; height: 34px; }
/* Where the supplier stamps it (from customer review photos): centred horizontally, on the lower part of the front. */
.stamp { position: absolute; left: 50%; top: 80%; transform: translate(-50%, -50%); z-index: 2; white-space: nowrap; font-family: var(--display); font-weight: 700; font-size: 30px; font-size: 8.4cqw; letter-spacing: 0.06em; line-height: 1; background: var(--foil); background-size: 250% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 1px 0 rgba(0,0,0,0.55)); }
.stamp.long { font-size: 24px; font-size: 6.8cqw; }
.stamp.silver, .stage.silver .foil { background-image: var(--foil-silver); }
.stamp.silver { background-size: 250% 100%; }
.stamp.script { font-family: var(--script); font-weight: 400; font-size: 38px; font-size: 10.5cqw; letter-spacing: 0; padding: 0.1em 0.14em 0.18em; }
.stamp.script.long { font-size: 30px; font-size: 8.6cqw; }
.bench-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.spec { font-size: 13px; color: var(--muted); text-align: center; letter-spacing: 0.04em; }

/* Hot foil sequence: foil slides in, the die presses, the foil peels off, the gold catches the light. */
.stage.intro .card3d { animation: arrive 1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(50px) rotateX(22deg) rotateZ(-5deg); } }
.stage.stamping .foil { animation: foil 1.9s cubic-bezier(0.5, 0, 0.3, 1) both; }
.stage.stamping .die { animation: press 1.9s cubic-bezier(0.5, 0, 0.3, 1); }
.stage.stamping .card3d { animation: give 1.9s ease; }
.stage.stamping .stamp { animation: reveal 1.9s ease both, shine 1.6s ease 1.5s both; }
@keyframes foil { 0% { opacity: 1; transform: translateX(110%); } 22%, 62% { opacity: 1; transform: translateX(0); background-position: 0 0; } 84% { opacity: 0.9; transform: translateX(-112%) rotate(-3deg); } 100% { opacity: 0; transform: translateX(-112%); } }
@keyframes press { 0%, 24% { transform: translateY(0); box-shadow: 0 6px 14px rgba(0,0,0,0.35); } 40%, 52% { transform: translateY(var(--drop, 200px)); box-shadow: 0 0 26px 4px rgba(255, 140, 60, 0.55); } 70%, 100% { transform: translateY(0); box-shadow: 0 6px 14px rgba(0,0,0,0.35); } }
@keyframes give { 0%, 38% { transform: scale(1); } 46% { transform: scale(0.985); } 60%, 100% { transform: scale(1); } }
@keyframes reveal { 0%, 60% { opacity: 0; } 70%, 100% { opacity: 1; } }
@keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* Card thumbnails (tiles) with the engraving shown where it will be */
.tile { position: relative; aspect-ratio: 900 / 632; width: 100%; background: var(--c-face) center / 100% 100% no-repeat; filter: drop-shadow(0 12px 16px rgba(0,0,0,0.4)); transition: transform 0.3s ease; container-type: inline-size; }
.stamp-mini { position: absolute; left: 50%; top: 80%; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 700; font-size: 8cqw; color: var(--gold-hi); white-space: nowrap; text-shadow: 0 1px 0 rgba(0,0,0,0.5); }
.stamp-mini.silver { color: #E6E9EF; }
.seg .foil-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: -2px; background: var(--foil); }
.seg .foil-dot.silver { background: var(--foil-silver); }

/* Sections */
section.block { padding-block: 88px; border-top: 1px solid var(--line); }
section.block.alt { background: var(--surface); }
.section-head { display: flex; flex-direction: column; gap: 4px; max-width: 660px; }
.section-head p { color: var(--muted); margin-top: 10px; }
.faq { margin-top: 32px; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding-block: 18px; }
.faq summary { cursor: pointer; font-family: var(--display); font-size: 22px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); transition: transform 0.3s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 10px; color: var(--muted); max-width: 62ch; animation: drop 0.35s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
footer.site { padding-block: 48px 64px; border-top: 1px solid var(--line); }
footer.site .wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
footer.site .band { width: 220px; }
footer.site p { font-size: 13px; color: var(--muted); }
footer.site nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: 13px; }
footer.site nav a { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: var(--panel); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-pending { color: var(--muted); } .s-new { color: var(--gold-hi); } .s-ordered { color: #9DB7F5; } .s-shipped { color: #C3A6F2; } .s-delivered { color: var(--ok); } .s-problem { color: var(--warn); } .s-cancelled { color: var(--muted); }

/* Scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--d, 0s); }
[data-reveal].seen { opacity: 1; transform: none; }

/* Drawers and dialogs */
.scrim { position: fixed; inset: 0; background: rgba(5, 9, 20, 0.6); z-index: 40; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.scrim.open { opacity: 1; pointer-events: auto; }
aside.cart { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); z-index: 50; background: var(--paper); border-left: 1px solid var(--line); transform: translateX(100%); visibility: hidden; transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.45s; display: flex; flex-direction: column; padding: calc(20px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) 20px; overflow-y: auto; }
aside.cart.open { transform: translateX(0); visibility: visible; transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 28px; }
.cart-items { display: flex; flex-direction: column; gap: 4px; padding-block: 12px; }
.line-item { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding-block: 12px; border-bottom: 1px solid var(--line); }
.line-item .tile { width: 76px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.35)); }
.line-item .meta { min-width: 0; font-size: 14px; }
.line-item .meta strong { font-family: var(--display); font-size: 19px; font-weight: 500; display: block; }
.line-item .meta span { color: var(--muted); display: block; overflow-wrap: anywhere; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.empty { padding-block: 40px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.cart-foot { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 14px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: space-between; font-family: var(--display); font-size: 24px; font-variant-numeric: tabular-nums; }
.checkout { display: flex; flex-direction: column; gap: 12px; }
.checkout .text-input { font-size: 15px; min-height: 44px; }
.two { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr); gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--gold); }
.thanks { padding: 16px; border: 1px solid var(--gold); border-radius: 6px; font-size: 14px; display: flex; flex-direction: column; gap: 10px; }
.thanks strong { font-family: var(--display); font-size: 22px; font-weight: 500; }
.modal { position: fixed; left: 50%; top: 50%; z-index: 60; width: min(440px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; padding: 28px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,0.6); transform: translate(-50%, -46%) scale(0.97); opacity: 0; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease; display: flex; flex-direction: column; gap: 16px; }
.modal.open { transform: translate(-50%, -50%); opacity: 1; }
.modal h2 { font-size: 32px; }
.modal .close { position: absolute; right: 10px; top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
