/* ============================================================================
   ADRIANO JEWELRY · components.css
   Component language (CLAUDE.md §1.2 Component Language / Nav / §1.4 Footer):
   kickers · hairline rules · buttons · cards · forms · image-slot placeholders
   · header + scroll glass · mobile overlay nav · global footer · P1 shell intro.
   All hover affordances gated behind @media (hover: hover) so touch never sticks.
   Depends on tokens.css + base.css.
   ============================================================================ */

/* ---- Kicker — uppercase champagne-gold label (11–12px, 0.22em) ----------- */
.kicker {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-kicker);
  font-weight: 500;
  letter-spacing: var(--ls-kicker);
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.4;
}
.kicker--dim { color: var(--local-dim, var(--text-dim)); }
/* On cream paper chapters the light champagne accent is too pale — use the
   AA-safe darker gold for kickers and the fading rule. */
.chapter--paper .kicker { color: var(--accent-ink); }
.chapter--paper .rule-gold { background: linear-gradient(90deg, transparent, var(--accent-ink), transparent); }

/* ---- Hairline rules ------------------------------------------------------- */
/* The one permitted gradient per page: a 1px gold hairline fading at both ends. */
.rule-gold {
  width: min(120px, 40%);
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.rule-gold--full { width: 100%; }
.hairline { border: 0; border-top: 1px solid var(--line); width: 100%; }

/* ---- Buttons — two variants only. Radius 2px. Never a drop shadow. -------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 44px;               /* tap target */
  padding: 0.85em 1.6em;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: color var(--dur-micro) var(--ease-out),
              background-color var(--dur-micro) var(--ease-out),
              border-color var(--dur-micro) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}

/* Primary — 1px gold border, transparent fill, gold text → fills gold on hover */
.btn--primary {
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
}
@media (hover: hover) {
  .btn--primary:hover {
    color: var(--bg);
    background: var(--accent);
    transform: translateY(-1px);
  }
}
.btn--primary:active { transform: translateY(0); }

/* Ghost — text + 1px underline that draws in from the left */
.btn--ghost {
  color: var(--text);
  background: transparent;
  border: 0;
  padding-inline: 0.15em;
  position: relative;
  text-transform: uppercase;
}
.btn--ghost::after {
  content: "";
  position: absolute;
  left: 0.15em; right: 0.15em; bottom: 0.55em;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-micro) var(--ease-out);
}
@media (hover: hover) {
  .btn--ghost:hover { color: var(--accent-bright); }
  .btn--ghost:hover::after { transform: scaleX(1); }
}
.btn--ghost:focus-visible::after { transform: scaleX(1); }
/* On cream: ink text, dark-gold hover + underline (champagne is ~1.8:1 there). */
.chapter--paper .btn--ghost { color: var(--ink); }
.chapter--paper .btn--ghost::after { background: var(--accent-ink); }
@media (hover: hover) {
  .chapter--paper .btn--ghost:hover { color: var(--accent-ink); }
}

/* Inline ghost link with arrow — "View →" caption links */
.ghost-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  position: relative;
}
.ghost-link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-micro) var(--ease-out);
}
@media (hover: hover) { .ghost-link:hover::after { transform: scaleX(1); } }
.ghost-link:focus-visible::after { transform: scaleX(1); }

/* ---- Cards — surface panel, hairline border, no shadow at rest ------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--dur-micro) var(--ease-out);
}
.card__media { overflow: hidden; border-radius: inherit; } /* fixed mask */
.card__media > img,
.card__media > .imgslot {
  transition: transform var(--dur-card) var(--ease-out);
}
@media (hover: hover) {
  .card:hover { border-color: var(--accent-soft); }
  .card:hover .card__media > img,
  .card:hover .card__media > .imgslot { transform: scale(1.03); }
}

/* ---- Image unveil — the clip-wipe motif (bottom→top) inside a .reveal ------
   .wipe sits on the media box (not the img) so the card hover-zoom transform
   never fights the clip transition. Visible by default: only .js hides it, a
   failsafe un-clips it if reveal.js never runs, focus always un-clips it, and
   reduced-motion never clips at all. */
.js .reveal .wipe { clip-path: inset(100% 0 0 0); }
.js .reveal.is-visible .wipe {
  clip-path: inset(0 0 0 0);
  transition: clip-path calc(var(--dur-reveal) + 150ms) var(--ease-out);
  transition-delay: calc(var(--reveal-delay, 0ms) + 60ms);
}
.js .reveal:focus-within .wipe { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal .wipe { animation: wipeFailsafe 0.01s linear 1.6s forwards; }
  .js .reveal.is-visible .wipe { animation: none; }
}
@keyframes wipeFailsafe { to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal .wipe { clip-path: none; animation: none; }
}

/* ---- Image-slot placeholders — elegant even before photos arrive ---------- */
.imgslot {
  display: grid;
  place-items: center;
  width: 100%;
  background: var(--placeholder);
  border: 1px solid var(--line);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 1rem;
  /* callers set aspect-ratio inline, e.g. style="aspect-ratio:4/5" (zero CLS) */
}

/* ---- Forms — underline inputs, floating labels (used from P4) ------------- */
.field { position: relative; padding-top: 1.1rem; }
.field__input {
  width: 100%;
  padding: 0.5rem 0 0.55rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  border-radius: 0;              /* no iOS default rounding */
  transition: border-color var(--dur-micro) var(--ease-out);
}
.field__input::placeholder { color: transparent; } /* float-label technique */
.field__input:focus { outline: none; border-bottom-color: var(--accent); }
.field__label {
  position: absolute;
  left: 0; top: 1.35rem;
  color: var(--local-dim, var(--text-dim));
  pointer-events: none;
  transform-origin: left top;
  transition: transform var(--dur-micro) var(--ease-out),
              color var(--dur-micro) var(--ease-out);
}
.field__input:focus + .field__label,
.field__input:not(:placeholder-shown) + .field__label {
  transform: translateY(-1.35rem) scale(0.78);
  color: var(--accent);
}
/* Autofill-safe: keep the dark surface, don't let UA paint white boxes */
.field__input:-webkit-autofill,
.field__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  transition: background-color 5000000s ease-in-out 0s;
}
.field--error .field__input { border-bottom-color: var(--danger); }
.field__error { display: block; margin-top: 0.4rem; font-size: var(--fs-small); color: var(--danger-text); }

/* ===========================================================================
   HEADER — transparent over hero → glass after 80px scroll (solid fallback)
   =========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  /* Grow the box by the notch inset (padding eats into height under border-box),
     so the 68px content bar is preserved below the safe area on notched iOS. */
  height: calc(var(--header-h) + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-micro) var(--ease-out),
              border-color var(--dur-micro) var(--ease-out);
  padding-top: env(safe-area-inset-top);
}
.site-header.is-scrolled {
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-scrolled { background: var(--glass-solid); }
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
}

/* Wordmark */
.brand {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { color: var(--text); }

/* Desktop nav */
.nav-desktop { display: none; }
@media (min-width: 860px) {
  .nav-desktop { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 2.75rem); }
}
.nav-desktop__list { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.25rem); }
.nav-link {
  position: relative;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-block: 0.4rem;
  transition: color var(--dur-micro) var(--ease-out);
}
.nav-link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;   /* underline offset 6px */
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-micro) var(--ease-out);
}
@media (hover: hover) { .nav-link:hover { color: var(--text); } .nav-link:hover::after { transform: scaleX(1); } }
.nav-link[aria-current="page"] { color: var(--accent); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* Burger toggle — an <a> (works via :target without JS), enhanced by nav.js */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;      /* tap target */
  color: var(--text);
  margin-right: -8px;             /* optical edge alignment */
}
@media (min-width: 860px) { .nav-toggle { display: none; } }
.nav-toggle__bars { position: relative; width: 22px; height: 12px; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 1.5px;
  background: currentColor;
  transition: transform var(--dur-micro) var(--ease-out), top var(--dur-micro) var(--ease-out);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: 10px; }

/* ---- Mobile overlay nav — full-screen dark, focus-trapped, oversized serif -*/
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-nav);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding: max(var(--header-h), env(safe-area-inset-top)) var(--gutter) calc(var(--space-2xl) + env(safe-area-inset-bottom));
  /* Landscape / short viewports: let tall menu content scroll within the overlay
     (the __body auto-margins collapse to 0 when there's no free space). */
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--dur-micro) var(--ease-out), visibility var(--dur-micro) var(--ease-out);
}
/* When JS is present (.js on <html>), .is-open is the SOLE open/close authority,
   so a #mobile-nav deep link can never leave :target desynced. No-JS falls back
   to :target so the burger still works. */
html:not(.js) .mobile-nav:target,
.mobile-nav.is-open { visibility: visible; opacity: 1; }
@media (min-width: 860px) { .mobile-nav { display: none; } }

.mobile-nav__top { display: flex; justify-content: flex-end; }
.nav-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; color: var(--text); font-size: 1.75rem; line-height: 1;
}
.mobile-nav__body { margin-block: auto; display: flex; flex-direction: column; }
.mobile-nav__list {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 2vh, 1rem);
}
.mobile-nav__link {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3.25rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  line-height: 1.1;
  /* staggered entrance when the overlay opens */
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
  transition-delay: 0ms;
}
.mobile-nav.is-open .mobile-nav__link,
html:not(.js) .mobile-nav:target .mobile-nav__link { opacity: 1; transform: none; }
/* 40ms stagger */
.mobile-nav__list li:nth-child(1) .mobile-nav__link { transition-delay: 60ms; }
.mobile-nav__list li:nth-child(2) .mobile-nav__link { transition-delay: 100ms; }
.mobile-nav__list li:nth-child(3) .mobile-nav__link { transition-delay: 140ms; }
.mobile-nav__list li:nth-child(4) .mobile-nav__link { transition-delay: 180ms; }
.mobile-nav__link[aria-current="page"] { color: var(--accent); }
.mobile-nav__cta { margin-top: clamp(1.5rem, 4vh, 2.5rem); align-self: flex-start; }

/* When the overlay is open, hide the burger under it (JS also manages aria). */
.nav-open .site-header { z-index: calc(var(--z-nav) - 1); }

/* ===========================================================================
   FOOTER — global, every public page (CLAUDE.md §1.4 Footer)
   =========================================================================== */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding-block: var(--space-2xl) var(--space-lg);
  padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom));
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl) var(--gutter);
}
@media (min-width: 620px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1.2fr 1fr; } }

.footer__heading {
  margin-bottom: var(--space-md);
}
.footer__wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text);
}
.footer__ethos {
  margin-top: var(--space-xs);
  max-width: 30ch;
  color: var(--text-dim);
  font-size: var(--fs-small);
  line-height: 1.7;
}
.footer__list { display: flex; flex-direction: column; gap: 0.15rem; }
.footer__list a, .footer__contact a {
  color: var(--text-dim);
  font-size: var(--fs-small);
  transition: color var(--dur-micro) var(--ease-out);
}
/* Touch: >= 44px hit targets without inflating the footer's visual rhythm. */
.footer__list a,
.footer__contact a[href^="tel:"],
.footer__directions {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer__contact > a { display: inline-block; padding-block: 0.4rem; } /* multi-line maps address */
@media (hover: hover) {
  .footer__list a:hover, .footer__contact a:hover { color: var(--accent); }
}
.footer__contact { display: flex; flex-direction: column; gap: 0.35rem; font-size: var(--fs-small); color: var(--text-dim); font-style: normal; }
.footer__contact .label { color: var(--text-dim); letter-spacing: 0.04em; }
.footer__socials { display: flex; gap: var(--space-md); margin-top: 0.3rem; }
.footer__social { display: inline-flex; align-items: center; gap: 0.5em; min-height: 44px; color: var(--text-dim); font-size: var(--fs-small); }
.footer__social svg { width: 18px; height: 18px; fill: currentColor; }
@media (hover: hover) { .footer__social:hover { color: var(--accent); } }

/* Hours table — tabular numerals, aligned like craftsmanship */
.hours { border-collapse: collapse; font-size: var(--fs-small); }
.hours th, .hours td { text-align: left; padding: 0.28rem 0; vertical-align: top; }
.hours th { font-weight: 400; color: var(--text-dim); padding-right: 1.25rem; }
.hours td { color: var(--text); font-variant-numeric: tabular-nums; }
.hours .is-closed { color: var(--text-dim); }

.footer__legal {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  font-size: var(--fs-small);
  color: var(--text-dim);
}
.footer__legal .sep { color: var(--line); }
.footer__legal a { color: var(--text-dim); }
@media (hover: hover) { .footer__legal a:hover { color: var(--accent); } }
.footer__directions { margin-left: auto; }

/* ===========================================================================
   P1 SHELL INTRO — the real design system standing in for phase content.
   Full-height centered chapter; replaced by hero/sections in P2–P4.
   =========================================================================== */
.shell-intro {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
}
.shell-intro__inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); }
.shell-intro__title { font-size: var(--fs-display); font-weight: 600; }
.shell-intro__lede { max-width: 46ch; color: var(--text-dim); font-size: var(--fs-lede); }
