
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background-color: rgb(211, 215, 215);
  color: #222;
  overflow-x: hidden;
}

/* =========================
   HERO BACKGROUND
   ========================= */

.bgImage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 600px;

  background-image: url("/images/Niagara.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  z-index: 8;
}

#bgtbox {
  position: relative;
  width: 100%;
  min-height: 600px;

  background-color: rgba(0, 0, 0, 0.6);
  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  padding: 110px 22px 65px;
}

.hero-content {
  width: min(100%, 900px);
}

/* =========================
   HERO TEXT AND ANIMATION
   ========================= */

#bgtbox .child {
  font-family: "Inter", sans-serif;
  font-size: clamp(64px, 9vw, 100px);
  font-weight: 800;
  letter-spacing: -0.055em;

  color: white;
  opacity: 0;
  transform: translateY(35px);

  transition:
    transform 0.7s ease-in-out,
    opacity 0.7s ease-in-out;
}

#bgtbox .child.moved {
  transform: translateY(0);
  opacity: 1;
}

#bgtbox .child2 {
  margin-top: 8px;

  font-family: "Inter", sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 400;

  color: white;
  opacity: 0;
  transform: translateY(25px);

  transition:
    transform 1.1s ease-in-out,
    opacity 1.1s ease-in-out;
}

#bgtbox .child2.moved {
  transform: translateY(0);
  opacity: 1;
}

.hero-description,
.hero-actions {
  opacity: 0;
  transform: translateY(18px);

  transition:
    transform 0.85s ease,
    opacity 0.85s ease;
}

.hero-description.moved,
.hero-actions.moved {
  opacity: 1;
  transform: translateY(0);
}

.hero-description {
  max-width: 630px;
  margin: 24px auto 0;

  color: #edf5fa;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;

  gap: 14px;
  margin-top: 28px;
}

/* =========================
   BUTTONS
   ========================= */

.homepage-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  gap: 12px;
  padding: 15px 24px;
  border-radius: 10px;

  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;

  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.homepage-button:hover {
  transform: translateY(-2px);
}

.homepage-button:focus-visible,
.section-link:focus-visible {
  outline: 3px solid #56b7e8;
  outline-offset: 4px;
}

.homepage-button-primary {
  background: #e8f5fb;
  color: #0d225f;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

.homepage-button-primary:hover {
  background: #fff;
}

.homepage-button-outline {
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.homepage-button-outline:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* =========================
   PAGE CONTENT
   ========================= */

.page-content {
  display: flex;
  flex-direction: column;

  gap: clamp(110px, 13vw, 210px);
  padding: 140px 8% 100px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 7%;
  width: 100%;
  min-height: 460px;
}

.info-row.reverse {
  flex-direction: row-reverse;
}

.info-text {
  width: 46%;
}

.section-eyebrow {
  color: #176d96;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}

.section-title {
  font-family: "Inter", sans-serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;

  color: rgb(13, 34, 95);
  margin-bottom: 25px;
}

.bodytext {
  width: 100%;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 400;
  line-height: 1.65;
  color: #333;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  color: #0d477e;
  font-size: 17px;
  font-weight: 700;

  margin-top: 27px;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.section-link:hover {
  color: #087b9f;
}

/* =========================
   SECTION IMAGES
   ========================= */

.info-image {
  width: 46%;
  height: 500px;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#tapWaterImage {
  background-image: url("/images/tapwaterim.png");
}

#waterDataImage {
  background-image: url("/images/waterdata.png");
}

#knowWaterImage {
  background-image: url("/images/knowwater.png");
}

/* =========================
   SCROLL ANIMATIONS
   ========================= */

.reveal {
  opacity: 0;
  transform: translateY(65px);

  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   FINAL CALL TO ACTION
   ========================= */

.homepage-cta {
  border-radius: 22px;
  background: #0d225f;

  padding: clamp(35px, 5vw, 70px);
  color: white;
  text-align: center;
}

.homepage-cta .section-eyebrow {
  color: #a8ddf5;
}

.homepage-cta h2 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.15;
  margin-bottom: 14px;
}

.homepage-cta > p:not(.section-eyebrow):not(.homepage-data-note) {
  font-size: 19px;
  line-height: 1.6;
  color: #deecf5;

  max-width: 580px;
  margin: 0 auto 25px;
}

.homepage-data-note {
  max-width: 700px;
  margin: 26px auto 0;

  font-size: 12px;
  line-height: 1.6;
  color: #bfd4e3;
}

/* =========================
   TABLET
   ========================= */

@media (max-width: 900px) {
  .page-content {
    gap: 110px;
    padding: 90px 6% 70px;
  }

  .info-row,
  .info-row.reverse {
    flex-direction: column;
    gap: 35px;
    min-height: auto;
  }

  .info-text,
  .info-image {
    width: 100%;
  }

  .info-image {
    height: 390px;
  }

  .section-title {
    font-size: clamp(39px, 7vw, 55px);
  }

  .bodytext {
    font-size: 19px;
  }
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 520px) {
  .bgImage {
    height: 570px;
  }

  #bgtbox {
    min-height: 570px;
    padding: 110px 22px 40px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .homepage-button {
    width: 100%;
  }

  .page-content {
    gap: 85px;
    padding: 75px 6% 55px;
  }

  .info-image {
    height: 290px;
  }

  .bodytext {
    font-size: 17px;
  }

  .section-link {
    font-size: 16px;
  }
}

/* =========================
   ACCESSIBILITY
   ========================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .hero-description,
  .hero-actions,
  #bgtbox .child,
  #bgtbox .child2 {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .homepage-button {
    transition: none;
  }
}

html,
body,
button,
input,
select,
textarea {
  font-family: "Inter", sans-serif;
}

/* Clickable homepage section titles */

.section-title-link {
  color: inherit;
  text-decoration: none;
  display: inline;
  transition: color 0.2s ease;
}

.section-title-link span {
  display: inline-block;
  font-size: 0.42em;
  vertical-align: middle;
  margin-left: 8px;
  opacity: 0.5;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.section-title-link:hover {
  color: #1676a5;
}

.section-title-link:hover span {
  opacity: 1;
  transform: translate(3px, -3px);
}

.section-title-link:focus-visible {
  outline: 3px solid #1676a5;
  outline-offset: 5px;
  border-radius: 4px;
}

/* Short instruction below hero buttons */

.hero-instruction {
  max-width: 650px;
  margin: 20px auto 0;
  font-size: 14px;
  line-height: 1.65;
  color: #e0ebf3;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}

.hero-instruction.moved {
  opacity: 1;
  transform: translateY(0);
}

/* How AquaNY Works */

.homepage-how {
  text-align: center;
  width: 100%;
}

.homepage-how h2 {
  color: #0d225f;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin-bottom: 40px;
}

.homepage-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  text-align: left;
}

.homepage-step {
  min-width: 0;
  padding: 30px 26px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(13, 34, 95, 0.1);
  border-radius: 16px;
}

.homepage-step-number {
  display: block;
  color: #1680ad;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
}

.homepage-step h3 {
  color: #0d225f;
  font-size: 23px;
  font-weight: 700;
  margin-bottom: 12px;
}

.homepage-step p {
  color: #52616f;
  font-size: 16px;
  line-height: 1.65;
}

.homepage-how-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  color: #0d477e;
  font-weight: 700;
  font-size: 17px;
  text-underline-offset: 5px;
}

.homepage-how-link:hover {
  color: #1676a5;
}

.homepage-how-link:focus-visible {
  outline: 3px solid #1676a5;
  outline-offset: 5px;
}

/* Responsive steps */

@media (max-width: 900px) {
  .homepage-steps {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .homepage-step {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-instruction {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
