/* ==========================================================================
   Sunset Beach Towing — styles.css
   Palette: harbor navy + hazard amber (tow beacon) + sea-foam white
   Type:    Barlow Condensed (highway signage) / IBM Plex Sans / IBM Plex Mono
   ========================================================================== */

/* Metric-matched fallback so headings don't reflow when Barlow Condensed
   finishes loading — keeps Cumulative Layout Shift near zero on slow phones. */
@font-face {
  font-family: "Display Fallback";
  src: local("Arial Narrow"), local("Roboto Condensed"), local("Helvetica Neue"), local("Arial");
  size-adjust: 82%;
  ascent-override: 104%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  --ink:      #0B1F2A;   /* deepest navy — text + dark sections */
  --deep:     #12303F;   /* harbor navy — panels */
  --surf:     #2E8C9E;   /* teal — links, secondary accents */
  --beacon:   #FFB020;   /* hazard amber — primary action */
  --beacon-d: #E09400;   /* amber pressed */
  --foam:     #F2F5F6;   /* page background */
  --white:    #FFFFFF;
  --line:     #D7E0E3;   /* hairlines on light */
  --line-dk:  rgba(255,255,255,.16);
  --muted:    #5A6E77;
  --alert:    #D64535;

  --f-display: "Barlow Condensed", "Display Fallback", "Arial Narrow", sans-serif;
  --f-body:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r: 4px;
  --wrap: 1120px;
  --pad: clamp(1.15rem, 4vw, 2rem);
  --shadow: 0 1px 2px rgba(11,31,42,.08), 0 8px 24px rgba(11,31,42,.06);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--foam);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--surf); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.15rem, 8.4vw, 4.6rem); }
h2 { font-size: clamp(1.75rem, 5.5vw, 2.9rem); }
h3 { font-size: 1.35rem; letter-spacing: .02em; }
p  { margin: 0 0 1rem; }

:focus-visible {
  outline: 3px solid var(--beacon);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--beacon); color: var(--ink); padding: .7rem 1rem; font-weight: 600;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ---------- eyebrow / labels ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--surf);
  margin: 0 0 .75rem;
}
.on-dark .eyebrow { color: var(--beacon); }

/* ---------- dispatch strip (signature: live beacon) ---------- */
.strip {
  background: var(--ink);
  color: var(--white);
  font-family: var(--f-mono);
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.strip .wrap {
  display: flex; align-items: center; gap: .6rem;
  min-height: 34px; flex-wrap: wrap;
}
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--beacon);
  box-shadow: 0 0 0 0 rgba(255,176,32,.7);
  animation: beacon 2.4s infinite;
  flex: none;
}
@keyframes beacon {
  0%   { box-shadow: 0 0 0 0 rgba(255,176,32,.65); }
  70%  { box-shadow: 0 0 0 10px rgba(255,176,32,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,176,32,0); }
}
.strip .sep { color: rgba(255,255,255,.35); }
.strip a { color: var(--beacon); text-decoration: none; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: rgba(242,245,246,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.head-in {
  display: flex; align-items: center; gap: 1rem;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name {
  font-family: var(--f-display); font-weight: 700; text-transform: uppercase;
  font-size: 1.32rem; line-height: 1; letter-spacing: .015em;
}
.brand-sub {
  font-family: var(--f-mono); font-size: .58rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); display: block; margin-top: 3px;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
.nav a {
  font-family: var(--f-display); text-transform: uppercase; font-size: 1.05rem;
  letter-spacing: .04em; color: var(--ink); text-decoration: none;
  padding: .45rem .6rem; border-radius: var(--r);
}
.nav a:hover { background: rgba(46,140,158,.12); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--beacon); }
.nav-toggle {
  margin-left: auto; display: none; align-items: center; gap: .4rem;
  background: none; border: 1px solid var(--line); border-radius: var(--r);
  padding: .5rem .65rem; font-family: var(--f-display); text-transform: uppercase;
  font-size: 1rem; letter-spacing: .05em; color: var(--ink); cursor: pointer;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--f-display); text-transform: uppercase; font-weight: 700;
  font-size: 1.22rem; letter-spacing: .04em;
  padding: .82rem 1.4rem; min-height: 52px;
  border-radius: var(--r); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: transform .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-call { background: var(--beacon); color: var(--ink); }
.btn-call:hover { background: var(--beacon-d); color: var(--ink); }
.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.on-dark .btn-ghost { color: var(--white); }
.btn-ghost:hover { background: rgba(46,140,158,.14); color: inherit; }
.btn-sm { font-size: 1.02rem; min-height: 44px; padding: .55rem 1rem; }
.btn-wide { width: 100%; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink);
  color: var(--white);
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}
.hero::before { /* amber beacon wash */
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 90%;
  background: radial-gradient(60% 60% at 20% 0%, rgba(255,176,32,.22), transparent 70%),
              radial-gradient(50% 50% at 85% 10%, rgba(46,140,158,.28), transparent 70%);
  pointer-events: none;
}
.hero::after { /* horizon line */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--beacon), transparent);
  opacity: .5;
}
.hero .wrap { position: relative; }
.hero h1 { max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--beacon); }
.hero-lead { font-size: 1.12rem; max-width: 52ch; color: rgba(255,255,255,.86); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 1.4rem; }
.hero-num {
  font-family: var(--f-mono); font-size: 1rem; letter-spacing: .04em;
  color: rgba(255,255,255,.75);
}
.hero-num a { color: var(--white); text-decoration: none; border-bottom: 1px solid var(--beacon); }
.trust {
  list-style: none; margin: 2rem 0 0; padding: 1.1rem 0 0;
  border-top: 1px solid var(--line-dk);
  display: grid; gap: .55rem 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  font-family: var(--f-mono); font-size: .78rem; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255,255,255,.8);
}
.trust li::before { content: "▸ "; color: var(--beacon); }

/* ---------- sections ---------- */
.sec { padding: clamp(2.8rem, 7vw, 4.5rem) 0; }
.sec-tight { padding: clamp(2rem, 5vw, 3rem) 0; }
.sec-dark { background: var(--deep); color: var(--white); }
.sec-dark a { color: var(--beacon); }
.sec-head { max-width: 62ch; margin-bottom: 2rem; }
.sec-head p { color: var(--muted); }
.sec-dark .sec-head p { color: rgba(255,255,255,.8); }

/* ---------- service cards ---------- */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.4rem 1.3rem; box-shadow: var(--shadow);
  border-top: 3px solid var(--beacon);
}
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.card .ico { width: 30px; height: 30px; margin-bottom: .8rem; color: var(--surf); }

/* ---------- steps (a real sequence) ---------- */
.steps { counter-reset: s; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { position: relative; padding-top: 2.6rem; border-top: 1px solid var(--line-dk); }
.step::before {
  counter-increment: s; content: counter(s, decimal-leading-zero);
  position: absolute; top: .7rem; left: 0;
  font-family: var(--f-mono); font-size: .8rem; letter-spacing: .1em; color: var(--beacon);
}
.step h3 { margin-bottom: .3rem; }
.step p { color: rgba(255,255,255,.8); margin: 0; font-size: .97rem; }

/* ---------- billing notice ---------- */
.notice {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--beacon);
  border-radius: var(--r);
  padding: 1.4rem 1.4rem;
  box-shadow: var(--shadow);
}
.notice h3 { margin-bottom: .4rem; }
.notice p:last-child { margin-bottom: 0; }
.notice strong { background: linear-gradient(transparent 62%, rgba(255,176,32,.55) 62%); }

/* ---------- split / info list ---------- */
.split { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .split { grid-template-columns: 1.15fr .85fr; gap: 3rem; } }

.dl { margin: 0; font-family: var(--f-mono); font-size: .95rem; }
.dl dt {
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-top: 1.1rem;
}
.sec-dark .dl dt { color: rgba(255,255,255,.65); }
.dl dd { margin: .2rem 0 0; }
.dl dd a { text-decoration: none; border-bottom: 1px solid var(--beacon); }

/* ---------- areas ---------- */
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li {
  font-family: var(--f-mono); font-size: .78rem; letter-spacing: .05em;
  border: 1px solid var(--line); background: var(--white);
  padding: .4rem .7rem; border-radius: 999px;
}
.sec-dark .tags li { border-color: var(--line-dk); background: rgba(255,255,255,.05); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.05rem 2rem 1.05rem 0; position: relative;
  font-family: var(--f-display); text-transform: uppercase; font-size: 1.22rem; letter-spacing: .02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .2rem; top: .85rem;
  font-family: var(--f-mono); font-size: 1.3rem; color: var(--beacon);
}
.faq details[open] summary::after { content: "−"; }
.faq .ans { padding: 0 0 1.1rem; color: var(--muted); max-width: 70ch; }

/* ---------- form ---------- */
.form { display: grid; gap: 1rem; max-width: 560px; }
.field label {
  display: block; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: .35rem;
}
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--white);
}
.field textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: .88rem; color: var(--muted); }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: rgba(255,255,255,.78); padding: 2.8rem 0 6rem; font-size: .93rem; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-foot h4 {
  font-size: .74rem; font-family: var(--f-mono); letter-spacing: .14em;
  color: var(--beacon); margin-bottom: .8rem; font-weight: 500;
}
.site-foot a { color: var(--white); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.legal {
  margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line-dk);
  font-size: .8rem; color: rgba(255,255,255,.55);
}

/* ---------- sticky call bar (mobile) ---------- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: none; gap: .5rem; padding: .5rem;
  padding-bottom: calc(.5rem + env(safe-area-inset-bottom, 0px));
  background: rgba(11,31,42,.97); border-top: 1px solid var(--line-dk);
}
.callbar .btn { flex: 1; font-size: 1.1rem; min-height: 50px; }

@media (max-width: 800px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: .4rem var(--pad) 1.1rem; gap: .1rem;
    box-shadow: 0 18px 32px rgba(11,31,42,.18);
    max-height: calc(100vh - 100px); overflow-y: auto;
  }
  .nav.open a { padding: .8rem .2rem; border-bottom: 1px solid var(--line); font-size: 1.15rem; }
  .nav.open .btn { margin-top: .9rem; border-bottom: 0; justify-content: center; }
  .nav-toggle { display: inline-flex; }
  .callbar { display: flex; }
  .site-head { position: sticky; }
}

/* ---------- phones: 600px and down ---------- */
@media (max-width: 600px) {
  body { font-size: 16.5px; }

  /* tighter header so more of the page shows above the fold */
  .head-in { min-height: 58px; gap: .55rem; }
  .brand svg { width: 30px; height: 30px; }
  .brand-name { font-size: 1.02rem; letter-spacing: .005em; }
  .brand-sub { font-size: .5rem; letter-spacing: .09em; margin-top: 2px; }
  .nav-toggle { padding: .45rem .6rem; font-size: .95rem; }

  /* one-line dispatch strip */
  .strip { font-size: .68rem; }
  .strip .hide-sm { display: none; }

  /* full-width, thumb-sized calls to action */
  .hero { padding-top: 2.2rem; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: .6rem; }
  .hero-cta .btn { width: 100%; }
  .btn { font-size: 1.12rem; padding: .8rem 1rem; }
  .callbar .btn { font-size: 1.05rem; }

  .hero-lead { font-size: 1.05rem; }
  .sec { padding: 2.4rem 0; }
  .card { padding: 1.2rem 1.1rem; }
  .faq summary { font-size: 1.12rem; }
}

@media (max-width: 380px) {
  .brand-sub { display: none; }
  .btn { font-size: 1.05rem; }
}

/* anchors clear the sticky header */
[id] { scroll-margin-top: 84px; }

/* long addresses never blow out a 320px screen */
a[href^="mailto:"], .dl dd { overflow-wrap: anywhere; }

/* touch feedback in the brand color, not the browser default blue */
a, button, summary { -webkit-tap-highlight-color: rgba(255,176,32,.28); }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; }
}

@media print {
  .site-head, .callbar, .strip, .hero::before { display: none; }
  body { background: #fff; }
}
