/* ==========================================================================
   Melbourne Power Group — "Grid Voltage" design system
   Premium dark electric-tech. Brand blue #2980C4 anchored.
   ========================================================================== */

:root {
  /* Brand */
  --blue: #2980C4;          /* exact logo blue */
  --blue-bright: #4FA8E8;   /* links / hover on dark */
  --blue-deep: #16456B;
  --cyan: #56D4FF;          /* electric glow */
  --volt: #FFB930;          /* energy accent / CTA */
  --volt-bright: #FFCE63;

  /* Surfaces */
  --ink: #070D14;           /* page background */
  --ink-2: #0B141F;         /* raised section */
  --ink-3: #101D2C;         /* card */
  --ink-4: #16273A;         /* card hover / inset */
  --line: rgba(86, 169, 224, .14);
  --line-strong: rgba(86, 169, 224, .28);

  /* Text */
  --text: #E9F1F8;
  --text-soft: #ADC2D4;
  --text-mute: #7E95A8;

  /* Type */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, monospace;

  /* Rhythm */
  --radius: 14px;
  --radius-lg: 22px;
  --pad: clamp(20px, 4vw, 48px);
  --section: clamp(72px, 10vw, 140px);
  --header-h: 76px;

  /* Glow */
  --glow-blue: 0 0 24px rgba(41, 128, 196, .35), 0 0 80px rgba(41, 128, 196, .12);
  --glow-volt: 0 0 24px rgba(255, 185, 48, .35), 0 0 64px rgba(255, 185, 48, .10);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-bright); text-decoration: none; }
a:hover { color: var(--cyan); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--text);
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }
p { margin: 0 0 1.1em; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 2000;
  background: var(--volt); color: #1A1205; padding: 10px 18px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { left: 8px; }

.container { width: min(1200px, 100% - 2 * var(--pad)); margin-inline: auto; }
.container-wide { width: min(1380px, 100% - 2 * var(--pad)); margin-inline: auto; }

section { padding-block: var(--section); position: relative; }

/* Eyebrow label */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: .78rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px;
  background: linear-gradient(90deg, var(--volt), var(--cyan));
  box-shadow: 0 0 8px rgba(86, 212, 255, .8);
}
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .lead, .lead { color: var(--text-soft); font-size: 1.1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 30px;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: .01em;
  cursor: pointer; transition: transform .2s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn { white-space: nowrap; }
.btn-volt {
  background: linear-gradient(135deg, var(--volt-bright), var(--volt));
  color: #20160233; color: #211603;
  box-shadow: var(--glow-volt);
}
.btn-volt:hover { color: #211603; box-shadow: 0 0 36px rgba(255, 185, 48, .5), 0 0 90px rgba(255, 185, 48, .16); transform: translateY(-2px); }
.btn-ghost {
  background: rgba(41, 128, 196, .08);
  border-color: var(--line-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(41, 128, 196, .18); border-color: var(--blue-bright); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; box-shadow: var(--glow-blue); }
.btn-blue:hover { background: var(--blue-bright); color: #fff; transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 1000;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(7, 13, 20, .82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  width: min(1380px, 100% - 2 * var(--pad)); margin-inline: auto;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; letter-spacing: .01em; }
.brand:hover { color: #fff; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 0 10px rgba(41,128,196,.55)); }
.brand span small { display: block; font-family: var(--font-mono); font-size: .58rem; font-weight: 500; letter-spacing: .3em; color: var(--cyan); text-transform: uppercase; }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.main-nav > a, .nav-drop > button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 8px; border: 0; background: none;
  color: var(--text-soft); font-family: var(--font-body); font-size: .95rem; font-weight: 600;
  cursor: pointer; transition: color .2s;
}
.main-nav > a:hover, .nav-drop > button:hover { color: #fff; }
.main-nav > a[aria-current="page"] { color: var(--cyan); }
.nav-drop { position: relative; }
.nav-drop > button svg { width: 12px; height: 12px; transition: transform .2s; }
.nav-drop.open > button svg { transform: rotate(180deg); }
.drop-menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 250px;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px; box-shadow: 0 24px 60px rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.nav-drop.open .drop-menu { opacity: 1; visibility: visible; transform: none; }
.drop-menu a { display: block; padding: 10px 14px; border-radius: 8px; color: var(--text-soft); font-size: .93rem; font-weight: 600; }
.drop-menu a:hover { background: var(--ink-4); color: #fff; }

.header-cta { display: flex; align-items: center; gap: 10px; }
.header-cta .btn { min-height: 44px; padding: 10px 22px; font-size: .92rem; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: .95rem; padding: 10px 12px; }
.header-phone svg { width: 16px; height: 16px; color: var(--volt); }
.header-phone:hover { color: var(--cyan); }

.nav-toggle {
  display: none; margin-left: auto;
  width: 48px; height: 48px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(41,128,196,.08); color: var(--text);
  cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* Mobile drawer */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 1100; display: none;
}
.mobile-drawer.open { display: block; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(2, 5, 9, .7); backdrop-filter: blur(4px); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 88vw);
  background: var(--ink-2); border-left: 1px solid var(--line);
  padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
  transform: translateX(100%); transition: transform .3s ease;
}
.mobile-drawer.open .drawer-panel { transform: none; }
.drawer-close { align-self: flex-end; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--text); cursor: pointer; }
.drawer-panel a { padding: 13px 10px; border-radius: 10px; color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.drawer-panel a:hover { background: var(--ink-4); }
.drawer-panel .drawer-sub { padding-left: 22px; font-size: .95rem; color: var(--text-soft); font-family: var(--font-body); }
.drawer-panel .btn { margin-top: 18px; }
.drawer-label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; color: var(--text-mute); padding: 18px 10px 6px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + clamp(60px, 9vw, 120px)) 0 clamp(60px, 8vw, 100px);
  background:
    radial-gradient(900px 480px at 80% -10%, rgba(41,128,196,.22), transparent 64%),
    radial-gradient(620px 380px at 12% 110%, rgba(255,185,48,.07), transparent 60%),
    var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(86,169,224,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86,169,224,.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 30%, transparent 75%);
}
.page-hero .container { position: relative; }
.page-hero .lead { max-width: 640px; font-size: 1.12rem; }
.page-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.page-hero-media { position: absolute; inset: 0; z-index: 0; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .22; }
.page-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,13,20,.55), rgba(7,13,20,.92)); }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 22px; }
.breadcrumbs a { color: var(--text-mute); }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs span[aria-hidden] { color: var(--blue-deep); }

/* ---------- Cards / grids ---------- */
.card {
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 0 0 1px rgba(86,169,224,.06); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

/* Quick answer (AEO) */
.quick-answer {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--volt);
  background: linear-gradient(180deg, rgba(41,128,196,.10), rgba(41,128,196,.03));
  border-radius: var(--radius);
  padding: 26px 30px; margin: 0 0 40px;
}
.quick-answer h2 { font-size: 1.05rem; font-family: var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--volt); margin-bottom: 10px; }
.quick-answer p { margin: 0; color: var(--text); font-size: 1.08rem; }

.key-facts { width: 100%; border-collapse: collapse; margin: 28px 0 40px; font-size: .98rem; }
.key-facts th, .key-facts td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.key-facts th { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mute); white-space: nowrap; }
.key-facts td { color: var(--text-soft); }
.key-facts tr:first-child th, .key-facts tr:first-child td { border-top: 1px solid var(--line); }

/* FAQ accordion */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: var(--ink-3); overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; color: var(--volt); flex: none; transition: transform .25s; line-height: 1; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 24px 22px; color: var(--text-soft); }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  background:
    radial-gradient(700px 360px at 50% 120%, rgba(255,185,48,.14), transparent 60%),
    radial-gradient(900px 460px at 50% -40%, rgba(41,128,196,.3), transparent 65%),
    var(--ink-2);
  border-block: 1px solid var(--line);
}
.cta-band h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.cta-band .lead { max-width: 560px; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.cta-ticks { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; margin-top: 28px; color: var(--text-mute); font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.cta-ticks span { display: inline-flex; align-items: center; gap: 8px; }
.cta-ticks svg { width: 14px; height: 14px; color: var(--volt); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-family: var(--font-display); font-weight: 600; font-size: .92rem; }
.form-field label em { color: var(--volt); font-style: normal; }
.form-field input, .form-field select, .form-field textarea {
  background: var(--ink); border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--text); font-family: var(--font-body); font-size: 1rem;
  padding: 14px 16px; min-height: 52px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--blue-bright); box-shadow: 0 0 0 3px rgba(41,128,196,.22);
}
.form-field .field-error { color: #FF8A7A; font-size: .85rem; display: none; }
.form-field.invalid input, .form-field.invalid textarea, .form-field.invalid select { border-color: #E2604C; }
.form-field.invalid .field-error { display: block; }
.form-note { color: var(--text-mute); font-size: .85rem; }
.hp-field { position: absolute; left: -5000px; opacity: 0; pointer-events: none; }

.form-success {
  border: 1px solid rgba(115, 220, 150, .4); border-radius: var(--radius);
  background: rgba(38, 122, 73, .15); color: #B8EBC8;
  padding: 22px 26px; display: none;
}
.form-success.show { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(800px 400px at 85% 0%, rgba(41,128,196,.10), transparent 60%),
    var(--ink-2);
  padding: clamp(56px, 7vw, 90px) 0 36px;
  color: var(--text-soft);
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 44px; margin-bottom: 56px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { font-size: .95rem; color: var(--text-mute); }
.footer-rec { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; color: var(--cyan); }
.site-footer h4 { font-size: .8rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 18px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-links a { color: var(--text-soft); font-size: .95rem; }
.footer-links a:hover { color: var(--cyan); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--text-mute); }
.footer-bottom a { color: var(--text-mute); }
.footer-bottom a:hover { color: var(--cyan); }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s cubic-bezier(.2,.65,.25,1), transform .8s cubic-bezier(.2,.65,.25,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.65,.25,1), transform .7s cubic-bezier(.2,.65,.25,1); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .08s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .24s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .32s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .4s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: .48s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .main-nav, .header-cta .btn-ghost, .header-phone { display: none; }
  .nav-toggle { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .header-cta .btn-volt { padding: 10px 16px; font-size: .85rem; min-height: 44px; }
  .site-header .brand { font-size: .92rem; white-space: nowrap; }
  .site-header .brand span small { display: none; }
  .site-header .brand img { width: 34px; height: 34px; }
  .header-inner { gap: 12px; }
}
