/* New Pipe Plumbing & Rooter — coming soon */

:root {
  --navy: #07172c;
  --blue: #1e4d8c;
  --blue-bright: #3a7ad6;
  --red: #c8102e;
  --red-hover: #c8102e;
  --red-active: #b40e29;
  --white: #ffffff;
  --muted: #c8d2e0;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --media-max: 960px;
}

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

html {
  background: var(--navy);
  color: var(--white);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.4;
  background: var(--navy);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l);
}

.stripe {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 3px;
  width: 100%;
}

.stripe span:nth-child(1) { background: var(--blue); }
.stripe span:nth-child(2) { background: var(--white); }
.stripe span:nth-child(3) { background: var(--red); }

.hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 1rem;
  padding: 1rem 0.75rem 1.25rem;
}

.stage {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  max-width: var(--media-max);
  aspect-ratio: 16 / 9;
  /* Room for the 44px control below the art, so it cannot overlap the heading */
  margin-bottom: calc(44px + 0.25rem);
}

.media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 90% 86% at 50% 50%, #000 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 90% 86% at 50% 50%, #000 60%, transparent 100%);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to right, var(--navy) 0%, rgb(7 23 44 / 0) 6%),
    linear-gradient(to left, var(--navy) 0%, rgb(7 23 44 / 0) 6%),
    linear-gradient(to bottom, var(--navy) 0%, rgb(7 23 44 / 0) 8%),
    linear-gradient(to top, var(--navy) 0%, rgb(7 23 44 / 0) 8%);
}

.media video,
.media .poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: transparent;
}

.media .poster {
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.media .poster.is-visible {
  opacity: 1;
}

.media-toggle {
  position: absolute;
  z-index: 2;
  top: calc(100% + 0.25rem);
  right: 0;
  left: auto;
  bottom: auto;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 23, 44, 0.88);
  color: var(--white);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92);
  cursor: pointer;
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.media-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.media-toggle .icon-pause { display: none; }
.media-toggle.is-playing .icon-play { display: none; }
.media-toggle.is-playing .icon-pause { display: block; }

.media-toggle:hover,
.media-toggle:focus-visible {
  background: rgba(7, 23, 44, 0.95);
}

.media-toggle:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

.media-toggle[hidden] {
  display: none;
}

.brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  width: 100%;
  max-width: 36rem;
  padding: 0 0.25rem;
}

.brand h1 {
  font-size: clamp(1.2rem, 2.4vw + 0.7rem, 2.05rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--white);
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.serving {
  font-size: clamp(0.95rem, 1.1vw + 0.7rem, 1.15rem);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.015em;
  line-height: 1.35;
  max-width: 28rem;
  text-wrap: balance;
}

.call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  margin-top: 0.65rem;
  min-height: 3.25rem;
  min-width: min(12.5rem, 100%);
  width: auto;
  max-width: 100%;
  padding: 0.75rem 1.15rem;
  background: var(--red);
  color: var(--white);
  font-size: clamp(1rem, 0.85rem + 1.2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 999px;
  border: 0;
  box-shadow: 0 8px 24px rgba(200, 16, 46, 0.32);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.call svg {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  fill: currentColor;
}

.call:hover,
.call:focus-visible {
  background: var(--red);
  box-shadow: 0 8px 28px rgba(200, 16, 46, 0.5);
}

.call:active {
  background: var(--red-active);
  transform: scale(0.985);
}

.call:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

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

.missing {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
  padding: 2rem 1.25rem;
}

.missing p {
  color: var(--muted);
  max-width: 24rem;
}

.missing a.home {
  color: var(--white);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.missing a.home:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .media video {
    display: none;
  }

  .media .poster {
    opacity: 1;
  }

  .media-toggle {
    display: none;
  }
}

@media (min-width: 768px) {
  .hero {
    gap: 1.25rem;
    padding: 1.25rem 1.5rem 1.6rem;
  }

  .call {
    min-height: 3.25rem;
    margin-top: 0.75rem;
    padding: 0.85rem 1.4rem;
  }
}

@media (min-width: 1200px) {
  .hero {
    padding: 1.5rem 2rem 1.75rem;
    gap: 1.35rem;
  }
}

@media (orientation: landscape) and (max-height: 540px) {
  .hero {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.25rem 1.75rem;
    padding: 0.6rem 1rem 0.75rem;
  }

  .stage {
    flex: 1 1 56%;
    width: auto;
    max-width: min(var(--media-max), 58%);
    max-height: calc(100dvh - 1.5rem - 44px - 0.25rem);
  }

  .brand {
    flex: 1 1 38%;
    max-width: 22rem;
    padding: 0;
  }

  .call {
    margin-top: 0.45rem;
  }
}
