/* =========================================================================
   HW DESIGNS LLC — shared stylesheet for every page of hwdesigns.us
   Brand: black + gold (matches the logo and the Review Tap Sign pages).
   Light and dark mode follow the visitor's device setting.
   ========================================================================= */

/* ---------- Fonts (stored on our own site, no outside requests) ---------- */
@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/nunito-sans-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

/* ---------- Colors and sizes (change the brand here) ---------- */
:root {
  --black: #111111;
  --gold: #f2b705;
  --gold-text: #8a6a00;       /* gold that is readable on light backgrounds */

  --bg: #faf9f6;
  --surface: #ffffff;
  --border: #e4e1da;
  --text: #1a1a1a;
  --muted: #5c5a55;
  --link: var(--gold-text);

  /* Product-line accents */
  --pet: #2f6b4f;             /* Pine, from the pet branding */
  --pet-soft: #e4f0e6;
  --hw: #9a5a1c;              /* Copper, for electronics */
  --hw-soft: #f6eadc;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
  --wrap: 1120px;
  --gutter: 20px;

  --font-head: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --surface: #1b1b1b;
    --border: #2f2d29;
    --text: #f2f0ea;
    --muted: #b3afa6;
    --link: var(--gold);

    --pet: #7cc4a0;
    --pet-soft: #1c2a23;
    --hw: #e4a064;
    --hw-soft: #2b2119;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--gold); color: var(--black);
  padding: 8px 14px; border-radius: 8px; font-weight: 700; z-index: 100;
}
.skip-link:focus { left: 8px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 0.75rem;
}

/* ---------- Header (same on every page) ---------- */
.site-header { background: var(--black); color: #faf9f6; position: relative; z-index: 10; }
.site-header::after { content: ""; display: block; height: 4px; background: var(--gold); }

.header-bar { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }

.brand { display: inline-flex; align-items: center; }
.brand img { height: 38px; width: auto; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid #3a3a3a; color: #faf9f6;
  border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 700; cursor: pointer;
}

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.site-nav a {
  display: block;
  color: #e9e6df;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
}
.site-nav a:hover { color: var(--gold); background: #1e1e1e; }
.site-nav a[aria-current="page"] { color: var(--gold); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--black); border-bottom: 4px solid var(--gold); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .site-nav a { padding: 14px 8px; border-radius: 0; border-bottom: 1px solid #262626; }
  .site-header::after { position: relative; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 8vw, 88px) 0; }
.section--tight { padding-top: 0; }

.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(32px, 5vw, 56px); }
.hero h1 { max-width: 17ch; }
.lead { font-size: clamp(1.1rem, 2.1vw, 1.3rem); color: var(--muted); max-width: 60ch; }

/* ---------- Product-line cards (home page) ---------- */
.lines { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 760px) { .lines { grid-template-columns: 1fr 1fr; gap: 28px; } }

.line-card {
  --accent: var(--gold-text);
  --accent-soft: var(--bg);
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 5px solid var(--accent);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.line-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,0.08), 0 16px 36px rgba(0,0,0,0.12); }
.line-card--pet { --accent: var(--pet); --accent-soft: var(--pet-soft); }
.line-card--hw { --accent: var(--hw); --accent-soft: var(--hw-soft); }

.line-card__media { aspect-ratio: 4 / 3; background: var(--accent-soft); overflow: hidden; }
.line-card__media img { width: 100%; height: 100%; object-fit: cover; }

.line-card__body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.line-card__body .eyebrow { color: var(--accent); }
.line-card__body h2 { margin-bottom: 0.4em; }
.line-card__body p { color: var(--muted); }

.line-card__cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 800;
  color: var(--accent);
}
.line-card__cta span { transition: transform 0.18s ease; }
.line-card:hover .line-card__cta span { transform: translateX(4px); }

/* ---------- Three-point strip ---------- */
.points { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 760px) { .points { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.point { border-top: 2px solid var(--border); padding-top: 18px; }
.point h3 { margin-bottom: 0.35em; }
.point p { color: var(--muted); margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 800; font-size: 1.05rem;
  padding: 14px 22px; border-radius: 12px;
  background: var(--gold); color: var(--black);
  text-decoration: none; border: 2px solid var(--gold);
}
.btn:hover { background: #ffc91f; border-color: #ffc91f; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface); border-color: var(--text); }

/* ---------- Footer (same on every page) ---------- */
.site-footer { background: var(--black); color: #cfcbc2; margin-top: clamp(48px, 8vw, 88px); }
.site-footer::before { content: ""; display: block; height: 4px; background: var(--gold); }
.site-footer a { color: #e9e6df; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }

.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }

.footer-brand img { height: 34px; width: auto; margin-bottom: 14px; }
.footer-brand p { margin: 0; font-size: 0.95rem; }

.footer-col h2 {
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; font-size: 0.97rem; overflow-wrap: anywhere; }

.footer-bottom {
  border-top: 1px solid #2a2a2a;
  padding-top: 18px;
  padding-bottom: 28px;
  font-size: 0.85rem;
  color: #9d998f;
  display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between;
}

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Logo panels on the home-page cards ---------- */
.line-card__media--logo {
  display: flex; align-items: center; justify-content: center;
  background: var(--panel, #111111);
  padding: 8% 12%;
}
.line-card__media--logo img { width: 100%; height: 100%; object-fit: contain; }
.line-card--pet .line-card__media--logo { --panel: #1f3a2b; }   /* Deep pine, from the pet branding */
.line-card--hw .line-card__media--logo { --panel: #111111; }    /* Brand black */
.line-card--hw .line-card__media--logo img { max-width: 82%; }

/* ---------- Legal pages (Terms, Privacy) ---------- */
.legal { max-width: 760px; }
.legal .updated { color: var(--muted); font-size: 0.95rem; }
.legal h2 { font-size: 1.5rem; margin-top: 2em; padding-top: 1em; border-top: 2px solid var(--border); }
.legal h3 { font-size: 1.15rem; margin-top: 1.6em; }
.legal ul { padding-left: 1.25em; }
.legal li { margin-bottom: 0.4em; }

.footer-legal a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.footer-legal a:hover { color: #ffd34d; text-decoration-thickness: 2px; }

/* =========================================================================
   Product pages (Pet Products, Hardware)
   ========================================================================= */

/* ---------- Line hero: colored band with the product-line logo ---------- */
.line-hero { color: #faf9f6; padding: clamp(40px, 7vw, 72px) 0; }
.line-hero--pet { background: #1f3a2b; }
.line-hero--hw { background: #111111; }
.line-hero .wrap { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 760px) { .line-hero .wrap { grid-template-columns: 220px 1fr; gap: 48px; } }
.line-hero__logo { width: 180px; height: auto; }
@media (min-width: 760px) { .line-hero__logo { width: 220px; } }
.line-hero .eyebrow { color: #8fbf6a; }
.line-hero--hw .eyebrow { color: var(--gold); }
.line-hero h1 { margin-bottom: 0.3em; }
.line-hero p { color: #d8e3dc; font-size: 1.15rem; max-width: 58ch; margin: 0; }
.line-hero--hw p { color: #cfcbc2; }

/* ---------- Product block ---------- */
.product { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 860px) { .product { grid-template-columns: 1.05fr 1fr; gap: 56px; } }

.gallery__main {
  background: #ffffff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 1 / 1;
}
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }

.product__model { font-family: var(--font-head); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 0.4rem; }
.product h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.product__price { font-family: var(--font-head); font-weight: 800; font-size: 1.8rem; margin: 0 0 1rem; }
.product__lead { color: var(--muted); }

.badges { list-style: none; margin: 0 0 1.4rem; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li {
  font-size: 0.85rem; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  background: var(--pet-soft); color: var(--pet); border: 1px solid color-mix(in srgb, var(--pet) 30%, transparent);
}

/* Color swatches */
.swatch-label { font-weight: 700; margin: 0 0 0.5rem; }
.swatch-label span { font-weight: 400; color: var(--muted); }
.swatches { display: flex; gap: 12px; margin: 0 0 1.6rem; padding: 0; list-style: none; }
.swatch {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--swatch);
  cursor: pointer; padding: 0; position: relative;
}
.swatch[aria-pressed="true"] { outline: 3px solid var(--text); outline-offset: 3px; }
.swatch:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.btn--disabled { background: var(--surface); color: var(--muted); border-color: var(--border); cursor: default; }
.btn--disabled:hover { background: var(--surface); border-color: var(--border); }
.buy__note { color: var(--muted); font-size: 0.95rem; }

/* ---------- Kit contents / feature cards ---------- */
.section-head { max-width: 62ch; margin-bottom: 28px; }
.section-head p { color: var(--muted); margin: 0; }

.tiles { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 600px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .tiles--4 { grid-template-columns: repeat(4, 1fr); } }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  border-top: 4px solid var(--accent, var(--pet)); padding: 22px 22px 24px;
}
.tile__no { font-family: var(--font-head); font-weight: 800; color: var(--accent, var(--pet)); font-size: 0.85rem; letter-spacing: 0.12em; }
.tile h3 { margin: 0.35rem 0 0.4rem; }
.tile p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* ---------- Specifications & care ---------- */
.two-col { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1.1fr 1fr; gap: 48px; } }

.spec-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 38%; font-weight: 700; }
.spec-table td { color: var(--muted); }

.care { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; }
.care h3 { margin-bottom: 0.6rem; }
.care ul { margin: 0; padding-left: 1.2em; color: var(--muted); }
.care li { margin-bottom: 0.35em; }

/* ---------- "Coming soon" band ---------- */
.soon {
  background: var(--pet-soft); border: 1px solid color-mix(in srgb, var(--pet) 25%, transparent);
  border-radius: var(--radius); padding: clamp(24px, 4vw, 40px);
}
.soon h2 { color: var(--pet); }
.soon p { margin: 0; max-width: 62ch; }

/* ---------- Hardware product rows ---------- */
.hw-list { display: grid; gap: clamp(40px, 6vw, 64px); }
.hw-item { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 860px) {
  .hw-item { grid-template-columns: 1fr 1fr; gap: 56px; }
  .hw-item--flip .hw-item__media { order: 2; }
}
.hw-item__media {
  background: #ffffff; border: 1px solid var(--border); border-top: 4px solid var(--hw);
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center; padding: 6%;
}
.hw-item__media img { width: 100%; height: 100%; object-fit: contain; }
.hw-item__media--dark { background: #111111; padding: 0; }
.hw-item__media--dark img { object-fit: cover; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
  background: var(--hw-soft); color: var(--hw); border: 1px solid color-mix(in srgb, var(--hw) 35%, transparent);
  margin-bottom: 0.9rem;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.hw-item h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 0.35em; }
.hw-item__sub { font-family: var(--font-head); font-weight: 700; color: var(--hw); margin: -0.2em 0 0.8em; }
.hw-item p { color: var(--muted); }

.feature-list { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: 8px; }
.feature-list li { position: relative; padding-left: 22px; }
.feature-list li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 8px; height: 8px; background: var(--hw); }

.link-row { display: flex; flex-wrap: wrap; gap: 12px; }
.fine-print { font-size: 0.85rem; color: var(--muted); margin-top: 1rem; }

/* ---------- Documentation banner ---------- */
.docs-banner {
  display: grid; grid-template-columns: 1fr; gap: 18px; align-items: center;
  background: #111111; color: #faf9f6; border-radius: var(--radius); border-top: 4px solid var(--gold);
  padding: clamp(24px, 4vw, 40px);
}
@media (min-width: 760px) { .docs-banner { grid-template-columns: 1fr auto; } }
.docs-banner h2 { color: #ffffff; margin-bottom: 0.3em; }
.docs-banner p { color: #cfcbc2; margin: 0; max-width: 60ch; }
.docs-banner .eyebrow { color: var(--gold); }

/* ---------- Plain page hero (About, Contact) ---------- */
.page-hero { padding: clamp(40px, 7vw, 80px) 0 clamp(8px, 2vw, 16px); }
.page-hero h1 { max-width: 20ch; }

/* ---------- Story block ---------- */
.story { max-width: 68ch; }
.story p { font-size: 1.1rem; }

.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.facts th { width: 40%; font-weight: 700; padding-right: 16px; }
.facts td { color: var(--muted); }

/* ---------- Contact card ---------- */
.contact-card {
  background: #111111; color: #faf9f6; border-radius: var(--radius); border-top: 4px solid var(--gold);
  padding: clamp(24px, 5vw, 48px);
}
.contact-card .eyebrow { color: var(--gold); }
.contact-card h2 { color: #ffffff; }
.contact-card p { color: #cfcbc2; max-width: 60ch; }
.contact-email {
  display: inline-block; font-family: var(--font-head); font-weight: 800;
  font-size: clamp(1.3rem, 4.5vw, 2rem); color: var(--gold); text-decoration: none;
  overflow-wrap: anywhere; margin: 0.2em 0 0.6em;
}
.contact-email:hover { text-decoration: underline; }
.checklist { margin: 0; padding-left: 1.2em; color: var(--muted); }
.checklist li { margin-bottom: 0.4em; }
.tile a { font-weight: 700; }
/* Keep dark panels visible against the dark page background */
.contact-card, .docs-banner { border: 1px solid var(--border); border-top: 4px solid var(--gold); }
/* Full-bleed product photo inside the hardware media frame */
.hw-item__media--photo { padding: 0; background: #ece7df; }
.hw-item__media--photo img { object-fit: cover; }
