/**
 * Solera Site — Shared Components
 *
 * Styles used across multiple page templates.
 * Page-specific styles live in each template's <style> block.
 *
 * @package SoleraSite
 * @since   1.0.0
 */

/* ============================================================
   UTILITIES
   ============================================================ */
.gold-text {
  color: transparent;
  background: var(--gold-foil);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: gold-shift 16s ease-in-out infinite;
}
.gold-rule {
  height: 1px;
  background: var(--gold-foil);
  background-size: 200% 100%;
  animation: gold-shift 14s ease-in-out infinite;
  opacity: 0.9;
}

/* ============================================================
   SECTION SERIAL (§ markers)
   ============================================================ */
.section-serial {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 36px;
}
.section-serial__line {
  width: 56px;
  height: 1px;
  background: var(--gold-foil);
  background-size: 200% 100%;
  animation: gold-shift 14s ease-in-out infinite;
}
.section-serial__text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-transform: uppercase;
}

/* ============================================================
   CORNER CROPS
   ============================================================ */
.corner-crops {
  position: absolute;
  inset: -12px;
  pointer-events: none;
}
.corner-crops span { position: absolute; background: var(--gold); }
.corner-crops .tl-h { top: 0; left: 0; width: 20px; height: 1px; }
.corner-crops .tl-v { top: 0; left: 0; width: 1px; height: 20px; }
.corner-crops .tr-h { top: 0; right: 0; width: 20px; height: 1px; }
.corner-crops .tr-v { top: 0; right: 0; width: 1px; height: 20px; }
.corner-crops .bl-h { bottom: 0; left: 0; width: 20px; height: 1px; }
.corner-crops .bl-v { bottom: 0; left: 0; width: 1px; height: 20px; }
.corner-crops .br-h { bottom: 0; right: 0; width: 20px; height: 1px; }
.corner-crops .br-v { bottom: 0; right: 0; width: 1px; height: 20px; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in oklab, var(--void) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav__brand { display: flex; align-items: center; gap: 14px; }
.nav__mark { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.nav__mark img { width: 100%; height: 100%; object-fit: cover; }
.nav__name { font-family: var(--font-display); font-size: 16px; color: var(--silver); font-weight: 500; letter-spacing: -0.005em; }
.nav__title { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.24em; color: var(--muted); text-transform: uppercase; margin-top: 2px; }
.nav__links { display: flex; list-style: none; gap: 28px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
.nav__links a { color: var(--muted); text-decoration: none; transition: color var(--transition); }
.nav__links a:hover, .nav__links a.active { color: var(--silver); }
.nav__right { display: flex; align-items: center; gap: 10px; }

/* ============================================================
   THEME TOGGLE
   ============================================================ */
.theme-toggle { display: inline-flex; gap: 0; padding: 3px; border: 1px solid var(--hairline); border-radius: 999px; background: rgba(255,255,255,0.02); }
.theme-toggle button { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; transition: all 0.2s; }
.theme-toggle button:hover { color: var(--silver); }
.theme-toggle button.active { background: var(--panel); color: var(--silver); box-shadow: inset 0 0 0 1px var(--hairline); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--silver);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 2px;
}
.btn:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn-gold { border: 1px solid transparent; position: relative; z-index: 0; }
.btn-gold::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  background: var(--gold-foil);
  background-size: 200% 200%;
  animation: gold-shift 10s ease-in-out infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  z-index: -1;
  border-radius: 2px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding: 48px 32px 28px; background: var(--void); position: relative; }
.footer__line { padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.footer__top { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--hairline); }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand-mark { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.footer__brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.footer__brand-name { font-family: var(--font-display); font-size: 15px; color: var(--silver); font-weight: 500; }
.footer__brand-title { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.22em; color: var(--muted); text-transform: uppercase; margin-top: 2px; }
.footer__socials { display: flex; gap: 16px; }
.footer__social-link { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; transition: transform var(--transition); }
.footer__social-link:hover { transform: translateY(-2px); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 24px; list-style: none; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
.footer__nav a { color: var(--muted); }
.footer__nav a:hover { color: var(--silver); }
.footer__notice { display: flex; gap: 16px; align-items: flex-start; }
.footer__notice-label { font-family: var(--font-display); font-style: italic; font-size: 16px; color: var(--gold); flex-shrink: 0; margin-top: -1px; }
.footer__notice-text { font-family: var(--font-body); font-size: 12px; line-height: 1.7; color: var(--muted); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; flex-wrap: wrap; gap: 16px; }
.footer__copy { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; color: var(--muted); }
.footer__signatures { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--muted); }
.footer__signatures a { color: var(--gold); }

.solera-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px 1px rgba(239,68,68,0.5);
  animation: solera-pulse 2.5s ease-in-out infinite;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s cubic-bezier(.2,.6,.2,1), transform 0.9s cubic-bezier(.2,.6,.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ============================================================
   EMAIL CAPTURE STRIP
   ============================================================ */
.email-capture {
  padding: 48px 40px;
  text-align: center;
  border-top: 1px solid var(--hairline);
}
.email-capture__label {
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--gold);
  margin-bottom: 10px;
}
.email-capture__heading {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 400;
  color: var(--silver);
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.email-capture__sub {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
  font-weight: 300;
  max-width: 520px;
  margin: 0 auto 20px;
}

/* ── WPForms — Solera Brand Override ──
   !important required: wpforms-base.min.css loads AFTER components.css
   and uses high-specificity selectors. This is a theme-level override. */

.email-capture .wpforms-container,
.email-capture div.wpforms-container-full,
.email-capture .wpforms-container.inline-fields {
  max-width: 680px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

.email-capture .wpforms-container-full .wpforms-form,
.email-capture .wpforms-form {
  padding: 0 !important;
  margin: 0 !important;
}

.email-capture .wpforms-form .wpforms-field-container {
  display: flex !important;
  gap: 12px !important;
  align-items: stretch !important;
}

.email-capture .wpforms-form .wpforms-field {
  flex: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.email-capture .wpforms-form input[type="text"],
.email-capture .wpforms-form input[type="email"],
.email-capture .wpforms-form .wpforms-field-medium {
  width: 100% !important;
  height: 52px !important;
  padding: 0 18px !important;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  font-weight: 300 !important;
  color: var(--silver) !important;
  background: var(--panel, #1A1A26) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 2px !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.25s, box-shadow 0.25s !important;
  -webkit-appearance: none !important;
  max-width: 100% !important;
}

.email-capture .wpforms-form input::placeholder {
  color: var(--muted) !important;
  font-weight: 300 !important;
  opacity: 1 !important;
}

.email-capture .wpforms-form input:focus {
  border-color: var(--gold-warm, #c48c20) !important;
  box-shadow: 0 0 0 1px var(--gold-warm, #c48c20) !important;
}

/* Hide WPForms labels & helpers (placeholders visible) */
.email-capture .wpforms-form .wpforms-field-label,
.email-capture .wpforms-form .wpforms-field-limit-text,
.email-capture .wpforms-form .wpforms-field-description {
  display: none !important;
}

/* Submit button container */
.email-capture .wpforms-submit-container {
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: stretch !important;
}

/* Submit button — gold foil */
.email-capture .wpforms-form button[type="submit"],
.email-capture .wpforms-form .wpforms-submit {
  height: 52px !important;
  padding: 0 28px !important;
  font-family: var(--font-mono) !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--void, #0A0A0F) !important;
  background: var(--gold-foil) !important;
  background-size: 200% 200% !important;
  animation: gold-shift 10s ease-in-out infinite !important;
  border: none !important;
  border-radius: 2px !important;
  cursor: pointer !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
  white-space: nowrap !important;
  -webkit-appearance: none !important;
}

.email-capture .wpforms-form button[type="submit"]:hover,
.email-capture .wpforms-form .wpforms-submit:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 18px rgba(196, 140, 32, 0.25) !important;
}

/* WPForms loading spinner */
.email-capture .wpforms-submit-spinner { margin-left: 8px !important; }

/* ============================================================
   GOLD DOT — Mobile Nav Trigger
   ============================================================ */
.gold-dot-trigger {
  display: none; /* shown only on mobile */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.gold-dot-trigger__dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-foil);
  background-size: 200% 200%;
  animation: gold-shift 8s ease-in-out infinite;
  box-shadow: 0 0 10px 2px rgba(196,140,32,0.35);
  transition: transform 0.3s, box-shadow 0.3s;
}
.gold-dot-trigger:hover .gold-dot-trigger__dot,
.gold-dot-trigger:focus .gold-dot-trigger__dot {
  transform: scale(1.3);
  box-shadow: 0 0 16px 4px rgba(196,140,32,0.5);
}

/* ============================================================
   GOLD OVERLAY — Full-screen sovereign navigation
   ============================================================ */
.gold-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  visibility: hidden;
}
.gold-overlay.open {
  pointer-events: auto;
  visibility: visible;
}

.gold-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--void) 94%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(.2,.6,.2,1);
}
.gold-overlay.open .gold-overlay__backdrop {
  opacity: 1;
}

.gold-overlay__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 80px 32px 60px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.4s cubic-bezier(.2,.6,.2,1) 0.05s, transform 0.4s cubic-bezier(.2,.6,.2,1) 0.05s;
}
.gold-overlay.open .gold-overlay__content {
  opacity: 1;
  transform: scale(1);
}

.gold-overlay__close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.gold-overlay__close:hover {
  color: var(--silver);
  border-color: var(--gold);
}

.gold-overlay__brand {
  margin-bottom: 36px;
  opacity: 0.8;
}

.gold-overlay__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.gold-overlay__link {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: -0.01em;
  padding: 8px 16px;
  transition: color 0.25s, transform 0.25s;
}
.gold-overlay__link:hover,
.gold-overlay__link.active {
  color: var(--gold-hi);
  transform: translateX(4px);
}

.gold-overlay__sub {
  margin-top: 40px;
}
.gold-overlay__sub-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.6;
}

/* ============================================================
   RESPONSIVE — SHARED BREAKPOINTS
   ============================================================ */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .gold-dot-trigger { display: flex; }
  .footer__top { flex-direction: column; align-items: flex-start; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }

  /* Footer nav — two-column grid on mobile */
  .footer__nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
  }

  /* Email capture — stack fields vertically on mobile */
  .email-capture { padding: 36px 20px !important; }
  .email-capture .wpforms-form .wpforms-field-container {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .email-capture .wpforms-submit-container {
    margin-top: 10px !important;
  }
  .email-capture .wpforms-form button[type="submit"],
  .email-capture .wpforms-form .wpforms-submit {
    width: 100% !important;
  }
}
