/* ============================================================
   Attic Panda — atticpanda.ca
   Design tokens & global styles (light-committed, snow-daylight brand)
   ============================================================ */

:root {
  /* palette */
  --paper: #FAFAF8;
  --sand: #F2EEE5;
  --ink: #1B1F1D;
  --ink-soft: #4A544E;
  --ink-faint: #74807A;
  --green: #2E5E4E;
  --green-deep: #234A3D;
  --green-tint: #E3EDE8;
  --amber: #E8A33D;
  --amber-deep: #B97A14;
  --amber-tint: #FBF0DC;
  --ice: #9FB4BE;
  --ice-tint: #EAF0F2;
  --line: #E0DED6;
  --white: #FFFFFF;
  --danger: #B4552F;

  /* type */
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* rhythm */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(27,31,29,.05), 0 10px 30px rgba(27,31,29,.07);
  --shadow-lift: 0 2px 4px rgba(27,31,29,.08), 0 18px 44px rgba(27,31,29,.12);
  --wrap: 72rem;
  --wrap-text: 44rem;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-deep); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0 0 .6rem;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.18rem; font-weight: 700; }
p { margin: .75rem 0; }
ul, ol { margin: .75rem 0; padding-left: 1.35rem; }
li { margin: .4rem 0; }
strong { font-weight: 650; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.wrap-text { max-width: var(--wrap-text); margin: 0 auto; padding: 0 1.25rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .74rem;
  font-weight: 700;
  color: var(--amber-deep);
  margin-bottom: .8rem;
}
.lede { font-size: 1.13rem; color: var(--ink-soft); max-width: 40rem; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

section { padding: 4.5rem 0; }
section.tight { padding: 3rem 0; }
section.alt { background: var(--sand); }
section.dark { background: var(--ink); color: #EDF0EE; }
section.dark h2 { color: #fff; }
section.dark .lede { color: #B9C2BD; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,250,248,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-bar {
  display: flex; align-items: center; gap: 1rem;
  max-width: var(--wrap); margin: 0 auto; padding: .65rem 1.25rem;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: 1.18rem;
  letter-spacing: -.01em; white-space: nowrap;
}
.brand img { width: 40px; height: 40px; }
.brand .ca { color: var(--ink-faint); font-weight: 600; }
.nav-links {
  display: flex; align-items: center; gap: .35rem;
  margin-left: auto; list-style: none; padding: 0;
}
.nav-links a {
  display: block; padding: .45rem .7rem; border-radius: 8px;
  text-decoration: none; color: var(--ink-soft);
  font-size: .95rem; font-weight: 550;
}
.nav-links a:hover { background: var(--green-tint); color: var(--green-deep); }
.nav-links a[aria-current="page"] { color: var(--green-deep); background: var(--green-tint); }
.nav-links .btn { margin-left: .4rem; }
.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: .5rem .6rem; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { display: block; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .15rem;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .75rem 1.25rem 1rem; margin: 0;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .7rem .75rem; font-size: 1.05rem; }
  .nav-links .btn { margin: .5rem 0 0; text-align: center; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700; font-size: .98rem;
  padding: .72rem 1.35rem;
  border-radius: 10px;
  border: none; cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-primary { background: var(--amber); color: #241A05; box-shadow: 0 2px 0 rgba(27,31,29,.15); }
.btn-primary:hover { background: #F0AE49; color: #241A05; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,163,61,.4); }
.btn-secondary { background: var(--green); color: #fff; }
.btn-secondary:hover { background: var(--green-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--green-deep); border: 1.5px solid var(--green); }
.btn-ghost:hover { background: var(--green-tint); }
.btn-lg { font-size: 1.08rem; padding: .9rem 1.7rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 4.5rem 0 4rem;
  background:
    radial-gradient(56rem 30rem at 85% 115%, rgba(232,163,61,.16), transparent 60%),
    radial-gradient(40rem 24rem at -10% -20%, rgba(46,94,78,.08), transparent 60%),
    var(--paper);
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center;
  max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 2rem; } }
.hero h1 { margin-bottom: 1rem; }
.hero .lede { font-size: 1.18rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-note { font-size: .88rem; color: var(--ink-faint); margin-top: 1rem; }
.hero-fig { margin: 0; }
.hero-fig svg { display: block; width: 100%; max-width: 26rem; margin: 0 auto; }
.hero-fig figcaption { text-align: center; font-size: .85rem; color: var(--ink-faint); margin-top: .6rem; }

/* ---------- trust bar ---------- */
.trust-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.trust-items {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem;
}
.trust-item {
  display: flex; align-items: center; gap: .65rem;
  padding: 1rem .9rem; font-size: .92rem; font-weight: 550; color: var(--ink-soft);
}
.trust-item svg { flex: none; color: var(--green); }

/* ---------- cards & grids ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: .2rem; }
.card .price {
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
  color: var(--green-deep); font-variant-numeric: tabular-nums;
}
.card .price small { font-size: .85rem; font-weight: 600; color: var(--ink-faint); }
.card-cta { margin-top: 1rem; }
.card.featured { border: 2px solid var(--amber); position: relative; }
.card.featured::before {
  content: "Most booked";
  position: absolute; top: -0.8rem; left: 1.2rem;
  background: var(--amber); color: #241A05;
  font-family: var(--font-display); font-weight: 700; font-size: .72rem;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .2rem .6rem; border-radius: 6px;
}

/* R-value chip */
.rchip {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--ice-tint); border: 1px solid var(--line);
  border-radius: 999px; padding: .25rem .7rem;
  font-family: var(--font-display); font-weight: 700; font-size: .82rem;
}
.rchip .cold { color: #5D7683; }
.rchip .warm { color: var(--amber-deep); }
.rchip svg { display: block; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 999px;
  background: var(--green); color: #fff;
  font-family: var(--font-display); font-weight: 700;
  margin-bottom: .7rem;
}
.step h3 { font-size: 1.02rem; }
.step p { font-size: .92rem; color: var(--ink-soft); margin: .3rem 0 0; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); margin: 1.4rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
th { font-family: var(--font-display); font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); background: var(--sand); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- callout ---------- */
.callout {
  border-left: 4px solid var(--amber); background: var(--amber-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.3rem; margin: 1.5rem 0;
}
.callout.cool { border-left-color: var(--ice); background: var(--ice-tint); }
.callout.risk { border-left-color: var(--danger); background: #F6E9E2; }
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- calculator ---------- */
.calc {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.calc-grid { display: grid; grid-template-columns: 1.1fr .9fr; }
@media (max-width: 900px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-inputs { padding: 1.8rem; }
.calc-inputs h3 { margin-bottom: 1rem; }
.field { margin-bottom: 1.15rem; }
.field > label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-weight: 600; font-size: .92rem; margin-bottom: .35rem;
}
.field .val { font-family: var(--font-display); font-weight: 700; color: var(--green-deep); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--amber); }
select, input[type="number"], input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; padding: .6rem .75rem;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink);
  font: inherit;
}
select:focus, input:focus, textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(46,94,78,.15); }
.seg { display: flex; gap: .4rem; flex-wrap: wrap; }
.seg label {
  flex: 1; text-align: center; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: .5rem .6rem; font-size: .9rem; font-weight: 600; color: var(--ink-soft);
  white-space: nowrap;
}
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { color: var(--green-deep); }
.seg label:has(input:checked) { border-color: var(--green); background: var(--green-tint); color: var(--green-deep); }
.check-row { display: flex; align-items: center; gap: .55rem; font-size: .95rem; font-weight: 550; }
.check-row input { width: 1.1rem; height: 1.1rem; accent-color: var(--green); }

.calc-results {
  background: linear-gradient(180deg, var(--ink) 0%, #232B27 100%);
  color: #EDF0EE; padding: 1.8rem;
  display: flex; flex-direction: column; gap: .4rem;
}
.calc-results .headline-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: #9DB0A6; font-weight: 650; }
.calc-results .big {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3rem); color: var(--amber);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.calc-results .big small { font-size: 1.1rem; color: #C8D2CC; font-weight: 600; }
.calc-line { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed #3A453F; font-size: .93rem; }
.calc-line:last-of-type { border-bottom: none; }
.calc-line .k { color: #AFBDB5; }
.calc-line .v { font-variant-numeric: tabular-nums; font-weight: 650; color: #fff; white-space: nowrap; }
.calc-disclaimer { font-size: .78rem; color: #8FA096; margin-top: auto; padding-top: 1rem; }
.calc-cta { margin-top: 1rem; }
details.assumptions { margin-top: 1rem; border-top: 1px solid var(--line); }
details.assumptions summary {
  cursor: pointer; font-weight: 650; font-size: .92rem; color: var(--green-deep);
  padding: .9rem 0 .3rem;
}
details.assumptions .inner { font-size: .88rem; color: var(--ink-soft); }
details.assumptions .adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: .8rem 0; }
@media (max-width: 560px) { details.assumptions .adv-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); margin-bottom: .75rem; }
.faq-item summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.2rem;
  font-family: var(--font-display); font-weight: 650; font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.4rem; color: var(--amber-deep); flex: none;
  transition: transform .15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .answer { padding: 0 1.2rem 1.1rem; color: var(--ink-soft); }
.faq-item .answer p:first-child { margin-top: 0; }

/* ---------- area strip ---------- */
.area-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.area-pills span, .area-pills a {
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: .35rem .85rem; font-size: .88rem; font-weight: 550; color: var(--ink-soft);
  text-decoration: none;
}
.area-pills a:hover { border-color: var(--green); color: var(--green-deep); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--green-deep); color: #fff; text-align: center; padding: 4rem 1.25rem; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #C9DAD2; max-width: 36rem; margin: .6rem auto 1.4rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #B9C2BD; font-size: .92rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2rem;
  max-width: var(--wrap); margin: 0 auto; padding: 3.5rem 1.25rem 2rem;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  font-family: var(--font-display); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .1em; color: #fff; margin: 0 0 .8rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .45rem 0; }
.site-footer a { color: #B9C2BD; text-decoration: none; }
.site-footer a:hover { color: var(--amber); }
.footer-brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; margin-bottom: .8rem; }
.footer-brand img { width: 36px; height: 36px; }
.footer-bottom {
  border-top: 1px solid #2E3733;
  padding: 1.2rem 1.25rem 2rem; text-align: center; font-size: .82rem; color: #7D8A82;
}

/* ---------- page hero (interior pages) ---------- */
.page-hero { padding: 3.5rem 0 2.5rem; background: linear-gradient(180deg, var(--sand), var(--paper)); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }
.page-hero .lede { margin-top: .5rem; }
.breadcrumbs { font-size: .84rem; color: var(--ink-faint); margin-bottom: 1rem; }
.breadcrumbs a { color: var(--ink-faint); }

/* ---------- article ---------- */
.article { padding: 3rem 0 4rem; }
.article-body { max-width: var(--wrap-text); margin: 0 auto; padding: 0 1.25rem; }
.article-body h2 { margin-top: 2.5rem; font-size: 1.55rem; }
.article-body h3 { margin-top: 1.8rem; }
.article-meta { font-size: .85rem; color: var(--ink-faint); margin-bottom: 1.5rem; }
.article-body img { border-radius: var(--radius); }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.form-note { font-size: .85rem; color: var(--ink-faint); }

/* ---------- utilities ---------- */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.muted { color: var(--ink-faint); }
.small { font-size: .88rem; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
