/* PHLSolar concept redesign — design tokens + components.
   Shared by every page and by design-kit.html, so the kit and the site never drift. */

:root {
  /* Colour: evolved from the PHLSolar logo (red wordmark, sun, leaf) */
  --ink: #1C1714;
  --ink-2: #57504A;
  --ink-3: #8A8179;
  --paper: #FBF8F3;
  --sand: #F3ECE1;
  --line: #E5DCCD;
  --white: #FFFFFF;
  --red: #A3221C;        /* brand red, text + buttons */
  --red-deep: #7D1713;   /* hover, pressed */
  --red-tint: #F8E7E4;
  --sun: #F4B223;        /* fill only, never text on light */
  --sun-tint: #FDF1D3;
  --leaf: #2E7A3A;       /* savings, success */
  --leaf-tint: #E4F1E5;

  /* Type: Manrope only (Tailwind scale) */
  --font: "Manrope", system-ui, sans-serif;
  --t-xs: 0.75rem;  --l-xs: 1rem;
  --t-sm: 0.875rem; --l-sm: 1.25rem;
  --t-base: 1rem;   --l-base: 1.5rem;
  --t-lg: 1.125rem; --l-lg: 1.75rem;
  --t-xl: 1.25rem;  --l-xl: 1.75rem;
  --t-2xl: 1.5rem;  --l-2xl: 2rem;
  --t-3xl: 1.875rem;--l-3xl: 2.25rem;
  --t-4xl: 2.25rem; --l-4xl: 2.5rem;
  --t-5xl: 3rem;
  --t-6xl: 3.75rem;

  /* Spacing */
  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px;
  --s-300: 24px; --s-400: 32px; --s-500: 40px; --s-600: 48px;
  --s-700: 64px; --s-800: 80px; --s-900: 96px;

  /* Radius */
  --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px; --r-full: 9999px;

  --shadow-1: 0 1px 2px rgba(28, 23, 20, 0.06), 0 2px 8px rgba(28, 23, 20, 0.04);
  --shadow-2: 0 8px 24px rgba(28, 23, 20, 0.08), 0 2px 4px rgba(28, 23, 20, 0.04);

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: var(--l-base);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: var(--r-md); }

.skip { position: absolute; left: var(--s-200); top: -60px; z-index: 100; background: var(--ink); color: var(--white); padding: var(--s-75) var(--s-100); border-radius: var(--r-lg); transition: top 300ms var(--ease); }
.skip:focus { top: var(--s-200); }

.wrap { width: min(100% - 2 * var(--s-300), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--s-900); }
.section--sand { background: var(--sand); }
.section--ink { background: var(--ink); color: var(--white); }

/* ---------- Type helpers ---------- */
.eyebrow { font-size: var(--t-sm); line-height: var(--l-sm); font-weight: 600; color: var(--red); margin-bottom: var(--s-100); }
.section--ink .eyebrow { color: var(--sun); }
.h-display {
  font-size: var(--t-5xl); line-height: 1; font-weight: 700; max-width: 680px;
  background: linear-gradient(90deg, #000000, #666666); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.h-section { font-size: var(--t-4xl); line-height: var(--l-4xl); max-width: 680px; }
.h-card { font-size: var(--t-xl); line-height: var(--l-xl); }
.lead { font-size: var(--t-lg); line-height: var(--l-lg); color: var(--ink-2); max-width: 680px; }
.section--ink .lead { color: #CFC7BE; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-sm); line-height: var(--l-sm); }
.tiny { font-size: var(--t-xs); line-height: var(--l-xs); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Concept strip ---------- */
.concept {
  background: var(--ink); color: #D8D0C6; font-size: var(--t-xs); line-height: var(--l-xs);
  text-align: center; padding: var(--s-75) var(--s-200);
}
.concept a { color: var(--sun); text-decoration: none; font-weight: 600; }
.concept a:hover { text-decoration: underline; }

/* ---------- Island nav ---------- */
.nav-shell { position: sticky; top: 0; z-index: 50; padding-top: var(--s-200); pointer-events: none; }
.nav {
  pointer-events: auto; margin-inline: auto; width: max-content; max-width: calc(100% - 2 * var(--s-200));
  display: flex; align-items: center; gap: var(--s-300);
  padding: var(--s-75) var(--s-75) var(--s-75) var(--s-300);
  border-radius: var(--r-full); border: 1px solid rgba(229, 220, 205, 0.9);
  background: rgba(251, 248, 243, 0.78); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow-2);
}
.brand { display: flex; align-items: center; gap: var(--s-75); text-decoration: none; font-weight: 700; font-size: var(--t-base); line-height: var(--l-base); white-space: nowrap; }
.brand svg { width: 28px; height: 28px; }
.brand b { color: var(--red); font-weight: 700; }
.nav-links { display: flex; gap: var(--s-50); }
.nav-links a {
  text-decoration: none; font-size: var(--t-sm); line-height: var(--l-sm); font-weight: 600; color: var(--ink-2);
  padding: var(--s-75) var(--s-100); border-radius: var(--r-full); transition: all 500ms var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--sand); }
.nav-links a[aria-current="page"] { color: var(--red); background: var(--red-tint); }
.nav .btn { font-size: var(--t-sm); line-height: var(--l-sm); }
.burger { display: none; position: relative; width: 40px; height: 40px; border: 0; background: var(--ink); border-radius: var(--r-full); cursor: pointer; }
.burger span { position: absolute; left: 12px; width: 16px; height: 2px; background: var(--white); border-radius: 2px; transition: all 600ms var(--ease); }
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 23px; }
.menu-open .burger span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

.overlay {
  position: fixed; inset: 0; z-index: 40; background: rgba(251, 248, 243, 0.86);
  backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
  display: flex; flex-direction: column; justify-content: center; gap: var(--s-75); padding: var(--s-400);
  opacity: 0; visibility: hidden; transition: all 600ms var(--ease);
}
.overlay a { font-size: var(--t-3xl); line-height: var(--l-3xl); font-weight: 700; text-decoration: none; padding-block: var(--s-75);
  transform: translateY(48px); opacity: 0; transition: all 700ms var(--ease); }
.overlay a[aria-current="page"] { color: var(--red); }
.menu-open .overlay { opacity: 1; visibility: visible; }
.menu-open .overlay a { transform: none; opacity: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-200); min-height: 40px; border-radius: var(--r-full); border: 1px solid transparent;
  font-size: var(--t-base); line-height: var(--l-base); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: all 500ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-deep); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--white); border-color: var(--ink-3); }
.btn--sun { background: var(--sun); color: var(--ink); }
.btn--sun:hover { background: #E2A111; }
.btn--lg { min-height: 48px; padding: var(--s-100) var(--s-300); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.link { color: var(--red); font-weight: 600; text-decoration: none; display: inline-flex; gap: var(--s-50); align-items: center; }
.link:hover { text-decoration: underline; }

/* ---------- Chips, badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: var(--s-50); padding: var(--s-50) var(--s-100);
  border-radius: var(--r-full); font-size: var(--t-sm); line-height: var(--l-sm); font-weight: 600;
  border: 1px solid var(--line); background: var(--white); color: var(--ink-2); cursor: pointer; transition: all 400ms var(--ease);
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.tag { display: inline-block; font-size: var(--t-xs); line-height: var(--l-xs); font-weight: 700; padding: var(--s-25) var(--s-75); border-radius: var(--r-full); }
.tag--sale { background: var(--sun); color: var(--ink); }
.tag--leaf { background: var(--leaf-tint); color: var(--leaf); }

/* ---------- Cards ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-2xl); padding: var(--s-300); }
.card--flat { background: var(--sand); border-color: transparent; }
.grid { display: grid; gap: var(--s-300); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.icon { width: 40px; height: 40px; border-radius: var(--r-xl); display: grid; place-items: center; background: var(--red-tint); color: var(--red); font-size: 22px; margin-bottom: var(--s-200); }
.icon--sun { background: var(--sun-tint); color: #9A6A00; }
.icon--leaf { background: var(--leaf-tint); color: var(--leaf); }

/* Package card */
.pkg { display: flex; flex-direction: column; gap: var(--s-200); padding: var(--s-400); }
.pkg--featured { border: 2px solid var(--red); }
.pkg .price { font-size: var(--t-3xl); line-height: var(--l-3xl); font-weight: 700; }
.pkg .price small { font-size: var(--t-sm); line-height: var(--l-sm); font-weight: 600; color: var(--ink-2); }
.ticks li { display: flex; gap: var(--s-75); padding-block: var(--s-50); color: var(--ink-2); }
.ticks i { color: var(--leaf); font-size: 20px; flex: none; }
.pkg .btn { margin-top: auto; }

/* Product card */
.product { display: flex; flex-direction: column; padding: 0; overflow: hidden; transition: all 600ms var(--ease); }
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.product .art { aspect-ratio: 4 / 3; background: var(--sand); display: grid; place-items: center; position: relative; margin: var(--s-75); border-radius: var(--r-lg); }
.product .art svg { width: 56%; height: auto; }
.product .art .tag { position: absolute; top: var(--s-100); left: var(--s-100); }
.product .body { padding: var(--s-100) var(--s-300) var(--s-300); display: flex; flex-direction: column; gap: var(--s-50); flex: 1; }
.product .cat { font-size: var(--t-xs); line-height: var(--l-xs); color: var(--ink-3); font-weight: 600; }
.product h3 { font-size: var(--t-lg); line-height: var(--l-lg); }
.product .p { font-weight: 700; margin-top: auto; padding-top: var(--s-100); }

/* Testimonial */
.quote { display: flex; flex-direction: column; gap: var(--s-200); }
.quote p { font-size: var(--t-lg); line-height: var(--l-lg); }
.quote footer { font-size: var(--t-sm); line-height: var(--l-sm); color: var(--ink-3); font-weight: 600; }
.quote i.ph-quotes { font-size: 32px; color: var(--sun); }

/* Location card */
.loc { display: flex; gap: var(--s-200); align-items: flex-start; }
.loc .icon { margin: 0; flex: none; }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-top: var(--s-600); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 32px; height: 32px; border-radius: var(--r-full); background: var(--ink); color: var(--white); display: grid; place-items: center; font-size: var(--t-sm); font-weight: 700; }
.section--ink .step::before { background: var(--sun); color: var(--ink); }

/* FAQ */
.faq { border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--white); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; padding: var(--s-300); font-weight: 700; display: flex; justify-content: space-between; gap: var(--s-200); align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { transition: transform 500ms var(--ease); color: var(--ink-3); }
.faq details[open] summary i { transform: rotate(45deg); }
.faq .a { padding: 0 var(--s-300) var(--s-300); color: var(--ink-2); max-width: 720px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: var(--s-75); }
.field label { font-size: var(--t-sm); line-height: var(--l-sm); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: var(--s-100) var(--s-200); border: 1px solid var(--line); border-radius: var(--r-xl);
  background: var(--white); transition: all 400ms var(--ease);
}
.textarea { min-height: 128px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px var(--red-tint); }
.field.has-error .input, .field.has-error .textarea, .field.has-error .select { border-color: var(--red); }
.err { font-size: var(--t-sm); line-height: var(--l-sm); color: var(--red); display: none; }
.field.has-error .err { display: block; }
.prefix { position: relative; }
.prefix span { position: absolute; left: var(--s-200); top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; }
.prefix .input { padding-left: var(--s-500); }
input[type="range"] { width: 100%; accent-color: var(--red); }

/* Estimator */
.estimator { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.estimator .in { padding: var(--s-400); display: flex; flex-direction: column; gap: var(--s-300); }
.estimator .out { background: var(--ink); color: var(--white); padding: var(--s-400); display: flex; flex-direction: column; gap: var(--s-200); margin: var(--s-75); border-radius: var(--r-lg); }
.estimator .big { font-size: var(--t-5xl); line-height: 1; font-weight: 700; color: var(--sun); }
.estimator dl { display: grid; grid-template-columns: 1fr auto; gap: var(--s-75) var(--s-200); margin: 0; font-size: var(--t-sm); line-height: var(--l-sm); }
.estimator dt { color: #BDB4AA; }
.estimator dd { margin: 0; font-weight: 700; text-align: right; }

/* ---------- Hero ---------- */
.hero { padding-block: var(--s-800) var(--s-900); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--s-600); align-items: center; }
.hero .lead { margin-top: var(--s-300); }
.hero .ctas { display: flex; gap: var(--s-100); flex-wrap: wrap; margin-top: var(--s-400); }
.proof { display: flex; gap: var(--s-300); flex-wrap: wrap; margin-top: var(--s-500); padding-top: var(--s-300); border-top: 1px solid var(--line); }
.proof div { display: flex; flex-direction: column; }
.proof b { font-size: var(--t-xl); line-height: var(--l-xl); }
.proof span { font-size: var(--t-sm); line-height: var(--l-sm); color: var(--ink-2); }
.hero-art { border-radius: var(--r-3xl); background: var(--sun-tint); overflow: hidden; aspect-ratio: 1 / 1; position: relative; }
.hero-art svg { width: 100%; height: 100%; }
.float-card { position: absolute; background: var(--white); border-radius: var(--r-2xl); padding: var(--s-200); box-shadow: var(--shadow-2); display: flex; gap: var(--s-100); align-items: center; }
.float-card .icon { margin: 0; }
.float-card b { display: block; font-size: var(--t-lg); line-height: var(--l-lg); }
.float-card span { font-size: var(--t-xs); line-height: var(--l-xs); color: var(--ink-2); }

.page-hero { padding-block: var(--s-800) var(--s-700); }
.page-hero .lead { margin-top: var(--s-200); }

/* Tagline reveal */
.reveal-words { font-size: var(--t-5xl); line-height: 1.1; font-weight: 700; max-width: 900px; text-wrap: balance; }
.reveal-words .w { color: rgba(28, 23, 20, 0.28); transition: color 700ms var(--ease); }
.reveal-words .w.on { color: var(--ink); }
.reveal-words .w.hl.on { color: var(--red); }

/* Split + compare */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-700); align-items: center; }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-2xl); overflow: hidden; }
.compare th, .compare td { text-align: left; padding: var(--s-200) var(--s-300); border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--sand); font-size: var(--t-sm); line-height: var(--l-sm); }
.compare td:first-child { font-weight: 600; width: 28%; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: var(--s-300); transform: translate(-50%, 24px); opacity: 0; z-index: 80;
  background: var(--ink); color: var(--white); padding: var(--s-100) var(--s-300); border-radius: var(--r-full); font-size: var(--t-sm); line-height: var(--l-sm); font-weight: 600; transition: all 600ms var(--ease); pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* Footer */
.footer { background: var(--ink); color: #CFC7BE; padding-block: var(--s-800) var(--s-400); }
.footer .brand { color: var(--white); }
.footer .brand b { color: var(--sun); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s-400); }
.footer h4 { color: var(--white); font-size: var(--t-sm); line-height: var(--l-sm); margin-bottom: var(--s-200); }
.footer li { padding-block: var(--s-50); font-size: var(--t-sm); line-height: var(--l-sm); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--white); text-decoration: underline; }
.footer .base { margin-top: var(--s-700); padding-top: var(--s-300); border-top: 1px solid #3A322C; display: flex; justify-content: space-between; gap: var(--s-200); flex-wrap: wrap; font-size: var(--t-xs); line-height: var(--l-xs); }

/* CTA band */
.band { background: var(--red); color: var(--white); border-radius: var(--r-3xl); padding: var(--s-700); display: flex; justify-content: space-between; align-items: center; gap: var(--s-400); flex-wrap: wrap; }
.band .lead { color: #F6D9D6; margin-top: var(--s-100); }

/* Scroll reveal */
.rv { opacity: 0; transform: translateY(64px); filter: blur(12px); transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease); }
.rv.in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; filter: none; transition: none; }
  * { transition-duration: 0ms !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links, .nav .btn { display: none; }
  .burger { display: block; }
  .nav { width: calc(100% - 2 * var(--s-200)); justify-content: space-between; padding-left: var(--s-200); }
}
@media (max-width: 900px) {
  .hero-grid, .split, .estimator { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .h-display { font-size: var(--t-4xl); line-height: var(--l-4xl); }
  .reveal-words { font-size: var(--t-4xl); line-height: var(--l-4xl); }
  .section { padding-block: var(--s-800); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .h-section { font-size: var(--t-3xl); line-height: var(--l-3xl); }
  .reveal-words { font-size: var(--t-3xl); line-height: var(--l-3xl); }
  .band { padding: var(--s-400); }
  .hero { padding-block: var(--s-600) var(--s-800); }
  .compare th, .compare td { padding: var(--s-100); font-size: var(--t-sm); line-height: var(--l-sm); }
  .float-card { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}

.faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--s-600); }
@media (max-width: 900px) { .faq-wrap { grid-template-columns: 1fr; gap: var(--s-400); } }
@media (max-width: 600px) { .h-display br { display: none; } }
