/* =============================================
   I-CONTROL-ENERGY.COM — Global Stylesheet
   Design: Industrial-meets-nature. Deep forest green 
   authority + amber energy + clean white space.
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

/* === TOKENS === */
:root {
  --green-dark:   #0d2b1f;
  --green-mid:    #1a4731;
  --green-bright: #2e7d52;
  --amber:        #f59e0b;
  --amber-light:  #fcd34d;
  --cream:        #f9f7f2;
  --white:        #ffffff;
  --gray-soft:    #e8ece9;
  --gray-mid:     #6b7c72;
  --text-dark:    #111c16;
  --text-body:    #2e4035;
  --radius:       8px;
  --shadow:       0 4px 24px rgba(13,43,31,0.12);
  --shadow-lg:    0 12px 48px rgba(13,43,31,0.18);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-body);
  background: var(--cream);
  line-height: 1.65;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--green-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-dark);
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.15rem; }
p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }

/* === LAYOUT === */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-alt { background: var(--white); }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }

/* === NAV === */
#nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--green-dark);
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  max-width: 1140px;
  margin: 0 auto;
  height: 64px;
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo .logo-mark {
  background: var(--amber);
  color: var(--green-dark);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all 0.2s;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--amber);
  background: rgba(255,255,255,0.08);
  text-decoration: none;
}
.nav-cta {
  background: var(--amber) !important;
  color: var(--green-dark) !important;
  font-weight: 700 !important;
  padding: 8px 18px !important;
}
.nav-cta:hover { background: var(--amber-light) !important; }
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: white;
  border-radius: 2px;
}

/* === HERO === */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 60%, #1d5c38 100%);
  color: var(--white);
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='28'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 760px; }
.hero-eyebrow {
  display: inline-block;
  background: rgba(245,158,11,0.2);
  border: 1px solid rgba(245,158,11,0.4);
  color: var(--amber-light);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 span { color: var(--amber); }
.hero p { color: rgba(255,255,255,0.8); font-size: 1.15rem; margin-bottom: 32px; max-width: 600px; }
.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stat .num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--amber);
  display: block;
}
.hero-stat .lbl {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--amber);
  color: var(--green-dark);
}
.btn-primary:hover {
  background: var(--amber-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.35);
  text-decoration: none;
}
.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-secondary:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.08);
  text-decoration: none;
}
.btn-green {
  background: var(--green-bright);
  color: white;
}
.btn-green:hover {
  background: var(--green-mid);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: white;
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--green-bright);
  color: var(--green-bright);
}
.btn-outline:hover {
  background: var(--green-bright);
  color: white;
  text-decoration: none;
}

/* === TOOL / PLANNER === */
.tool-wrapper {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--gray-soft);
}
.tool-header {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: white;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.tool-header h2 { color: white; font-size: 1.5rem; margin: 0; }
.tool-header p { color: rgba(255,255,255,0.75); font-size: 0.9rem; margin: 0; }
.tool-steps {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--gray-soft);
  overflow-x: auto;
}
.tool-step-tab {
  flex: 1;
  min-width: 120px;
  padding: 14px 16px;
  text-align: center;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-mid);
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  white-space: nowrap;
}
.tool-step-tab:hover { color: var(--green-bright); background: var(--gray-soft); }
.tool-step-tab.active {
  color: var(--green-bright);
  border-bottom-color: var(--amber);
  background: rgba(46,125,82,0.05);
}
.tool-step-tab .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gray-soft);
  color: var(--gray-mid);
  font-size: 0.75rem;
  margin-right: 6px;
  font-weight: 700;
}
.tool-step-tab.active .step-num {
  background: var(--amber);
  color: var(--green-dark);
}
.tool-step-tab.done .step-num {
  background: var(--green-bright);
  color: white;
}
.tool-step-tab.done { color: var(--green-bright); }

.tool-body { padding: 32px; }
.tool-panel { display: none; }
.tool-panel.active { display: block; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}
.form-group label .hint {
  font-weight: 400;
  color: var(--gray-mid);
  font-size: 0.82rem;
  margin-left: 6px;
}
.form-control {
  padding: 11px 14px;
  border: 1.5px solid var(--gray-soft);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--cream);
  transition: border-color 0.2s;
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--green-bright);
  background: white;
}
select.form-control { cursor: pointer; }

.appliance-list { margin-top: 8px; }
.appliance-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.appliance-row .form-control { padding: 9px 12px; }
.appliance-remove {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  color: #cc4444;
  font-size: 1.1rem;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.appliance-remove:hover { background: #ffeaea; border-color: #cc4444; }
.add-appliance-btn {
  background: none;
  border: 1.5px dashed var(--green-bright);
  color: var(--green-bright);
  border-radius: var(--radius);
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  width: 100%;
  margin-top: 8px;
}
.add-appliance-btn:hover { background: rgba(46,125,82,0.06); }

.tool-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-soft);
}
.progress-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--gray-soft);
  border-radius: 3px;
  margin: 0 20px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-bright), var(--amber));
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Results */
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 24px 0; }
.result-card {
  background: var(--cream);
  border: 1px solid var(--gray-soft);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.result-card .result-icon { font-size: 2rem; margin-bottom: 8px; }
.result-card .result-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--green-bright);
  margin-bottom: 4px;
}
.result-card .result-label { font-size: 0.85rem; color: var(--gray-mid); font-weight: 500; }
.result-card.highlight { background: var(--green-dark); color: white; border-color: transparent; }
.result-card.highlight .result-value { color: var(--amber); }
.result-card.highlight .result-label { color: rgba(255,255,255,0.7); }

.recommendation-box {
  background: linear-gradient(135deg, rgba(46,125,82,0.08), rgba(245,158,11,0.06));
  border: 1px solid rgba(46,125,82,0.2);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
}
.recommendation-box h3 { margin-bottom: 16px; color: var(--green-mid); }
.system-rec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.system-rec-item {
  background: white;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--gray-soft);
}
.system-rec-item strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  color: var(--green-bright);
  margin-bottom: 4px;
}
.system-rec-item span { font-size: 0.85rem; color: var(--gray-mid); }

.plan-print-area {
  border: 2px dashed var(--gray-soft);
  border-radius: 12px;
  padding: 24px;
  margin-top: 24px;
  background: white;
}
.plan-print-area h3 { color: var(--green-mid); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.plan-checklist { list-style: none; padding: 0; }
.plan-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-soft);
  font-size: 0.95rem;
}
.plan-checklist li:last-child { border-bottom: none; }
.plan-checklist .chk { color: var(--green-bright); font-weight: 700; flex-shrink: 0; margin-top: 2px; }
.plan-checklist .item-cost { margin-left: auto; font-weight: 600; color: var(--amber); font-size: 0.9rem; white-space: nowrap; padding-left: 10px; }

/* Share/Bookmark Bar */
.share-bar {
  background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
  color: white;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.share-bar p { margin: 0; font-weight: 600; font-size: 0.95rem; }
.share-bar small { color: rgba(255,255,255,0.7); font-weight: 400; }
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
}
.share-btn:hover { transform: translateY(-1px); opacity: 0.92; text-decoration: none; }
.share-btn-bookmark { background: var(--amber); color: var(--green-dark); }
.share-btn-facebook { background: #1877f2; color: white; }
.share-btn-twitter { background: #000; color: white; }
.share-btn-linkedin { background: #0077b5; color: white; }
.share-btn-link { background: rgba(255,255,255,0.2); color: white; border: 1px solid rgba(255,255,255,0.3); }

/* === CARDS === */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: var(--white);
  border: 1px solid var(--gray-soft);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-icon { font-size: 2.4rem; margin-bottom: 16px; }
.card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.card p { font-size: 0.95rem; color: var(--gray-mid); margin: 0; }

/* === SECTION HEADERS === */
.section-header { text-align: center; max-width: 660px; margin: 0 auto 48px; }
.section-header .eyebrow {
  display: inline-block;
  color: var(--green-bright);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--gray-mid); font-size: 1.05rem; margin: 0; }

/* === BLOG / ARTICLES === */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.article-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--gray-soft);
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.article-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.article-body { padding: 20px; }
.article-tag {
  display: inline-block;
  background: rgba(46,125,82,0.1);
  color: var(--green-bright);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.article-card h3 { font-size: 1.05rem; margin-bottom: 10px; line-height: 1.35; }
.article-card h3 a { color: var(--text-dark); text-decoration: none; }
.article-card h3 a:hover { color: var(--green-bright); }
.article-card p { font-size: 0.9rem; color: var(--gray-mid); margin-bottom: 14px; }
.article-meta { font-size: 0.82rem; color: var(--gray-mid); display: flex; gap: 12px; }

/* === FOOTER === */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.6; margin-bottom: 20px; }
.footer-col h4 {
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  transition: color 0.2s;
  text-decoration: none;
}
.footer-col ul li a:hover { color: var(--amber); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: var(--amber); }

/* AdSense placeholders */
.ad-banner {
  background: var(--gray-soft);
  border: 1px dashed #ccc;
  border-radius: var(--radius);
  text-align: center;
  padding: 20px;
  color: var(--gray-mid);
  font-size: 0.82rem;
  margin: 24px 0;
}

/* Disclaimer */
.disclaimer-box {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 0.85rem;
  color: var(--gray-mid);
  margin: 24px 0;
}
.disclaimer-box strong { color: var(--text-dark); }

/* === INLINE ARTICLE PAGE === */
.article-page { max-width: 760px; margin: 0 auto; padding: 40px 20px; }
.article-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 12px; }
.article-page .article-page-meta { color: var(--gray-mid); font-size: 0.9rem; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--gray-soft); }
.article-page h2 { margin: 32px 0 12px; }
.article-page h3 { margin: 24px 0 10px; }

/* Table of contents */
.toc {
  background: var(--cream);
  border-left: 4px solid var(--green-bright);
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin: 28px 0;
}
.toc h4 { margin-bottom: 12px; color: var(--green-dark); }
.toc ol { margin: 0; }
.toc ol li { margin-bottom: 6px; }
.toc ol li a { color: var(--green-bright); font-size: 0.9rem; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--gray-soft); padding: 18px 0; }
.faq-q { font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-q::after { content: '+'; font-size: 1.4rem; color: var(--green-bright); flex-shrink: 0; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { margin-top: 10px; color: var(--gray-mid); font-size: 0.95rem; display: none; }
.faq-item.open .faq-a { display: block; }

/* === ABOUT / CONTACT PAGES === */
.page-hero {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: white;
  padding: 64px 0;
  text-align: center;
}
.page-hero h1 { color: white; }
.page-hero p { color: rgba(255,255,255,0.75); max-width: 600px; margin: 12px auto 0; }
.content-page { max-width: 820px; margin: 0 auto; padding: 56px 20px; }
.content-page h2 { margin: 32px 0 12px; }

/* Contact form */
.contact-form { max-width: 600px; }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form textarea.form-control { min-height: 140px; resize: vertical; }

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--green-dark); padding: 16px 20px; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
  .appliance-row { grid-template-columns: 1fr 1fr; }
  .appliance-row .form-control:first-child { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .share-bar { flex-direction: column; align-items: flex-start; }
  .tool-body { padding: 20px 16px; }
  .hero { padding: 56px 0 48px; }
  .hero-stats { gap: 24px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr 1fr; }
}

/* Print styles for Energy Plan */
@media print {
  #nav, footer, .share-bar, .tool-steps, .tool-nav, .btn, .ad-banner { display: none !important; }
  .tool-wrapper { box-shadow: none; border: none; }
  body { background: white; }
  .results-grid { break-inside: avoid; }
}

/* Utility */
.text-green { color: var(--green-bright); }
.text-amber { color: var(--amber); }
.bg-green-dark { background: var(--green-dark); }
.hidden { display: none; }
