/* =============================================================
   Smart Meter Help UK — Homepage Styles
   Drop this file into your active theme folder as smh-home.css
   The page template links to it automatically.
   ============================================================= */

/* --- Brand tokens --- */
:root {
  --smh-navy:        #0d1b2a;
  --smh-green:       #00c896;
  --smh-green-light: #00e6b0;
  --smh-amber:       #f59e0b;
  --smh-red:         #ef4444;
  --smh-white:       #ffffff;

  --smh-bg:          #f4f7fa;
  --smh-bg-alt:      #eaf6f2;
  --smh-text:        #1a2a3a;
  --smh-text-muted:  #4a5a6a;
  --smh-border:      #d0dce8;

  --smh-radius-sm:   8px;
  --smh-radius-md:   14px;
  --smh-radius-lg:   20px;

  --smh-shadow:      0 2px 12px rgba(13,27,42,0.08);
  --smh-shadow-hover:0 6px 24px rgba(13,27,42,0.14);
}

/* --- Reset & base --- */
#smh-home *,
#smh-home *::before,
#smh-home *::after {
  box-sizing: border-box;
}

#smh-home {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--smh-text);
  background: var(--smh-white);
  -webkit-font-smoothing: antialiased;
}

/* --- Container --- */
.smh-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Utility --- */
.smh-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Section headings --- */
#smh-home h2 {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 700;
  color: var(--smh-navy);
  margin: 0 0 8px;
  line-height: 1.25;
}

.smh-section__sub {
  font-size: 1rem;
  color: var(--smh-text-muted);
  margin: 0 0 32px;
}

/* --- Buttons --- */
.smh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--smh-radius-md);
  padding: 16px 32px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  min-height: 54px;
}

.smh-btn--primary {
  background: var(--smh-green);
  color: var(--smh-navy);
  box-shadow: 0 4px 16px rgba(0, 200, 150, 0.35);
}

.smh-btn--primary:hover,
.smh-btn--primary:focus-visible {
  background: var(--smh-green-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 200, 150, 0.45);
  color: var(--smh-navy);
  text-decoration: none;
}

.smh-btn--primary:active {
  transform: translateY(0);
}

.smh-btn--hero {
  font-size: 1.2rem;
  padding: 20px 48px;
  min-height: 64px;
}


/* =============================================================
   SECTION 1 — HERO
   ============================================================= */
.smh-hero {
  background: var(--smh-navy);
  color: var(--smh-white);
  padding: 64px 0 56px;
  text-align: center;
}

.smh-hero h1 {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 800;
  color: var(--smh-white);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.smh-hero__sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,0.78);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.55;
}

/* Quick action buttons */
.smh-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 28px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.smh-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--smh-radius-md);
  padding: 18px 12px;
  text-decoration: none;
  color: var(--smh-white);
  font-weight: 600;
  font-size: 0.88rem;
  min-height: 80px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  text-align: center;
  line-height: 1.3;
}

.smh-quick-btn:hover,
.smh-quick-btn:focus-visible {
  background: rgba(0, 200, 150, 0.15);
  border-color: var(--smh-green);
  color: var(--smh-white);
  text-decoration: none;
  transform: translateY(-2px);
}

.smh-quick-btn__icon {
  font-size: 1.6rem;
  line-height: 1;
}

.smh-quick-btn__label {
  display: block;
}


/* =============================================================
   SECTION 2 — WHAT'S GOING WRONG?
   ============================================================= */
.smh-problems {
  background: var(--smh-bg);
  padding: 60px 0;
}

.smh-problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.smh-problem-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--smh-white);
  border: 1.5px solid var(--smh-border);
  border-radius: var(--smh-radius-md);
  padding: 18px 16px;
  text-decoration: none;
  color: var(--smh-text);
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 68px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
  box-shadow: var(--smh-shadow);
  line-height: 1.3;
}

.smh-problem-card:hover,
.smh-problem-card:focus-visible {
  border-color: var(--smh-green);
  box-shadow: var(--smh-shadow-hover);
  transform: translateY(-2px);
  color: var(--smh-text);
  text-decoration: none;
}

.smh-problem-card__icon {
  font-size: 1.7rem;
  flex-shrink: 0;
  line-height: 1;
}


/* =============================================================
   SECTION 3 — TOOLS REINFORCEMENT
   ============================================================= */
.smh-tools {
  background: var(--smh-white);
  padding: 60px 0;
}

.smh-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* 5th tool card sits centred on its own row */
.smh-tools-grid .smh-tool-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc(50% - 7px);
  margin: 0 auto;
}

.smh-tool-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--smh-bg-alt);
  border: 1.5px solid rgba(0, 200, 150, 0.2);
  border-radius: var(--smh-radius-md);
  padding: 20px 16px;
  text-decoration: none;
  color: var(--smh-text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.smh-tool-card:hover,
.smh-tool-card:focus-visible {
  border-color: var(--smh-green);
  box-shadow: var(--smh-shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--smh-text);
}

.smh-tool-card__icon {
  font-size: 1.9rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.smh-tool-card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.smh-tool-card__body strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--smh-navy);
  line-height: 1.3;
}

.smh-tool-card__body span {
  font-size: 0.875rem;
  color: var(--smh-text-muted);
  line-height: 1.45;
}


/* =============================================================
   SECTION 4 — HOW IT WORKS
   ============================================================= */
.smh-how {
  background: var(--smh-navy);
  color: var(--smh-white);
  padding: 60px 0;
  text-align: center;
}

.smh-how h2 {
  color: var(--smh-white);
}

.smh-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.smh-step {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.smh-step__number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--smh-green);
  color: var(--smh-navy);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.smh-step__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
}

.smh-step__content strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--smh-white);
  line-height: 1.3;
}

.smh-step__content span {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}

.smh-how__cta {
  margin-top: 8px;
}


/* =============================================================
   SECTION 5 — TRUST LAYER
   ============================================================= */
.smh-trust {
  background: var(--smh-bg);
  padding: 52px 0;
  text-align: center;
}

.smh-trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.smh-trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--smh-text);
  font-weight: 500;
}

.smh-trust-item__icon {
  font-size: 1.1rem;
  color: var(--smh-green);
  flex-shrink: 0;
}


/* =============================================================
   RESPONSIVE — TABLET (600px+)
   ============================================================= */
@media (min-width: 600px) {

  .smh-quick-actions {
    grid-template-columns: repeat(4, 1fr);
    max-width: 720px;
  }

  .smh-quick-btn {
    font-size: 0.85rem;
  }

  .smh-problem-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .smh-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .smh-trust-list {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px 40px;
  }

}


/* =============================================================
   RESPONSIVE — DESKTOP (820px+)
   ============================================================= */
@media (min-width: 820px) {

  .smh-hero {
    padding: 80px 0 72px;
  }

  .smh-problems,
  .smh-tools,
  .smh-how,
  .smh-trust {
    padding: 72px 0;
  }

  .smh-tools-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .smh-steps {
    flex-direction: row;
    gap: 0;
    max-width: 820px;
    align-items: flex-start;
  }

  .smh-step {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 12px;
  }

  /* Connector line between steps */
  .smh-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    left: calc(50% + 22px);
    width: calc(100% - 44px);
    height: 2px;
    background: rgba(0, 200, 150, 0.3);
  }

  .smh-step__content {
    padding-top: 14px;
    align-items: center;
  }

}


/* =============================================================
   FOCUS STYLES — Accessibility
   ============================================================= */
#smh-home a:focus-visible {
  outline: 3px solid var(--smh-green);
  outline-offset: 3px;
  border-radius: var(--smh-radius-sm);
}


/* =============================================================
   PRINT
   ============================================================= */
@media print {
  .smh-hero {
    background: var(--smh-navy) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
