/* Suffolk Cement Precast: website draft v1, shared design system.
   Clean and fresh, from the Showroom direction: white page, pale stone grounds, ink type and
   linework, the logo red only for what's selected or new. Funnel Display for headlines, Funnel Sans
   for everything else. Square edges. Page-specific styles live in assets/css/pages/{page}.css. */

:root {
  /* color */
  --white: #ffffff;
  --stone: #f3f4f2;          /* bands, tiles, drawing grounds */
  --stone-2: #e9ebe7;        /* hover on stone */
  --ink: #191b1d;
  --grey: #5d6469;           /* secondary text: 5.9:1 on white, 5.4:1 on stone */
  --rule: rgba(25, 27, 29, 0.14);
  --rule-strong: rgba(25, 27, 29, 0.55);
  --red: #e1251b;            /* logo red: selected, active, new. 4.7:1 on white */
  --red-ink: #b81d14;        /* red text on white when it must be read */
  --open: #1f7a4a;           /* the "open now" dot only */
  --ill-ground: var(--stone);

  /* illustration-only colors (cutaways, maps): never for UI chrome */
  --water: #cfe3ec;
  --water-deep: #3d7a96;
  --soil: #ece4d4;
  --lawn: #6aa86f;

  /* type */
  --display: "Funnel Display", "Funnel Sans", system-ui, sans-serif;
  --sans: "Funnel Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-body: 17px;
  --fs-small: 15px;
  --fs-fine: 14px;
  --h1: clamp(40px, 6vw, 88px);
  --h1-page: clamp(36px, 4.6vw, 64px);
  --h2: clamp(28px, 3.2vw, 42px);
  --h3: 20px;

  /* space and layout */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --head-h: 68px;
  --section: clamp(56px, 7vw, 104px);
  --gap: clamp(24px, 4vw, 48px);
  --gap-wide: clamp(40px, 7vw, 120px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-padding-top: calc(var(--head-h) + 24px);
  -webkit-text-size-adjust: 100%;
}
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 var(--fs-body) / 1.55 var(--sans);
  font-feature-settings: "kern";
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 500; text-wrap: balance; }
h3, h4 { font-family: var(--sans); font-weight: 600; }
p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.sr {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; background: var(--ink); color: var(--white); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section:not(.band) + .section:not(.band) { padding-top: 0; }  /* two white sections in a row share one gap */
.band { background: var(--stone); }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--gap) var(--gap-wide); align-items: start; }
.split-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap) var(--gap-wide); align-items: start; }

/* Page title area for inner pages */
.page-hero { padding-block: clamp(40px, 6vw, 88px) clamp(28px, 4vw, 48px); }
.page-hero h1 { font-size: var(--h1-page); line-height: 1.02; letter-spacing: -0.026em; max-width: 16em; }
.page-hero .lead { margin-top: 18px; max-width: 36em; font-size: clamp(17px, 1.4vw, 19px); }
.page-hero .actions { margin-top: 26px; }

/* Section heading + lead */
.section-head { max-width: 46em; margin-bottom: clamp(24px, 3.5vw, 40px); }
.section-head h2, h2.h2 { font-size: var(--h2); line-height: 1.06; letter-spacing: -0.02em; }
.lead { margin-top: 12px; color: var(--grey); max-width: 38em; }
.fine { font-size: var(--fs-fine); color: var(--grey); }
.num, .price { font-variant-numeric: tabular-nums; }
.price { font-weight: 600; white-space: nowrap; }
.call-price { font-weight: 400; color: var(--grey); white-space: nowrap; }

/* ---------- buttons and links ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border: 1.5px solid var(--ink); border-radius: 0;
  background: var(--white); color: var(--ink);
  font: 600 15.5px/1.2 var(--sans);
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-small { min-height: 38px; padding: 0 12px; font-size: 14.5px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; text-decoration: none; }
.btn-add::before { content: "+"; font-weight: 600; font-size: 1.15em; line-height: 1; }
.text-link { font-weight: 600; }
.pdf-link::after { content: " (PDF)"; font-weight: 400; color: var(--grey); }

/* ---------- forms ---------- */
input, textarea, select {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1.5px solid var(--rule-strong); border-radius: 0; background: var(--white);
  font-size: 16px;
}
textarea { resize: vertical; line-height: 1.45; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:hover, textarea:hover, select:hover { border-color: var(--ink); }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
input[type="radio"], input[type="checkbox"] { width: auto; min-height: 0; accent-color: var(--ink); }
::placeholder { color: var(--grey); opacity: 1; }

.field { display: block; margin-top: 18px; }
.field > span, .field-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: var(--fs-small); }
.field em { font-style: normal; font-weight: 400; color: var(--grey); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.hint { display: block; margin-top: 6px; min-height: 1.4em; font-size: 14.5px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.form-error { margin-top: 12px; padding: 10px 14px; border-left: 3px solid var(--red); background: var(--stone); font-weight: 600; }

/* Toggle chips: <label class="pick"><input type="radio|checkbox"><span>8′</span></label> */
.picks { margin: 0; padding: 0; border: 0; min-width: 0; }
.picks legend { padding: 0; margin-bottom: 10px; font-weight: 600; font-size: var(--fs-small); }
.pick-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pick span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; min-width: 44px; padding: 8px 13px;
  border: 1.5px solid var(--rule-strong); background: var(--white);
  font-size: 15px; line-height: 1.2; font-variant-numeric: tabular-nums;
}
.pick input:hover + span { border-color: var(--ink); }
.pick input:checked + span { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); font-weight: 600; }
.pick input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.pick input:disabled + span { opacity: 0.4; border-style: dashed; cursor: not-allowed; }

/* Quantity stepper: <span class="stepper"><button>−</button><output>2</output><button>+</button></span> */
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); background: var(--white); }
.stepper button { width: 38px; height: 38px; border: 0; background: none; font-size: 19px; line-height: 1; cursor: pointer; }
.stepper button:hover { background: var(--stone); }
.stepper output { min-width: 34px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- tables ---------- */
.table-scroll { position: relative; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.data-table caption { caption-side: top; text-align: left; padding-bottom: 10px; font-size: var(--fs-small); color: var(--grey); }
.data-table th, .data-table td { padding: 12px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.data-table th + th, .data-table th + td, .data-table td + td { padding-left: 18px; }
.data-table thead th { padding-top: 0; font-size: 14px; font-weight: 500; color: var(--grey); border-bottom-color: var(--ink); }
.data-table tbody th { font-weight: 600; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table tr.is-hit > * { background: var(--stone); }
.data-table tr.is-hit > :first-child { box-shadow: inset 3px 0 0 var(--red); padding-left: 12px; }

/* ---------- draft bar, header, navigation ---------- */
.draft-bar { background: var(--stone); font-size: 13.5px; }
.draft-bar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding-block: 6px; }
.draft-bar a { font-weight: 600; }

.site-head { position: sticky; top: 0; z-index: 40; background: var(--white); border-bottom: 1px solid var(--rule); }
.head-row { display: flex; align-items: center; gap: 22px; height: var(--head-h); }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; font-weight: 600; font-size: 16px; line-height: 1.15; text-decoration: none; min-width: 0; }
.brand img { width: 40px; height: 40px; flex: none; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { padding: 23px 0 20px; border-bottom: 3px solid transparent; font-size: 15.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.site-nav a:hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); font-weight: 600; }
.head-phone { font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.head-phone:hover { text-decoration: underline; }
.head-list { min-height: 42px; padding: 0 12px 0 16px; }
.count {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px;
  background: var(--white); color: var(--ink); font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.count[data-n="0"] { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); }
.count.bump { animation: bump 0.45s ease-out; }
@keyframes bump { 35% { transform: scale(1.3); background: var(--red); color: var(--white); } }
.menu-btn { display: none; min-height: 42px; padding: 0 12px; border: 1.5px solid var(--ink); background: var(--white); font-weight: 600; cursor: pointer; }

/* ---------- product tiles and drawings ---------- */
.tiles { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 24px; }
.tile { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; text-decoration: none; cursor: pointer; }
.tile-art { position: relative; display: block; aspect-ratio: 1; background: var(--stone); }
.tile-art svg { width: 100%; height: 100%; }
.tile-art::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--red); transform: scaleX(0); }
.tile.is-open .tile-art::after { transform: none; }
.tile-name { display: block; margin-top: 14px; font-size: 17px; font-weight: 600; line-height: 1.3; }
.tile-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 3px; font-size: 15px; }
.tile-price { font-variant-numeric: tabular-nums; }
.tile-count { color: var(--grey); white-space: nowrap; }
.tile:hover .tile-name { text-decoration: underline; text-underline-offset: 4px; }
.tile:focus-visible { outline-offset: 6px; }
.tile .ill { transition: transform 0.25s ease; }
.tile:hover .ill { transform: translateY(-5px); }

.ill { overflow: visible; }
.ill path { vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.ill .o { fill: var(--ill-ground); stroke: var(--ink); stroke-width: 1.6; }
.ill .k { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.ill .l { fill: none; stroke: var(--ink); stroke-width: 1.1; }
.ill .r { fill: var(--ill-ground); stroke: var(--red); stroke-width: 1.6; }
.ill .rl { fill: none; stroke: var(--red); stroke-width: 1.6; }
.ill .rt { fill: none; stroke: var(--red); stroke-width: 1.1; }
.ill .rd { fill: none; stroke: var(--red); stroke-width: 1.4; stroke-dasharray: 3 3; }
.on-white .ill { --ill-ground: var(--white); }

/* ---------- side panel (native <dialog class="panel">) ---------- */
.panel {
  position: fixed; inset: 0 0 0 auto; width: min(620px, 100%); max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0; background: var(--white); color: var(--ink); overflow: hidden;
}
.panel::backdrop { background: rgba(25, 27, 29, 0.38); }
.panel[open] { animation: panel-in 0.34s cubic-bezier(0.2, 0.75, 0.25, 1); }
.panel[open]::backdrop { animation: scrim-in 0.34s ease; }
@keyframes panel-in { from { transform: translateX(100%); } }
@keyframes scrim-in { from { opacity: 0; } }
.panel-inner { display: flex; flex-direction: column; height: 100%; }
.panel-bar { display: flex; justify-content: flex-end; padding: 12px clamp(16px, 3vw, 28px); }
.panel-close { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; border: 0; background: none; font-weight: 600; font-size: 15px; cursor: pointer; }
.panel-close::after {
  content: ""; width: 14px; height: 14px;
  background:
    linear-gradient(45deg, transparent calc(50% - 0.8px), var(--ink) calc(50% - 0.8px), var(--ink) calc(50% + 0.8px), transparent calc(50% + 0.8px)),
    linear-gradient(-45deg, transparent calc(50% - 0.8px), var(--ink) calc(50% - 0.8px), var(--ink) calc(50% + 0.8px), transparent calc(50% + 0.8px));
}
.panel-body { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 clamp(16px, 4vw, 40px) 40px; }
.panel-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; padding: 14px clamp(16px, 4vw, 40px); border-top: 1px solid var(--rule); background: var(--white); }

/* ---------- notices ---------- */
.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 80; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px; max-width: min(560px, calc(100% - 32px));
  padding: 12px 14px 12px 18px; background: var(--ink); color: var(--white); font-size: 15px;
}
.toast a { color: var(--white); font-weight: 600; white-space: nowrap; }
.toast.is-in { animation: toast-in 0.25s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
.note { padding: 14px 18px; background: var(--stone); font-size: var(--fs-small); }
.note strong { font-weight: 600; }

/* Open status: <p class="status" data-open-state><span data-open-status></span></p> */
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grey); flex: none; }
.status[data-state="open"]::before { background: var(--open); }

/* ---------- FAQ, quotes, photos ---------- */
.faq-list { border-top: 1px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary { position: relative; padding: 18px 44px 18px 0; font-weight: 600; font-size: 18px; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before, .faq-list summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 1.6px; background: var(--ink); }
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { display: none; }
.faq-list details p { padding: 0 44px 22px 0; max-width: 40em; }

.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.quotes blockquote p { font-family: var(--display); font-size: clamp(21px, 1.9vw, 25px); line-height: 1.25; letter-spacing: -0.01em; }
.quotes figcaption { margin-top: 14px; font-size: var(--fs-small); color: var(--grey); }

.photo img { width: 100%; object-fit: cover; }
.photo figcaption { margin-top: 10px; font-size: var(--fs-fine); color: var(--grey); }

/* ---------- footer ---------- */
.site-foot { margin-top: 0; padding-block: 56px 32px; border-top: 1px solid var(--rule); font-size: 15.5px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-foot h2 { font-family: var(--sans); font-size: 15.5px; font-weight: 600; margin-bottom: 8px; }
.site-foot p + p { margin-top: 8px; }
.foot-brand { display: flex; gap: 16px; align-items: flex-start; }
.foot-brand img { width: 72px; height: 72px; flex: none; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); }
.foot-nav a { font-weight: 500; }
.copy { margin-top: 20px; font-size: var(--fs-fine); color: var(--grey); }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) {
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 16px; background: var(--white); border-bottom: 1px solid var(--rule);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--rule); box-shadow: inset 3px 0 0 var(--red); padding-left: 12px; }
  .menu-btn { display: inline-flex; align-items: center; }
}
@media (max-width: 1080px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split, .split-even { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  :root { --head-h: 60px; --fs-body: 16.5px; }
  .head-row { gap: 10px; }
  .brand { font-size: 14.5px; gap: 10px; }
  .brand img { width: 34px; height: 34px; }
  .brand span { max-width: 8.5em; }
  .head-phone { display: none; }
  .head-list, .menu-btn { min-height: 40px; padding: 0 10px; font-size: 14.5px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; }
  .tile-name { font-size: 15.5px; margin-top: 10px; }
  .tile-meta { flex-direction: column; gap: 0; font-size: 14.5px; }
  .field-row, .quotes { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .inline-form { flex-direction: column; }
}
@media (max-width: 400px) {
  .brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tile:hover .ill { transform: none; }
}

@media print {
  .draft-bar, .site-head, .site-foot, .skip-link, .toast { display: none !important; }
  body { font-size: 11pt; }
  a { text-decoration: none; }
}
