@import url("fonts.css");

/* ============================================================
   Atlantic Energy Storage — shared stylesheet
   Reproduction of atlanticenergystorage.ca (Wix) as a static site
   Breakpoints: desktop-first, matching the 980px design canvas
   ============================================================ */

:root {
  /* brand */
  --accent: #f6b33b;
  --accent-dark: #e0a02c;
  --navy: #1a2b6d;
  --navy-active: #3f2f82;
  --footer-bg: #050515;
  --blue: #3127ff;

  /* neutrals */
  --white: #ffffff;
  --gray: #f2f2f2;
  --gray-soft: #fafafa;
  --text: #000000;

  /* layout */
  --container: 980px;
  --header-h: 133px;

  /* type */
  --font-display: "Raleway AES", "Raleway", sans-serif;
  --font-body: "Helvetica AES Light", Helvetica, Arial, sans-serif;
  --font-roman: "Helvetica AES Roman", Helvetica, Arial, sans-serif;
  --font-bold: "Helvetica AES Bold", Helvetica, Arial, sans-serif;
  --font-heavy: "Avenir AES Heavy", "Avenir Next", sans-serif;
  --font-avenir-light: "Avenir AES Light", "Avenir Next", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 16px;
  clip: auto;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-bold);
  font-size: 14px;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0 0 1.2em;
}

p:last-child {
  margin-bottom: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.05;
}

/* ---------- layout helpers ---------- */

.container {
  width: var(--container);
  max-width: calc(100% - 48px);
  margin: 0 auto;
  position: relative;
}

.section {
  padding: 90px 0;
}

.section--gray {
  background: var(--gray);
}

.section--soft {
  background: var(--gray-soft);
}

/* ---------- typography helpers ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: var(--text);
}

/* big page title, e.g. "CONTACT" / "ABOUT US" */
.display--xl {
  font-size: clamp(56px, 8.3vw, 120px);
}

.display--lg {
  font-size: clamp(48px, 7vw, 96px);
}

/* uppercase sub-title under page titles */
.kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* small uppercase eyebrow, e.g. "Take back the power to" */
.eyebrow {
  font-family: var(--font-bold);
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: 0.2em;
  text-transform: none;
}

.lead {
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.03em;
}

.body-small {
  font-family: var(--font-roman);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.04em;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 26px;
  border-radius: 20px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-heavy);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  box-shadow: inset 0 -51px 0 var(--white);
  color: var(--accent);
}

.btn--outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
  padding: 0 24px;
  height: 40px;
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background: #000;
  border-color: #000;
  color: var(--white);
  box-shadow: none;
}

.btn--navy {
  background: var(--navy);
  border-color: var(--navy);
}

.btn--navy:hover,
.btn--navy:focus-visible {
  box-shadow: inset 0 -51px 0 var(--white);
  color: var(--navy);
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.site-header.is-solid,
.site-header:not(.site-header--overlay) {
  background: var(--white);
}

.site-header.is-solid::after,
.site-header:not(.site-header--overlay)::after {
  opacity: 1;
}

.site-header__inner {
  height: 100%;
  position: relative;
  display: flex;
  align-items: flex-start;
}

.logo {
  display: flex;
  align-items: flex-start;
  margin: 20px 0 0 30px;
  flex: 0 0 auto;
}

.logo__mark {
  width: 65px;
  height: 91px;
}

.logo__wordmark {
  width: 226px;
  height: 55px;
  margin: 26px 0 0 29px;
}

.main-nav {
  position: absolute;
  top: 41px;
  right: 43px;
}

.main-nav__list {
  display: flex;
}

.main-nav__item {
  position: relative;
}

.main-nav__link {
  display: block;
  padding: 0 27px;
  height: 50px;
  line-height: 50px;
  font-family: var(--font-bold);
  font-size: 16px;
  letter-spacing: 0.005em;
  color: var(--accent);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.main-nav__link:hover,
.main-nav__link[aria-current="page"],
.main-nav__link.is-active {
  color: var(--navy-active);
}

.main-nav__link[aria-current="page"]:hover {
  color: var(--navy-active);
}

/* services dropdown */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 250px;
  padding: 14px 0;
  background: var(--white);
  box-shadow: 0 18px 40px rgba(5, 5, 21, 0.16);
  opacity: 0;
  visibility: hidden;
  translate: 0 -8px;
  transition: opacity 0.2s ease, translate 0.2s ease, visibility 0.2s;
}

.main-nav__item.is-open .nav-dropdown,
.main-nav__item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
}

.nav-dropdown a {
  display: block;
  padding: 9px 26px;
  font-family: var(--font-bold);
  font-size: 16px;
  color: var(--accent);
  text-align: center;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-dropdown a:hover {
  color: var(--navy-active);
  background: var(--gray);
}

.main-nav__toggle {
  display: none;
}

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  background: var(--footer-bg);
  color: var(--white);
  min-height: 780px;
  padding: 59px 0 40px;
  overflow: hidden;
}

.site-footer__inner {
  position: relative;
  width: var(--container);
  max-width: calc(100% - 48px);
  margin: 0 auto;
  min-height: 681px;
}

.footer-brand {
  margin-left: 4px;
}

.footer-brand__mark {
  width: 162px;
  height: 224px;
  margin-left: 20px;
}

.footer-brand__wordmark {
  width: 214px;
  height: 55px;
  margin-top: 17px;
}

.footer-nav {
  position: absolute;
  top: 119px;
  left: 544px;
  display: flex;
  width: 593px;
}

.footer-nav a {
  display: block;
  padding: 0 27px;
  height: 50px;
  line-height: 50px;
  font-family: var(--font-bold);
  font-size: 16px;
  color: var(--white);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-nav a[aria-current="page"] {
  color: var(--accent);
}

.footer-contact {
  position: absolute;
  top: 362px;
  left: 4px;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: normal;
}

.footer-contact p {
  margin: 0 0 10px;
}

.footer-contact p:nth-child(3) {
  margin-top: 15px;
}

.footer-contact p:last-child {
  margin-bottom: 0;
}

.footer-contact a:hover {
  color: var(--accent);
}

.footer-social {
  position: absolute;
  top: 524px;
  left: 5px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.footer-social img,
.footer-social svg {
  width: 39px;
  height: 39px;
}

.footer-social a {
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer-social a:hover {
  opacity: 1;
}

.footer-copy {
  position: absolute;
  top: 680px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

/* ---------- home hero ---------- */

.home-hero {
  position: relative;
  height: 1215px;
  background: url("../img/hero-home.jpg") center top / cover no-repeat;
  color: var(--white);
}

.home-hero__content {
  position: absolute;
  top: 230px;
  left: 50%;
  width: var(--container);
  max-width: calc(100% - 48px);
  transform: translateX(-50%);
}

.home-hero__text {
  width: 446px;
  margin-left: 546px;
}

.home-hero__title {
  font-size: 67px;
  line-height: 1;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin: 0;
}

.home-hero__sub {
  width: 270px;
  margin: 27px 0 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 20.5px;
  letter-spacing: 0.15em;
}

.home-hero__action {
  margin: 38px 0 0 22px;
}

.home-hero__action .btn {
  width: 142px;
  padding: 0;
}

/* ---------- home: "Control Your Energy" ---------- */

.intro {
  padding: 117px 0 56px;
  text-align: center;
}

.intro__eyebrow {
  font-family: var(--font-bold);
  font-size: 20px;
  line-height: 22px;
  letter-spacing: 0.2em;
  margin: 0;
}

.intro__title {
  font-size: 68px;
  line-height: 1.1;
  letter-spacing: 0;
}

/* ---------- home: services ---------- */

.services {
  padding: 16px 0 63px;
}

.services__grid {
  width: calc(100% - 380px);
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
}

.service-card {
  text-align: center;
  padding: 0 14px;
}

.service-card__icon {
  height: 229px;
  margin: 0 auto 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card__icon img {
  max-width: 100%;
  max-height: 229px;
}

.service-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 29px;
  line-height: 35px;
  color: var(--navy);
  margin: 0 0 29px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card__body {
  font-family: var(--font-roman);
  font-size: 14px;
  line-height: 16.8px;
  letter-spacing: 0.04em;
  text-align: center;
  margin: 0 auto;
  max-width: 226px;
  min-height: 166px;
}

.service-card__body p {
  margin: 0;
}

.service-card:nth-child(1) .service-card__body {
  max-width: 211px;
}

.service-card:nth-child(2) .service-card__body {
  max-width: 224px;
}

.service-card:nth-child(3) .service-card__body {
  max-width: 226px;
}

.service-card:nth-child(4) .service-card__body {
  max-width: 224px;
}

.service-card__action {
  margin: 0;
}

.service-card__action .btn {
  width: 148px;
  height: 40px;
  font-size: 15px;
  padding: 0;
}

/* ---------- home: watermark quote ---------- */

.watermark-section {
  position: relative;
  height: 424px;
  text-align: center;
}

.watermark {
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 232px;
  height: 321px;
  opacity: 0.18;
}

.watermark-section__text {
  position: relative;
  margin: 0 auto;
  padding-top: 146px;
  max-width: 733px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  line-height: 35.7px;
  letter-spacing: 0.005em;
  color: var(--navy);
}

.watermark-section__text p {
  margin: 0;
}

/* ---------- inner page hero scaffolding ---------- */

.page {
  padding-top: var(--header-h);
}

.page-hero {
  position: relative;
  overflow: hidden;
}

.page-hero--gray {
  background: var(--gray);
}

.page-hero--soft {
  background: var(--gray-soft);
}

.page-hero__inner {
  position: relative;
  width: var(--container);
  max-width: calc(100% - 48px);
  margin: 0 auto;
  padding: 32px 0 0;
}

.page-hero__kicker {
  margin: 0 0 0 8px;
}

.page-hero__text {
  max-width: 480px;
}

/* two-column hero with image bleeding to the right edge */
.hero-media {
  position: absolute;
  top: 282px;
  left: 499px;
  width: 725px;
  height: 453px;
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.45s ease;
}

.hero-media img.is-hover {
  opacity: 0;
}

.hero-media:hover img.is-hover {
  opacity: 1;
}

.hero-media__badge {
  position: absolute;
  right: -110px;
  bottom: -85px;
  width: 186px;
  height: auto;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.hero-media:hover .hero-media__badge {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- generic content blocks ---------- */

.h2-block {
  font-size: 24px;
  letter-spacing: 0.1em;
  text-transform: none;
  line-height: 1.25;
  margin: 0 0 24px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* ---------- mobile ---------- */

@media (max-width: 1100px) {
  :root {
    --header-h: 96px;
  }

  .site-header__inner {
    align-items: center;
  }

  .logo {
    margin: 0 0 0 20px;
    align-items: center;
  }

  .logo__mark {
    width: 39px;
    height: 55px;
  }

  .logo__wordmark {
    width: 136px;
    height: 33px;
    margin: 0 0 0 14px;
  }

  .main-nav {
    display: none;
  }

  .main-nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 0;
    cursor: pointer;
  }

  .main-nav__toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--accent);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .site-header.is-open .main-nav__toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header.is-open .main-nav__toggle span:nth-child(2) {
    opacity: 0;
  }

  .site-header.is-open .main-nav__toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-header.is-open {
    background: var(--white);
  }

  .main-nav.is-open {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0;
    top: var(--header-h);
    right: 0;
    background: var(--white);
    padding: 18px 0 40px;
    overflow-y: auto;
  }

  .main-nav.is-open .main-nav__list {
    display: block;
  }

  .main-nav.is-open .main-nav__link {
    height: auto;
    padding: 14px 28px;
    line-height: 1.3;
    font-size: 18px;
  }

  .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    translate: none;
    box-shadow: none;
    min-width: 0;
    padding: 0 0 8px;
  }

  .nav-dropdown a {
    text-align: left;
    padding: 8px 44px;
  }

  .home-hero {
    height: auto;
    min-height: 720px;
    padding: 150px 0 80px;
    background-position: center top;
  }

  .home-hero__content {
    position: static;
    transform: none;
    width: auto;
    max-width: none;
    margin: 0 auto;
    padding: 0 28px;
  }

  .home-hero__text {
    width: auto;
    max-width: 520px;
    margin: 0;
  }

  .home-hero__title {
    font-size: clamp(38px, 9vw, 60px);
  }

  .home-hero__action {
    margin-left: 0;
  }

  .intro__title {
    font-size: clamp(34px, 7vw, 56px);
  }

  .services__grid {
    width: auto;
    max-width: 560px;
    padding: 0 24px;
    grid-template-columns: repeat(2, 1fr);
    gap: 44px 0;
  }

  .service-card__body {
    max-width: 210px;
  }

  .watermark-section__text {
    padding: 0 28px;
    margin-top: -100px;
    font-size: 18px;
  }

  .page-hero__inner {
    padding: 20px 28px 0;
    width: auto;
    max-width: none;
  }

  .hero-media {
    position: static;
    width: auto;
    height: auto;
    margin: 32px 0 0;
  }

  .hero-media img {
    position: static;
    width: 100%;
    height: auto;
  }

  .hero-media__badge {
    display: none;
  }

  .site-footer {
    min-height: 0;
    padding: 56px 0 40px;
  }

  .site-footer__inner {
    width: auto;
    max-width: none;
    min-height: 0;
    padding: 0 28px;
  }

  .footer-brand {
    margin: 0 0 34px;
  }

  .footer-brand__mark {
    width: 100px;
    height: 138px;
    margin: 0;
  }

  .footer-brand__wordmark {
    width: 160px;
    height: 41px;
    margin-top: 12px;
  }

  .footer-nav {
    position: static;
    width: auto;
    flex-wrap: wrap;
    gap: 4px 0;
    margin: 0 0 30px;
  }

  .footer-nav a {
    padding: 0 18px 0 0;
    height: 36px;
    line-height: 36px;
    font-size: 15px;
  }

  .footer-contact {
    position: static;
    margin: 0 0 26px;
  }

  .footer-social {
    position: static;
  }

  .footer-copy {
    position: static;
    margin-top: 40px;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section {
    padding: 56px 0;
  }
}

@media (max-width: 640px) {
  .services__grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .service-card__title {
    min-height: 0;
  }
}

/* ============================================================
   Inner page building blocks (shared by service/about/impact pages)
   ============================================================ */

.inner-hero {
  position: relative;
  background: var(--gray);
  overflow: hidden;
}

.inner-hero--soft {
  background: var(--gray-soft);
}

.inner-hero--white {
  background: var(--white);
}

.inner-hero__inner {
  position: relative;
  width: var(--container);
  max-width: calc(100% - 48px);
  margin: 0 auto;
}

.inner-main {
  padding: 0 0 0;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: var(--text);
  margin: 0;
}

.page-subtitle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0.1em;
  color: var(--text);
  margin: 0;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0.1em;
  color: var(--text);
  margin: 0 0 24px;
}

.text-block p {
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.03em;
  margin: 0 0 24px;
}

.text-block p:last-child {
  margin-bottom: 0;
}

.text-block--wide {
  max-width: 958px;
}

.text-block--narrow {
  max-width: 476px;
}

/* image with hover swap + decorative badge */
.media-swap {
  position: relative;
}

.media-swap__frame {
  position: relative;
  overflow: hidden;
}

.media-swap__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-swap__alt {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.media-swap:hover .media-swap__alt {
  opacity: 1;
}

.media-swap__badge {
  position: absolute;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.media-swap:hover .media-swap__badge {
  opacity: 1;
  transform: translateY(0);
}

/* section rhythm used on interior pages */
.band {
  padding: 72px 0 96px;
}

.band--gray {
  background: var(--gray);
}

.band--white {
  background: var(--white);
}

@media (max-width: 1100px) {
  .inner-hero__inner {
    padding: 12px 0 0;
  }

  .page-title {
    font-size: clamp(42px, 9vw, 84px) !important;
  }

  .page-subtitle {
    font-size: 18px;
  }

  .h3 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .text-block p {
    font-size: 15px;
    margin-bottom: 16px;
  }

  .band {
    padding: 48px 0 64px;
  }

  .media-swap__badge {
    display: none;
  }
}
