/* ============================================================
   Keystone Web Design — shared stylesheet
   Common base used by every page: tokens, reset, nav, mobile
   menu, page-hero, section headings, footer, buttons.
   Page-specific rules live in each page's own <style> block.
   ============================================================ */

:root {
  --lime: #c8f53a;
  --lime-dim: rgba(200,245,58,0.12);
  --dark: #141414;
  --darker: #0c0c0c;
  --cream: #f5f0e6;
  --cream-dark: #ece5d4;
  --ink: #1a1a1a;
  --orange: #f25c1a;
  --white: #ffffff;
  --gray: #5a5a5a;            /* darkened from #666 for AA contrast on cream */
  --muted-on-dark: rgba(255,255,255,0.62);  /* AA-safe muted text on dark */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Cabinet Grotesk', sans-serif;
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
}

/* Visible focus outline for keyboard users (a11y) */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* Skip link for keyboard/screen-reader users (a11y) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--lime);
  color: var(--dark);
  padding: 12px 20px;
  font-weight: 800;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ===== NAV ===== */
nav {
  background: var(--dark);
  padding: 0 5%;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo-mark {
  font-size: 2rem; color: var(--lime); line-height: 1;
  display: flex; align-items: center;
  filter: drop-shadow(0 0 10px rgba(200,245,58,0.5));
  transition: filter 0.3s; flex-shrink: 0;
}
.nav-logo:hover .logo-mark { filter: drop-shadow(0 0 18px rgba(200,245,58,0.8)); }
.logo-text {
  display: flex; flex-direction: column; line-height: 1; gap: 3px;
  font-size: 1.25rem; font-weight: 900; color: var(--lime); letter-spacing: -0.03em;
}
.logo-sub {
  font-size: 0.65rem; font-weight: 700; color: var(--lime);
  letter-spacing: 0.18em; text-transform: uppercase;
}
.nav-logo span { color: var(--lime); }

.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.82);
  text-decoration: none; font-size: 1rem; font-weight: 700;
  padding: 8px 18px; border-radius: 100px;
  transition: all 0.2s; letter-spacing: -0.01em;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--lime); background: rgba(200,245,58,0.1);
}

.nav-cta {
  background: var(--lime); color: var(--dark);
  padding: 10px 22px; border-radius: 100px;
  font-size: 0.85rem; font-weight: 800; text-decoration: none;
  transition: all 0.2s; letter-spacing: -0.01em;
}
.nav-cta:hover { background: #d8ff4a; transform: scale(1.03); }

.nav-phone {
  color: var(--lime); font-size: 0.85rem; font-weight: 700;
  text-decoration: none; letter-spacing: 0.01em; transition: opacity 0.2s;
}
.nav-phone:hover { opacity: 0.8; }

/* ===== HAMBURGER ===== */
.nav-hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
  border-radius: 8px; transition: background 0.2s;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.08); }
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,0.85); border-radius: 2px;
  transition: all 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== MOBILE MENU DRAWER ===== */
.mobile-menu {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--darker); z-index: 99;
  flex-direction: column; padding: 88px 8% 48px; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: rgba(255,255,255,0.82); text-decoration: none;
  font-size: 2rem; font-weight: 900; letter-spacing: -0.04em;
  padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s;
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--lime); }
.mobile-menu .mobile-phone {
  font-size: 1.1rem; color: rgba(255,255,255,0.55); font-weight: 500;
  letter-spacing: 0.02em; border-bottom: none; margin-top: auto; padding-top: 24px;
}
.mobile-menu .mobile-phone:hover { color: var(--lime); opacity: 1; }
.mobile-menu .mobile-cta {
  margin-top: 24px; background: var(--lime); color: var(--dark);
  padding: 18px 32px; border-radius: 100px; font-size: 1.1rem;
  font-weight: 800; text-align: center; border-bottom: none;
}
.mobile-menu .mobile-cta:hover { background: #d8ff4a; color: var(--dark); }

/* ===== SHARED SECTION HEADINGS ===== */
.section-eyebrow {
  font-size: 0.8rem; font-weight: 700; color: var(--orange);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 12px;
}
.section-h2 {
  font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 900;
  letter-spacing: -0.04em; line-height: 1; color: var(--ink); margin-bottom: 60px;
}
.section-h2 em {
  font-family: 'Lora', serif; font-style: italic; font-weight: 500; color: var(--orange);
}

/* ===== PAGE HERO (inner pages) ===== */
.page-hero { background: var(--dark); padding: 80px 5% 72px; position: relative; overflow: hidden; }
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(200,245,58,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero-eyebrow {
  font-size: 0.8rem; font-weight: 700; color: var(--lime);
  text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 18px;
  position: relative; z-index: 1;
}
.page-hero h1 {
  font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 900; letter-spacing: -0.05em;
  line-height: 0.95; color: var(--white); margin-bottom: 20px; position: relative; z-index: 1;
}
.page-hero p {
  font-family: 'Lora', serif; font-style: italic; font-size: 1rem;
  color: rgba(255,255,255,0.62); position: relative; z-index: 1;
}

/* ===== FOOTER ===== */
footer { background: var(--darker); color: var(--white); padding: 80px 5% 28px; position: relative; overflow: hidden; }
footer::before {
  content: ''; position: absolute; top: 0; left: 5%; right: 5%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,245,58,0.35), transparent);
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 56px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand-block { display: flex; flex-direction: column; gap: 22px; }
.footer-logo { display: flex; align-items: center; gap: 12px; }
.footer-diamond { font-size: 1.8rem; color: var(--lime); filter: drop-shadow(0 0 12px rgba(200,245,58,0.55)); line-height: 1; flex-shrink: 0; }
.footer-logo-text { display: flex; flex-direction: column; line-height: 1; gap: 3px; }
.footer-brand { font-size: 1.15rem; font-weight: 900; color: var(--lime); letter-spacing: -0.02em; }
.footer-sub { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(200,245,58,0.55); }
.footer-tagline { font-family: 'Lora', serif; font-style: italic; font-size: 1.35rem; line-height: 1.35; color: rgba(255,255,255,0.85); letter-spacing: -0.01em; max-width: 320px; }
.footer-tagline span { color: var(--lime); }
.footer-col h4 { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--lime); margin-bottom: 20px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: rgba(255,255,255,0.72); text-decoration: none; font-size: 0.95rem; font-weight: 600; letter-spacing: -0.005em; transition: color 0.2s, transform 0.2s; display: inline-block; }
.footer-col a:hover { color: var(--lime); transform: translateX(3px); }
.footer-contact-line { display: flex; flex-direction: column; gap: 4px; }
.footer-contact-line .label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.footer-contact-line a { color: var(--white); font-size: 1.05rem; font-weight: 700; text-decoration: none; letter-spacing: -0.01em; transition: color 0.2s; }
.footer-contact-line a:hover { color: var(--lime); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; flex-wrap: wrap; gap: 14px; }
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,0.5); font-weight: 500; letter-spacing: 0.01em; }
.footer-legal { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.footer-legal a { font-size: 0.78rem; color: rgba(255,255,255,0.5); text-decoration: none; font-weight: 500; transition: color 0.2s; letter-spacing: 0.01em; }
.footer-legal a:hover { color: var(--lime); }

@media (max-width: 900px) {
  footer { padding: 64px 5% 24px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 44px 32px; padding-bottom: 44px; }
  .footer-brand-block { grid-column: 1 / -1; }
  .footer-tagline { font-size: 1.2rem; max-width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
}

/* ===== NAV RESPONSIVE (show hamburger on small screens) ===== */
@media (max-width: 860px) {
  .nav-links, .nav-phone { display: none; }
  nav .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}

/* ===== INLINE SVG ICON SIZING ===== */
/* Decorative icon containers that used to hold emoji. SVGs inherit color
   via currentColor; we set an explicit box size so they render crisply. */
.how-step-icon, .step-icon, .value-icon, .ww-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.how-step-icon svg, .step-icon svg, .value-icon svg, .ww-icon svg {
  width: 30px; height: 30px;
}
.how-step-icon svg, .step-icon svg, .ww-icon svg { color: var(--lime); }
.value-icon svg { color: var(--orange); }
.home-g-icon, .guarantee-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.home-g-icon svg, .guarantee-icon svg {
  width: 28px; height: 28px;
  color: var(--orange);
}
/* Inline phone glyph used in mobile menu and tel buttons */
.i-phone {
  display: inline-flex;
  vertical-align: -0.18em;
  margin-right: 6px;
}
.i-phone svg { width: 1.05em; height: 1.05em; }
.mobile-menu .mobile-phone .i-phone svg { width: 1.1rem; height: 1.1rem; }
