/* main.css */

/* ========= Base ========= */

:root {
  --bg: #020617;
  --bg-elevated: #020617;
  --text: #e5e7eb;
  --text-muted: #94a3b8;
  --border-subtle: rgba(148, 163, 184, 0.16);
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
}

/* ========= Theme: Light (secondary) ========= */
/* Dark is the default (primary). Light is a softer, slightly purple-tinted theme. */
html[data-theme="light"],
body[data-theme="light"] {
  /* softer, less "white-white" */
  --bg: #f2f0ff;                 /* page background */
  --bg-elevated: #f7f6ff;        /* cards/menus/FAQ */
  --bg-muted: rgba(15,23,42,0.03);

  --text: #0f172a;
  --text-muted: #475569;

  --border-subtle: rgba(15, 23, 42, 0.14);

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ========= Utilities ========= */

.text-muted {
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #f9fafb;
  border: none;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.btn-ghost:hover {
  border-color: #f9fafb;
}

/* ========= Header ========= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
}

/* Top strip: logo + audience + locale */

.header-strip {
  background: #020617;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.header-strip .strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1rem;
}

.strip-left {
  display: flex;
  align-items: center;
}

.strip-logo {
  font-weight: 600;
  font-size: 1.1rem;
  color: #f9fafb;
  text-decoration: none;
}

.header-strip .strip-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #e5e7eb;
}

.header-strip .strip-right a {
  color: inherit;
  text-decoration: none;
}

.header-strip .strip-right a:hover {
  text-decoration: underline;
}

/* Locale dropdown */

.locale-switcher {
  position: relative;
}

.locale-current {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  font-size: 0.8rem;
  color: #e5e7eb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.locale-caret {
  font-size: 0.7rem;
}

.locale-menu {
  position: absolute;
  right: 0;
  top: 125%;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  background: #020617;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.7);
  min-width: 190px;
  display: none;
  z-index: 150;
}

.locale-menu.open {
  display: block;
}

.locale-menu li a {
  display: block;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
  color: #e5e7eb;
  text-decoration: none;
  white-space: nowrap;
}

.locale-menu li a:hover {
  background: rgba(148, 163, 184, 0.16);
}

/* Main header row: nav + CTAs */

.header-main {
  background: #020617;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
}

/* Nav */

.main-nav {
  flex: 1 1 auto;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.main-nav a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.95rem;
}

.main-nav a:hover {
  color: #f9fafb;
}

.main-nav li.active > a {
  color: #f9fafb;
  font-weight: 600;
}

/* Primary product tabs (Broadband, Phone, TV) */

.main-nav a.nav-primary {
  font-weight: 600;
}

/* Dropdowns */

.has-dropdown {
  position: relative;
}

.has-dropdown > a {
  display: inline-block;
  padding-bottom: 0.4rem;
}

.has-dropdown .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  background: #020617;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.7);
  list-style: none;
  padding: 0.35rem 0;
  min-width: 220px;
  display: none;
  z-index: 200;
}

.has-dropdown:hover .dropdown {
  display: block;
}

.has-dropdown .dropdown li a {
  display: block;
  padding: 0.35rem 0.9rem;
  font-size: 0.9rem;
}

.has-dropdown .dropdown li a:hover {
  background: rgba(148, 163, 184, 0.16);
}

/* Header CTAs & theme toggle */

.header-cta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.theme-toggle {
  margin-left: 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: transparent;
  color: #e5e7eb;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

/* Mobile nav toggle */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #e5e7eb;
  cursor: pointer;
}

/* ========= Main content basics ========= */

main {
  padding: 2.5rem 0;
}

/* Hero – shared */

.hero {
  padding: 2.5rem 0 2rem;
}

.hero-inner,
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-copy {
  max-width: 36rem;
}

.hero h1 {
  font-size: 2.4rem;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero p {
  color: var(--text-muted);
  max-width: 34rem;
}

.hero-buttons,
.btn-row {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-note,
.trust-cues {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-visual {
  border-radius: 1.25rem;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* Page-specific subtle width control */

.page-full-fibre .section > .container {
  max-width: 960px;
}

/* Feature grid / cards */

.section {
  padding: 2.5rem 0;
}

.section-alt {
  background: #020617;
}

.section h2 {
  margin: 0 0 0.75rem;
}

.section p {
  margin: 0 0 1.5rem;
}

/* Two-column card layout used on full fibre page */

.pillars {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

/* Three-card grid used for FTTP / FTTC / ADSL and plan grids */

.feature-grid,
.plans-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.card,
.feature-card {
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  background: radial-gradient(
      circle at top left,
      rgba(37, 99, 235, 0.08),
      transparent
    ),
    #020617;
}

.card h3,
.feature-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.card p,
.feature-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.section-link {
  margin-top: 1.5rem;
}

/* FAQs */

.faq {
  border-radius: 0.85rem;
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 1rem;
  background: #020617;
}

.faq + .faq {
  margin-top: 0.75rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 500;
}

.faq p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Bullets */

.bullets {
  padding-left: 1.25rem;
  margin-top: 0.75rem;
}

.bullets li + li {
  margin-top: 0.35rem;
}

/* Final CTA */

.final-cta {
  text-align: center;
}

.final-cta .btn-row {
  justify-content: center;
}

/* ========= Footer ========= */

.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  background: #020617;
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h3 {
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
  color: #e5e7eb;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.35rem;
}

.site-footer a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.site-footer a:hover {
  color: #f9fafb;
}

.footer-bottom {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========= Responsive ========= */

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    width: 100%;
    order: 1;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    display: none;
    padding-top: 0.5rem;
  }

  .main-nav.open ul {
    display: flex;
  }

  .header-cta {
    order: 2;
    margin-left: auto;
  }

  .hero-inner,
  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .pillars,
  .feature-grid,
  .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .header-strip .strip-right {
    gap: 0.5rem;
    font-size: 0.8rem;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .pillars,
  .feature-grid,
  .plans-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-cta {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .theme-toggle {
    margin-top: 0.25rem;
  }
}

/* ========= Light mode overrides for hard-coded dark header colours ========= */
html[data-theme="light"] body,
body[data-theme="light"] {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="light"] .header-strip,
html[data-theme="light"] .header-main,
html[data-theme="light"] .locale-menu {
  background: var(--bg-elevated);
}

html[data-theme="light"] .header-strip {
  border-bottom: 1px solid var(--border-subtle);
}

html[data-theme="light"] .header-main {
  border-bottom: 1px solid var(--border-subtle);
}

html[data-theme="light"] .strip-logo {
  color: var(--text);
}

html[data-theme="light"] .header-strip .strip-right,
html[data-theme="light"] .header-strip .strip-right a {
  color: var(--text);
}

html[data-theme="light"] .locale-current {
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.25);
}

html[data-theme="light"] .locale-menu {
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .locale-menu li a {
  color: var(--text);
}

html[data-theme="light"] .locale-menu li a:hover {
  background: rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .btn-ghost {
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.25);
}

html[data-theme="light"] .btn-ghost:hover {
  border-color: rgba(15, 23, 42, 0.45);
}

/* ========= Light mode fixes for section backgrounds + cards ========= */
/* Fixes the “dark band” in the middle of pages when light mode is enabled. */

html[data-theme="light"] .section-alt {
  background: var(--bg); /* override hard-coded #020617 */
}

html[data-theme="light"] .card,
html[data-theme="light"] .feature-card {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent),
    var(--bg-elevated); /* override hard-coded #020617 */
}

html[data-theme="light"] .faq {
  background: var(--bg-elevated); /* keep FAQs readable in light mode */
}

html[data-theme="light"] .site-footer {
  background: var(--bg); /* prevent footer from staying dark in light mode */
}

html[data-theme="light"] .hero-visual {
  border-color: rgba(15, 23, 42, 0.18);
}
