/* ============================================================
   OCTOPUS ENERGY REFERRAL — style.css
   Mobile-first, system fonts, zero external dependencies
   Octopus brand colours: #00d15b (green), #1a1a2e (dark)
============================================================ */

/* ── Custom Properties ─────────────────────────────────── */
:root {
  --green:       #00d15b;
  --green-dark:  #00a847;
  --green-light: #e6faf0;
  --dark:        #1a1a2e;
  --dark-mid:    #2d2d44;
  --text:        #222222;
  --text-mid:    #555555;
  --text-light:  #777777;
  --border:      #e0e0e0;
  --bg:          #ffffff;
  --bg-alt:      #f7fdf9;
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.12);
  --radius:      12px;
  --radius-sm:   8px;
  --transition:  0.18s ease;
  --font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
                 Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--green-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
a:hover { color: var(--dark); }

ul, ol { padding-left: 1.25rem; }

/* ── Container ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ── CTA Buttons ───────────────────────────────────────── */
.cta-btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  background: var(--green);
  color: var(--dark) !important;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(0, 209, 91, 0.30);
  white-space: nowrap;
}
.cta-btn:hover {
  background: var(--green-dark);
  color: var(--dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 209, 91, 0.40);
}
.cta-btn:focus-visible {
  outline: 3px solid var(--dark);
  outline-offset: 3px;
}
.cta-btn:active {
  transform: translateY(0);
}

.cta-secondary {
  display: block;
  width: fit-content;
  margin-inline: auto;
  background: var(--green);
  color: var(--dark) !important;
  box-shadow: 0 4px 16px rgba(0, 209, 91, 0.30);
}
.cta-secondary:hover {
  background: var(--green-dark);
  color: var(--dark) !important;
  box-shadow: 0 6px 24px rgba(0, 209, 91, 0.40);
}

.cta-footer {
  font-size: 1rem;
}

/* ── Section Shared ────────────────────────────────────── */
.section {
  padding: 40px 1rem;
}
.section-alt {
  background: var(--bg-alt);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}

.section-intro {
  font-size: 1.1rem;
  color: var(--text-mid);
  margin-bottom: 2rem;
  max-width: 720px;
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  background: linear-gradient(145deg, var(--dark) 0%, var(--dark-mid) 60%, #1e3a28 100%);
  color: #ffffff;
  padding-block: 4rem 3.5rem;
  text-align: center;
}

.freshness {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(0, 209, 91, 0.35);
  border-radius: 50px;
}

.hero h1 {
  font-size: clamp(1.7rem, 5.5vw, 3rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,0.85);
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.hero-sub strong {
  color: var(--green);
}

.hero .cta-btn {
  font-size: 1.15rem;
  padding: 1rem 2.25rem;
  margin-bottom: 1.5rem;
}

/* Copy row */
.copy-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  overflow: hidden;
  margin-bottom: 1.75rem;
  max-width: 480px;
  margin-inline: auto;
}

.link-display {
  font-family: monospace, monospace;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.08);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.15);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  flex-shrink: 0;
  background: transparent;
  color: rgba(255,255,255,0.75);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.copy-btn:hover {
  background: rgba(255,255,255,0.10);
  color: #ffffff;
  border-color: rgba(255,255,255,0.55);
}
.copy-btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.copy-btn.copied {
  background: var(--green);
  color: var(--dark);
  border-color: var(--green);
}

/* Price cap callout */
.price-cap-callout {
  display: block;
  background: rgba(0, 209, 91, 0.12);
  border: 1px solid rgba(0, 209, 91, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.1rem;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.75rem;
  max-width: 480px;
  margin-inline: auto;
  text-align: left;
}
.price-cap-callout strong {
  color: var(--green);
}

/* Trust badges */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.25rem;
}

.badge {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.70);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50px;
  padding: 0.3rem 0.8rem;
  white-space: nowrap;
}

/* ── How It Works ──────────────────────────────────────── */
#how-it-works h2 {
  text-align: center;
}
.steps {
  list-style: none;
  padding: 0;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.steps li {
  counter-increment: steps;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
}

.steps li::before {
  content: counter(steps);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--green);
  color: var(--dark);
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 50%;
  margin-top: 0.15rem;
}

.steps li strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.2rem;
}

.steps li p {
  color: var(--text-mid);
  font-size: 0.97rem;
}

/* Note callout */
.note {
  background: var(--green-light);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 2rem;
}
.note strong {
  color: var(--dark);
}

/* ── Smart Tariffs ─────────────────────────────────────── */
.tariff-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  align-items: start;
}

.tariff-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.tariff-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.tariff-card--business {
  border-color: var(--border);
  background: var(--bg);
}

.card-icon {
  font-size: 2rem;
  line-height: 1;
}

.tariff-card h3 {
  margin-bottom: 0;
  font-size: 1.15rem;
}

.tariff-card h4 {
  margin-bottom: 0;
}

.tariff-card p {
  font-size: 0.95rem;
  color: var(--text-mid);
}

.tariff-card ul {
  font-size: 0.93rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.tariff-card ul li strong {
  color: var(--dark);
}

.learn-more {
  font-size: 0.88rem;
  font-weight: 600;
  color: #007a36;
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
  display: inline-block;
  margin-top: auto;
  padding-top: 0.5rem;
}
.learn-more:hover {
  color: var(--dark);
  border-color: var(--dark);
}

.card-cta {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  background: var(--green);
  color: var(--dark) !important;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 50px;
  margin-top: 0.5rem;
  transition: background var(--transition), transform var(--transition);
  align-self: flex-start;
}
.card-cta:hover {
  background: var(--green-dark);
  color: var(--dark) !important;
  transform: translateY(-1px);
}

.tariff-card--business .card-cta {
  background: var(--green);
  color: var(--dark) !important;
}
.tariff-card--business .card-cta:hover {
  background: var(--green-dark);
}

/* Comparison table */
.table-heading {
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
  margin-top: 0.5rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.tariff-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--bg);
}

.tariff-table thead {
  background: var(--dark);
  color: #ffffff;
}

.tariff-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tariff-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.tariff-table tbody tr:last-child td {
  border-bottom: none;
}

.tariff-table tbody tr:nth-child(even) {
  background: var(--bg-alt);
}

.tariff-table tbody tr:hover {
  background: rgba(0, 209, 91, 0.06);
}

/* ── Why Octopus ───────────────────────────────────────── */
.why-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.why-list li {
  font-size: 1rem;
  color: var(--text);
  padding: 0.65rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.section-alt .why-list li {
  background: var(--bg);
}

/* ── Business Referrals ────────────────────────────────── */
.business-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  background: var(--bg);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

.business-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.big-num {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 900;
  color: var(--green-dark);
  line-height: 1;
}

.big-label {
  font-size: 0.85rem;
  color: var(--text-mid);
  font-weight: 600;
}

.business-plus,
.business-equals {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 900;
  color: var(--text-light);
  line-height: 1;
}

/* ── FAQ ────────────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0;
}

.faq-list details {
  border-bottom: 1px solid var(--border);
}

.faq-list details:last-child {
  border-bottom: none;
}

.faq-list summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  background: var(--bg);
  transition: background var(--transition);
  -webkit-user-select: none;
  user-select: none;
}

.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::marker { display: none; }

.faq-list summary::after {
  content: '+';
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-dark);
  background: var(--green-light);
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition);
}

.faq-list details[open] > summary {
  background: var(--bg-alt);
  color: var(--green-dark);
  border-bottom: 1px solid var(--border);
}

.faq-list details[open] > summary::after {
  content: '−';
  background: var(--green);
  color: var(--dark);
  transform: rotate(180deg);
}

.faq-list summary:hover {
  background: var(--bg-alt);
}

.faq-list summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}

.faq-list details > p,
.faq-list details > div {
  padding: 1rem 1.25rem 1.2rem;
  font-size: 0.97rem;
  color: var(--text-mid);
  line-height: 1.7;
  background: var(--bg-alt);
}

.faq-list details > p a {
  color: var(--green-dark);
  font-weight: 600;
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.65);
  padding-block: 3rem;
  text-align: center;
}

.footer-cta-row {
  margin-bottom: 1.25rem;
}

.footer-link-plain {
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  color: rgba(255,255,255,0.55);
}

.footer-link-plain a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}
.footer-link-plain a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-terms {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.40);
  max-width: 680px;
  margin-inline: auto;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.30);
  font-style: italic;
}

/* ── Responsive: Tablet (640px+) ────────────────────────── */
@media (min-width: 640px) {
  .section {
    padding: 56px 1.5rem;
  }

  .hero {
    padding-block: 5rem 4rem;
  }

  .steps {
    gap: 1.5rem;
  }

  .steps li {
    flex-direction: row;
    gap: 1.1rem;
    align-items: flex-start;
  }

  .steps li::before {
    margin-top: 0.15rem;
  }

  .tariff-grid {
    grid-template-columns: 1fr 1fr;
  }

  .why-list li {
    padding: 0.75rem 1.25rem;
  }
}

/* ── Responsive: Desktop (960px+) ───────────────────────── */
@media (min-width: 960px) {
  .hero {
    padding-block: 6rem 5rem;
  }

  .section {
    padding: 64px 2rem;
  }

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

  .steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .steps li {
    flex-direction: column;
    align-items: flex-start;
  }

  .steps li::before {
    width: 2.8rem;
    height: 2.8rem;
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
    margin-top: 0;
  }

  .business-box {
    gap: 2rem;
    padding: 2.5rem 2rem;
  }

  .big-num {
    font-size: 3.5rem;
  }
}

/* ── Focus / Accessibility ──────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}

/* ── Mobile overrides (max 600px) ───────────────────────── */
@media (max-width: 600px) {
  .hero .cta-btn {
    display: block;
    width: calc(100% - 32px);
    max-width: 480px;
    margin-inline: auto;
    white-space: normal;
  }

  .copy-row {
    width: calc(100% - 32px);
    max-width: 480px;
    margin-inline: auto;
  }
}

/* ── Print ──────────────────────────────────────────────── */
@media print {
  .cta-btn, .copy-btn { display: none; }
  .hero { background: none; color: var(--text); }
  .hero h1, .freshness { color: var(--dark); }
}
