/* PP Pavers — shared styles.
 * Brand colours are tokens: change --brand / --brand-ink to match the Palmeira logo. */
:root {
  --stone: #e4e4df;      /* page: stone-dust grey */
  --slab: #f3f3f0;       /* raised surfaces */
  --ink: #1b2220;        /* text */
  --ink-soft: #4c5552;
  --line: #c6c6bf;
  --brand: #131373;      /* Palmeira navy, sampled from the logo */
  --brand-ink: #ffffff;
  --brand-tint: #e2e3f3;
  --load: #d39b1a;       /* truckload meter / highlights */
  --danger: #a3341f;
  --ok: #2c6e3f;
  --radius-s: 4px;
  --radius-m: 10px;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--stone); color: var(--ink);
  font-family: var(--font); font-size: 1rem; line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--load); outline-offset: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.02em; color: var(--brand); }
h1 { font-size: clamp(2.1rem, 5.6vw, 4rem); font-weight: 800; max-width: 17ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; color: var(--ink); }
p { margin: 0 0 1em; max-width: 68ch; }

/* ---------- header ---------- */
.site-header { background: var(--slab); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-weight: 800; font-size: 1.15rem; color: var(--brand); letter-spacing: .01em; }
.brand-text span { font-size: .78rem; color: var(--ink-soft); }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--brand); }
@media (max-width: 760px) { .site-nav { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: var(--radius-s);
  font: 700 1rem var(--font); text-decoration: none; cursor: pointer;
  border: 2px solid var(--brand); background: var(--brand); color: var(--brand-ink);
}
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .5; cursor: not-allowed; filter: none; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-wa { background: #1f8a4c; border-color: #1f8a4c; }
.btn-small { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero-lead { font-size: 1.15rem; color: var(--ink-soft); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-art { aspect-ratio: 4 / 3; }
.hero-art svg { width: 100%; height: 100%; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero-art { max-width: 420px; } }

.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--slab); }
.facts ul { list-style: none; margin: 0 auto; padding: 18px 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.facts li { font-weight: 600; }
.facts li span { display: block; font-weight: 400; color: var(--ink-soft); font-size: .92rem; }
@media (max-width: 700px) { .facts ul { grid-template-columns: 1fr; } }

.block { padding: 56px 0; }
.section-intro { color: var(--ink-soft); margin-bottom: 28px; }

/* ---------- order builder ---------- */
.order-grid { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
@media (max-width: 940px) { .order-grid { grid-template-columns: 1fr; } }

.product { display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.product:last-child { border-bottom: 1px solid var(--line); }
.product-price { font-weight: 800; font-size: 1.15rem; text-align: right; white-space: nowrap; }
.product-price small { display: block; font-weight: 400; font-size: .8rem; color: var(--ink-soft); }
.product p { color: var(--ink-soft); margin: 0; font-size: .95rem; }
.product-controls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field label, .field .label { font-weight: 600; font-size: .9rem; }
.field .hint { font-size: .82rem; color: var(--ink-soft); }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #9ea09a; border-radius: var(--radius-s);
  min-height: 46px; padding: 8px 12px; width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
input[aria-invalid="true"] { border-color: var(--danger); }

.stepper { display: flex; align-items: stretch; }
.stepper button {
  width: 46px; border: 1px solid #9ea09a; background: var(--slab); font: 700 1.2rem var(--font); cursor: pointer; color: var(--ink);
}
.stepper button:first-child { border-radius: var(--radius-s) 0 0 var(--radius-s); }
.stepper button:last-child { border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.stepper input { width: 110px; border-radius: 0; border-left: 0; border-right: 0; text-align: center; font-weight: 700; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch label {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px; min-height: 40px;
  border: 1px solid #9ea09a; border-radius: var(--radius-s); background: #fff; cursor: pointer; font-size: .88rem;
}
.swatch label i { width: 18px; height: 18px; border-radius: 2px; display: inline-block; border: 1px solid rgba(0,0,0,.2); }
.swatch input:checked + label { border: 2px solid var(--brand); background: var(--brand-tint); }
.swatch input:focus-visible + label { outline: 3px solid var(--load); outline-offset: 2px; }

/* summary */
.summary {
  background: var(--slab); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 20px; position: sticky; top: 84px;
}
.summary h3 { margin-bottom: 12px; }
.summary-lines { list-style: none; margin: 0 0 12px; padding: 0; font-size: .95rem; }
.summary-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.summary-empty { color: var(--ink-soft); font-size: .95rem; }
.totals { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .grand { font-weight: 800; font-size: 1.15rem; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 8px; }
.totals .due { color: var(--brand); font-weight: 700; }
.fieldset { border: 0; padding: 0; margin: 14px 0 0; }
.fieldset legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: .95rem; cursor: pointer; }
.radio input { width: 20px; min-height: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.radio small { display: block; color: var(--ink-soft); }
.radio[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* the truckload meter */
.load { margin: 8px 0 4px; }
.load-head { display: flex; justify-content: space-between; font-size: .88rem; color: var(--ink-soft); margin-bottom: 6px; }
.load-head strong { color: var(--ink); }
.load-trucks { display: flex; gap: 4px; flex-wrap: wrap; }
.truck { position: relative; flex: 1 1 56px; max-width: 90px; height: 22px; border: 2px solid var(--ink); border-radius: 3px 8px 3px 3px; background: #fff; overflow: hidden; }
.truck i { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--load) 0 10px, #b9840f 10px 12px); transition: width .35s ease; }

.errors { background: #f6e3de; border-left: 4px solid var(--danger); padding: 10px 14px; margin: 12px 0 0; font-size: .92rem; border-radius: var(--radius-s); }
.errors ul { margin: 0; padding-left: 18px; }
.notice { background: #fbf1d6; border-left: 4px solid var(--load); padding: 10px 14px; border-radius: var(--radius-s); font-size: .92rem; }

/* checkout */
.checkout { margin-top: 36px; padding-top: 28px; border-top: 2px solid var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.gateways { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gateway { position: relative; }
.gateway input { position: absolute; opacity: 0; }
.gateway label { display: block; padding: 14px; border: 1px solid #9ea09a; border-radius: var(--radius-s); background: #fff; cursor: pointer; font-weight: 700; }
.gateway label small { display: block; font-weight: 400; color: var(--ink-soft); }
.gateway input:checked + label { border: 2px solid var(--brand); background: var(--brand-tint); }
.gateway input:focus-visible + label { outline: 3px solid var(--load); outline-offset: 2px; }

/* mobile total bar */
.mobile-bar { display: none; }
@media (max-width: 940px) {
  .mobile-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--ink); color: #fff; padding: 10px 16px; align-items: center; justify-content: space-between; gap: 12px;
  }
  .mobile-bar[hidden] { display: none; }
  .mobile-bar strong { font-size: 1.05rem; }
  .mobile-bar .btn { min-height: 42px; }
  body.has-bar { padding-bottom: 72px; }
  .summary { position: static; }
}

/* quality */
.quality { background: var(--brand); color: #eceeea; }
.quality h2 { color: #fff; }
.quality p, .quality li { color: #cfd1ee; }
.quality-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 24px; }
.quality-grid h3 { color: #fff; }
@media (max-width: 800px) { .quality-grid { grid-template-columns: 1fr; } }

/* footer */
.site-footer { padding: 36px 0 48px; font-size: .92rem; color: var(--ink-soft); border-top: 1px solid var(--line); }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* status page */
.status-card { background: var(--slab); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 24px; max-width: 640px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: .85rem; background: var(--brand-tint); color: var(--brand); }
.badge.warn { background: #fbf1d6; color: #7a5600; }
.badge.bad { background: #f6e3de; color: var(--danger); }

.footer-logo { height: 44px; width: auto; margin-bottom: 10px; }
