/* trophyclubpoolservice.com - SITE TOKENS + page rhythm.
   ---------------------------------------------------------------------------
   SCOPE RULE: this file owns the PALETTE and base page typography ONLY.
   Component rules live in public/css/components.css, which the layout loads
   AFTER this file. Re-styling a component here creates two sources of truth
   for the same pixels and loses the cascade - components.css wins. Do not.
   ---------------------------------------------------------------------------
   Design language: square corners (radius 2px max), hard ZERO-BLUR offset
   shadows, thick accent rules, dark-block / paper-block rhythm, uppercase
   letterspaced labels. NOT rounded pastel.
   Doctrine: /root/projects/astro/best-practices/STYLING.md
   Ratios:   /root/projects/trophyclubpoolservice/design/TOKENS.md
   Accent is a BLOCK colour carrying DARK text; never a ground for white text.
   Lowest measured pair is 7.08:1 (AAA). Re-run scripts/contrast.py after edits.
*/

:root{
  /* grounds */
  --paper:#f1efea;  --bg:#f1efea;   --card-bg:#ffffff;
  --dark:#14181d;   --navy:#0b3a6b; --navy-deep:#06182b;
  /* ink */
  --ink:#14181d;    --fg:#14181d;   --muted:#4a5058;  --link:#0b3a6b;
  --on-dark:#f1efea;                --on-dark-muted:#c3c8cf;
  /* accent - a BLOCK colour. Dark text sits on it. */
  --accent:#26b6d6; --accent-bright:#59cfe8; --accent-shadow:#12788f;
  --accent-ink:#06181d;
  /* lines */
  --line:#d7d2c8;   --rule:#d7d2c8;
  /* metrics */
  --wrap:1120px;    --wrap-pad:22px;  --sec-y:56px;
  --sans:"Helvetica Neue",Helvetica,Arial,sans-serif;
  --display:"Helvetica Neue",Helvetica,Arial,sans-serif;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  font-size:17px;
  line-height:1.65;          /* never below 1 - it leaks (ink-padding doctrine) */
}
img{max-width:100%;height:auto}
a{color:var(--link)}
a:focus-visible,button:focus-visible,summary:focus-visible,
input:focus-visible,label:focus-visible{
  outline:3px solid var(--accent);
  outline-offset:2px;
}

.wrap{max-width:var(--wrap);margin:0 auto;padding:0 var(--wrap-pad)}

/* Page rhythm. Section chrome itself belongs to components.css (.sec/.sec-alt). */
h2{
  font-size:clamp(24px,3vw,32px);line-height:1.22;margin:0 0 20px;
  font-weight:800;letter-spacing:-.01em;
  padding-left:16px;border-left:6px solid var(--accent);
}
h3{font-size:20px;line-height:1.3;margin:28px 0 10px;font-weight:800}
h4{font-size:17px;line-height:1.35;margin:22px 0 8px;font-weight:800}
p{margin:0 0 16px;max-width:72ch}
ul,ol{max-width:72ch;padding-left:22px}
li{margin:0 0 8px}
strong{font-weight:800}
hr,.divider{height:6px;background:var(--accent);border:0;margin:0}

/* Tables (privacy policy, comparison copy) - square, ruled, no zebra pastels. */
table{border-collapse:collapse;width:100%;margin:0 0 20px}
th,td{border:1px solid var(--line);padding:12px 14px;text-align:left;vertical-align:top}
th{background:var(--dark);color:var(--on-dark);font-weight:800;
   text-transform:uppercase;letter-spacing:.06em;font-size:13px}

@media print{.site-header,.site-footer,.crumbs,.topbar{display:none}}

/* ===========================================================================
   HEADER OVERRIDES - required, not cosmetic.
   components.css defines .site-header TWICE: dark at ~line 163, then overridden
   to a PAPER ground at ~line 381 by a block carrying another client's look
   (Georgia serif, navy, gold). The later rule wins, so this site rendered its
   cyan accent text on paper at 2.09:1 - a real WCAG failure on 17 pages, found
   by the RENDERED contrast walk and invisible to the token table.
   components.css loads AFTER site.css, so these need the extra specificity of
   a doubled class to win. Measured after the fix: all pairs >= 7:1.
   =========================================================================== */
.site-header.site-header{
  background:var(--dark);
  border-top:6px solid var(--accent);
  border-bottom:0;
}
.site-header.site-header .brand-name{
  font-family:var(--sans);
  color:var(--on-dark);
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:800;
}
.site-header.site-header .brand-kicker{
  color:var(--accent);          /* 7.42:1 on --dark */
  font-size:.72rem;
  letter-spacing:.16em;
  font-weight:700;
}
.site-header.site-header .nav-list a{
  color:var(--on-dark);         /* 15.51:1 on --dark */
  font-weight:700;
  font-size:.95rem;
  text-transform:uppercase;
  letter-spacing:.05em;
  border-bottom:3px solid transparent;
}
.site-header.site-header .nav-list a:hover,
.site-header.site-header .nav-list a[aria-current="page"],
.site-header.site-header .nav-list .is-active > a{
  color:var(--accent);          /* 7.42:1 on --dark */
  border-bottom-color:var(--accent);
  text-decoration:none;
}
.site-header.site-header .nav-toggle{color:var(--on-dark)}
.site-header.site-header .nav-toggle-bars,
.site-header.site-header .nav-toggle-bars::before{background:var(--on-dark)}
@media (max-width:640px){
  .site-header.site-header .nav-list li{border-top:1px solid #2a3038}
}

/* Nav layout. The kit's .nav-bar wraps the brand and the 7-item list onto two
   rows at 1280px, leaving an orphaned second line and a very tall dark header.
   Found by EYE on a screenshot - the contrast walk passed it clean. Keep the
   brand and the list on one row and let the list itself wrap only if it must. */
.site-header.site-header .nav-bar{
  padding:18px 24px;
  gap:14px 32px;
  align-items:center;
}
.site-header.site-header .nav-list{
  gap:8px 22px;
  margin-left:auto;
  justify-content:flex-end;
}
@media (max-width:1180px) and (min-width:641px){
  .site-header.site-header .nav-list{
    margin-left:0;
    justify-content:flex-start;
    flex-basis:100%;
  }
}
/* The hero sits directly under the header on this site; the kit's default top
   padding assumed a topbar we do not ship. */
.hero{padding-top:44px}
