/* ============================================================================
   HOTUBMOVERS.COM DESIGN SYSTEM (the foundation layer)
   Spa theme: navy + copper, Fraunces headings, Source Sans 3 body.

   LOAD ORDER (every page): design-system, chrome, page-layouts, trust-offer,
   htm-brand, htm-compat, htm-pages. This file and chrome.css load FIRST, so
   later files win ties. Anything here that must beat a later file's rule uses
   the ":root" prefix (adds one class of specificity) and, only where the later
   rule is !important, !important as well. Look for "CASCADE AUTHORITY" in
   chrome.css for the overrides that do this.

   TOKENS
     Navy      --htm-ink #0b1c2c (text, deepest) / --htm-dusk #14324a (bands, nav)
               --htm-dusk-rich #1a3e5a / --htm-dusk-soft #234a6b (gradient ends)
     Teal      --htm-pool #1aa6b8 mark and icon colour, never text on light
               --htm-pool-bright #2bc4d8 text and icons ON NAVY (6.3:1 on dusk)
               --htm-pool-deep #0b6a77 teal text/border on light (6.3:1 white)
               --htm-pool-text #0a5a64 darkest teal text (7.9:1 white)
     Copper    --htm-copper #d4893a button fill ONLY (lead-starting buttons)
               --htm-copper-hot #e8a04a hover, --htm-copper-deep #b8712a border,
               --htm-copper-warm #a65f1e copper TEXT on light (4.9:1 white)
     Ground    --htm-sand #f4efe6 page / --htm-foam #f7fbfc / --bg-white
               --htm-sand-2 #e7dfd2 / --htm-line #c9d5de / --htm-muted #5b6b78
     Type      --font-display Fraunces (h1 to h3), --font-body Source Sans 3
     Shape     --radius-btn 12px, --radius-card 18px
     Chrome    --htm-nav-h (pinned nav height), --htm-bar-h (mobile sticky bar),
               --site-chrome-height (full header, written by quote-flow.js)
     Z scale   --z-bar 90, --z-chrome 100, --z-drawer 200, --z-skip 1000

   BUTTONS (one family, one shape: 12px radius, 48px min height)
     .btn-primary .btn-copper .btn-quote .btn-cta .htm-nav-book
         The act colour. Copper fill, INK text (6.1:1), copper-deep border.
         Lead-starting actions only. Nothing else on the page is copper.
     .btn-secondary
         Aqua fill, ink text. Secondary action (call, back).
     .btn-ghost-dark   .btn-call .btn.on-light .btn.ghost
         Outline, navy or teal, for LIGHT bands.
     .btn-ghost-light  .btn-ghost-copper (on dark)
         White outline, for DARK bands (see BANDS below).
     .btn (bare)
         Neutral outline. Gives legacy markup a finished base; variants above
         refine it. Native <button> elements inherit the page font.

   BANDS    Dark surfaces are named by class, not by data-band, because
            data-band="dark" is also printed on sections that render light.
            Dark: .htm-section--dusk .htm-cta-dusk .htm-offer-dock
            .htm-lantern-block--dusk .htm-lantern-hero .htm-hero--service-lantern
            .section--navy (+ chrome: .htm-nav .htm-footer .trust-strip).
            Links, pills, outline buttons and focus rings switch on them.
            A new dark band must be added to those lists (here and in the
            CASCADE AUTHORITY section of chrome.css).
   ============================================================================ */

/* ----------------------------------------------------------------------------
   FONTS: self-hosted, Latin subset, variable. font-display: swap.
   fraunces-latin.woff2 carries the opsz and wght axes (400 to 800);
   source-sans-3-latin.woff2 carries wght 200 to 900. One file each.
   The Google Fonts <link> in each page head is redundant once these load and
   is listed for removal in docs/audit/requests/cssF.md.
   ---------------------------------------------------------------------------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Navy */
  --htm-ink: #0b1c2c;
  --htm-dusk: #14324a;
  --htm-dusk-rich: #1a3e5a;
  --htm-dusk-soft: #234a6b;

  /* Teal: a mark and an accent, never the act colour */
  --htm-pool: #1aa6b8;
  --htm-pool-bright: #2bc4d8;
  --htm-pool-deep: #0b6a77;
  --htm-pool-text: #0a5a64;

  /* Copper: the act colour. Fill for lead buttons only */
  --htm-copper: #d4893a;
  --htm-copper-hot: #e8a04a;
  --htm-copper-deep: #b8712a;
  --htm-copper-warm: #a65f1e;

  /* Ground and lines */
  --htm-sand: #f4efe6;
  --htm-sand-2: #e7dfd2;
  --htm-foam: #f7fbfc;
  --htm-line: #c9d5de;
  --htm-muted: #5b6b78;

  /* Text and surfaces (aliases) */
  --text-primary: #0b1c2c;
  --text-secondary: #2d4456;
  --text-muted: #5b6b78;
  --bg-light: #f4efe6;
  --bg-white: #ffffff;
  --border-light: #c9d5de;

  /* Interaction */
  --focus-ring: #0a5a64;
  --focus-ring-on-dark: #3ecbd8;
  --hover-overlay: rgba(26, 166, 184, 0.08);

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;

  /* Shape and depth */
  --radius-btn: 12px;
  --radius-card: 18px;
  --shadow-soft: 0 10px 30px rgba(11, 28, 44, 0.12);

  /* Chrome geometry */
  --htm-nav-h: 59px;
  --htm-bar-h: 76px;

  /* Z scale */
  --z-bar: 90;
  --z-chrome: 100;
  --z-drawer: 200;
  --z-skip: 1000;
}

/* htm-brand.css redeclares :root custom properties later in the cascade.
   html:root outranks it, so the contrast-tuned values below always hold. */
html:root {
  --htm-pool-deep: #0b6a77;
  --htm-pool-text: #0a5a64;
  --focus-ring: #0a5a64;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
}

@media (max-width: 900px) {
  :root {
    --htm-nav-h: 49px;
  }
}

/* ----------------------------------------------------------------------------
   BASE RESET AND TYPOGRAPHY
   ---------------------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Only the nav stays pinned (chrome.css collapses the rail), so anchors
     clear 49 to 59px of nav plus a 16px breath. Do not stack scroll-margin. */
  scroll-padding-top: calc(var(--htm-nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (max-width: 768px) {
  html {
    scroll-padding-bottom: calc(var(--htm-bar-h) + 24px);
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  line-height: 1.6;
  background: var(--bg-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 17px;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

/* Native form controls default to Arial; make them follow the page. */
button,
input,
select,
textarea {
  font-family: inherit;
}

/* Headings: Fraunces for h1 to h3, Source Sans 3 below that. */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  text-wrap: balance;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-variant-numeric: lining-nums;
  letter-spacing: -0.015em;
}

h4, h5, h6 {
  font-family: var(--font-body);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
}

h4 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}

/* Figures that must not read as old-style numerals. */
.htm-lining,
.htm-credit-chip__amount,
.coupon-amt b,
.htm-step-rail__num {
  font-variant-numeric: lining-nums;
}

/* Links: teal text on light grounds, bright teal on navy. */
a {
  color: var(--htm-pool-deep);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--htm-pool-text);
  text-decoration-thickness: 2px;
}

strong, b {
  font-weight: 700;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

svg {
  flex-shrink: 0;
}

/* Dark surfaces: every navy band and chrome piece. One list, kept in sync with
   the header comment. Hover and focus colours switch here. */
.htm-section--dusk a:hover,
.htm-lantern-hero a:hover,
.htm-cta-dusk a:hover,
.htm-offer-dock a:hover,
.htm-lantern-block--dusk a:hover,
.htm-hero--service-lantern a:hover,
.section--navy a:hover,
.htm-credit-chip a:hover,
.coupon a:hover,
.coupon-card a:hover,
.trust-strip a:hover,
.htm-nav a:hover,
.htm-footer a:hover {
  color: var(--htm-pool-bright);
}

/* Focus: dark teal ring on light grounds (7.9:1 white, 6.1:1 sand), bright
   teal ring on navy. Never removed, only recoloured. */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.htm-section--dusk :focus-visible,
.htm-lantern-hero :focus-visible,
.htm-cta-dusk :focus-visible,
.htm-offer-dock :focus-visible,
.htm-lantern-block--dusk :focus-visible,
.htm-hero--service-lantern :focus-visible,
.section--navy :focus-visible,
.htm-credit-chip :focus-visible,
.coupon :focus-visible,
.coupon-card :focus-visible,
.trust-strip :focus-visible,
.htm-nav :focus-visible,
.htm-footer :focus-visible,
.htm-sticky-ctas :focus-visible {
  outline-color: var(--focus-ring-on-dark);
}

/* Copper buttons sit on light or dark grounds; give them a ring that reads on
   both by pairing a navy ring with a white halo. */
.btn-primary:focus-visible,
.btn-copper:focus-visible,
.btn-quote:focus-visible,
.btn-cta:focus-visible,
.htm-nav-book:focus-visible {
  outline: 3px solid var(--htm-ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff;
}

[hidden] {
  display: none !important;
}

/* ----------------------------------------------------------------------------
   LAYOUT UTILITIES
   ---------------------------------------------------------------------------- */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (max-width: 768px) {
  .wrap {
    padding: 0 1.25rem;
  }
}

/* Skip link: fixed so it is never clipped by or painted under the sticky
   header, and above every other layer when focused. */
.skip {
  position: fixed;
  left: -9999px;
  top: 0;
  background: var(--htm-dusk);
  color: var(--bg-white);
  padding: 0.75rem 1.25rem;
  z-index: var(--z-skip);
  font-weight: 700;
  border-radius: 0 0 0.625rem 0;
  text-decoration: none;
}

.skip:focus {
  left: 0;
  color: var(--bg-white);
  outline: 3px solid var(--focus-ring-on-dark);
  outline-offset: -3px;
}

main:focus {
  outline: none;
}

/* ----------------------------------------------------------------------------
   BUTTON SYSTEM (see the header for the family map)
   ---------------------------------------------------------------------------- */

.btn,
.btn-primary,
.btn-secondary,
.btn-copper,
.btn-ghost-light,
.btn-ghost-dark,
.btn-ghost-copper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

/* Bare legacy .btn: a neutral outline so unstyled markup is never a sliver. */
.btn {
  background: transparent;
  color: var(--htm-pool-text);
  border-color: var(--htm-pool-deep);
}

.btn:hover {
  background: var(--htm-pool-text);
  border-color: var(--htm-pool-text);
  color: #fff;
}

/* Primary: copper fill, ink text. */
.btn-primary,
.btn-copper {
  background: var(--htm-copper);
  color: var(--htm-ink);
  border-color: var(--htm-copper-deep);
}

.btn-primary:hover,
.btn-copper:hover {
  background: var(--htm-copper-hot);
  color: var(--htm-ink);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 137, 58, 0.35);
}

.btn-primary:active,
.btn-copper:active {
  transform: translateY(0);
}

/* Secondary: aqua fill, ink text. */
.btn-secondary {
  background: var(--htm-pool);
  color: var(--htm-ink);
  border-color: var(--htm-pool-deep);
}

.btn-secondary:hover {
  background: var(--htm-pool-bright);
  color: var(--htm-ink);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 166, 184, 0.3);
}

/* Ghost on light bands. */
.btn-ghost-dark,
.btn-ghost-copper {
  background: transparent;
  color: var(--htm-dusk);
  border-color: var(--htm-dusk);
}

.btn-ghost-dark:hover,
.btn-ghost-copper:hover {
  background: var(--htm-dusk);
  color: var(--bg-white);
}

/* Ghost on dark bands. */
.btn-ghost-light {
  background: transparent;
  color: var(--bg-white);
  border-color: rgba(255, 255, 255, 0.65);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--bg-white);
  color: var(--bg-white);
}

/* Fixed full-width helper */
.btn-block {
  display: flex;
  width: 100%;
}

/* Native submit/next buttons inside forms keep the same geometry. */
button.btn,
button.btn-primary,
button.btn-secondary {
  appearance: none;
  -webkit-appearance: none;
}

@media (max-width: 480px) {
  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-copper,
  .btn-ghost-light,
  .btn-ghost-dark,
  .btn-ghost-copper {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    white-space: normal;
  }
}

/* ----------------------------------------------------------------------------
   REDUCED MOTION
   ---------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-copper:hover {
    transform: none;
  }
}

/* ----------------------------------------------------------------------------
   PRINT
   ---------------------------------------------------------------------------- */

@media print {
  .site-chrome,
  .htm-sticky-ctas,
  .htm-drawer,
  .htm-drawer-overlay,
  .skip {
    display: none !important;
  }
}
