:root {
  --nsdcea-ink: #101c2d;
  --nsdcea-navy: #1b3554;
  --nsdcea-navy-soft: #274663;
  --nsdcea-teal: #4b9aa6;
  --nsdcea-sea: #82c9cd;
  --nsdcea-foam: #f4f8f7;
  --nsdcea-sand: #f3eee5;
  --nsdcea-paper: #fcfbf8;
  --nsdcea-line: rgb(16 28 45 / 12%);
  --nsdcea-shadow: 0 22px 70px rgb(16 28 45 / 12%);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--nsdcea-paper);
  text-rendering: optimizeLegibility;
}

::selection {
  color: var(--nsdcea-ink);
  background: rgb(130 201 205 / 55%);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  color: white;
  background: var(--nsdcea-ink);
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

main > section[id] {
  scroll-margin-top: 7rem;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgb(75 154 166 / 55%);
  outline-offset: 3px;
}

header.nav {
  overflow: hidden;
  isolation: isolate;
  transition:
    top 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease;
}

header.nav::after {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--nsdcea-teal),
    var(--nsdcea-sea)
  );
  content: "";
  transform: scaleX(var(--nav-progress, 0));
  transform-origin: left;
}

header.nav.is-scrolled {
  top: 0.65rem !important;
  border-color: rgb(255 255 255 / 82%);
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 14px 42px rgb(16 28 45 / 16%);
}

header.nav nav a {
  position: relative;
  padding-block: 0.4rem;
}

header.nav nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--nsdcea-teal);
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

header.nav nav a:hover::after,
header.nav nav a[aria-current="location"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.hero {
  position: relative;
  background: var(--nsdcea-ink);
}

.hero::after {
  position: absolute;
  z-index: 2;
  right: max(1rem, calc(50% - 35rem));
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  color: rgb(255 255 255 / 72%);
  background: rgb(10 20 34 / 36%);
  content: "Photo · Oceanside, 2016 · Jason Zook · CC0";
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.025em;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.hero-image {
  object-position: center center;
  filter: contrast(1.03) saturate(0.88);
  animation: hero-settle 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-copy {
  animation: copy-rise 700ms 100ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-copy h1 {
  text-shadow: 0 3px 30px rgb(0 0 0 / 18%);
}

.hero-copy > p:last-child {
  max-width: 46rem;
}

.hero .button {
  min-height: 3.15rem;
  padding-inline: 1.3rem;
}

#top + section {
  display: grid;
  grid-template-columns: minmax(10rem, 0.65fr) minmax(0, 1.35fr);
  max-width: 70rem;
  gap: 0 5rem;
  text-align: left;
}

#top + section > p:first-child {
  grid-row: 1 / span 2;
  align-self: start;
  padding-top: 0.55rem;
}

#top + section > h2,
#top + section > p:last-child {
  grid-column: 2;
}

#top + section > h2 {
  max-width: 45rem;
}

#top + section > p:last-child {
  margin-inline: 0;
}

#why-nsdcea {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% -30%, rgb(75 154 166 / 23%), transparent 42%),
    linear-gradient(135deg, #0e1b2d 0%, #101a29 60%, #0d1725 100%);
}

#why-nsdcea::before {
  position: absolute;
  top: 0;
  right: max(20px, calc(50% - 560px));
  left: max(20px, calc(50% - 560px));
  height: 1px;
  background: linear-gradient(90deg, var(--nsdcea-sea), transparent 65%);
  content: "";
}

#why-nsdcea > * {
  position: relative;
}

#why-nsdcea > div:first-child {
  max-width: 46rem;
}

#why-nsdcea > div:first-child > p:last-child {
  max-width: 43rem;
  color: rgb(255 255 255 / 69%);
  font-size: 1.04rem;
}

#why-nsdcea > div:last-child {
  overflow: hidden;
  gap: 0 !important;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 1.15rem;
  background: rgb(255 255 255 / 3.5%);
}

#why-nsdcea > div:last-child > div {
  min-height: 10rem;
  padding: 1.45rem;
  border-top: 0 !important;
  border-right: 1px solid rgb(255 255 255 / 11%);
}

#why-nsdcea > div:last-child > div:last-child {
  border-right: 0;
}

#why-nsdcea > div:last-child p:first-child {
  color: var(--nsdcea-sea);
}

#education {
  position: relative;
}

#education > div {
  align-self: start;
  padding-top: 0.5rem;
}

#education ul {
  border-top-color: var(--nsdcea-line);
}

#education li {
  position: relative;
  padding-left: 1.4rem;
  transition:
    background-color 180ms ease,
    padding-left 180ms ease;
}

#education li::before {
  position: absolute;
  top: 1.95rem;
  left: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--nsdcea-teal);
  box-shadow: 0 0 0 5px rgb(75 154 166 / 10%);
  content: "";
}

#education li:hover {
  padding-left: 1.75rem;
  background: linear-gradient(90deg, rgb(75 154 166 / 6%), transparent);
}

#membership {
  background:
    linear-gradient(rgb(255 255 255 / 38%), rgb(255 255 255 / 38%)),
    var(--nsdcea-sand);
}

#membership > div:first-of-type {
  gap: 1rem;
}

#membership > div:first-of-type article {
  min-height: 9.25rem;
  padding: 1.4rem;
  border: 1px solid var(--nsdcea-line);
  border-top: 3px solid var(--nsdcea-teal);
  border-radius: 1rem;
  background: rgb(255 255 255 / 54%);
}

#membership > div:first-of-type article h3 {
  margin-bottom: 0.7rem;
}

#membership > div:nth-of-type(2) > div {
  gap: 1rem;
}

#membership > div:nth-of-type(2) article {
  position: relative;
  overflow: hidden;
  min-height: 15.5rem;
  border-color: var(--nsdcea-line);
  border-radius: 1rem;
  background: rgb(255 255 255 / 76%);
  box-shadow: 0 8px 24px rgb(16 28 45 / 5%);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

#membership > div:nth-of-type(2) article::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--nsdcea-teal), transparent);
  content: "";
  opacity: 0;
  transition: opacity 180ms ease;
}

#membership > div:nth-of-type(2) article:hover {
  border-color: rgb(75 154 166 / 38%);
  box-shadow: 0 16px 34px rgb(16 28 45 / 9%);
  transform: translateY(-3px);
}

#membership > div:nth-of-type(2) article:hover::before {
  opacity: 1;
}

#membership > div:nth-of-type(2) article a {
  border-color: rgb(16 28 45 / 15%);
  background: transparent;
}

#membership > div:nth-of-type(2) article a:hover {
  border-color: var(--nsdcea-navy);
  color: white;
  background: var(--nsdcea-navy);
}

#board {
  max-width: 70rem;
}

#board .board-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  align-items: stretch;
}

#board .board-grid > div {
  grid-column: span 2;
}

#board .board-grid > div:nth-child(4) {
  grid-column: 2 / span 2;
}

#board .board-grid article {
  min-height: 18rem;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 1.15rem;
  padding: 1.75rem;
  text-align: center;
  border-color: var(--nsdcea-line);
  background: white;
  box-shadow: 0 8px 24px rgb(16 28 45 / 5%);
}

#board .board-grid > div:first-child article {
  background:
    linear-gradient(110deg, rgb(75 154 166 / 10%), transparent 60%),
    white;
}

#board .board-grid img {
  width: 9rem;
  height: 9rem;
  border-width: 3px;
}

#board .board-grid > div:first-child img {
  width: 9.5rem;
  height: 9.5rem;
}

#board .board-grid article > div {
  text-align: center;
}

#board .board-grid article:hover {
  border-color: rgb(75 154 166 / 35%);
  box-shadow: 0 16px 32px rgb(16 28 45 / 10%);
}

#gallery {
  max-width: 70rem;
}

#gallery .photo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: auto;
}

#gallery .photo-grid > div {
  grid-column: auto;
  grid-row: auto;
}

#gallery .photo-grid figure {
  width: 100%;
  height: 100%;
  border-color: rgb(16 28 45 / 9%);
  border-radius: 1rem;
  aspect-ratio: 1;
}

#gallery .photo-grid img {
  object-position: center;
  transform: scale(1.01);
}

#gallery .photo-grid figure:hover img {
  transform: scale(1.055);
}

#gallery .gallery-follow a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--nsdcea-line);
  border-radius: 999px;
  text-decoration: none;
}

#gallery .gallery-follow a:hover {
  border-color: rgb(75 154 166 / 38%);
  background: var(--nsdcea-foam);
}

#events ul li > img,
#events ul li > a > img {
  object-fit: contain !important;
  object-position: center !important;
  background: white;
}

@media (min-width: 48rem) {
  #events ul li {
    grid-template-columns: auto 7rem minmax(0, 1fr) auto !important;
  }

  #events ul li > img,
  #events ul li > a {
    width: 7rem !important;
    height: 5.25rem !important;
  }

  #events ul li > a > img {
    width: 100% !important;
    height: 100% !important;
  }
}

#join {
  position: relative;
  overflow: hidden;
  border-color: rgb(255 255 255 / 8%);
  color: white;
  background:
    radial-gradient(circle at 14% 20%, rgb(130 201 205 / 18%), transparent 32%),
    linear-gradient(125deg, #162d49, #101c2d 72%);
}

#join::after {
  position: absolute;
  right: max(20px, calc(50% - 560px));
  bottom: 0;
  left: max(20px, calc(50% - 560px));
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--nsdcea-sea), transparent);
  content: "";
}

#join > * {
  position: relative;
}

#join p {
  color: rgb(255 255 255 / 72%);
}

#join .button {
  color: var(--nsdcea-ink);
  background: white;
}

#events {
  max-width: 58rem;
}

#events > div:first-of-type {
  position: relative;
  overflow: hidden;
  border-color: rgb(75 154 166 / 20%);
  background:
    radial-gradient(circle at 100% 0%, rgb(130 201 205 / 18%), transparent 42%),
    var(--nsdcea-foam);
}

#events > ul li {
  border-color: var(--nsdcea-line);
  background: white;
  box-shadow: 0 5px 18px rgb(16 28 45 / 4%);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

#events > ul li:hover {
  border-color: rgb(75 154 166 / 32%);
  box-shadow: 0 12px 28px rgb(16 28 45 / 8%);
  transform: translateY(-2px);
}

#events > ul li > div:first-child {
  border-color: rgb(75 154 166 / 24%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 45%);
}

#events > div:last-of-type {
  border-color: rgb(75 154 166 / 18%);
  background: var(--nsdcea-foam);
}

#contact {
  display: grid;
  grid-template-columns: minmax(15rem, 0.8fr) minmax(24rem, 1.2fr);
  max-width: 70rem;
  gap: 0 5.5rem;
  align-items: start;
  text-align: left;
}

#contact > img,
#contact > h2,
#contact > p:not(#cf-status) {
  grid-column: 1;
}

#contact > img {
  width: 10rem;
  margin-bottom: 1.75rem;
}

#contact > h2 {
  margin-bottom: 0.85rem;
}

#contact > p {
  margin-inline: 0;
}

#contact > form {
  grid-column: 2;
  grid-row: 1 / span 4;
  width: 100%;
  max-width: none;
  margin-top: 0;
  padding: 1.5rem;
  border: 1px solid var(--nsdcea-line);
  border-radius: 1.15rem;
  background: var(--nsdcea-foam);
  box-shadow: 0 14px 34px rgb(16 28 45 / 7%);
}

#contact > p:last-child {
  grid-column: 2 !important;
  margin-top: 1rem;
  text-align: center;
}

#contact input,
#contact textarea {
  border-color: rgb(16 28 45 / 13%);
  background: white;
}

#contact input:focus,
#contact textarea:focus {
  border-color: var(--nsdcea-teal);
  box-shadow: 0 0 0 4px rgb(75 154 166 / 11%);
}

footer {
  border-color: rgb(255 255 255 / 9%) !important;
  color: rgb(255 255 255 / 60%) !important;
  background: var(--nsdcea-ink);
}

footer strong,
footer a {
  color: white !important;
}

@keyframes hero-settle {
  from {
    opacity: 0.7;
    transform: scale(1.035);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes copy-rise {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 63.999rem) {
  #contact {
    gap: 0 3rem;
  }
}

@media (max-width: 47.999rem) {
  main > section[id] {
    scroll-margin-top: 6rem;
  }

  header.nav {
    width: calc(100% - 1.5rem) !important;
    border-radius: 1.35rem !important;
  }

  header.nav.is-scrolled {
    top: 0.5rem !important;
  }

  header.nav.menu-open {
    align-items: center;
    border-radius: 1.35rem !important;
  }

  header.nav.menu-open nav {
    display: grid !important;
    width: 100%;
    gap: 0;
    padding: 0.5rem 0.25rem 0;
    border-top: 1px solid var(--nsdcea-line);
  }

  header.nav.menu-open nav a {
    padding: 0.72rem 0.5rem;
  }

  header.nav.menu-open nav a::after {
    right: auto;
    width: 1.75rem;
  }

  header.nav.menu-open > a.button {
    display: flex !important;
    width: 100%;
    margin-top: 0.25rem;
  }

  header.nav.menu-open .nav-toggle span:nth-child(1) {
    transform: translateY(0.375rem) rotate(45deg);
  }

  header.nav.menu-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  header.nav.menu-open .nav-toggle span:nth-child(3) {
    transform: translateY(-0.375rem) rotate(-45deg);
  }

  .hero-copy {
    width: calc(100% - 2.5rem);
  }

  .hero-image {
    object-position: 57% center;
  }

  .hero::after {
    right: 0.75rem;
    bottom: 0.65rem;
    min-height: 1.8rem;
    padding-inline: 0.6rem;
    content: "Real photo · Oceanside, 2016 · CC0";
    font-size: 0.62rem;
  }

  .hero-copy h1 {
    max-width: 21rem !important;
  }

  .hero-copy > div {
    align-items: flex-start;
  }

  #top + section {
    display: block;
    max-width: none;
    text-align: left;
  }

  #top + section > p:first-child {
    padding-top: 0;
  }

  #why-nsdcea > div:last-child {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #why-nsdcea > div:last-child > div {
    min-height: 10.5rem;
    padding: 1.1rem;
    border-right: 1px solid rgb(255 255 255 / 11%);
    border-bottom: 1px solid rgb(255 255 255 / 11%);
  }

  #why-nsdcea > div:last-child > div:nth-child(2n) {
    border-right: 0;
  }

  #why-nsdcea > div:last-child > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  #education li {
    gap: 0.55rem !important;
  }

  #membership > div:first-of-type article {
    min-height: auto;
  }

  #membership > div:nth-of-type(2) article {
    min-height: auto;
  }

  #board .board-grid {
    grid-template-columns: 1fr !important;
  }

  #board .board-grid > div,
  #board .board-grid > div:nth-child(4) {
    grid-column: auto;
  }

  #board .board-grid > div:first-child article {
    padding: 1.2rem;
  }

  #board .board-grid article {
    min-height: 9.75rem;
    flex-direction: row;
    justify-content: flex-start;
    gap: 1.1rem;
    padding: 1.2rem;
    text-align: left;
  }

  #board .board-grid img,
  #board .board-grid > div:first-child img {
    width: 7rem;
    height: 7rem;
  }

  #board .board-grid article > div {
    text-align: left;
  }

  #gallery .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: auto;
    gap: 0.65rem !important;
  }

  #gallery .photo-grid > div,
  #gallery .photo-grid > div:first-child,
  #gallery .photo-grid > div:nth-child(4) {
    grid-column: auto;
    grid-row: auto;
  }

  #contact {
    display: block;
    text-align: center;
  }

  #contact > img {
    width: 9rem;
    margin-inline: auto;
  }

  #contact > p {
    margin-inline: auto;
  }

  #contact > form {
    margin-top: 1.6rem;
    padding: 1rem;
    text-align: left;
  }

  #contact > p:last-child {
    text-align: center;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
