/* ==========================================================================
   Dick's Hardware Centre — shared styles
   Palette: builder's yellow (#F2B807) on graphite/near-black (#22262A)
   Two theme roles kept separate:
     --on-brand-*  : text/icons on saturated brand grounds (nav, footer, hero,
                     buttons) — stays LIGHT in both themes.
     --surface-*   : page/card fill — flips DARK in dark mode.
   ========================================================================== */

:root {
  /* Brand */
  --brand-yellow: #F2B807;
  --brand-yellow-hover: #d9a406;
  --graphite: #22262A;
  --graphite-deep: #1A1D20;
  --trade-blue: #1F5FA8;

  /* Surfaces / grounds (flip in dark) */
  --surface-page: #FFFFFF;
  --surface-band: #F7F6F2;
  --surface-card: #FFFFFF;
  --surface-border: #E2E1DC;
  --surface-muted: #EDEDE9;

  /* Text on surfaces (flip in dark) */
  --text-body: #22262A;
  --text-muted: #5C6266;
  --text-heading: #22262A;
  --link: #1F5FA8;
  --link-hover: #17457a;

  /* On-brand text (stays light in BOTH themes — never remapped to a surface) */
  --on-brand-text: #FFFFFF;
  --on-brand-muted: #C9CCCF;

  /* Header/footer ground (near-black in BOTH themes) */
  --bar-bg: #1A1D20;
  --bar-text: #FFFFFF;
  --bar-muted: #B7BBBE;
  --bar-border: #32373b;

  --shadow: 0 1px 3px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);

  --maxw: 1180px;
  --radius: 8px;

  --font-head: "Archivo", system-ui, -apple-system, Segoe UI, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
}

[data-theme="dark"] {
  --surface-page: #1A1D20;
  --surface-band: #22262A;
  --surface-card: #262b30;
  --surface-border: #383e43;
  --surface-muted: #2c3237;

  --text-body: #ECEBE6;
  --text-muted: #A9AEB2;
  --text-heading: #F4F3EE;
  --link: #79aef0;
  --link-hover: #a7cbf6;

  /* on-brand + bar tokens intentionally unchanged: they stay light on dark grounds */
  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.35);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--surface-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--text-heading);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--band { background: var(--surface-band); }
.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  font-size: .8rem;
  color: var(--brand-yellow);
  margin: 0 0 .4rem;
}
[data-theme="dark"] .eyebrow { color: var(--brand-yellow); }
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 700;
  text-decoration: none; cursor: pointer;
  padding: .8rem 1.4rem; border-radius: var(--radius);
  border: 2px solid transparent; font-size: 1rem;
  transition: background .15s, color .15s, border-color .15s;
  min-height: 48px;
}
.btn--primary { background: var(--brand-yellow); color: #22262A; }
.btn--primary:hover { background: var(--brand-yellow-hover); color: #22262A; }
.btn--ghost {
  background: transparent; color: var(--on-brand-text);
  border-color: rgba(255,255,255,.55);
}
.btn--ghost:hover { border-color: var(--brand-yellow); color: var(--brand-yellow); }
.btn--dark { background: var(--graphite); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; }
.btn--outline {
  background: transparent; color: var(--text-heading);
  border-color: var(--surface-border);
}
.btn--outline:hover { border-color: var(--brand-yellow); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bar-bg); color: var(--bar-text);
  border-bottom: 1px solid var(--bar-border);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1rem;
  min-height: 66px;
}
.brand { display: flex; align-items: center; text-decoration: none; margin-right: auto; }
.brand__mark {
  font-family: var(--font-head); font-weight: 800;
  text-transform: uppercase; letter-spacing: -.01em;
  line-height: 1; font-size: 1.15rem;
  background: var(--brand-yellow); color: #1A1D20;
  padding: .45rem .6rem; border-radius: 6px;
}
.brand__word { display: flex; flex-direction: column; }
.brand__sub {
  font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--bar-muted); font-weight: 600; margin-top: 2px;
}
.brand__mark small { display:block; font-size:.55rem; letter-spacing:.1em; font-weight:600; }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav a {
  color: var(--bar-text); text-decoration: none;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: .5rem .7rem; border-radius: 6px;
}
.nav a:hover { background: rgba(255,255,255,.08); color: var(--brand-yellow); }
.nav a[aria-current="page"] { color: var(--brand-yellow); }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-call {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--brand-yellow); color: #1A1D20;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  text-decoration: none; padding: .55rem .9rem; border-radius: 6px;
  min-height: 44px;
}
.header-call:hover { background: var(--brand-yellow-hover); color:#1A1D20; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 6px;
  background: transparent; color: var(--bar-text);
  border: 1px solid var(--bar-border); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--brand-yellow); color: var(--brand-yellow); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Mobile nav toggle */
.nav-toggle { display: none; background: transparent; border: 1px solid var(--bar-border);
  color: var(--bar-text); width: 42px; height: 42px; border-radius: 6px; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--graphite-deep); color: var(--on-brand-text); }
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero__inner {
  position: relative; z-index: 2;
  padding: 84px 0 76px;
  max-width: 720px;
}
.hero h1 { color: var(--on-brand-text); }
.hero .eyebrow { color: var(--brand-yellow); }
.hero p { color: var(--on-brand-muted); font-size: 1.2rem; max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero__meta { margin-top: 1.4rem; color: var(--on-brand-muted); font-size: .95rem; }

/* ---------- Trust strip ---------- */
.trust {
  background: var(--brand-yellow); color: #22262A;
}
.trust ul {
  display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: center;
  list-style: none; margin: 0; padding: 18px 20px;
  font-family: var(--font-head); font-weight: 700; font-size: .98rem;
  text-align: center;
}
.trust li { display: inline-flex; align-items: center; gap: .45rem; }
.trust .star { color: #7a5c00; }

/* ---------- Department grid ---------- */
.dept-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}
.dept-card {
  display: flex; flex-direction: column; gap: .35rem;
  background: var(--surface-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius); padding: 20px; text-decoration: none;
  color: var(--text-body); box-shadow: var(--shadow);
  border-left: 4px solid var(--brand-yellow);
  transition: transform .12s, border-color .12s;
}
.dept-card:hover { transform: translateY(-3px); border-left-color: var(--brand-yellow); color: var(--text-body); }
.dept-card h3 {
  font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: .02em; font-size: 1.02rem; margin: 0; color: var(--text-heading);
}
.dept-card p { margin: 0; font-size: .9rem; color: var(--text-muted); }

/* Full department sections (Departments page) */
.dept-list { display: grid; gap: 18px; }
.dept-item {
  background: var(--surface-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius); padding: 24px 26px;
  border-left: 5px solid var(--brand-yellow); box-shadow: var(--shadow);
}
.dept-item h3 {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .02em;
  font-size: 1.25rem; margin-bottom: .4rem;
}
.dept-item p { margin: 0 0 .7rem; }
.dept-item .call-line {
  font-size: .92rem; color: var(--text-muted); font-weight: 600;
}
.dept-item .call-line a { font-family: var(--font-head); }
.dept-item .flag {
  display: inline-block; margin-top: .3rem; padding: .2rem .55rem;
  background: var(--surface-muted); border-radius: 4px; font-size: .8rem;
  color: var(--text-muted); font-weight: 600;
}

/* ---------- Specials strip ---------- */
.specials-strip {
  background: var(--graphite); color: var(--on-brand-text);
  border-radius: var(--radius); padding: 34px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.2rem;
}
.specials-strip h2 { color: var(--on-brand-text); margin: 0; }
.specials-strip p { color: var(--on-brand-muted); margin: .4rem 0 0; max-width: 46ch; }

/* ---------- Reviews ---------- */
.reviews { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.review {
  background: var(--surface-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.review__stars { color: var(--brand-yellow); font-size: 1.05rem; letter-spacing: 2px; }
.review__text { margin: .6rem 0 1rem; font-size: 1rem; }
.review__by { margin-top: auto; font-weight: 700; font-family: var(--font-head); font-size: .95rem; }
.review__date { color: var(--text-muted); font-size: .85rem; font-weight: 400; }
.rating-summary {
  display: inline-flex; align-items: baseline; gap: .5rem;
  font-family: var(--font-head);
}
.rating-summary .big { font-size: 2.4rem; font-weight: 800; color: var(--brand-yellow); }

/* ---------- Location / contact blocks ---------- */
.split { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; align-items: start; }
.info-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.info-list li { padding: .35rem 0; display: flex; gap: .6rem; align-items: flex-start; }
.info-list .label {
  font-family: var(--font-head); font-weight: 700; min-width: 92px; color: var(--text-heading);
}
.info-list a { font-weight: 600; }
.map-embed {
  border: 1px solid var(--surface-border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); background: var(--surface-muted);
}
.map-embed iframe { width: 100%; height: 340px; border: 0; display: block; }
.note {
  font-size: .88rem; color: var(--text-muted); font-style: italic;
}

/* ---------- Forms ---------- */
.form-field { margin-bottom: 1rem; }
.form-field label {
  display: block; font-family: var(--font-head); font-weight: 700;
  margin-bottom: .3rem; font-size: .95rem;
}
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: .7rem .8rem; font-family: var(--font-body); font-size: 1rem;
  background: var(--surface-page); color: var(--text-body);
  border: 1px solid var(--surface-border); border-radius: 6px; min-height: 46px;
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: 2px solid var(--brand-yellow); outline-offset: 1px; border-color: var(--brand-yellow);
}
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
fieldset { border: 1px solid var(--surface-border); border-radius: 6px; padding: .8rem 1rem; margin: 0 0 1rem; }
fieldset legend { font-family: var(--font-head); font-weight: 700; font-size: .95rem; padding: 0 .4rem; }
.radio-row { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.radio-row label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; font-family: var(--font-body); }
.radio-row input { width: auto; min-height: auto; }

/* ---------- Owner-updatable specials slot ---------- */
.specials-slot {
  border: 2px dashed var(--surface-border); border-radius: var(--radius);
  padding: 40px 24px; text-align: center; background: var(--surface-band);
  color: var(--text-muted);
}
.specials-slot strong { color: var(--text-heading); font-family: var(--font-head); }
.specials-image { border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

/* ---------- Feature / differentiator lists ---------- */
.feature-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
.feature {
  background: var(--surface-card); border: 1px solid var(--surface-border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  border-top: 3px solid var(--brand-yellow);
}
.feature h3 { font-family: var(--font-head); text-transform: uppercase; font-size: 1.02rem; letter-spacing: .02em; }
.feature p { margin: 0; color: var(--text-muted); }

/* ---------- Media + text ---------- */
.media-text { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.media-text img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Page header ---------- */
.page-head { background: var(--graphite-deep); color: var(--on-brand-text); padding: 56px 0; }
.page-head h1 { color: var(--on-brand-text); margin: 0; }
.page-head .eyebrow { color: var(--brand-yellow); }
.page-head p { color: var(--on-brand-muted); max-width: 60ch; margin: .6rem 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bar-bg); color: var(--bar-muted); padding: 48px 0 28px; border-top: 3px solid var(--brand-yellow); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: var(--bar-text); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em; font-size: .95rem; margin-bottom: .8rem; }
.site-footer a { color: var(--bar-muted); text-decoration: none; }
.site-footer a:hover { color: var(--brand-yellow); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { padding: .2rem 0; }
.footer-brand .brand__mark { display: inline-block; margin-bottom: .8rem; }
.footer-legal {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--bar-border);
  font-size: .82rem; color: var(--bar-muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem;
}

/* ---------- Sticky mobile call bar ---------- */
.mobile-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: 1fr; }
  .split, .media-text, .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .media-text .media-text__img--first { order: -1; }
}
@media (max-width: 720px) {
  .nav {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bar-bg); border-bottom: 1px solid var(--bar-border);
    padding: .5rem; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 1rem; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; order: 3; }
  .header-call .header-call__label { display: none; }
  .header-call { padding: .55rem .7rem; }
  body { padding-bottom: 64px; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  }
  .mobile-bar a {
    display: flex; align-items: center; justify-content: center; gap: .4rem;
    padding: 16px 8px; text-decoration: none; font-family: var(--font-head); font-weight: 700;
    min-height: 56px;
  }
  .mobile-bar .call { background: var(--brand-yellow); color: #1A1D20; }
  .mobile-bar .dir { background: var(--graphite); color: #fff; }
  .mobile-bar svg { width: 18px; height: 18px; }
}
@media (max-width: 480px) {
  .dept-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--brand-yellow);
  color: #1A1D20; padding: .6rem 1rem; z-index: 100; font-family: var(--font-head); font-weight: 700;
}
.skip-link:focus { left: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
