/* ============================================================
   Nathan's Electrical Solutions — styles
   Palette: safety yellow + black + white
   ============================================================ */

:root {
  /* Colours — yellow / black / white.
     (The --navy-* names are kept for compatibility; they now hold the black scale.) */
  --navy-900: #0a0a0a;
  --navy-800: #161616;
  --navy-700: #262626;
  --navy-600: #383838;
  --accent:   #ffd400;
  --accent-d: #8a6d00;
  --accent-soft: rgba(255, 212, 0, .14);

  --text:   #161616;
  --muted:  #5c5c5c;
  --bg:     #ffffff;
  --bg-alt: #f5f5f5;
  --border: #e6e6e6;
  --white:  #ffffff;

  /* System */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .16);
  --maxw: 1160px;
  --ease: cubic-bezier(.16, .8, .3, 1);

  --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head: 'Poppins', var(--font-body);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--navy-800); font-weight: 700; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent-d);
  margin: 0 0 .6rem;
}
.accent { color: var(--accent); }
.ico { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--navy-900);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .98rem;
  line-height: 1;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--accent { background: var(--accent); color: var(--navy-900); box-shadow: 0 8px 22px rgba(255, 212, 0, .38); }
.btn--accent:hover { background: var(--accent-d); color: #fff; box-shadow: 0 12px 28px rgba(255, 212, 0, .48); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .45); }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn--dark { background: var(--navy-800); color: #fff; }
.btn--dark:hover { background: var(--navy-900); }
.btn--lg { padding: 1.05rem 1.9rem; font-size: 1.05rem; }
.btn--sm { padding: .6rem 1.1rem; font-size: .9rem; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--navy-900);
  color: #cccccc;
  font-size: .85rem;
}
.topbar__inner { display: flex; align-items: center; gap: .9rem; padding-block: .5rem; }
.topbar__item { display: inline-flex; align-items: center; gap: .4rem; }
.topbar__sep { opacity: .4; }
.topbar__phone { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: #fff; }
.topbar__phone:hover { color: var(--accent); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 118px; gap: 1rem; }

.brand { display: inline-flex; align-items: center; gap: .65rem; }
.brand__logo { height: 90px; width: auto; display: block; border-radius: 10px; }
.brand__mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--navy-800);
  border-radius: 11px;
  flex: none;
}
.brand__mark svg { width: 22px; height: 22px; fill: var(--accent); }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong { font-family: var(--font-head); font-size: 1.12rem; color: var(--navy-800); font-weight: 700; }
.brand__text span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 1.7rem; }
.nav > a { font-weight: 500; font-size: .98rem; color: var(--navy-700); transition: color .2s; }
.nav > a:not(.btn):hover { color: var(--accent-d); }
.nav__cta { color: var(--navy-900); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 26px; height: 2.5px; background: var(--navy-800); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 75% -10%, var(--navy-600), transparent 60%),
              linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 100%);
  color: #f2f2f2;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(4rem, 10vw, 8rem);
}
.hero__glow {
  position: absolute; inset: 0;
  background: radial-gradient(520px 320px at 88% 12%, rgba(255, 212, 0, .20), transparent 70%);
  pointer-events: none;
}
.hero__inner { position: relative; max-width: 820px; }
.hero__flex { display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); }
.hero__logo { flex: 0 0 auto; width: min(48%, 560px); height: auto; margin-left: -3.5rem; }
@media (max-width: 860px) {
  .hero__flex { flex-direction: column; align-items: flex-start; gap: 1.6rem; }
  .hero__logo { width: min(80vw, 340px); margin-left: 0; }
}
.hero__eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: .4rem .9rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
}
.hero__title { color: #fff; font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 800; letter-spacing: -.01em; margin-bottom: 1rem; }
.hero__lead { font-size: clamp(1.02rem, 2vw, 1.22rem); color: #cfcfcf; max-width: 620px; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.4rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.hero__badges li { display: inline-flex; align-items: center; gap: .5rem; font-size: .95rem; color: #dddddd; font-weight: 500; }
.hero__badges .ico { color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 680px; margin: 0 auto clamp(2rem, 5vw, 3.2rem); text-align: center; }
.section__head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.section__sub { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Card base ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Service cards ---------- */
.service { padding: 1.8rem 1.5rem; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.service:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #d3e0ec; }
.service__icon {
  display: grid; place-items: center;
  width: 58px; height: 58px;
  border-radius: 14px;
  background: var(--accent-soft);
  margin-bottom: 1.1rem;
}
.service__icon svg { width: 30px; height: 30px; fill: none; stroke: var(--accent-d); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-size: 1.22rem; }
.service p { color: var(--muted); font-size: .96rem; margin: 0; }
.service--accent { background: var(--navy-800); border-color: var(--navy-700); }
.service--accent h3 { color: #fff; }
.service--accent p { color: #c9c9c9; }
.service--accent .service__icon { background: rgba(255, 212, 0, .18); }
.service--accent .service__icon svg { stroke: var(--accent); }
.service__link { display: inline-block; margin-top: 1rem; color: var(--accent); font-weight: 600; font-family: var(--font-head); }
.service__link:hover { color: #fff; }

/* ---------- Specialist cards ---------- */
.spec { padding: 1.5rem 1.4rem; display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.spec:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.spec__icon {
  display: grid; place-items: center;
  width: 50px; height: 50px;
  border-radius: 12px;
  background: var(--navy-800);
  margin-bottom: 1rem;
}
.spec__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.spec h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.spec p { color: var(--muted); font-size: .92rem; margin: 0; }
.spec--wide { grid-column: span 1; }

/* ---------- Why choose us ---------- */
.why { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.why__text h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.why__text > p { color: var(--muted); font-size: 1.05rem; }
.why__list { margin: 1.5rem 0 2rem; display: grid; gap: .7rem; }
.why__list li { display: flex; align-items: center; gap: .7rem; font-weight: 500; color: var(--navy-700); }
.why__list .ico { color: var(--accent-d); background: var(--accent-soft); border-radius: 50%; padding: 4px; width: 1.7em; height: 1.7em; }
.why__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.stat {
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.6rem 1.3rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat:nth-child(2), .stat:nth-child(3) { background: var(--navy-900); }
.stat__num { display: block; font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: .35rem; }
.stat__label { font-size: .88rem; color: #c9c9c9; }

/* ---------- Contact ---------- */
.section--contact { background: var(--bg-alt); }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.contact__info h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.contact__lead { color: var(--muted); font-size: 1.05rem; }
.contact__list { margin-top: 1.8rem; display: grid; gap: 1.2rem; }
.contact__list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact__ico {
  display: grid; place-items: center;
  width: 46px; height: 46px; flex: none;
  border-radius: 12px;
  background: var(--navy-800);
}
.contact__ico svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.contact__list strong { display: block; font-family: var(--font-head); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .1rem; }
.contact__list a { font-size: 1.1rem; font-weight: 600; color: var(--navy-800); overflow-wrap: anywhere; }
.contact__list a:hover { color: var(--accent-d); }
.contact__plain { font-size: 1.05rem; color: var(--navy-700); }

/* ---------- Form ---------- */
.contact__form { padding: 1.8rem; }
.contact__form h3 { font-size: 1.3rem; margin-bottom: 1.2rem; }
.field { margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--navy-700); margin-bottom: .35rem; }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px; /* 16px min avoids iOS zoom-on-focus */
  color: var(--text);
  padding: .8rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #fff;
}
.field textarea { resize: vertical; }
.form-note { margin: 1rem 0 0; font-size: .88rem; color: var(--muted); text-align: center; }
.form-note a { color: var(--accent-d); font-weight: 600; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: #c9c9c9; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 2rem; padding: clamp(2.6rem, 5vw, 3.6rem) 22px; }
.brand--footer .brand__text strong, .brand--footer .brand__text { color: #fff; }
.brand--footer .brand__text span { color: #999999; }
.footer__brand p { margin-top: 1rem; font-size: .92rem; max-width: 280px; }
.footer__col h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer__col a, .footer__plain { display: block; color: #c9c9c9; font-size: .94rem; margin-bottom: .55rem; transition: color .2s; overflow-wrap: anywhere; }
.footer__col a:hover { color: var(--accent); }
.footer__bar { border-top: 1px solid rgba(255, 255, 255, .08); }
.footer__bar-inner { display: flex; justify-content: space-between; align-items: center; padding-block: 1.1rem; font-size: .86rem; gap: 1rem; flex-wrap: wrap; }
.footer__top { color: #c9c9c9; }
.footer__top:hover { color: var(--accent); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .why { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topbar__item:not(:first-child), .topbar__sep { display: none; }
  .topbar__phone { margin-left: auto; }

  /* backdrop-filter makes the header the containing block for the fixed
     nav panel, clipping it to the header height — disable it on mobile. */
  .header { backdrop-filter: none; }
  .header__inner { min-height: 80px; }
  .brand__logo { height: 62px; }

  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(82vw, 320px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy-900);
    padding: 100px 26px 2rem;
    transform: translateX(100%);
    transition: transform .35s var(--ease);
    box-shadow: -20px 0 60px rgba(0, 0, 0, .4);
  }
  .nav.is-open { transform: none; }
  .nav > a { color: #f0f0f0; padding: 1rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 1.08rem; }
  .nav > a:not(.btn):hover { color: var(--accent); }
  .nav__cta { margin-top: 1.2rem; justify-content: center; border-bottom: 0; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 560px) {
  .grid--4, .grid--3 { grid-template-columns: 1fr; }
  .why__stats { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .hero__badges { gap: .9rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .service:hover, .spec:hover { transform: none; }
}
