:root {
  --current: #063b4c;
  --current-deep: #032c3a;
  --mist: #dce8e7;
  --ink: #102d35;
  --coral: #f06449;
  --coral-dark: #b93727;
  --white: #f8fbfa;
  --edge: rgba(6, 59, 76, 0.22);
  --sans: "Inter", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

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

html {
  min-width: 320px;
  background: var(--current-deep);
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--mist) url("assets/periscope-water-hero.jpg") center / cover no-repeat fixed;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(238, 246, 245, 0.93) 0%, rgba(230, 241, 240, 0.84) 50%, rgba(220, 234, 233, 0.58) 78%, rgba(5, 48, 62, 0.3) 100%),
    linear-gradient(180deg, rgba(248, 251, 250, 0.34), rgba(220, 232, 231, 0.2) 60%, rgba(3, 44, 58, 0.12));
  content: "";
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  color: inherit;
}

.skip-link,
.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;
}

.skip-link:focus {
  top: 1rem;
  left: 1rem;
  z-index: 100;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  margin: 0;
  clip: auto;
  background: var(--white);
  border: 2px solid var(--current);
  border-radius: 0.25rem;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.75rem max(1.5rem, calc((100vw - 96rem) / 2));
  background: rgba(235, 244, 243, 0.68);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.38rem;
  text-decoration: none;
  letter-spacing: -0.035em;
}

.wordmark-primary {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 600;
}

.wordmark-secondary {
  font-size: clamp(0.85rem, 1.35vw, 1.05rem);
  font-weight: 500;
}

.primary-navigation {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3.2vw, 3.5rem);
  padding-top: 4px;
}

.primary-navigation a {
  border: 0;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.primary-navigation a {
  padding-block: 0.55rem;
  border-bottom: 1px solid transparent;
}

.primary-navigation a:hover,
.primary-navigation a:focus-visible {
  border-color: currentColor;
}

.nav-contact {
  padding: 0.72rem 1rem !important;
  color: var(--white);
  background: var(--coral-dark) !important;
  border: 1px solid var(--coral-dark) !important;
  border-radius: 0.2rem;
}

.nav-contact:hover,
.nav-contact:focus-visible {
  background: #94291f !important;
  border-color: #94291f !important;
}

.menu-button {
  display: none;
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  width: min(100% - 3rem, 96rem);
  min-height: 100svh;
  margin-inline: auto;
  padding: clamp(14rem, 29vh, 18rem) clamp(0rem, 8vw, 8rem) clamp(4rem, 8vh, 7rem);
}

.hero-copy {
  max-width: 68rem;
}

.audience-line {
  width: fit-content;
  margin: 0 0 1.6rem;
  padding-bottom: 0.45rem;
  color: var(--current);
  border-bottom: 1px solid rgba(6, 59, 76, 0.42);
  font-size: clamp(0.78rem, 1vw, 0.92rem);
  font-weight: 600;
}

h1 {
  max-width: 20ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 6.2vw, 6.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.01;
  text-wrap: balance;
}

.headline-fixed {
  display: block;
}

.rotator-shell {
  display: grid;
  grid-template-rows: max-content;
  width: max-content;
  max-width: calc(100vw - 12rem);
  height: 1.18em;
  margin-top: 0.1em;
  overflow: hidden;
  color: var(--coral-dark);
}

.rotating-phrase {
  display: block;
  grid-area: 1 / 1;
  width: fit-content;
  padding-bottom: 0.06em;
  font-size: 0.82em;
  line-height: 1.12;
  text-decoration-line: underline;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.09em;
  white-space: nowrap;
}

.rotating-phrase.is-leaving-up {
  animation: phrase-leave-up 560ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.rotating-phrase.is-entering-up {
  animation: phrase-enter-up 560ms cubic-bezier(0.65, 0, 0.35, 1) both;
}

.hero-summary {
  max-width: 44rem;
  margin: clamp(1.7rem, 3vh, 2.6rem) 0 0;
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  font-weight: 500;
  line-height: 1.65;
}

.site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  width: min(100% - 3rem, 96rem);
  margin: -3.25rem auto 0;
  padding-bottom: 1.5rem;
}

.cookie-preferences {
  padding: 0.35rem 0;
  color: var(--current);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(6, 59, 76, 0.45);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
}

.cookie-preferences:hover,
.cookie-preferences:focus-visible {
  border-color: currentColor;
}

.simple-page {
  position: relative;
  z-index: 1;
  width: min(100% - 3rem, 96rem);
  min-height: 100svh;
  margin-inline: auto;
  padding: 2rem max(0rem, calc((100% - 80rem) / 2));
}

.simple-page-copy {
  max-width: 54rem;
  padding-top: clamp(8rem, 22vh, 14rem);
}

.simple-page h1 {
  max-width: 12ch;
}

.text-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--coral-dark);
  font-weight: 600;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

@keyframes phrase-leave-up {
  to { opacity: 0; transform: translateY(-48%); }
}

@keyframes phrase-enter-up {
  from { opacity: 0; transform: translateY(48%); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 721px) and (max-width: 1100px) {
  .rotator-shell {
    width: auto;
    max-width: none;
    height: 2.22em;
  }

  .rotating-phrase {
    white-space: normal;
  }
}

@media (max-width: 720px) {
  body.menu-open {
    overflow: hidden;
  }

  .hero {
    width: min(100% - 2rem, 96rem);
  }

  .site-footer {
    width: min(100% - 2rem, 96rem);
  }

  .site-header {
    padding: 1.2rem 1rem;
  }

  .wordmark {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
    line-height: 1;
  }

  .wordmark-secondary {
    margin-top: 0.22rem;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
  }

  .menu-button {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 0.4rem;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.72rem 0.55rem;
    background: rgba(248, 251, 250, 0.65);
    border: 1px solid var(--edge);
    border-radius: 50%;
    cursor: pointer;
  }

  .menu-button span {
    width: 100%;
    height: 1px;
    background: var(--current);
    transition: transform 180ms ease;
  }

  .menu-button[aria-expanded="true"] span:first-child {
    transform: translateY(0.22rem) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] span:last-child {
    transform: translateY(-0.22rem) rotate(-45deg);
  }

  .primary-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2rem;
    width: 100vw;
    height: calc(100dvh - 100%);
    padding: 2rem 1rem max(2rem, env(safe-area-inset-bottom));
    overflow-y: auto;
    background: rgb(220, 232, 231);
    backdrop-filter: blur(12px);
  }

  .primary-navigation.is-open {
    display: flex;
  }

  .primary-navigation a {
    font-size: 1.25rem;
  }

  .hero {
    padding: clamp(12.5rem, 27vh, 14.5rem) 0 2.5rem;
  }

  .hero-copy {
    width: 100%;
  }

  h1 {
    font-size: clamp(2.55rem, 11.8vw, 4.25rem);
    line-height: 1.04;
  }

  .rotator-shell {
    width: auto;
    max-width: none;
    height: 2.08em;
  }

  .rotating-phrase {
    line-height: 1.16;
    white-space: normal;
  }

  .hero-summary {
    max-width: 34rem;
    padding-right: 1rem;
  }

  body {
    background-attachment: scroll;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
