/* ============================================================
   Construction Quotes — public marketing & legal pages.
   Self-contained: nothing here leaks into the app shell
   (app.css) and nothing from the shell is required here.
   Direction: "the estimator's worksheet" — drafting-paper
   ground, blueprint grid confined to the hero, dimension-line
   rules with real tick ends, document cards with registration
   marks. One accent (the app's blue), one amber highlight.
   ============================================================ */

:root {
    /* Palette */
    --ink:       #17222c;   /* headings, nav, strong text        */
    --ink-2:     #46535f;   /* body copy                         */
    --ink-3:     #74818d;   /* captions, small print             */
    --paper:     #f3f5f8;   /* page ground (cool drafting paper) */
    --sheet:     #ffffff;   /* document surfaces                 */
    --line:      #dce3ea;   /* hairlines                         */
    --blue:      #1b6ee0;   /* blueprint blue — the app accent   */
    --blue-deep: #14509f;
    --blue-wash: #e8f1fd;
    --green:     #13795b;
    --green-soft:#e3f5ee;
    --red:       #c23934;
    --red-soft:  #fdeceb;
    --amber-hl:  #f7e0a8;   /* highlighter stroke — used once    */
    --night:     #0f1720;   /* footer band                       */

    /* Type */
    --display: "Archivo", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --body:    "Archivo", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono:    Consolas, "Courier New", monospace;

    /* Rhythm */
    --max:     1120px;
    --radius:  10px;
    --radius-sm: 6px;
    --speed:   170ms;
    --shadow:    0 1px 2px rgba(23, 34, 44, .06);
    --shadow-lg: 0 18px 48px rgba(20, 80, 159, .16);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-2);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
    font-family: var(--display);
    color: var(--ink);
    line-height: 1.12;
    margin: 0 0 .4em;
}
p  { margin: 0 0 1em; }
a  { color: var(--blue-deep); }
a:hover { color: var(--blue); }

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

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--ink); color: #fff;
    padding: 10px 16px; z-index: 100; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- Shared motifs ---------- */

/* Dimension line: a rule with tick ends, label in the middle —
   the annotation style of a construction drawing. */
.dim {
    display: flex; align-items: center; gap: 14px;
    font-family: var(--mono);
    font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--blue-deep);
}
.dim::before, .dim::after {
    content: ""; flex: 1; height: 9px;
    background: linear-gradient(var(--blue), var(--blue)) left center / 100% 1px no-repeat;
    opacity: .55;
}
.dim::before { border-left: 1px solid var(--blue); }
.dim::after  { border-right: 1px solid var(--blue); }

/* Eyebrow: single-tick variant for section openers. */
.eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    font-family: var(--mono);
    font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--blue-deep);
    margin: 0 0 18px;
}
.eyebrow::before {
    content: ""; width: 30px; height: 9px;
    background: linear-gradient(var(--blue), var(--blue)) left center / 100% 1px no-repeat;
    border-left: 1px solid var(--blue);
}

/* Registration marks: two opposing corner ticks on a document. */
.tick-frame { position: relative; }
.tick-frame::before, .tick-frame::after {
    content: ""; position: absolute;
    width: 15px; height: 15px; pointer-events: none;
}
.tick-frame::before { top: -8px; left: -8px;   border-top: 2px solid var(--blue);    border-left: 2px solid var(--blue); }
.tick-frame::after  { bottom: -8px; right: -8px; border-bottom: 2px solid var(--blue); border-right: 2px solid var(--blue); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 46px; padding: 10px 24px;
    font-family: var(--display); font-size: 16px; font-weight: 600;
    border-radius: var(--radius-sm); border: 1px solid transparent;
    cursor: pointer; text-decoration: none;
    transition: background var(--speed), border-color var(--speed), color var(--speed);
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); color: #fff; }
.btn-ghost {
    background: transparent; color: var(--ink);
    border-color: rgba(23, 34, 44, .35);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn[disabled] { opacity: .6; cursor: default; }

/* ---------- Top nav ---------- */
.site-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(243, 245, 248, .9);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 62px; gap: 16px;
}
.brand {
    display: inline-flex; align-items: center; gap: 12px;
    font-family: var(--display); font-weight: 700; font-size: 17px;
    color: var(--ink); text-decoration: none; letter-spacing: -.01em;
}
.brand:hover { color: var(--ink); }
.brand-mark {
    position: relative;
    width: 30px; height: 30px; border-radius: 6px;
    background: var(--blue); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; letter-spacing: .04em;
    flex-shrink: 0;
}
.brand-mark::after {              /* drafting-frame offset around the mark */
    content: ""; position: absolute; inset: -4px;
    border: 1px solid rgba(27, 110, 224, .4); border-radius: 8px;
}
.site-nav .btn { min-height: 40px; padding: 6px 20px; font-size: 15px; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}
.hero::before {                   /* blueprint grid, fading toward the fold */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(27, 110, 224, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(27, 110, 224, .055) 1px, transparent 1px),
        linear-gradient(rgba(27, 110, 224, .09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(27, 110, 224, .09) 1px, transparent 1px);
    background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
    -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 96%);
    mask-image: linear-gradient(180deg, #000 45%, transparent 96%);
}
.hero .wrap {
    position: relative;
    display: grid; grid-template-columns: 1.1fr .9fr;
    gap: 56px; align-items: center;
    padding-top: 84px; padding-bottom: 96px;
}
.hero h1 {
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 800; letter-spacing: -.025em;
    margin-bottom: 20px;
}
.hero .lede {
    font-size: 19px; line-height: 1.6; color: var(--ink-2);
    max-width: 34em; margin-bottom: 32px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* The signature: a miniature quote sheet, all CSS. */
.hero-doc { justify-self: end; width: 100%; max-width: 430px; }
.sheet {
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    padding: 26px 28px 22px;
    font-family: var(--mono); font-size: 13px; color: var(--ink);
}
.sheet-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 4px;
}
.sheet-doc {
    font-family: var(--display); font-weight: 800; font-size: 18px;
    letter-spacing: .12em; color: var(--blue-deep);
}
.sheet-no { font-size: 12px; color: var(--ink-3); }
.sheet-meta {
    font-family: var(--body); font-size: 13px; color: var(--ink-2);
    padding-bottom: 12px; border-bottom: 2px solid var(--ink);
    margin-bottom: 10px;
}
.sheet-cols, .sheet-row, .sheet-total {
    display: grid; grid-template-columns: 64px 1fr auto;
    gap: 12px; align-items: baseline;
}
.sheet-cols {
    font-size: 10px; letter-spacing: .12em; color: var(--ink-3);
    padding-bottom: 6px;
}
.sheet-row { padding: 7px 0; border-top: 1px dashed var(--line); }
.sheet-row .c { color: var(--blue-deep); }
.sheet-row .t { font-family: var(--body); font-size: 13.5px; color: var(--ink-2); }
.sheet-row .a { text-align: right; font-variant-numeric: tabular-nums; }
.sheet-total {
    grid-template-columns: 1fr auto;
    border-top: 2px solid var(--ink);
    margin-top: 4px; padding-top: 10px;
    font-family: var(--display); font-weight: 700; font-size: 15px;
}
.sheet-total .a {                 /* the one amber moment: highlighter on the number */
    font-family: var(--mono); font-size: 14.5px;
    background: linear-gradient(transparent 42%, var(--amber-hl) 42%);
    padding: 0 3px;
}
.sheet-foot { display: flex; gap: 8px; margin-top: 16px; }
.chip {
    font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
    padding: 3px 8px; border-radius: 3px;
    background: var(--blue-wash); color: var(--blue-deep);
}
.chip-green { background: var(--green-soft); color: var(--green); }
.hero-doc .dim { margin-top: 26px; }

/* ---------- Features ---------- */
.features { padding: 88px 0 40px; }
.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head h2 {
    font-size: clamp(28px, 3.4vw, 38px);
    font-weight: 800; letter-spacing: -.02em;
}
.section-head p { font-size: 17px; margin: 0; }
.feature-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature-card {
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 24px 26px;
    box-shadow: var(--shadow);
}
.feature-tag {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--mono); font-size: 11px;
    letter-spacing: .14em; color: var(--blue-deep);
    margin-bottom: 16px;
}
.feature-tag::after {
    content: ""; flex: 1; height: 1px;
    background: var(--line);
    transition: background var(--speed);
}
.feature-card:hover .feature-tag::after { background: var(--blue); }
.feature-card h3 {
    font-size: 18px; font-weight: 700; letter-spacing: -.01em;
    margin-bottom: 8px;
}
.feature-card p { margin: 0; font-size: 15px; line-height: 1.6; }

/* Trust strip below the grid. */
.trust {
    margin: 44px 0 0;
    padding: 0 0 88px;
}
.trust .dim { color: var(--ink-3); }
.trust .dim::before, .trust .dim::after { background-image: linear-gradient(var(--line), var(--line)); border-color: var(--ink-3); opacity: 1; }

/* ---------- Request access ---------- */
.access {
    background: var(--sheet);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 88px 0 96px;
}
.access-grid {
    display: grid; grid-template-columns: .8fr 1.2fr;
    gap: 64px; align-items: start;
}
.access-steps { list-style: none; margin: 32px 0 0; padding: 0; }
.access-steps li {
    position: relative;
    padding: 0 0 26px 52px;
}
.access-steps li:not(:last-child)::after {   /* connector between steps */
    content: ""; position: absolute; left: 17px; top: 40px; bottom: 6px;
    width: 1px; background: var(--line);
}
.step-no {
    position: absolute; left: 0; top: 0;
    width: 35px; height: 35px; border-radius: 50%;
    border: 1px solid var(--blue);
    color: var(--blue-deep);
    font-family: var(--mono); font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--sheet);
}
.access-steps h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.access-steps p { margin: 0; font-size: 14.5px; line-height: 1.6; }

.access-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 34px 36px 30px;
}
.field-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
}
.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }
.field label {
    font-size: 13.5px; font-weight: 600; color: var(--ink);
    margin-bottom: 5px;
}
.field .hint {
    font-family: var(--mono); font-size: 11.5px; color: var(--ink-3);
    margin-top: 5px;
}
.field input, .field textarea {
    font-family: var(--body); font-size: 15px; color: var(--ink);
    background: var(--sheet);
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 10px 12px; min-height: 44px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-wash);
}
.form-actions { margin-top: 24px; }
.form-msg {
    display: none;
    margin: 0 0 16px; padding: 11px 14px;
    border-radius: var(--radius-sm); font-size: 14.5px;
}
.form-msg.is-error   { background: var(--red-soft);   color: var(--red);   border: 1px solid rgba(194, 57, 52, .25); }
.form-msg.is-success { background: var(--green-soft); color: var(--green); border: 1px solid rgba(19, 121, 91, .25); }
.form-note {
    margin: 18px 0 0; font-size: 13.5px; color: var(--ink-3);
}
.access-done { text-align: center; padding: 36px 8px; }
.access-done h3 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.access-done p  { margin: 0 auto; max-width: 30em; font-size: 15.5px; }
.access-done .done-mark {
    width: 46px; height: 46px; border-radius: 50%;
    margin: 0 auto 18px;
    background: var(--green-soft); color: var(--green);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--night);
    color: #a9b4c0;
    padding: 56px 0 40px;
    font-size: 14.5px;
}
.footer-grid {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 32px; flex-wrap: wrap;
}
.site-footer .brand { color: #fff; }
.site-footer .brand-mark::after { border-color: rgba(255, 255, 255, .25); }
.footer-line { margin: 14px 0 0; max-width: 30em; color: #8b97a4; }
.footer-links { display: flex; gap: 28px; list-style: none; margin: 6px 0 0; padding: 0; }
.footer-links a { color: #cfd7df; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-fine {
    margin-top: 40px; padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-family: var(--mono); font-size: 12px; color: #6e7a87;
}

/* ---------- Legal pages ---------- */
.legal-main { padding: 64px 0 96px; }
/* The legal pages run to the same margins as the site menu above them,
   rather than sitting in a narrow column of their own. */
.legal-wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.legal-wrap h1 {
    font-size: clamp(30px, 4vw, 42px);
    font-weight: 800; letter-spacing: -.02em;
    margin-bottom: 10px;
}
.legal-updated {
    font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em;
    text-transform: uppercase; color: var(--ink-3);
    margin-bottom: 34px;
}
.legal-wrap .lede { font-size: 17.5px; line-height: 1.65; color: var(--ink-2); }
.legal-wrap h2 {
    display: flex; align-items: center; gap: 12px;
    font-size: 21px; font-weight: 700; letter-spacing: -.01em;
    margin: 44px 0 12px;
}
.legal-wrap h2::before {
    content: ""; width: 22px; height: 9px; flex-shrink: 0;
    background: linear-gradient(var(--blue), var(--blue)) left center / 100% 1px no-repeat;
    border-left: 1px solid var(--blue);
}
.legal-wrap p, .legal-wrap li { line-height: 1.7; font-size: 15.5px; }
.legal-wrap ul { padding-left: 22px; margin: 0 0 1em; }
.legal-wrap li { margin-bottom: .45em; }
.legal-contact {
    margin-top: 48px; padding: 22px 26px;
    background: var(--sheet); border: 1px solid var(--line);
    border-radius: var(--radius);
}
.legal-contact p:last-child { margin: 0; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }

    .hero .rev { opacity: 0; transform: translateY(14px); animation: rise .55s ease-out forwards; }
    .rev-1 { animation-delay: .05s; }
    .rev-2 { animation-delay: .13s; }
    .rev-3 { animation-delay: .21s; }
    .rev-4 { animation-delay: .32s; }

    .feature-card { transition: transform var(--speed), box-shadow var(--speed); }
    .feature-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(23, 34, 44, .1); }
}
@keyframes rise {
    to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .hero .wrap {
        grid-template-columns: 1fr;
        gap: 56px;
        padding-top: 56px; padding-bottom: 64px;
    }
    .hero-doc { justify-self: center; }
    .feature-grid { grid-template-columns: 1fr 1fr; }
    .access-grid { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 640px) {
    .feature-grid { grid-template-columns: 1fr; }
    .field-grid { grid-template-columns: 1fr; }
    .access-card { padding: 26px 20px 24px; }
    .hero h1 { font-size: 34px; }
    .footer-grid { flex-direction: column; }
    .trust .dim { flex-direction: column; gap: 8px; text-align: center; }
    .trust .dim::before, .trust .dim::after { display: none; }
}
