/* ===========================================
   THE LANDING HAVEN — Design Tokens
   Single source of truth for colour, type,
   space, elevation and motion.
   Loaded before every page stylesheet; the
   page stylesheets alias these into their own
   local names.
   =========================================== */

:root {
  /* ---- Surfaces ---- */
  --lh-ink-900: #0D1B2A;
  --lh-ink-800: #17283A;
  --lh-ink-700: #2B2B2B;
  --lh-cream: #F7F5F2;
  --lh-cream-light: #FDFCFA;
  --lh-ivory: #FDFCF9;
  --lh-sand: #DCD7CD;
  --lh-sand-deep: #C8C2B8;
  --lh-sand-soft: #EEEAE3;
  --lh-surface-raised: #FFFFFF;
  --lh-surface-sunken: #F0EDE8;

  /* ---- Accents ----
     Copper is darkened from the original #A67C52 (3.44:1 on cream, which
     failed AA) so it works as small text on cream/white AND as a button
     fill behind cream text. --lh-copper-deep is the variant for the sand
     CTA band, where the background is too dark for --lh-copper. */
  --lh-copper: #8A6440;
  --lh-copper-deep: #6F4F32;
  --lh-copper-tint: rgba(138, 100, 64, 0.08);
  --lh-gold: #C4A265;
  --lh-gold-ink: #8A6440;
  --lh-sage: #7D8A7A;

  /* ---- Text on light surfaces ---- */
  --lh-text: #2B2B2B;
  --lh-text-secondary: #6F675C;
  --lh-text-tertiary: #736B60;
  --lh-text-on-sand: #5F584E;

  /* ---- Text on ink surfaces ---- */
  --lh-text-on-dark: rgba(247, 245, 242, 0.92);
  --lh-text-on-dark-secondary: rgba(247, 245, 242, 0.72);
  --lh-text-on-dark-tertiary: rgba(247, 245, 242, 0.62);
  --lh-border-on-dark: rgba(247, 245, 242, 0.18);

  /* ---- Feedback ---- */
  --lh-error: #9A4D44;
  --lh-error-bg: #FBF1EF;
  --lh-success: #40614C;
  --lh-success-bg: #E7F0E9;
  --lh-warning: #765B31;
  --lh-warning-bg: #F4EAD6;
  --lh-info: #1E40AF;
  --lh-info-bg: #DBEAFE;
  --lh-neutral: #57534E;
  --lh-neutral-bg: #F3F4F6;
  --lh-violet: #5B21B6;
  --lh-violet-bg: #EDE9FE;

  /* ---- Type ---- */
  --lh-font-display: 'Cormorant Garamond', Georgia, serif;
  --lh-font-body: 'Lora', Georgia, serif;
  --lh-font-sub: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;

  /* 11px is the floor: nothing a user has to read renders smaller. */
  --lh-fs-label: 11px;
  --lh-fs-sm: 12px;
  --lh-fs-base: 13px;
  --lh-fs-md: 14px;
  --lh-fs-lg: 15px;
  --lh-fs-xl: 16px;

  /* ---- Space ---- */
  --lh-space-1: 4px;
  --lh-space-2: 8px;
  --lh-space-3: 12px;
  --lh-space-4: 16px;
  --lh-space-5: 20px;
  --lh-space-6: 24px;
  --lh-space-8: 32px;
  --lh-space-10: 40px;
  --lh-space-12: 48px;

  /* ---- Radius & elevation ---- */
  --lh-radius-sm: 2px;
  --lh-radius-md: 3px;
  --lh-radius-pill: 999px;
  --lh-shadow-sm: 0 4px 14px rgba(13, 27, 42, 0.10);
  --lh-shadow-md: 0 12px 32px rgba(13, 27, 42, 0.10);
  --lh-shadow-lg: 0 28px 80px rgba(13, 27, 42, 0.11);

  /* ---- Motion ---- */
  --lh-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --lh-dur-fast: 200ms;
  --lh-dur-base: 300ms;
  --lh-dur-slow: 560ms;
}

/* ===========================================
   Focus visibility
   One ring that reads on both cream and ink:
   a copper outline (3.3:1 on ink, 4.9:1 on
   cream) inside a cream halo.
   =========================================== */

:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--lh-copper);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(247, 245, 242, 0.85);
}

/* Elements already carrying their own focus treatment opt out of the halo. */
.binary-toggle:focus-within,
#signatureCanvas:focus-visible {
  box-shadow: 0 0 0 3px rgba(138, 100, 64, 0.18);
}

/* ===========================================
   Skip link
   =========================================== */

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 500;
  transform: translate(-50%, -120%);
  padding: 12px 24px;
  background: var(--lh-ink-900);
  color: var(--lh-cream);
  font-family: var(--lh-font-sub);
  font-size: var(--lh-fs-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform var(--lh-dur-fast) var(--lh-ease);
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
}

/* ===========================================
   Reduced motion
   Applies to every surface that loads tokens.
   =========================================== */

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

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

  /* Reveal-on-scroll resolves to its final state immediately. */
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Parallax is motion sickness bait. */
  .hero,
  #homeHero {
    background-attachment: scroll !important;
  }
}
