/* ========================================================================
   Future Scaling — contractor preview template v2
   Concept: the slab sizer. Concrete greys + the client's two brand colors.
   Type: Archivo, wide/heavy for display (truck-door lettering), normal for body.
   ======================================================================== */
:root {
  --brand: #1e2b38;            /* config.colors.brand  */
  --accent: #f2a900;           /* config.colors.accent */
  --accent-ink: #1a1408;
  --ink: #1c1e21;
  --ink-2: #474c53;
  --muted: #6f757c;
  --paper: #ffffff;
  --slab: #eceae6;             /* cured concrete */
  --slab-2: #dedbd5;
  --line: #d4d1ca;
  --display: 'Archivo', 'Arial Black', system-ui, sans-serif;
  --body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --max: 1180px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--body); font-stretch: 100%; color: var(--ink); background: var(--paper); line-height: 1.55; font-size: 17px; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.display { font-family: var(--display); font-stretch: 125%; font-weight: 800; letter-spacing: -.015em; line-height: 1.02; text-wrap: balance; }
h2.display { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.lede { color: var(--ink-2); font-size: 1.08rem; max-width: 36em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1rem var(--body); padding: 14px 22px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { filter: brightness(1.05); }
.btn--brand { background: var(--brand); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--paper); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--ghost-light { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--ghost-light:hover { border-color: #fff; }

/* Ribbon */
.ribbon { background: var(--ink); color: #e9e7e3; font-size: .82rem; text-align: center; padding: 7px 16px; }
.ribbon strong { color: var(--accent); font-weight: 600; }

/* Nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.logo__mark { width: 42px; height: 42px; border-radius: 6px; background: var(--brand); color: var(--accent); display: grid; place-items: center; font: 800 1.05rem var(--display); font-stretch: 125%; flex-shrink: 0; }
.logo__name { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: 1.15rem; line-height: 1.1; }
.logo__name small { display: block; font-family: var(--body); font-stretch: 100%; font-weight: 500; font-size: .78rem; color: var(--muted); }
.nav__links { display: flex; align-items: center; gap: 22px; }
.nav__links a:not(.btn) { text-decoration: none; font-weight: 500; color: var(--ink-2); font-size: .96rem; }
.nav__links a:not(.btn):hover { color: var(--ink); }
.nav__phone { white-space: nowrap; font-weight: 700 !important; color: var(--ink) !important; font-variant-numeric: tabular-nums; }
.lang { font: 600 .82rem var(--body); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; cursor: pointer; color: var(--ink-2); }

/* Hero */
.hero { background: var(--slab); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; padding-block: 64px 72px; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); margin-bottom: 20px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 26px; }
.proof { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-2); font-size: .95rem; }
.proof b { color: var(--ink); }
.stars { color: #c98a00; letter-spacing: 1px; }

/* Slab sizer — the one memorable thing */
.sizer { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 22px; box-shadow: 0 30px 60px -40px rgba(28,30,33,.55); }
.sizer__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; margin-bottom: 4px; }
.sizer__head h2 { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: 1.25rem; }
.sizer__head span { color: var(--muted); font-size: .85rem; }
.plan { display: block; width: 100%; height: auto; margin: 6px 0 4px; }
.plan .dim { stroke: var(--ink); stroke-width: 1; }
.plan .dim-text { font: 600 13px var(--body); fill: var(--ink); }
.plan .slab-edge { stroke: var(--ink); stroke-width: 1.5; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.ctl { display: grid; gap: 4px; min-width: 0; }
.ctl label { display: flex; justify-content: space-between; font-size: .85rem; color: var(--ink-2); font-weight: 500; }
.ctl label output { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ctl input[type=range] { width: 100%; accent-color: var(--brand); }
.ctl--full { grid-column: 1 / -1; }
.finish-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.finish-pick button { font: 500 .85rem var(--body); border: 1px solid var(--line); background: var(--paper); border-radius: 6px; padding: 6px 10px; cursor: pointer; color: var(--ink-2); }
.finish-pick button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: #fff; }
.readout { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 16px 0 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.readout div { padding: 10px 0; display: grid; gap: 1px; }
.readout div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.readout b { font-family: var(--display); font-stretch: 112%; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.readout small { color: var(--muted); font-size: .78rem; }
.sizer .btn { width: 100%; }
.sizer__fine { color: var(--muted); font-size: .78rem; margin-top: 8px; text-align: center; }

/* Sections */
.sec { padding-block: 84px; }
.sec--slab { background: var(--slab); }
.sec--brand { background: var(--brand); color: #fff; }
.sec__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; margin-bottom: 36px; }
.sec--brand .lede { color: rgba(255,255,255,.78); }

/* Price board (services) */
.board { border-top: 2px solid var(--ink); }
.board__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 8px 32px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); }
.board__row h3 { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: 1.25rem; }
.board__row p { color: var(--ink-2); }
.board__price { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.board__price--q { color: var(--muted); font-weight: 500; }

/* Finishes */
.finishes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.finish { display: flex; flex-direction: column; justify-content: flex-start; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.finish__sw { aspect-ratio: 1 / 1; max-width: 100%; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 10px; }
.finish b { display: block; font-family: var(--display); font-stretch: 112%; font-size: 1.05rem; }
.finish span { color: var(--muted); font-size: .9rem; }
.finish:hover .finish__sw { outline: 2px solid var(--brand); outline-offset: 2px; }
.sw-broom { background: repeating-linear-gradient(0deg, #b9b6ae 0 2px, #c9c6be 2px 4px, #c1beb6 4px 7px); }
.sw-stamped { background-color: #a98e6f; background-image: linear-gradient(90deg, rgba(60,40,20,.35) 2px, transparent 2px), linear-gradient(rgba(60,40,20,.35) 2px, transparent 2px), radial-gradient(circle at 30% 40%, rgba(255,255,255,.12), transparent 60%); background-size: 56px 28px, 56px 28px, 100% 100%; }
.sw-aggregate { background-color: #8e8a82; background-image: radial-gradient(circle, #d9d2c3 0 3px, transparent 4px), radial-gradient(circle, #5f5a52 0 2px, transparent 3px), radial-gradient(circle, #b8a98f 0 2.5px, transparent 3.5px); background-size: 23px 19px, 17px 21px, 29px 25px; background-position: 0 0, 5px 7px, 9px 3px; }
.sw-stained { background: radial-gradient(ellipse at 30% 30%, #7a5b3f, transparent 55%), radial-gradient(ellipse at 75% 70%, #4f3a2a, transparent 60%), #5e4632; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }

/* Process (a real sequence) */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.step { border-top: 3px solid var(--accent); padding-top: 16px; }
.step__n { font-family: var(--display); font-stretch: 125%; font-weight: 800; font-size: 2.2rem; color: var(--accent); line-height: 1; }
.step h3 { font-size: 1.15rem; margin: 10px 0 6px; }
.step p { color: rgba(255,255,255,.78); }

/* Reviews */
.quotes { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.quote-big { font-family: var(--display); font-stretch: 105%; font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.25; text-wrap: pretty; }
.quote-by { margin-top: 14px; color: var(--muted); }
.quote-sm { border-left: 3px solid var(--slab-2); padding: 4px 0 4px 16px; margin-bottom: 22px; }
.quote-sm p { color: var(--ink-2); }
.quote-by small, .quote-sm footer small { display: block; }
.quote-sm footer { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.note { color: var(--muted); font-size: .85rem; margin-top: 24px; }

/* Area + hours */
.area { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; }
.towns { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.towns li { border: 1px solid var(--line); background: var(--paper); border-radius: 6px; padding: 6px 12px; font-weight: 500; font-size: .94rem; }
.hours { border-top: 2px solid var(--ink); }
.hours div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.hours h3 { font-size: 1rem; margin: 0 0 4px; padding-top: 12px; }

/* Estimate */
.est { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.next { list-style: none; display: grid; gap: 14px; margin-top: 24px; counter-reset: n; }
.next li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; color: var(--ink-2); }
.next li::before { counter-increment: n; content: counter(n); width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.form { display: grid; gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field label { font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.form__note { font-size: .85rem; color: var(--muted); }
.form__ok { display: none; background: #edf6ef; border: 1px solid #b8d9c0; color: #1d5b2a; border-radius: 8px; padding: 14px; }
.form__ok a { font-weight: 700; color: #1d5b2a; }
.form.is-sent .form__ok { display: block; }

/* Footer */
.foot { background: var(--ink); color: #c9c6c0; font-size: .92rem; }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 30px; }
.foot strong { color: #fff; }

/* AI chat */
.chat-fab { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; align-items: center; gap: 10px; background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 10px 16px 10px 10px; font: 600 .95rem var(--body); cursor: pointer; box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); }
.chat-fab i { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: .8rem; }
.chat { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(80px, calc(env(safe-area-inset-bottom, 0px) + 80px)); z-index: 61; width: min(360px, calc(100vw - 32px)); background: var(--paper); border-radius: 12px; box-shadow: 0 30px 70px -30px rgba(0,0,0,.6); border: 1px solid var(--line); overflow: hidden; display: none; }
.chat.is-open { display: block; }
.chat__head { background: var(--brand); color: #fff; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.chat__head small { display: block; color: rgba(255,255,255,.72); font-size: .78rem; }
.chat__head button { background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.chat__body { padding: 14px; display: flex; flex-direction: column; gap: 8px; height: 270px; overflow-y: auto; background: var(--slab); }
.msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: .94rem; line-height: 1.4; }
.msg--ai { background: var(--paper); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 3px; }
.msg--me { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.msg--sys { align-self: center; font-size: .78rem; color: #1d5b2a; background: #edf6ef; border: 1px solid #b8d9c0; }
.chat__quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px 0; }
.chat__quick button { font: 500 .82rem var(--body); border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 10px; cursor: pointer; }
.chat__form { display: flex; gap: 8px; padding: 12px 14px 14px; }
.chat__form input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; }

/* Responsive */
@media (max-width: 980px) {
  .hero .wrap, .est, .quotes, .area, .sec__head { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { gap: 36px; padding-block: 44px 52px; }
  .finishes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 720px) {
  .nav__links a:not(.btn):not(.nav__phone) { display: none; }
  .nav__links .btn { display: none; }
  .board__row { grid-template-columns: minmax(0, 1fr) auto; }
  .board__row p { grid-column: 1 / -1; grid-row: 2; }
  .photos { grid-template-columns: minmax(0, 1fr); }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .sec { padding-block: 60px; }
  .chat-fab span { display: none; }
  .chat-fab { padding: 10px; }
}
@media (max-width: 440px) {
  .logo__name small { display: none; }
  .logo__name { font-size: 1rem; }
  .logo__mark { width: 36px; height: 36px; font-size: .9rem; }
  .nav .wrap { gap: 10px; }
  .nav__links { gap: 10px; }
  .lang { padding: 6px 8px; }
  .nav__phone { font-size: .88rem !important; }
  .controls { grid-template-columns: minmax(0, 1fr); }
  .readout b { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.lang__s { display: none; }
@media (max-width: 440px) { .lang__l { display: none; } .lang__s { display: inline; } }
