/* ── Design refresh: softer shapes, fewer template-style flourishes ──
   Loaded after each page's inline <style>, so it only overrides. Remove the
   <link> to revert a page. */

:root {
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 1px 2px rgba(28,26,23,0.04), 0 8px 24px rgba(28,26,23,0.06);
  --shadow-lift: 0 2px 4px rgba(28,26,23,0.05), 0 16px 40px rgba(28,26,23,0.10);
}

/* Nav: sentence case instead of tracked-out caps */
.nav-links a { text-transform: none; letter-spacing: 0.005em; font-size: 0.92rem; font-weight: 400; }
.nav-cta { border-radius: 999px !important; padding: 10px 22px; }

/* Buttons: rounded, plain sans text */
.btn-primary,
.btn-outline,
.btn-secondary {
  border-radius: 999px !important;
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 500 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
  padding: 15px 30px;
  box-shadow: 0 6px 18px rgba(200,130,26,0.22);
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(200,130,26,0.28); }

/* Eyebrow labels: drop the little rule lines, calmer tracking */
.hero-eyebrow::before,
.section-eyebrow::before,
.page-eyebrow::before,
.page-eyebrow::after,
.cta-eyebrow::before,
.cta-eyebrow::after { display: none; }
.hero-eyebrow, .section-eyebrow, .page-eyebrow, .cta-eyebrow { letter-spacing: 0.14em; font-weight: 500; }

/* Headings: keep the italic accent for the hero only */
.section-title em,
.cta-inner h2 em { font-style: normal; font-weight: inherit; color: inherit; }

/* Photos and media: rounded corners */
.tesla-visual,
.territory-map,
.hero-img,
.page-hero-img,
.gallery img,
.project-card { border-radius: var(--radius-lg); overflow: hidden; }
.visual-badge { border-radius: var(--radius); }

/* Feature list: replace 01/02/03 numbering with a soft accent rule */
.feature-num { display: none; }
.feature-text { padding-left: 18px; border-left: 2px solid var(--accent); border-radius: 1px; }

/* Card grids: separate rounded tiles instead of hairline-divided boxes */
.cards {
  gap: 20px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s;
}
.card:hover { background: var(--white); transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-light);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-icon svg { width: 22px; height: 22px; }

/* Stats row: rounded tiles */
.territory-stat-row {
  gap: 16px;
  background: transparent;
  border: none;
  overflow: visible;
}
.territory-stat-row .t-stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Region chips: pills */
.region-chip { border-radius: 999px; padding: 10px 18px; }

/* FAQ: separated rounded panels */
.faq-list {
  gap: 12px;
  background: transparent;
  border: none;
  overflow: visible;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Softer section edges: hero curves into the credentials bar */
.hero-bg, .hero-overlay { border-bottom-left-radius: 48px 28px; border-bottom-right-radius: 48px 28px; }
.cred-bar { border-top: none; }

/* Gentler scroll-in motion */
.reveal { transform: translateY(14px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }

@media (max-width: 900px) {
  .cards { gap: 14px; }
  .hero-bg, .hero-overlay { border-bottom-left-radius: 28px 16px; border-bottom-right-radius: 28px 16px; }
}

/* ── Shared across inner pages ── */

/* Line icons (replaced emoji) */
.ico { vertical-align: -0.14em; flex-shrink: 0; }
.value-card .icon,
.promise-item .icon,
.roof-type-card .icon,
.service-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-light);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.roof-type-card .icon { margin-left: auto; margin-right: auto; }
.contact-icon { color: var(--accent-text); font-size: 1.05rem; }
.confirm-icon { color: var(--accent-text); font-size: 3rem; }

/* Value / roof-type grids: separate rounded tiles */
.values-grid,
.roof-types-grid {
  gap: 20px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.roof-types-grid { gap: 14px; }
.value-card,
.roof-type-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s;
}
.value-card:hover,
.roof-type-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.value-card:hover { background: var(--white); }

/* ── Nav: keep the bar on one line, collapse earlier ── */
.nav-links a { white-space: nowrap; }
.nav-cta-mobile { display: none; }

/* Mid-size laptops: tighten spacing before anything wraps */
@media (max-width: 1440px) {
  nav { padding-left: 32px; padding-right: 32px; }
  .nav-links { gap: 22px; }
  .nav-links a { font-size: 0.88rem; }
}

/* Smaller laptops, tablets and phones: hamburger menu plus an always-visible Start Here */
@media (max-width: 1180px) {
  nav { padding: 12px 24px; }
  .nav-logo img { height: 56px; }
  .nav-toggle { display: flex; }
  .nav-cta-mobile {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    margin-right: 18px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 9px 18px;
    border-radius: 999px;
    white-space: nowrap;
    transition: background 0.2s;
  }
  .nav-cta-mobile:hover { background: var(--accent2); }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 4px 24px 20px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    box-shadow: 0 16px 32px rgba(28,26,23,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 0; font-size: 0.95rem; }
  .nav-links a:not(.nav-cta) { border-bottom: 1px solid var(--border); }
  .nav-links .nav-cta { text-align: center; margin-top: 14px; display: block; }
}

@media (max-width: 900px) {
  .nav-logo img { height: 48px; }
}

@media (max-width: 360px) {
  .nav-cta-mobile { padding: 8px 14px; font-size: 0.82rem; margin-right: 12px; }
}

/* Shorter header on laptops so the page isn't pushed down */
@media (max-width: 1440px) and (min-width: 1181px) {
  .nav-logo img { height: 120px; }
}

/* Phones: stop content spilling past the screen edge */
.form-grid > *,
.why-tesla-grid > *,
.territory-grid > * { min-width: 0; }
.contact-row { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .cred-item { padding: 0 16px; border-right: none; }
  .cred-item img { height: 56px !important; }
}

/* Homepage hero: clear the fixed header on laptop-height screens */
@media (min-width: 901px) and (max-width: 1440px) {
  .hero { padding: 180px 0 80px !important; min-height: 0; }
  .hero-content { margin-top: 0; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .hero { padding-top: 120px !important; }
}

/* ── Nav hover preview (desktop only; built by nav-preview.js) ── */
.nav-preview {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 280px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(28,26,23,0.16);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, left 0.25s ease;
}
.nav-preview.show { opacity: 1; transform: none; }
.nav-preview img { display: block; width: 100%; height: 170px; object-fit: cover; }
.nav-preview span { display: block; padding: 11px 14px 13px; font-size: 0.82rem; color: var(--text2); line-height: 1.4; }
@media (max-width: 1180px) { .nav-preview { display: none; } }

/* Wide screens: the header is taller (big logo), so give the homepage hero matching room */
@media (min-width: 1441px) {
  .hero { padding: 240px 0 100px !important; min-height: 0; }
  .hero-content { margin-top: 0; }
}

/* Shorter laptop screens: tighten the homepage hero so the main button stays above the fold */
@media (min-width: 901px) and (max-height: 950px) {
  .hero h1 { font-size: clamp(3.2rem, 5.4vw, 5rem); margin-bottom: 18px; }
  .hero-sub { margin-bottom: 28px; line-height: 1.65; max-width: 560px; }
  .hero-eyebrow { margin-bottom: 14px; }
  .now-pill { margin-top: 14px; }
}
@media (min-width: 901px) and (max-height: 950px) and (max-width: 1440px) {
  .hero { padding-top: 165px !important; padding-bottom: 56px !important; }
}
@media (min-width: 1441px) and (max-height: 950px) {
  .nav-logo img { height: 140px; }
  .hero { padding-top: 190px !important; padding-bottom: 64px !important; }
}
@media (min-width: 901px) and (max-height: 800px) {
  .hero h1 { font-size: clamp(3rem, 4.6vw, 4.2rem); }
  .hero-sub { font-size: 0.97rem; margin-bottom: 22px; }
  .hero { padding-top: 158px !important; }
}
