/* Alvarado Jewelers. base layer only: resets, fonts, the single focus token,
   and motion preferences. All layout and component styling is inline on the
   element so it paints as the page streams. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h, 112px); }

[data-anchor] { scroll-margin-top: calc(var(--header-h, 112px) + 1rem); }
[data-subnav] ~ [data-anchor] { scroll-margin-top: calc(var(--header-h, 112px) + 4.5rem); }

/* Five loaded faces, not four: Cormorant Garamond 400, 600 and 400 italic, plus
   Work Sans 400 and 500. The italic is a real face rather than a synthetic
   slant, which the quote headings on the repair page depend on. */
body {
  margin: 0;
  background: var(--warm-white);
  color: var(--charcoal);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: var(--lh-tight); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; }
img { max-width: 100%; display: block; }

a { color: var(--gold-text); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--charcoal); text-decoration-thickness: 2px; }

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

/* ---- The one focus indicator. 2px, 3:1 against warm-white, cream and charcoal. ---- */
:focus { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
:focus:not(:focus-visible) { outline: none; }
:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-sm);
}
/* Focus rings must never be clipped by a card or grid that hides overflow. */
[data-clip-safe] { overflow: visible; }

/* Skip link: first in tab order, hidden until focused. */
.skip-link {
  position: absolute; left: var(--space-md); top: var(--space-md);
  transform: translateY(-200%);
  z-index: 200;
  background: var(--charcoal); color: var(--white);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  text-decoration: none; font-size: var(--step--1);
  letter-spacing: 0.04em;
}
.skip-link:focus { transform: translateY(0); }

main:focus { outline: none; }

/* Button shine: a soft band of light sweeps left to right on hover and focus. */
[data-btn]::after {
  content: ""; position: absolute; inset: -1px; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255,250,235,0.55) 50%, transparent 65%);
  transform: translateX(-110%);
}
[data-btn="ghost"]::after { background: linear-gradient(110deg, transparent 35%, rgba(201,169,110,0.30) 50%, transparent 65%); }
[data-btn]:hover::after, [data-btn]:focus-visible::after {
  transform: translateX(110%);
  transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- Interaction layer ---- */
[data-btn] { will-change: transform; }
[data-btn]:active { transform: translateY(0) scale(0.98) !important; transition-duration: 120ms !important; }

/* Images inside any link ease in slightly on hover and keyboard focus. */
[data-clip-safe] img, [data-clip-safe] > svg { transition: transform 1100ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 600ms ease; }
@media (hover: hover) {
  a:hover [data-clip-safe] img { transform: scale(1.045); }
  a:hover [data-clip-safe] > svg { transform: rotate(45deg) scale(1.1); }
}
a:focus-visible [data-clip-safe] img { transform: scale(1.045); }

/* Text links with an arrow: the underline draws in, the arrow steps forward. */
[data-link] {
  text-decoration: none !important;
  display: inline-flex; align-items: center; gap: 0.5em;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  padding-bottom: 3px;
  transition: background-size 500ms cubic-bezier(0.22, 0.61, 0.36, 1), color 300ms ease;
}
[data-link]::after { content: "\2192"; transition: transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1); }
[data-link]:hover, [data-link]:focus-visible { background-size: 100% 1px; }
[data-link]:hover::after, [data-link]:focus-visible::after { transform: translateX(5px); }

/* Desktop nav: a gold rule grows from the centre instead of snapping on. */
[data-nav-desktop] [data-nav-link] {
  border-bottom-color: transparent !important;
  background: linear-gradient(var(--gold), var(--gold)) no-repeat 50% 100% / 0 2px;
  transition: color 300ms ease, background-size 450ms cubic-bezier(0.22, 0.61, 0.36, 1) !important;
}
[data-nav-desktop] [data-nav-link]:hover, [data-nav-desktop] [data-nav-link]:focus-visible, [data-nav-desktop] [data-nav-link][data-active="true"] { background-size: 100% 2px; }

/* Header scroll progress */
[data-scroll-progress] { transform: scaleX(0); transform-origin: left; }

::selection { background: var(--gold); color: var(--white); }

@keyframes alv-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reduced motion: every transition, transform and reveal is off. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  a:hover [data-clip-safe] img, a:hover [data-clip-safe] > svg, a:focus-visible [data-clip-safe] img { transform: none; }
  [data-scroll-progress] { display: none; }
}

/* Text-spacing override (WCAG 1.4.12) safety: nothing relies on a fixed height
   that would clip at 1.5 line-height / 0.12em letter-spacing. */
@media (max-width: 480px) {
  :root { --measure: 100%; }
}

[data-svc-card]:hover [data-mk-icon]{transform:translateY(-3px)}
@media (prefers-reduced-motion:reduce){[data-svc-card]:hover [data-mk-icon]{transform:none}}
