/*
 * Elite Solar Recovery: site component layer.
 * Loads after /brand.css (the original Elite Solar Recovery design system:
 * cream background, warm brown ink, terracotta primary, Playfair Display +
 * Inter). Header, footer and the home page use brand.css classes directly;
 * the rules below give the interior pages' semantic markup the same look.
 */

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
img, svg { max-width: 100%; }

.serif, .section h2, .section h3, .page-hero h1, .cta-band h2, .price-card .amount, .faq summary {
  font-family: "Playfair Display", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}
.mono, .price-table th, .step .num, .price-card .tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ---------- Mobile menu (toggled by the one-line script in the header) ---------- */
.mobile-menu { display: none; }
.menu-open .mobile-menu { display: block; }
.menu-open .icon-menu { display: none; }
.icon-close { display: none; }
.menu-open .icon-close { display: block; }
.mobile-menu a.m-link {
  display: block; padding: 0.8rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: "Playfair Display", ui-serif, Georgia, serif; font-size: 1.25rem; color: rgba(255, 255, 255, 0.9);
}
.mobile-menu a.m-link:hover { color: hsl(var(--primary)); }

/* ---------- Layout ---------- */
.container { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 768px) { .container { padding: 0 3rem; } }

.section { padding: 6rem 0; background: hsl(var(--background)); border-bottom: 1px solid hsl(var(--border) / 0.5); }
.section.alt { background: #ebe1d3; }
.section p a:not(.btn), .section li a:not(.btn), .section td a:not(.btn) { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 3px; }

.section-head { max-width: 42rem; margin-bottom: 3rem; }
.section-head h2, .split h2 {
  font-size: 2.25rem; line-height: 1.15; letter-spacing: -0.025em; color: hsl(var(--foreground)); margin-bottom: 1.25rem;
}
@media (min-width: 768px) { .section-head h2 { font-size: 3rem; } .split h2 { font-size: 2.25rem; } }
.section-head p { font-size: 1.125rem; line-height: 1.75; color: hsl(var(--foreground) / 0.7); }

.split { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1fr; gap: 5rem; } }
.split p { color: hsl(var(--foreground) / 0.8); font-size: 1.0625rem; line-height: 1.75; margin-bottom: 1rem; }

/* ---------- Interior page hero (same photo + fade as the home hero) ---------- */
.page-hero { position: relative; overflow: hidden; background: #000; color: #fff; padding: 10rem 0 7rem; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; opacity: 0.7;
  background: url(/img/hero-solar.jpg) center / cover no-repeat;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 55%, hsl(var(--background)) 100%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.25rem); line-height: 1.1; letter-spacing: -0.025em; max-width: 56rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.page-hero p {
  margin-top: 1.5rem; max-width: 42rem; font-size: 1.125rem; line-height: 1.7; color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}
@media (min-width: 768px) { .page-hero { padding: 12rem 0 8rem; } .page-hero p { font-size: 1.25rem; } }
.breadcrumbs {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-bottom: 2rem;
  padding: 0.3rem 0.85rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); color: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.breadcrumbs a { color: #fff; }
.breadcrumbs a:hover { color: hsl(var(--primary)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; height: 3rem; padding: 0 1.5rem;
  border-radius: 9999px; font-size: 1rem; font-weight: 500; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { transform: scale(1.03); }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover { background: hsl(var(--primary) / 0.9); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-navy { background: hsl(var(--foreground)); color: hsl(var(--background)); }
.btn-navy:hover { background: hsl(var(--foreground) / 0.9); }
.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }
@media (max-width: 480px) { .btn { white-space: normal; text-align: center; height: auto; min-height: 3rem; padding: 0.75rem 1.5rem; } }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .card-grid, .card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  position: relative; display: flex; flex-direction: column; padding: 2rem; border-radius: 1.5rem;
  background: hsl(var(--card) / 0.5); border: 1px solid hsl(var(--border) / 0.5);
  transition: border-color 0.5s, background-color 0.5s;
}
.card:hover { border-color: hsl(var(--primary) / 0.5); background: hsl(var(--card) / 0.8); }
.card > svg { width: 2.5rem; height: 2.5rem; margin-bottom: 1.5rem; color: hsl(var(--primary)); }
.card h3 { font-size: 1.25rem; line-height: 1.4; font-weight: 700; margin-bottom: 0.9rem; color: hsl(var(--foreground)); }
.card p { font-size: 0.9rem; line-height: 1.65; color: hsl(var(--foreground) / 0.8); flex: 1; }
.card .price-line { margin-top: 1.25rem; font-family: "Playfair Display", ui-serif, Georgia, serif; font-size: 1.05rem; font-weight: 600; color: hsl(var(--primary)); }
.card .price-line::before {
  content: "Price"; display: block; margin-bottom: 0.2rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: hsl(var(--muted-foreground));
}
.card a.card-link {
  margin-top: 1rem; display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.875rem; font-weight: 600; color: hsl(var(--primary));
}
.card a.card-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Price tables ---------- */
.table-wrap { overflow-x: auto; border-radius: 1.5rem; border: 1px solid hsl(var(--border) / 0.6); background: hsl(var(--card) / 0.6); }
.price-table { width: 100%; border-collapse: collapse; }
.price-table th {
  text-align: left; padding: 1.1rem 1.5rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: hsl(var(--muted-foreground)); border-bottom: 1px solid hsl(var(--border));
}
.price-table td {
  padding: 1.25rem 1.5rem; vertical-align: top; font-size: 0.95rem; line-height: 1.6;
  color: hsl(var(--foreground) / 0.8); border-bottom: 1px solid hsl(var(--border) / 0.5);
}
.price-table td:first-child { font-family: "Playfair Display", ui-serif, Georgia, serif; font-size: 1.08rem; font-weight: 600; color: hsl(var(--foreground)); }
.price-table td.price { font-family: "Playfair Display", ui-serif, Georgia, serif; font-weight: 600; color: hsl(var(--primary)); white-space: nowrap; }
.price-table tr:last-child td { border-bottom: 0; }
@media (max-width: 700px) {
  .price-table, .price-table tbody, .price-table tr, .price-table td { display: block; width: 100%; }
  .price-table tr:first-child { display: none; }
  .price-table tr { padding: 1.1rem 1.25rem; border-bottom: 1px solid hsl(var(--border) / 0.5); }
  .price-table tr:last-child { border-bottom: 0; }
  .price-table td { padding: 0.15rem 0; border: 0; }
  .price-table td.price { white-space: normal; }
}
.price-note { margin-top: 1rem; font-size: 0.875rem; line-height: 1.65; color: hsl(var(--muted-foreground)); }

/* ---------- Price cards (feature card mirrors the terracotta process card) ---------- */
.price-cards { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 900px) { .price-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.price-card {
  position: relative; display: flex; flex-direction: column; padding: 2rem; border-radius: 1rem;
  background: hsl(var(--card) / 0.5); border: 1px solid hsl(var(--border) / 0.5);
}
.price-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; color: hsl(var(--foreground)); }
.price-card .amount { font-size: 1.9rem; line-height: 1.2; font-weight: 500; margin: 0.4rem 0 0.75rem; color: hsl(var(--primary)); }
.price-card .amount small { font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 0.85rem; font-weight: 500; color: hsl(var(--muted-foreground)); }
.price-card p.desc { color: hsl(var(--foreground) / 0.7); font-size: 0.95rem; line-height: 1.65; margin-bottom: 1rem; }
.price-card ul { list-style: none; margin: 0 0 1.5rem; padding: 0; flex: 1; }
.price-card ul li { position: relative; padding: 0.45rem 0 0.45rem 1.9rem; font-size: 0.92rem; line-height: 1.55; color: hsl(var(--foreground) / 0.85); }
.price-card ul li::before, .checklist li::before {
  content: ""; position: absolute; left: 0; width: 1.25rem; height: 1.25rem; border-radius: 9999px;
  background: hsl(var(--primary) / 0.15) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23c9431d" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') no-repeat center / 0.72rem;
}
.price-card ul li::before { top: 0.6rem; }
.price-card .btn { width: 100%; }
.price-card.feature {
  background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  box-shadow: 0 10px 15px -3px hsl(var(--primary) / 0.2), 0 4px 6px -4px hsl(var(--primary) / 0.2);
}
.price-card.feature h3, .price-card.feature .amount, .price-card.feature .amount small,
.price-card.feature p.desc, .price-card.feature ul li { color: hsl(var(--primary-foreground)); }
.price-card.feature p.desc, .price-card.feature ul li { opacity: 0.92; }
.price-card.feature ul li::before {
  background: rgba(255, 255, 255, 0.2) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ffffff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') no-repeat center / 0.72rem;
}
.price-card.feature .btn { background: #fff; color: hsl(var(--primary)); }
.price-card .tag {
  position: absolute; top: -0.8rem; left: 1.5rem; padding: 0.2rem 0.75rem; border-radius: 9999px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  background: hsl(var(--foreground)); color: hsl(var(--background));
}

/* ---------- Checklists ---------- */
.checklist { list-style: none; margin: 1.25rem 0; padding: 0; }
.checklist li { position: relative; padding: 0.55rem 0 0.55rem 2.1rem; line-height: 1.6; color: hsl(var(--foreground) / 0.85); }
.checklist li::before { top: 0.75rem; }
.checklist li strong { color: hsl(var(--foreground)); }

/* ---------- FAQ (accordion look from the original) ---------- */
.faq details { border-bottom: 1px solid hsl(var(--border) / 0.6); padding: 0.5rem 0; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 0; font-size: 1.25rem; color: hsl(var(--foreground)); transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: ui-monospace, monospace; font-size: 1.1rem; color: hsl(var(--primary)); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: hsl(var(--primary)); }
.faq details p { padding: 0 0 1rem; color: hsl(var(--foreground) / 0.75); line-height: 1.7; }

/* ---------- Callouts ---------- */
.callout { margin: 1.5rem 0; padding: 1.25rem 1.5rem; border-radius: 1rem; background: hsl(var(--primary) / 0.08); border: 1px solid hsl(var(--primary) / 0.25); color: hsl(var(--foreground) / 0.85); line-height: 1.65; }
.callout strong { color: hsl(var(--primary)); }

/* ---------- CTA band: the dark rounded panel from the original ---------- */
.cta-band {
  position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 3rem 2rem; border-radius: 2rem; background: #1a1713; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.5);
}
.cta-band::before {
  content: ""; position: absolute; top: 50%; left: 50%; width: 600px; height: 600px; transform: translate(-50%, -50%);
  border-radius: 9999px; background: hsl(var(--primary) / 0.12); filter: blur(120px); pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band > div:first-child { max-width: 40rem; }
.cta-band h2 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.025em; color: #fff; }
.cta-band p { margin-top: 0.75rem; font-size: 1.05rem; line-height: 1.7; color: rgba(255, 255, 255, 0.65); }
@media (min-width: 768px) { .cta-band { padding: 3.5rem 3rem; } .cta-band h2 { font-size: 2.5rem; } }

/* ---------- Contact ---------- */
#contact-form {
  padding: 2rem; border-radius: 2rem; background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
@media (min-width: 768px) { #contact-form { padding: 2.5rem; } }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; margin-bottom: 0.5rem; font-size: 0.95rem; font-weight: 600; color: hsl(var(--foreground)); }
.form-grid input, .form-grid select, .form-grid textarea {
  display: block; width: 100%; padding: 0.6rem 0.8rem; border-radius: 0.375rem; font-size: 1rem;
  border: 1px solid hsl(var(--input)); background: hsl(var(--background)); color: hsl(var(--foreground));
}
.form-grid input, .form-grid select { height: 2.75rem; }
.form-grid textarea { min-height: 120px; }
.form-grid input::placeholder, .form-grid textarea::placeholder { color: hsl(var(--muted-foreground)); }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: 2px solid hsl(var(--ring)); outline-offset: 1px; }
.form-grid .btn { width: 100%; border-radius: 0.375rem; font-size: 1.1rem; }
.form-note { margin-top: 1rem; font-size: 0.8rem; line-height: 1.6; text-align: center; color: hsl(var(--muted-foreground)); }
.form-status { display: none; margin-top: 1rem; font-weight: 600; }
.form-status.ok { display: block; color: #15803d; }
.form-status.err { display: block; color: hsl(var(--destructive)); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.contact-info { padding: 1.75rem; border-radius: 1rem; background: hsl(var(--muted) / 0.5); border: 1px solid hsl(var(--border) / 0.5); }
.contact-info h3 { font-size: 1.2rem; font-weight: 500; margin-bottom: 0.4rem; color: hsl(var(--foreground)); }
.contact-info p { color: hsl(var(--muted-foreground)); line-height: 1.65; }
.contact-info .phone-big { display: inline-block; margin: 0.25rem 0 0.9rem; font-family: "Playfair Display", ui-serif, Georgia, serif; font-size: 1.9rem; color: hsl(var(--primary)); text-decoration: none; }

/* ---------- Policy pages ---------- */
.prose { max-width: 48rem; }
.prose h2 { font-size: 1.75rem; line-height: 1.25; margin: 2.5rem 0 0.9rem; color: hsl(var(--foreground)); }
.prose h3 { font-size: 1.25rem; margin: 1.75rem 0 0.6rem; color: hsl(var(--foreground)); }
.prose p, .prose li { font-size: 1.02rem; line-height: 1.75; color: hsl(var(--foreground) / 0.82); margin-bottom: 0.9rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: hsl(var(--primary)); }
.prose .updated { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; color: hsl(var(--muted-foreground)); }
.prose strong { color: hsl(var(--foreground)); }

/* ---------- Small utilities the brand build does not include ---------- */
.bg-black\/40 { background-color: rgb(0 0 0 / 0.4); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
@media (min-width: 768px) { .md\:col-span-2 { grid-column: span 2 / span 2; } }
@media (max-width: 1023px) { .hero-panel { background-color: rgb(26 23 19 / 0.82); } }
@media (min-width: 900px) { .price-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.page-hero + .section { padding-top: 3.5rem; }
