:root {
  --navy: #041222;
  --sand: #e8d5a9;
  --foam: #f7fafc;
  --sea:  #1c6a8e;

  --font-ui: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background-color: var(--navy);
  color: var(--foam);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

/* ---- Hero ------------------------------------------------------------ */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 3rem 1.5rem 0;
  background-image: url('assets/sandy-hook-aerial.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(4, 18, 34, 0.72) 0%,
    rgba(4, 18, 34, 0.45) 45%,
    rgba(4, 18, 34, 0.80) 100%
  );
}

.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 640px;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ---- Type ------------------------------------------------------------ */

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--sand);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-indent: 0.42em; /* offset the trailing letter-space so it stays centered */
  text-transform: uppercase;
}

.domain {
  margin: 0;
  font-size: clamp(2.2rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(4, 18, 34, 0.55);
  overflow-wrap: break-word;
}

.lede {
  margin: 1.25rem 0 2.5rem;
  max-width: 34ch;
  color: rgba(247, 250, 252, 0.88);
  font-size: clamp(1rem, 2.4vw, 1.1875rem);
  line-height: 1.6;
}

/* ---- Call to action -------------------------------------------------- */

.cta {
  display: inline-block;
  padding: 0.95rem 2.25rem;
  border-radius: 999px;
  background-color: var(--sand);
  color: var(--navy);
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(4, 18, 34, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.cta:hover,
.cta:focus-visible {
  background-color: #f2e3c1;
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(4, 18, 34, 0.55);
}

.cta:active {
  transform: translateY(0);
}

.email {
  margin: 1.5rem 0 0;
  color: rgba(247, 250, 252, 0.72);
  font-size: 0.9375rem;
}

.email a {
  color: var(--foam);
  text-decoration-color: rgba(232, 213, 169, 0.6);
  text-underline-offset: 0.25em;
}

.email a:hover,
.email a:focus-visible {
  text-decoration-color: var(--sand);
}

/* ---- Footer redirect ------------------------------------------------- */

.redirect {
  width: 100%;
  padding: 2rem 0 2.5rem;
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.redirect p {
  margin: 0;
  color: rgba(247, 250, 252, 0.7);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.redirect a {
  color: var(--foam);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.redirect a:hover,
.redirect a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* ---- Focus ----------------------------------------------------------- */

a:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---- Motion ---------------------------------------------------------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- Responsive ------------------------------------------------------ */

@media (max-width: 640px) {
  .hero {
    padding: 2rem 1.25rem 0;
  }

  .eyebrow {
    letter-spacing: 0.3em;
    text-indent: 0.3em;
  }

  .lede {
    margin-bottom: 2rem;
  }

  .redirect {
    padding: 1.75rem 0 2rem;
  }
}

/* `sandyhooknj.com` is one unbreakable 15-character word — on the narrowest
   phones it needs to come down a step to keep breathing room at the edges. */
@media (max-width: 360px) {
  .domain {
    font-size: 1.9rem;
  }

  .email {
    font-size: 0.875rem;
  }
}

/* `fixed` attachment is unreliable on touch browsers (iOS in particular). */
@media (hover: none), (max-width: 900px) {
  .hero {
    background-attachment: scroll;
  }
}
