/* ============================================================
   T² Tile — instant quote calculator (mobile-first)
   Loads after styles.css and reuses its design tokens.
   ============================================================ */

.quote-intro {
  padding: calc(80px + 6vw) 0 0;
  background: var(--cream);
}
.quote-intro h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin: 16px 0 14px;
}
.quote-intro h1 em { font-style: italic; color: var(--clay); }
.quote-lead { color: var(--muted); font-size: 1.05rem; max-width: 640px; }

.calc-section { padding: 36px 0 clamp(60px, 9vw, 110px); }
.calc {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

/* ---------- steps ---------- */
.calc-step { margin-bottom: 30px; }
.step-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 16px;
}
.step-num {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 700;
  display: grid; place-items: center;
}
.step-hint { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }

/* ---------- option cards (radio) ---------- */
.opt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.opt-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.opt-grid.cols-3 { grid-template-columns: 1fr; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  height: 100%;
  padding: 18px 16px;
  background: var(--white);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
}
.opt:hover .opt-inner { border-color: var(--ink-soft); }
.opt input:checked + .opt-inner {
  border-color: var(--clay);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(176, 101, 63, 0.15);
}
.opt input:focus-visible + .opt-inner { box-shadow: 0 0 0 3px rgba(176, 101, 63, 0.3); }
.opt-ic {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--cream-2);
  color: var(--clay);
}
.opt-ic svg { width: 22px; height: 22px; }
.opt-name { font-weight: 600; font-size: 1rem; line-height: 1.2; }
.opt-sub { font-size: 0.8rem; color: var(--muted); }
.opt-sm .opt-inner { padding: 14px; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.opt-sm .opt-name { font-size: 0.95rem; }
.opt-sm .opt-sub { width: 100%; }

/* ---------- size chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.chip {
  padding: 9px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--line-strong);
  background: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--ink-soft); }
.chip.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.size-field { margin-bottom: 0; }

/* ---------- checkboxes ---------- */
.check-group { display: flex; flex-direction: column; gap: 10px; }
.check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.check:hover { border-color: var(--ink-soft); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check-box {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
  transition: background 0.2s, border-color 0.2s;
}
.check-box::after {
  content: "";
  width: 11px; height: 6px;
  border-left: 2.5px solid var(--white);
  border-bottom: 2.5px solid var(--white);
  transform: rotate(-45deg) scale(0);
  transition: transform 0.18s var(--ease);
  margin-top: -2px;
}
.check input:checked + .check-box { background: var(--clay); border-color: var(--clay); }
.check input:checked + .check-box::after { transform: rotate(-45deg) scale(1); }
.check input:checked ~ .check-text { color: var(--ink); }
.check input:checked ~ * { }
.check:has(input:checked) { border-color: var(--clay); box-shadow: 0 0 0 2px rgba(176, 101, 63, 0.12); }
.check-text { display: flex; flex-direction: column; }
.check-label { font-weight: 600; font-size: 0.95rem; }
.check-detail { font-size: 0.8rem; color: var(--muted); }

/* ---------- result panel ---------- */
.result-card {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 34px);
  box-shadow: var(--shadow-lg);
}
.result-eyebrow {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay);
}
.result-amount {
  font-family: var(--display);
  font-size: clamp(2rem, 7vw, 2.6rem);
  line-height: 1.1;
  margin-top: 10px;
  color: var(--white);
}
.result-amount-label { font-size: 0.85rem; color: rgba(246, 241, 231, 0.6); margin-top: 6px; }

.result-breakdown { margin: 22px 0; border-top: 1px solid rgba(246, 241, 231, 0.14); }
.result-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(246, 241, 231, 0.1);
  color: rgba(246, 241, 231, 0.85);
}
.result-line span:last-child { white-space: nowrap; font-weight: 600; color: var(--cream); }

.result-tile { margin: 18px 0; }
.rt-row, .rt-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  padding: 8px 0;
  color: rgba(246, 241, 231, 0.8);
}
.rt-total {
  border-top: 1px solid rgba(246, 241, 231, 0.2);
  margin-top: 4px;
  padding-top: 14px;
  font-size: 1rem;
  color: var(--cream);
}
.rt-total strong, .rt-row strong { color: var(--white); white-space: nowrap; }

.result-note {
  display: flex;
  gap: 9px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(246, 241, 231, 0.72);
  margin-top: 12px;
}
.result-note svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--clay); }

.result-disclaimer {
  font-size: 0.76rem;
  line-height: 1.55;
  color: rgba(246, 241, 231, 0.5);
  margin: 20px 0;
  padding-top: 16px;
  border-top: 1px solid rgba(246, 241, 231, 0.14);
}

/* lead form inside the dark card */
.quote-lead-form .lead-title {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 16px;
}
.quote-lead-form .field label { color: rgba(246, 241, 231, 0.7); }
.quote-lead-form .field input,
.quote-lead-form .field textarea {
  background: rgba(246, 241, 231, 0.06);
  border-color: rgba(246, 241, 231, 0.2);
  color: var(--cream);
}
.quote-lead-form .field input::placeholder,
.quote-lead-form .field textarea::placeholder { color: rgba(246, 241, 231, 0.4); }
.quote-lead-form .field input:focus,
.quote-lead-form .field textarea:focus {
  border-color: var(--clay);
  box-shadow: 0 0 0 4px rgba(176, 101, 63, 0.2);
}
.quote-lead-form .field textarea { min-height: 80px; }
.quote-lead-form .btn { width: 100%; justify-content: center; margin-top: 4px; }
.quote-lead-form .form-note { color: rgba(246, 241, 231, 0.5); }
#quoteSuccess.show { color: var(--cream); }
#quoteSuccess h3 { color: var(--white); }
#quoteSuccess p { color: rgba(246, 241, 231, 0.7); }

/* ---------- desktop: two columns with sticky result ---------- */
@media (min-width: 900px) {
  .calc { grid-template-columns: 1.15fr 0.85fr; gap: 48px; }
  .opt-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .calc-result { position: sticky; top: 96px; }
}
