/* ============================================================
   Liberty Construction Inc. - Project estimator (estimate.html)
   Loads after style.css and only on the estimator page.
   ============================================================ */

:root{
  --est-card:#fbfaf7;
  --est-line:#ddd7ca;
  --est-shadow:0 30px 60px -40px rgba(10,28,84,.35);
}
.est-sec{padding-top:0;margin-top:-56px;position:relative;z-index:3}
.est-sec .wrap{max-width:1120px}

/* ---------- shell ---------- */
.est-shell{background:var(--est-card);border:1px solid var(--est-line);box-shadow:var(--est-shadow)}
.est-main{padding:56px 64px 64px}

/* stepper */
.est-steps{list-style:none;margin:0;padding:0 64px;display:flex;border-bottom:1px solid var(--est-line);
  counter-reset:none}
.est-steps li{flex:1;display:flex;align-items:center;gap:12px;padding:22px 0;position:relative;
  font-family:var(--display);font-weight:600;font-size:.8rem;letter-spacing:.06em;color:var(--muted);
  transition:color .25s}
.est-steps li::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:transparent;transition:background .3s}
.est-steps li .n{width:26px;height:26px;border:1px solid var(--est-line);border-radius:50%;display:inline-flex;
  align-items:center;justify-content:center;font-size:.72rem;font-variant-numeric:tabular-nums;
  transition:background .25s,color .25s,border-color .25s;flex:0 0 auto}
.est-steps li.on{color:var(--ink)}
.est-steps li.on .n{background:var(--navy);border-color:var(--navy);color:#fff}
.est-steps li.on::after{background:var(--red)}
.est-steps li.done{color:var(--ink)}
.est-steps li.done .n{background:var(--ink);border-color:var(--ink);color:#fff;font-size:0}
.est-steps li.done .n::after{content:"";width:5px;height:9px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg) translate(-1px,-1px)}
.est-steps li.done{cursor:pointer}

/* ---------- panels ---------- */
.est-panel{animation:estIn .45s var(--ease) both}
.est-panel[hidden]{display:none}
@keyframes estIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.est-head{margin-bottom:40px;max-width:64ch}
.est-head h2{font-size:clamp(1.7rem,3vw,2.4rem);letter-spacing:-.02em;margin-bottom:14px;text-transform:none}
.est-head p{color:var(--muted);font-size:1.02rem;margin:0}

/* context line: "Pricing  Siding  Change" */
.est-ctx{display:flex;align-items:baseline;gap:14px;margin:0 0 22px;font-size:.88rem;color:var(--muted);flex-wrap:wrap}
.est-ctx__k{font-family:var(--display);font-weight:600;font-size:.7rem;letter-spacing:.16em;text-transform:uppercase;color:var(--red)}
.est-ctx__v{color:var(--ink);font-weight:500}
.est-ctx__chg{background:none;border:0;padding:0;font:inherit;font-size:.82rem;color:var(--muted);
  text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.est-ctx__chg:hover{color:var(--ink)}

/* service cards */
.est-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.est-card{background:#fff;border:1px solid var(--est-line);text-align:left;cursor:pointer;padding:24px 24px 26px;
  display:flex;flex-direction:column;gap:8px;font-family:var(--body);color:var(--ink);border-radius:3px;
  transition:transform .25s var(--ease),box-shadow .25s,border-color .25s;position:relative;min-height:138px}
.est-card .nx{font-family:var(--display);font-weight:600;font-size:.68rem;letter-spacing:.16em;color:var(--muted);opacity:.7}
.est-card h3{font-size:1.08rem;letter-spacing:-.01em;line-height:1.15;text-transform:none;font-weight:700;margin-top:6px}
.est-card p{margin:0;font-size:.88rem;color:var(--muted);line-height:1.45}
.est-card::after{content:"\2192";position:absolute;right:20px;bottom:20px;font-family:var(--display);color:var(--red);
  opacity:0;transform:translateX(-6px);transition:opacity .25s,transform .25s var(--ease)}
.est-card:hover,.est-card:focus-visible{border-color:var(--navy);transform:translateY(-3px);
  box-shadow:0 18px 30px -22px rgba(10,28,84,.45);outline:none}
.est-card:hover::after,.est-card:focus-visible::after{opacity:1;transform:none}
.est-card.sel{border-color:var(--navy);box-shadow:inset 0 0 0 1px var(--navy)}

/* fields */
.est-fields{display:grid;gap:34px}
.est-row{display:grid;grid-template-columns:1fr 1fr;gap:34px}
.est-fld{display:flex;flex-direction:column;min-width:0}
.est-fld>label{font-family:var(--display);font-weight:600;font-size:.7rem;letter-spacing:.16em;
  text-transform:uppercase;color:var(--ink);margin-bottom:14px;display:flex;gap:10px;align-items:baseline}
.est-fld>label .rq{color:var(--red)}
.est-fld>label .opt{font-weight:500;letter-spacing:.04em;text-transform:none;color:var(--muted);font-size:.78rem}
.est-fld .hint{font-size:.86rem;color:var(--muted);margin:10px 0 0}
.est-fld input,.est-fld select,.est-fld textarea{font-family:var(--body);font-size:1.05rem;
  padding:14px 16px;border:1px solid var(--est-line);background:#fff;border-radius:3px;
  color:var(--ink);transition:border-color .2s,box-shadow .2s;width:100%;max-width:100%;min-width:0;appearance:none;-webkit-appearance:none}
.est-fld input::placeholder,.est-fld textarea::placeholder{color:#b3ad9f}
.est-fld input:focus,.est-fld select:focus,.est-fld textarea:focus{outline:none;border-color:var(--navy);box-shadow:0 0 0 3px rgba(10,28,84,.08)}
.est-fld textarea{resize:vertical;min-height:110px}
.est-fld.err>label{color:var(--red)}
.est-fld.err input,.est-fld.err select,.est-fld.err .est-num{border-color:var(--red)}
.est-fld .err-msg{display:none;color:var(--red);font-size:.84rem;margin:8px 0 0}
.est-fld.err .err-msg{display:block}

/* select with chevron */
.est-sel{position:relative;max-width:520px}
.est-sel::after{content:"";position:absolute;right:18px;top:50%;width:8px;height:8px;border:solid var(--ink);border-width:0 1.5px 1.5px 0;
  transform:translateY(-70%) rotate(45deg);pointer-events:none}
.est-sel select{padding-right:44px;cursor:pointer}

/* number with unit */
.est-num{display:flex;align-items:center;gap:12px;border:1px solid var(--est-line);background:#fff;border-radius:3px;
  max-width:360px;padding-right:16px;transition:border-color .2s,box-shadow .2s}
.est-num input{border:0;flex:1;box-shadow:none!important}
.est-num .u{font-family:var(--display);font-size:.68rem;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);white-space:nowrap}
.est-fld:focus-within .est-num{border-color:var(--navy);box-shadow:0 0 0 3px rgba(10,28,84,.08)}

/* chips */
.est-chips{display:flex;flex-wrap:wrap;gap:10px}
.est-chips button{font-family:var(--body);font-weight:500;font-size:.95rem;letter-spacing:0;text-align:left;
  padding:12px 18px;background:#fff;color:var(--ink);border:1px solid var(--est-line);border-radius:3px;cursor:pointer;
  transition:background .2s,color .2s,border-color .2s,box-shadow .2s;line-height:1.3}
.est-chips button:hover{border-color:var(--navy)}
.est-chips button.on{background:var(--navy);color:#fff;border-color:var(--navy)}
.est-chips button small{display:block;font-weight:400;font-size:.8rem;opacity:.65;margin-top:2px}
.est-chips button.on small{opacity:.8}

/* optional line items */
.est-items{display:grid;gap:10px}
.est-item{display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center;
  padding:14px 18px;background:#fff;border:1px solid var(--est-line);border-radius:3px;transition:border-color .2s}
.est-item.on{border-color:var(--navy)}
.est-item .ck{width:22px;height:22px;border:1.5px solid var(--est-line);border-radius:3px;position:relative;cursor:pointer;flex:0 0 auto;background:#fff;padding:0;transition:background .2s,border-color .2s}
.est-item.on .ck{background:var(--navy);border-color:var(--navy)}
.est-item.on .ck::after{content:"";position:absolute;left:7px;top:3px;width:5px;height:10px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.est-item .lb{font-size:.98rem;cursor:pointer;line-height:1.3}
.est-item .lb small{display:block;color:var(--muted);font-size:.82rem;margin-top:2px}
.est-item .qty{display:none;align-items:center;gap:8px}
.est-item.on .qty{display:flex}
.est-item .qty input{width:96px;text-align:right;font-family:var(--body);font-size:.98rem;padding:8px 10px;
  border:1px solid var(--est-line);border-radius:3px;background:#fff;color:var(--ink)}
.est-item .qty input:focus{outline:none;border-color:var(--navy)}
.est-item .qty .u{font-family:var(--display);font-size:.66rem;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}

.est-nav{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:48px;padding-top:28px;border-top:1px solid var(--est-line);flex-wrap:wrap}
.est-nav .btn{justify-content:center;padding:16px 34px}
.est-back{background:none;border:0;padding:0;font-family:var(--display);font-weight:600;font-size:.78rem;letter-spacing:.12em;
  text-transform:uppercase;color:var(--muted);cursor:pointer;transition:color .2s}
.est-back:hover{color:var(--ink)}
.est-note{background:#fff;border:1px solid var(--est-line);border-left:3px solid var(--red);padding:16px 20px;font-size:.92rem;margin-bottom:24px}
.est-note p{margin:0}
.fnote{margin-top:18px}

/* ---------- result ---------- */
.est-res{background:var(--navy-deep);color:#fff;padding:56px 56px 52px;position:relative;overflow:hidden;margin:-56px -64px 0}
.est-res::after{content:"";position:absolute;right:-140px;top:-160px;width:440px;height:440px;
  border:1px solid var(--line-d);border-radius:50%}
.est-res>*{position:relative;z-index:1}
.est-res .kicker{color:#ff8087;margin-bottom:20px}
.est-res .kicker i{color:#fff}
.est-res h2{font-size:clamp(1.4rem,2.4vw,1.9rem);letter-spacing:-.02em;text-transform:none;font-weight:600;margin-bottom:28px;max-width:30ch;color:#e6eaf8}
.est-range{display:flex;align-items:baseline;gap:18px;flex-wrap:wrap;font-family:var(--display);font-weight:800;letter-spacing:-.03em;line-height:1}
.est-range .amt{font-size:clamp(2.4rem,5.5vw,4.2rem)}
.est-range .to{font-size:.8rem;letter-spacing:.24em;text-transform:uppercase;color:#9aa3c4;font-weight:600}
.est-bar{margin:30px 0 0;max-width:560px}
.est-bar__track{height:6px;background:rgba(255,255,255,.12);border-radius:3px;position:relative;overflow:hidden}
.est-bar__fill{position:absolute;left:0;top:0;bottom:0;width:100%;border-radius:3px;
  background:linear-gradient(90deg,rgba(255,255,255,.35),var(--red))}
.est-bar__lbl{display:flex;justify-content:space-between;margin-top:10px;font-family:var(--display);font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:#9aa3c4}
.est-range__sub{color:#cdd4ee;font-size:.98rem;margin:26px 0 0;max-width:60ch;line-height:1.6}
.est-res .btns{display:flex;gap:12px;flex-wrap:wrap;margin-top:34px}
.est-res .btn--line{color:#fff}
.est-res .btn--line:hover{background:#fff;color:var(--navy)}

.est-break{margin:48px 0 0}
.est-break h3{font-size:.7rem;letter-spacing:.18em;text-transform:uppercase;color:var(--muted);margin-bottom:14px}
.est-break table{width:100%;border-collapse:collapse;font-size:.97rem;background:#fff;border:1px solid var(--est-line);border-radius:3px;overflow:hidden}
.est-break td{padding:15px 22px;border-top:1px solid var(--est-line);vertical-align:top}
.est-break tr:first-child td{border-top:0}
.est-break td:last-child{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;font-family:var(--display);font-weight:600}
.est-break td small{display:block;color:var(--muted);font-size:.83rem;margin-top:3px;font-weight:400}
.est-break tr.sub td{background:var(--est-card);color:var(--muted)}
.est-break tr.tot td{background:var(--navy);color:#fff;font-family:var(--display);font-weight:700;letter-spacing:.04em}
.est-break tr.tot td:last-child{font-size:1.1rem}
.est-notes{margin-top:26px;display:grid;gap:12px}
.est-notes p{margin:0;font-size:.92rem;color:var(--muted);display:flex;gap:12px;line-height:1.55}
.est-notes p::before{content:"";width:5px;height:5px;background:var(--red);flex:0 0 auto;margin-top:10px;border-radius:50%}
.est-restart{margin-top:34px;padding-top:26px;border-top:1px solid var(--est-line)}
.est-restart button{background:none;border:0;padding:0 0 6px;border-bottom:1px solid currentColor;cursor:pointer}
.est-send-warn{color:#ffb3b8;font-size:.9rem;margin-top:22px}
.est-send-warn a{text-decoration:underline;color:#fff}

/* ---------- facts strip ---------- */
.est-facts{display:grid;grid-template-columns:repeat(3,1fr);gap:48px;margin-top:64px;padding-top:40px;border-top:1px solid var(--line)}
.est-facts h3{font-size:.7rem;letter-spacing:.18em;text-transform:uppercase;color:var(--ink);margin-bottom:12px;display:flex;gap:10px;align-items:center}
.est-facts h3::before{content:"";width:7px;height:7px;background:var(--red);border-radius:50%}
.est-facts p{color:var(--muted);font-size:.94rem;line-height:1.6;margin:0}

/* ---------- FAQ ---------- */
.est-faq{background:var(--paper-2);padding:110px 0}
.est-faq__grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr);gap:70px;align-items:start}
.est-faq h2{font-size:clamp(1.9rem,3.6vw,2.9rem);text-transform:uppercase;margin-top:16px}
.est-faq__list{border-top:1px solid var(--line)}
.est-faq details{border-bottom:1px solid var(--line)}
.est-faq summary{cursor:pointer;list-style:none;padding:24px 0;font-family:var(--display);font-weight:700;
  font-size:1.12rem;letter-spacing:-.01em;display:flex;justify-content:space-between;gap:20px;align-items:center}
.est-faq summary::-webkit-details-marker{display:none}
.est-faq summary::after{content:"+";font-weight:400;font-size:1.5rem;color:var(--red);line-height:1;transition:transform .25s}
.est-faq details[open] summary::after{transform:rotate(45deg)}
.est-faq details p{color:var(--muted);margin:0 0 26px;max-width:66ch}

/* ---------- responsive ---------- */
@media (max-width:1024px){
  .est-main{padding:44px 40px 52px}
  .est-steps{padding:0 40px}
  .est-res{margin:-44px -40px 0;padding:44px 40px}
  .est-facts{grid-template-columns:1fr;gap:28px}
  .est-faq__grid{grid-template-columns:1fr;gap:30px}
}
@media (max-width:860px){
  .est-sec{margin-top:-32px}
  .est-main{padding:32px 24px 40px}
  .est-steps{padding:0 24px;overflow-x:auto;scrollbar-width:none}
  .est-steps::-webkit-scrollbar{display:none}
  .est-steps li{padding:16px 18px 16px 0;flex:0 0 auto;font-size:.74rem}
  .est-grid{grid-template-columns:1fr 1fr;gap:10px}
  .est-row{grid-template-columns:1fr}
  .est-res{margin:-32px -24px 0;padding:36px 24px}
  .est-break td{padding:12px 14px}
  .est-faq{padding:70px 0}
}
@media (max-width:560px){
  .est-grid{grid-template-columns:1fr}
  .est-card{min-height:0;padding:18px 20px}
  .est-steps li .t{display:none}
  .est-steps li.on .t{display:inline}
  .est-nav{flex-direction:column-reverse;align-items:stretch}
  .est-nav .btn{width:100%}
  .est-back{text-align:center;padding:6px}
  .est-item{grid-template-columns:auto 1fr;gap:14px}
  .est-item .qty{grid-column:2}
  .est-num{max-width:none}
}

/* page-specific spacing (this sheet only loads on the estimator page) */
.phero{padding-bottom:150px}
.est-head--unlock{margin-top:48px}
[data-panel="2"] .est-ctx{display:none}
@media (max-width:860px){.phero{padding-bottom:96px}.est-head--unlock{margin-top:36px}}
