/* ============================================================
   StructSure Fencing — shared site styles
   Industrial-modern: warm charcoal + paper white + fence red
   Type: Barlow Condensed (display) / Barlow (body)
   ============================================================ */

:root {
  --ink: #1d1b19;
  --ink-soft: #4a4642;
  --ink-faint: #7a746e;
  --paper: #faf9f7;
  --paper-dim: #f1efec;
  --line: #e3e0db;
  --red: oklch(0.55 0.19 28);
  --red-deep: oklch(0.47 0.18 28);
  --red-tint: oklch(0.96 0.02 28);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Helvetica Neue", Helvetica, sans-serif;
  --maxw: 1140px;
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--red); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  min-height: 48px;
}
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-deep); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-outline-light:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- Hazard stripe accent ---------- */
.hazard {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--red) 0 14px,
    var(--ink) 14px 28px
  );
}

/* ---------- Photo rotator ---------- */
.rotator { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; background: #2a2825; }
.rotator-track { position: absolute; inset: 0; }
.rotator-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 0.6s ease; pointer-events: none; }
.rotator-slide.is-active { opacity: 1; pointer-events: auto; }
.rotator-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rotator-slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 18px 16px;
  background: linear-gradient(to top, rgba(20,18,16,0.82), rgba(20,18,16,0));
  color: #fff; font-family: var(--display); font-size: 17px; letter-spacing: 0.05em; text-transform: uppercase;
}
.rotator-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: rgba(20,18,16,0.55); color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
  opacity: 0; transition: opacity 0.2s ease, background 0.2s ease;
}
.rotator:hover .rotator-nav, .rotator-nav:focus-visible { opacity: 1; }
.rotator-nav:hover { background: var(--red); }
.rotator-nav.prev { left: 12px; }
.rotator-nav.next { right: 12px; }
.rotator-dots { position: absolute; bottom: 14px; right: 16px; display: flex; gap: 8px; }
.rotator-dots button {
  width: 9px; height: 9px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.8); background: transparent; cursor: pointer;
  transition: background 0.2s ease;
}
.rotator-dots button[aria-selected="true"] { background: var(--red); border-color: var(--red); }
@media (hover: none) { .rotator-nav { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rotator-slide { transition: none; } }
/* Small variant: card-sized, no captions, compact controls */
.rotator-sm .rotator-slide figcaption { display: none; }
.rotator-sm .rotator-nav { width: 34px; height: 34px; font-size: 20px; }
.rotator-sm .rotator-nav.prev { left: 8px; }
.rotator-sm .rotator-nav.next { right: 8px; }
.rotator-sm .rotator-dots { bottom: 10px; right: 10px; gap: 6px; }
.rotator-sm .rotator-dots button { width: 7px; height: 7px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 247, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.logo-mark { width: 48px; height: 48px; flex: none; object-fit: contain; display: block; }
.logo-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
}
.logo-text em {
  font-style: normal;
  color: var(--red);
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.main-nav a {
  white-space: nowrap;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--red); }
.main-nav a.active { color: var(--ink); border-bottom: 2px solid var(--red); }
.main-nav .btn { font-size: 17px; padding: 10px 20px; min-height: 42px; white-space: nowrap; }
.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  white-space: nowrap;
}
.header-phone:hover { color: var(--red); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
}
.nav-toggle .lines {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  box-shadow: 0 7px 0 var(--ink), 0 -7px 0 var(--ink);
}

/* ---------- Page hero band (interior pages) ---------- */
.page-hero {
  background: var(--ink);
  color: #fff;
  padding: 64px 0 56px;
}
.page-hero .kicker { color: oklch(0.75 0.12 28); }
.page-hero h1 {
  font-size: clamp(42px, 6vw, 64px);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.page-hero p.lede {
  max-width: 640px;
  font-size: 19px;
  color: rgba(255,255,255,0.82);
  margin: 16px 0 0;
}

.kicker {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 10px;
}

section { padding: 72px 0; }
section.tight { padding: 48px 0; }
.section-dim { background: var(--paper-dim); }
.section-dark { background: var(--ink); color: #fff; }

h2.section-title {
  font-size: clamp(34px, 4.5vw, 48px);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-intro {
  max-width: 640px;
  color: var(--ink-soft);
  font-size: 18px;
  margin: 0 0 40px;
}

/* ---------- Cards / grids ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ---------- Image placeholder ---------- */
.ph {
  position: relative;
  background: repeating-linear-gradient(
    -45deg,
    #ecebe8 0 12px,
    #e2e0dc 12px 24px
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ph .ph-label {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 13px;
  color: var(--ink-faint);
  background: rgba(250,249,247,0.92);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 6px 12px;
  text-align: center;
  max-width: 85%;
}
.ph-dark {
  background: repeating-linear-gradient(
    -45deg,
    #2a2825 0 12px,
    #232120 12px 24px
  );
  border-color: #3a3733;
}
.ph-dark .ph-label {
  background: rgba(29,27,25,0.9);
  border-color: #3a3733;
  color: #a39c94;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--ink);
  color: #fff;
  padding: 64px 0;
}
.cta-band .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 {
  font-size: clamp(32px, 4vw, 44px);
  text-transform: uppercase;
}
.cta-band p { color: rgba(255,255,255,0.75); margin: 8px 0 0; max-width: 480px; }
.cta-band .actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  background: #161412;
  color: #b5aea7;
  padding: 56px 0 28px;
  font-size: 15px;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #2c2925;
}
.site-footer h3 {
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-footer a { color: #b5aea7; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .foot-logo { margin-bottom: 14px; }
.site-footer .foot-logo .logo-text { color: #fff; }
.site-footer .legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  font-size: 13.5px;
  color: #7d766f;
}

/* ---------- Sticky mobile call bar ---------- */
.mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--ink);
  border-top: 1px solid #3a3733;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}
.mobile-cta .row { display: flex; gap: 10px; }
.mobile-cta .btn { flex: 1; font-size: 17px; padding: 12px 10px; }

/* ---------- Checklist ---------- */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.checklist .check {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

/* ---------- FAQ ---------- */
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.faq-item + .faq-item { margin-top: 12px; }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .indicator {
  flex: none;
  font-family: var(--body);
  font-size: 22px;
  font-weight: 400;
  color: var(--red);
  transition: transform 0.2s ease;
}
.faq-item[open] summary .indicator { transform: rotate(45deg); }
.faq-item .faq-body {
  padding: 0 22px 20px;
  color: var(--ink-soft);
  max-width: 760px;
}
.faq-item .faq-body p { margin: 0; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.field input,
.field select,
.field textarea {
  font-family: var(--body);
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid #cfcbc4;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 0;
  border-color: var(--red);
}
.field .error-msg {
  display: none;
  color: var(--red-deep);
  font-size: 14px;
}
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: var(--red); background: var(--red-tint); }
.field.invalid .error-msg { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 0 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--line);
  }
  .main-nav a.active { border-bottom: 1px solid var(--line); color: var(--red); }
  .main-nav .btn { margin: 14px 24px 0; }
  .nav-toggle { display: block; }
  .header-phone .phone-label { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .mobile-cta { display: block; }
  body { padding-bottom: 76px; }
  section { padding: 56px 0; }
}

@media (max-width: 560px) {
  .site-footer .cols { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  [data-grid="connector-photos"], [data-grid="mid-height"] { grid-template-columns: 1fr !important; }
}

.photo-note-frame { position: relative; border-radius: var(--radius); overflow: hidden; }
.photo-note-frame img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.pn-label {
  position: absolute;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  color: #fff;
  background: rgba(20,18,16,0.82);
  padding: 7px 12px;
  border-radius: 3px;
}
.pn-label.pn-ours { background: var(--red); }
.pn-contain img { object-fit: contain; background: var(--paper-dim); }
.pn-cover-labels { container-type: inline-size; }
.pn-cover-labels img { aspect-ratio: auto !important; object-fit: cover !important; width: 100%; height: 100%; }
.pn-fit { font-size: 9cqw; padding: 1.2cqw 2.4cqw; border-radius: 2px; }
.pn-box { display: grid; place-items: center; padding: 0; text-align: center; line-height: 1; }
@media (max-width: 700px) { [data-grid="measurements"] { grid-template-columns: 1fr !important; } }
@media (max-width: 900px) { [data-block="measurements"] { max-width: 100% !important; } }
@media (max-width: 760px) { [data-grid="base-compare"] { grid-template-columns: 1fr !important; } }
.pn-pad { background: var(--paper-dim); display: grid; place-items: center; }
.pn-media { position: relative; overflow: hidden; border-radius: 3px; container-type: inline-size; }
.pn-media img { width: 100%; height: 100%; aspect-ratio: auto !important; object-fit: fill !important; display: block; }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .wrap [style*="grid-template-columns"]:not(dl):not([style*="aspect-ratio"]):not(.pn-media) { grid-template-columns: 1fr !important; }
  [data-grid="measurements"], [data-grid="base-compare"], [data-grid="spec-panels"], [data-grid="connector-photos"], [data-grid="mid-height"] { grid-template-columns: 1fr !important; gap: 16px !important; }
  section { padding: 40px 0; }
  .wrap { padding: 0 18px; }
  h1 { font-size: clamp(30px, 8.5vw, 44px) !important; }
  .section-title { font-size: clamp(26px, 7.5vw, 38px) !important; }
  .lede, .section-intro { font-size: 17px !important; }
  .card { padding: 20px !important; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions .btn, .btn-inline { width: auto; }
  figcaption { font-size: 13px !important; }
  .pn-label { font-size: 15px !important; padding: 5px 9px !important; }
  .pn-fit { font-size: 8.5cqw !important; padding: 1.2cqw 2.4cqw !important; }
  .checklist { font-size: 16px !important; }
  [data-block="measurements"] { padding: 16px !important; }
}
@media (max-width: 400px) {
  .logo-text { font-size: 19px; }
  .wrap { padding: 0 14px; }
}
[data-grid="rental-gallery"] { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
