/* Base: reset, typography, focus, shared primitives (buttons, links, tags, hallmark). Port of prototype/css/base.css. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Author display rules (.tag, img, svg, grid/flex components) would otherwise beat the hidden attribute. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.has-open-nav {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p,
figure,
dl,
dd,
ol,
ul {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

/* Headings: Caslon Display only at ≥28px; emphasis word in Caslon Text italic. */
h2,
.h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 em,
.h2 em,
.hero__title em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold-text);
}

h3 {
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: var(--lh-snug);
}

p {
  text-wrap: pretty;
}

strong,
b {
  font-weight: 600;
}

.num,
.tabular {
  font-variant-numeric: tabular-nums lining-nums;
}

/* Focus: always visible, never removed. Dark containers override --focus. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.on-ink {
  --focus: var(--gold-on-ink);
}

.sr-only,
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* WordPress/WooCommerce reveal .screen-reader-text links on focus (e.g. «skip to» links). */
.screen-reader-text:focus {
  z-index: 100;
  width: auto;
  height: auto;
  margin: 0;
  padding: var(--s-3) var(--s-4);
  clip: auto;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
}

.skip-link {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform var(--dur-fast) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Eyebrow: small caps label above headings. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
  color: var(--gold-text);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
}

.on-ink .eyebrow {
  color: var(--gold-on-ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  min-height: 48px;
  padding: 0 var(--s-5);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transition:
    background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.btn__icon {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform var(--dur-fast) var(--ease);
}

.btn:hover .btn__icon {
  transform: translateX(3px);
}

.btn--gold {
  background: var(--gold);
  color: var(--ink);
}

.btn--gold:hover {
  background: var(--gold-hover);
}

.btn--dark {
  background: var(--ink);
  color: var(--on-ink);
}

.btn--dark:hover {
  background: #33312a;
}

.btn--line {
  border-color: var(--field-border);
  background: transparent;
  color: var(--ink);
}

.btn--line:hover {
  border-color: var(--ink);
  background: var(--surface);
}

.btn--line-on-ink {
  border-color: #6d695d;
  color: var(--on-ink);
}

.btn--line-on-ink:hover {
  border-color: var(--gold-on-ink);
  color: var(--gold-on-ink);
}

.btn--sm {
  min-height: 40px;
  padding: 0 var(--s-4);
  font-size: var(--fs-sm);
}

.btn--block {
  width: 100%;
  justify-content: space-between;
  white-space: normal;
  text-align: left;
}

@media (max-width: 559px) {
  .btn {
    white-space: normal;
  }
}

/* Text link with animated gold underline. */
.link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: color var(--dur-fast) var(--ease);
}

.link:hover {
  color: var(--gold-text);
}

.link svg {
  width: 14px;
  height: 14px;
}

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-soft);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tag--example {
  border-style: dashed;
  border-color: var(--gold-ui);
  color: var(--gold-text);
}

/* Hallmark: the punch-mark cartouche (750 · 916 · 999) — brand signature. */
.hallmark {
  display: inline-grid;
  place-items: center;
  min-width: 3.4em;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 3px;
  outline: 1px solid currentColor;
  outline-offset: 2px;
  color: var(--gold-text);
  font-size: var(--fs-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.08em;
  line-height: 1.3;
}

/* Status dot (open/closed) — always next to text. */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--muted);
}

.is-open .status-dot {
  background: var(--open);
  box-shadow: 0 0 0 3px rgba(63, 107, 79, 0.18);
}

.is-closed .status-dot {
  background: var(--closed);
}

.on-ink .is-open .status-dot,
.on-ink.is-open .status-dot {
  background: var(--open-on-ink);
  box-shadow: 0 0 0 3px rgba(134, 199, 156, 0.2);
}

.on-ink .is-closed .status-dot,
.on-ink.is-closed .status-dot {
  background: var(--closed-on-ink);
}

/* Photo placeholders until the real photo session (intentional, labelled). */
.photo-slot {
  position: relative;
  display: grid;
  place-items: end start;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 80% 10%, rgba(187, 155, 96, 0.18), transparent 60%),
    repeating-linear-gradient(135deg, rgba(25, 25, 20, 0.035) 0 1px, transparent 1px 9px),
    var(--stone);
}

.photo-slot__label {
  margin: var(--s-3);
  padding: 4px 8px;
  background: rgba(250, 249, 246, 0.9);
  color: var(--text-soft);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Mark of a link that opens a new tab (Markup\new_tab_icon(), Blocks\NewTab): a small arrow
   after the text; its accessible name is «pestaña nueva». */
svg.new-tab[role='img'] {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  flex: none;
  vertical-align: baseline;
  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Windows high contrast (WCAG 1.4.11): the light logo keeps its dark plate and every selected
   state that relied on a background or a shadow gets a system-colour outline. */
@media (forced-colors: active) {
  .brand__mark {
    forced-color-adjust: none;
    background: #191914;
  }

  .calc__metal label:has(input:checked),
  .karat-chip:has(input:checked),
  .process__tab[aria-selected='true'],
  .hero__tab[aria-selected='true'],
  .store-tab[aria-selected='true'],
  .price-table tr.is-picked th {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }

  .price-bar,
  .status-dot {
    forced-color-adjust: none;
  }
}
