/* CleanGrid marketing website styles */

* { box-sizing: border-box; }
body { margin: 0; }

.cg-container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ============ HEADER ============ */
.cg-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, 0);
  transition: background 200ms var(--ease-out), backdrop-filter 200ms var(--ease-out), border-color 200ms;
  border-bottom: 1px solid transparent;
}
.cg-header.is-scrolled {
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  border-bottom-color: var(--ink-100);
}
.cg-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.cg-logo img { height: 40px; display: block; }
.cg-nav {
  display: flex; gap: 28px;
}
.cg-nav a {
  font-family: var(--font-display); font-weight: 500; font-size: 15px;
  color: var(--ink-700); text-decoration: none; transition: color 150ms;
}
.cg-nav a:hover { color: var(--cg-blue); }
.cg-header-right { display: flex; align-items: center; gap: 16px; }
.cg-link {
  font-family: var(--font-display); font-weight: 500; font-size: 15px;
  color: var(--ink-700); text-decoration: none;
}

/* ============ BUTTONS ============ */
.cg-btn {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 10px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 200ms var(--ease-out); white-space: nowrap;
}
.cg-btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 12px; }
.cg-btn-primary { background: var(--cg-blue); color: white; box-shadow: 0 1px 2px rgba(15,22,32,.10); }
.cg-btn-primary:hover { background: var(--cg-blue-700); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.cg-btn-primary:active { transform: translateY(1px); box-shadow: none; }
.cg-btn-sun { background: var(--cg-sun); color: white; }
.cg-btn-sun:hover { background: var(--cg-sun-700); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.cg-btn-ghost { background: transparent; color: var(--ink-800); border: 1px solid var(--ink-200); }
.cg-btn-ghost:hover { background: var(--ink-50); }
.cg-btn-ghost-dark { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.28); }
.cg-btn-ghost-dark:hover { background: rgba(255,255,255,0.08); }
.cg-btn svg { width: 18px; height: 18px; }

/* ============ HERO ============ */
.cg-hero {
  background: var(--canvas);
  padding-top: 16px;
}
.cg-hero-inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 56px; align-items: center;
  padding-top: 56px; padding-bottom: 88px;
}
.cg-eyebrow {
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--cg-sun-700);
}
.cg-hero-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(44px, 5.4vw, 72px); line-height: 1.04;
  letter-spacing: -0.02em; color: var(--ink-900);
  margin: 16px 0 18px;
}
.cg-brand-gradient {
  background: linear-gradient(90deg, var(--cg-blue) 0%, var(--cg-green) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cg-hero-lede {
  font-family: var(--font-body); font-size: 19px; line-height: 1.5;
  color: var(--ink-700); margin: 0 0 28px; max-width: 520px;
}
.cg-hero-form {
  display: flex; gap: 8px; max-width: 540px; margin-bottom: 18px;
}
.cg-hero-input {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--ink-200);
  border-radius: 12px; padding: 0 14px;
  transition: border-color 150ms, box-shadow 150ms;
}
.cg-hero-input:focus-within {
  border-color: var(--cg-blue); box-shadow: 0 0 0 4px rgba(30,91,184,0.12);
}
.cg-hero-input svg { width: 18px; height: 18px; color: var(--fg-3); flex-shrink: 0; }
.cg-hero-input input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font: 16px var(--font-body); padding: 14px 0; color: var(--ink-900);
}
.cg-trustline {
  display: flex; gap: 22px; flex-wrap: wrap;
  font-family: var(--font-body); font-size: 14px; color: var(--ink-600);
}
.cg-trustline span { display: inline-flex; align-items: center; gap: 6px; }
.cg-trustline svg { width: 16px; height: 16px; color: var(--cg-green-700); }

/* Hero visual */
.cg-hero-visual { position: relative; }
.cg-hero-card {
  background: var(--surface); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 20px;
}
.cg-hero-card-main { padding: 18px; }
.cg-card-eyebrow {
  font-family: var(--font-display); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--fg-3);
  margin-bottom: 12px;
}
.cg-roof-stage {
  background: linear-gradient(180deg, #cce0f5 0%, #e7eef6 100%);
  border-radius: 14px; aspect-ratio: 16/10; overflow: hidden;
  display: flex; align-items: flex-end; padding: 0;
  position: relative;
}
.cg-roof-stage::before {
  content: ""; position: absolute; top: 14%; right: 12%; width: 70px; height: 70px;
  border-radius: 999px; background: radial-gradient(circle, #ffc463 0%, #ffae3a 60%, rgba(255,174,58,0) 75%);
  filter: blur(2px);
}
.cg-roof-photo {
  /* fake "rooftop" — warm trapezoid */
  width: 100%; height: 68%;
  background:
    linear-gradient(180deg, #3d3a36 0%, #5a4f44 100%);
  clip-path: polygon(0% 100%, 8% 22%, 92% 22%, 100% 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.cg-panel-array {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px;
  width: 70%; margin-top: 6%;
  transform: perspective(800px) rotateX(38deg);
  transform-origin: center bottom;
}
.cg-panel {
  aspect-ratio: 1.6/1;
  background: linear-gradient(135deg, #1d4f9d 0%, #2a6dc5 50%, #1d4f9d 100%);
  border: 1px solid #0e2a55; border-radius: 1px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}
.cg-roof-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 16px 6px 4px;
}
.cg-roof-stat-num {
  font-family: var(--font-display); font-weight: 800; font-size: 24px;
  color: var(--ink-900); letter-spacing: -0.01em;
}
.cg-roof-stat-lbl {
  font-family: var(--font-body); font-size: 12px; color: var(--fg-3); margin-top: 2px;
}
.cg-hero-card-saving {
  position: absolute; bottom: -36px; right: -8px;
  background: var(--ink-900); color: white;
  border-radius: 16px; padding: 18px 22px;
  box-shadow: var(--shadow-xl);
}
.cg-saving-eyebrow {
  font-family: var(--font-display); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--cg-sun-500);
}
.cg-saving-num {
  font-family: var(--font-display); font-weight: 800; font-size: 32px;
  letter-spacing: -0.02em; margin-top: 4px;
}

/* ============ SECTIONS ============ */
.cg-section { padding: 96px 0; background: var(--canvas); }
.cg-section-warm { background: var(--surface-warm); border-block: 1px solid var(--border); }
.cg-section-eyebrow { display: inline-block; margin-bottom: 16px; }
.cg-section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(32px, 3.4vw, 44px); line-height: 1.15;
  letter-spacing: -0.015em; color: var(--ink-900); margin: 0 0 16px;
  max-width: 720px;
}
.cg-section-lede {
  font-family: var(--font-body); font-size: 18px; line-height: 1.55;
  color: var(--ink-600); max-width: 560px; margin: 0 0 40px;
}

/* Steps */
.cg-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.cg-step {
  background: var(--surface); border-radius: 16px; padding: 28px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px;
  transition: all 200ms var(--ease-out);
}
.cg-step:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cg-step-num {
  font-family: var(--font-mono); font-size: 12px; color: var(--fg-3);
  letter-spacing: 0.1em;
}
.cg-step-ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--cg-sun-50); color: var(--cg-sun-700);
  display: flex; align-items: center; justify-content: center;
  margin: 4px 0 6px;
}
.cg-step-ico svg { width: 22px; height: 22px; }
.cg-step-title {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  color: var(--ink-900); margin: 0; letter-spacing: -0.005em;
}
.cg-step-body { font-family: var(--font-body); font-size: 15px; line-height: 1.55; color: var(--ink-600); margin: 0; }

/* Stats */
.cg-stats { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.cg-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cg-stat-block { background: var(--surface); border-radius: 16px; padding: 24px; border: 1px solid var(--border); }
.cg-stat-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: 44px; line-height: 1; letter-spacing: -0.02em;
  color: var(--ink-900);
}
.cg-stat-num span {
  font-size: 22px; color: var(--fg-3); margin-left: 4px; font-weight: 600;
}
.cg-stat-sub {
  font-family: var(--font-body); font-size: 14px; color: var(--fg-3); margin-top: 6px;
}

/* Testimonial */
.cg-testimonial { max-width: 880px; }
.cg-quote {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(28px, 3vw, 40px); line-height: 1.25;
  letter-spacing: -0.01em; color: var(--ink-900);
  margin: 20px 0 28px;
}
.cg-quote em { font-style: normal; color: var(--cg-green-700); }
.cg-quote-attr { display: flex; align-items: center; gap: 14px; }
.cg-avatar {
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--cg-blue); color: white;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  letter-spacing: 0.02em;
}
.cg-quote-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink-900); }
.cg-quote-meta { font-family: var(--font-body); font-size: 13px; color: var(--fg-3); }

/* CTA band */
.cg-cta-band { background: var(--ink-900); color: white; padding: 72px 0; }
.cg-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cg-cta-title {
  font-family: var(--font-display); font-weight: 800; font-size: 36px;
  line-height: 1.15; letter-spacing: -0.015em; color: white; margin: 0 0 8px;
}
.cg-cta-lede { font-family: var(--font-body); font-size: 17px; color: rgba(255,255,255,0.72); margin: 0; }
.cg-cta-actions { display: flex; gap: 12px; }

/* Footer */
.cg-footer { background: var(--canvas); padding-top: 72px; border-top: 1px solid var(--ink-100); }
.cg-footer-inner { display: grid; grid-template-columns: 1.1fr 2fr; gap: 40px; padding-bottom: 56px; }
.cg-footer-brand img { height: 32px; display: block; margin-bottom: 14px; }
.cg-footer-brand p { font-family: var(--font-body); font-size: 14px; color: var(--fg-3); max-width: 280px; line-height: 1.5; margin: 0; }
.cg-footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.cg-footer-h { font-family: var(--font-display); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-800); margin-bottom: 14px; }
.cg-footer-cols a { display: block; font-family: var(--font-body); font-size: 14px; color: var(--ink-600); text-decoration: none; padding: 4px 0; }
.cg-footer-cols a:hover { color: var(--cg-blue); }
.cg-footer-base {
  display: flex; justify-content: space-between;
  font-family: var(--font-body); font-size: 13px; color: var(--fg-3);
  padding-top: 24px; padding-bottom: 28px; border-top: 1px solid var(--ink-100);
}

/* Toast (estimate submitted) */
.cg-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink-900); color: white;
  padding: 14px 20px; border-radius: 12px; box-shadow: var(--shadow-xl);
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  display: flex; align-items: center; gap: 10px; z-index: 100;
  animation: cg-toast-in 300ms var(--ease-out);
}
.cg-toast svg { color: var(--cg-green-500); width: 20px; height: 20px; }
@keyframes cg-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }
