/* ---------- Variables ---------- */
:root {
  --dark: #222222;
  --gray: #7B7B7B;
  --light: #F8F8F8;
  --white: #FFFFFF;
  --green: #146B3F;
  --green-hover: #1B8A52;

  --font: 'General Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --container: 1200px;
  --radius: 999px;
  --radius-card: 16px;
  --nav-height: 76px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; border: none; background: none; cursor: pointer; }

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
}
.eyebrow--invert { color: var(--light); opacity: .8; }

.section-title {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
  max-width: 18ch;
}

section { padding: 3rem 0; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.btn--primary {
  background: var(--green);
  color: var(--white);
}
.btn--primary:hover { background: var(--green-hover); transform: translateY(-1px); }

.btn--invert {
  background: var(--white);
  color: var(--dark);
}
.btn--invert:hover { background: var(--green-hover); color: var(--white); transform: translateY(-1px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(34, 34, 34, 0.08);
  z-index: 100;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__logo { font-weight: 600; font-size: 1.05rem; }

.nav__links {
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  height: calc(100vh - var(--nav-height));
  background: var(--white);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  font-size: 1.5rem;
  display: none;
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.nav__links.is-open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav__cta { display: none; }

.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}
.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--dark);
  transition: transform .25s ease, opacity .25s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 3.5rem;
  text-align: center;
}

.hero__headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15em;
  font-size: clamp(1.65rem, 5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin-inline: auto;
}
.hero__headline-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--dark);
}
@supports not (-webkit-text-stroke: 1px black) {
  .hero__headline-outline { color: var(--gray); }
}
.hero__headline-solid { font-weight: 700; color: var(--dark); }

.hero__photo {
  position: relative;
  z-index: 0;
  width: min(78%, 360px);
  aspect-ratio: 3 / 4;
  margin: -4rem auto 0;
}
.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%);
}
.hero__flame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: visible;
  filter: drop-shadow(0 0 6px rgba(27, 138, 82, 0.85)) drop-shadow(0 0 14px rgba(20, 107, 63, 0.55));
  pointer-events: none;
}
.hero__flame-trace {
  fill: none;
  stroke: var(--green-hover);
  stroke-width: 3;
  stroke-linecap: round;
}

.hero__footer {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.hero__footer-text { max-width: 46ch; }
.hero__sub { color: var(--gray); margin-top: 0.6rem; }

/* Hero entrance animation (plays once on load, hero is in initial viewport) */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroPhotoIn {
  from { opacity: 0; transform: translateY(24px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hero__headline { animation: heroFadeUp 0.7s ease both; }
.hero__photo { animation: heroPhotoIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: 0.25s; }
.hero .eyebrow { animation: heroFadeUp 0.6s ease both; animation-delay: 0.45s; }
.hero__sub { animation: heroFadeUp 0.6s ease both; animation-delay: 0.55s; }
.hero__footer .btn { animation: heroFadeUp 0.6s ease both; animation-delay: 0.65s; }

@media (prefers-reduced-motion: reduce) {
  .hero__headline, .hero__photo, .hero .eyebrow, .hero__sub, .hero__footer .btn {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Shared placeholder box (used by Team cards) */
.photo-placeholder {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  background: var(--light);
  border: 1px solid rgba(34, 34, 34, 0.1);
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  overflow: hidden;
}
.photo-placeholder svg { width: 35%; height: 35%; }
.photo-placeholder img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Problem ---------- */
.problem { background: var(--light); }
.leak-list { display: flex; flex-direction: column; }
.leak-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(34, 34, 34, 0.12);
  transition: padding-left 0.3s ease;
}
.leak-list .leak-item:last-child { border-bottom: 1px solid rgba(34, 34, 34, 0.12); }
.leak-item:hover { padding-left: 0.5rem; }
.leak-item:hover .leak-number {
  color: var(--dark);
  -webkit-text-stroke: 0;
}
.leak-number {
  flex-shrink: 0;
  width: 3.5rem;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--gray);
  transition: color 0.3s ease, -webkit-text-stroke 0.3s ease;
}
@supports not (-webkit-text-stroke: 1px black) {
  .leak-number { color: var(--gray); }
}
.leak-item h3 { font-size: 1.15rem; margin-bottom: 0.4rem; margin-top: 0.35rem; }
.leak-item p { color: var(--gray); font-size: 0.95rem; max-width: 60ch; }

/* ---------- Cards (Solution / Services) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.card {
  border: 1px solid rgba(34, 34, 34, 0.1);
  border-radius: var(--radius-card);
  padding: 1.75rem;
}
.card__icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1.25rem;
  color: var(--green);
}
.card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.card p { color: var(--gray); font-size: 0.92rem; }

/* Services cards get a visual frame + tag row; Solution's cards are untouched */
.services .card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.services .card h3,
.services .card .tag-row,
.services .card p {
  padding-inline: 1.75rem;
}
.services .card h3 { margin-top: 1.5rem; }
.services .card p { padding-bottom: 1.75rem; margin-top: 0.6rem; }

.card__visual {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--light);
  border-bottom: 1px solid rgba(34, 34, 34, 0.1);
  overflow: hidden;
}
.card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(34, 34, 34, 0.12);
  border-radius: var(--radius);
  background: var(--light);
  color: var(--gray);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.services__group-title {
  font-size: 1.3rem;
  margin: 3rem 0 1.5rem;
}
.services__group-title:first-of-type { margin-top: 0; }

/* ---------- Guarantee ---------- */
.guarantee { background: var(--dark); color: var(--white); }
.guarantee__headline {
  font-size: clamp(2rem, 6vw, 3.5rem);
  margin: 0.75rem 0 2.5rem;
}
.guarantee__number { color: var(--green-hover); }
.guarantee__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.guarantee__grid h3 { margin-bottom: 0.5rem; }
.guarantee__grid p { color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; }

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.team-card { text-align: center; }
.team-card .photo-placeholder {
  max-width: 220px;
  margin: 0 auto 1.25rem;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-card);
}
.team-card h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.team-card p { color: var(--gray); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.contact {
  background-image: linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.55)), url('pexel-clouds-bg.jpg');
  background-size: cover;
  background-position: center;
}
.contact__inner { text-align: center; max-width: 42ch; margin-inline: auto; }
.contact__inner p { color: var(--gray); margin: 1.25rem 0 2rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid rgba(34, 34, 34, 0.1); padding: 2rem 0; }
.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--gray);
}

/* =====================================================
   Tablet and up
   ===================================================== */
@media (min-width: 700px) {
  section { padding: 4.5rem 0; }

  .card-grid--2 { grid-template-columns: 1fr 1fr; }
  .card-grid--3 { grid-template-columns: 1fr 1fr; }

  .guarantee__grid { grid-template-columns: 1fr 1fr; }

  .team-grid { grid-template-columns: repeat(3, 1fr); }

  .footer__inner { flex-direction: row; justify-content: space-between; }
}

/* =====================================================
   Desktop
   ===================================================== */
@media (min-width: 960px) {
  .nav__links {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    background: none;
  }
  .nav__cta { display: inline-flex; }
  .nav__toggle { display: none; }

  .hero__photo { width: min(46%, 440px); margin-top: -8rem; }
  .hero__footer { flex-direction: row; align-items: flex-end; justify-content: space-between; text-align: left; }
  .hero__footer-text { max-width: 50ch; }

  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
}
