@font-face {
  font-family: "Clash Grotesk";
  src: url("assets/clash-grotesk.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
}

@font-face {
  font-family: Author;
  src: url("assets/author.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background-primary-default: #faf6ef;
  --background-secondary-default: #e7ddf8;
  --text-primary: #342044;
  --text-secondary: #564560;
  --text-on-dark-secondary: #eee4f9;
  --text-link: #6d3b91;
  --border-button-default: var(--text-link);
  --border-focus-ring: var(--text-link);
  --separator-border: #dbd0e8;
  --button-primary-background-default: #ffc85a;
  --button-primary-background-hover: #f5b644;
  --button-primary-background-active: #eaa337;
  --button-secondary-background-hover: #e0d2f3;
  --button-secondary-background-active: #d8c8ed;
  --gutter: clamp(18px, 4vw, 64px);
  --radius: 12px;
  --paper-grain: url("assets/paper-grain.png");
  --display-font: "Clash Grotesk", "Arial", sans-serif;
  --body-font: Author, "Arial", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background-color: var(--background-primary-default);
  background-image: var(--paper-grain);
  color: var(--text-primary);
  font: 400 1.125rem/1.35 var(--body-font);
}

img { display: block; width: 100%; height: auto; }
h1, h2, p, figure { margin: 0; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--border-focus-ring);
  outline-offset: 5px;
}

.shell {
  width: min(100% - var(--gutter) * 2, 80rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 2;
  top: 12px;
  left: var(--gutter);
  transform: translateY(-180%);
  padding: 10px 15px;
  border-radius: 6px;
  background: var(--background-primary-default);
}

.skip-link:focus { transform: none; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 16px;
  border-bottom: 1px solid var(--separator-border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font: 600 1rem/1.05 var(--display-font);
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--button-primary-background-default);
  font: 20px/1 Arial, sans-serif;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 35px);
}

.site-header nav a, .site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.04rem;
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 4px;
}

.site-header nav a:hover, .site-footer a:hover { text-decoration: underline; }

.home-header + .page-scroll-stage {
  margin-block-start: calc(0px - var(--home-nav-height, 0px));
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 64fr) minmax(0, 36fr);
  min-block-size: 100svh;
  background: var(--background-secondary-default) var(--paper-grain);
}

.hero-figure { position: relative; }

.hero-welcome {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: clamp(16px, 2.4vw, 33px);
  padding: clamp(24px, 3.3vw, 66px);
  padding-block-start: max(clamp(24px, 3.3vw, 66px), calc(var(--home-nav-height, 0px) + 16px));
}

.hero h1 {
  max-inline-size: 10ch;
  font: 640 clamp(2.6rem, 5.3vw, 6.5rem)/.93 var(--display-font);
  letter-spacing: -.049em;
  text-wrap: balance;
}

.hero-period { color: var(--text-link); }

.hero-welcome p {
  max-inline-size: 25ch;
  color: var(--text-secondary);
  font-size: clamp(1.2rem, 1.85vw, 1.65rem);
  line-height: 1.19;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px clamp(12px, 1.4vw, 22px);
}

.hero-support {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  color: var(--text-link);
  font-weight: 600;
  text-underline-offset: 4px;
}

.hero-support:hover { color: var(--text-primary); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  padding: 8px 17px;
  border: 1px solid transparent;
  border-radius: 8px;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.1;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.button--primary { background-color: var(--button-primary-background-default); }
.button--primary:hover { background-color: var(--button-primary-background-hover); }
.button--primary:active { background-color: var(--button-primary-background-active); }
.button--secondary { border-color: var(--border-button-default); color: var(--text-link); }
.button--secondary:hover { background-color: var(--button-secondary-background-hover); }
.button--secondary:active { background-color: var(--button-secondary-background-active); }

.photo-frame {
  overflow: hidden;
  border-radius: var(--radius);
}

.photo-frame, .support-photo { position: relative; }

.hero-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

:is(.hero-photo, .photo-frame, .support-photo)::after {
  position: absolute;
  inset: 0;
  background-image: var(--paper-grain);
  mix-blend-mode: soft-light;
  opacity: .68;
  pointer-events: none;
  content: "";
}

.hero-photo img, .photo-frame img, .support-photo img {
  height: 100%;
  object-fit: cover;
  filter: saturate(.95) contrast(.98) sepia(.055);
}
.hero-photo img { object-position: 50% 62%; }

.gallery-motion {
  --stage-inset: clamp(24px, 8svh, 72px);
}

.gallery-motion:not(.framed-motion) {
  --stage-inset: clamp(18px, 5svh, 42px);
}

.gallery-motion .gallery-stage::after {
  display: block;
  content: "";
}

.gallery-motion .gallery-stage {
  --gallery-heading-travel: clamp(140px, 22svh, 190px);
  --gallery-photo-travel: clamp(130px, 20svh, 155px);
}

.gallery-motion .gallery-stage::after {
  height: calc(clamp(285px, 51svh, 455px) + clamp(105px, 16svh, 155px) +
    var(--gallery-heading-travel) + var(--gallery-photo-travel));
}

.postcard-motion .gallery-stage::after {
  height: calc(clamp(525px, 85svh, 690px) + clamp(90px, 14svh, 140px) +
    var(--gallery-heading-travel) + var(--gallery-photo-travel));
}

.gallery-motion .gallery-frame {
  position: sticky;
  top: 0;
  min-height: 100svh;
  padding-top: var(--stage-inset);
  background: var(--text-primary) var(--paper-grain);
}

.framed-motion .gallery-panel {
  height: min(calc(100svh - var(--stage-inset) * 2), calc(34vw + 152px), 675px);
}

.framed-motion .gallery-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.framed-motion .section-heading { flex: none; }

.framed-motion .photo-grid {
  flex: 1;
  min-height: 0;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.framed-motion .story { grid-template-rows: minmax(0, 1fr) auto; }
.framed-motion .photo-frame { aspect-ratio: auto; }

@media (max-height: 760px) {
  .framed-motion .gallery-panel {
    height: min(calc(100svh - var(--stage-inset) * 2), calc(24vw + 190px), 545px);
  }

  .framed-motion .photo-grid {
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    align-items: center;
  }

  .framed-motion .story { grid-row: auto; }
  .framed-motion .photo-frame img { height: auto; }
}

@media (max-height: 600px) and (min-width: 1240px) {
  .framed-motion .photo-grid { align-items: stretch; }
  .framed-motion .photo-frame { background: transparent; }
  .framed-motion .photo-frame img { height: 100%; object-fit: contain; }
}

.club-life { padding-top: clamp(54px, 7vw, 106px); }

.gallery-motion .hero {
  position: sticky;
  top: 0;
}

.gallery-motion .hero:has(:focus-visible) { z-index: 2; }

.gallery-motion .club-life {
  position: relative;
  z-index: 1;
  padding-top: 0;
}

.gallery-frame { position: relative; }

.gallery-panel {
  padding-block: clamp(26px, 5svh, 54px);
  color: var(--background-primary-default);
  background: var(--text-primary) var(--paper-grain);
}

.gallery-motion .gallery-panel { background: none; }

.gallery-panel :is(.section-heading p, figcaption) { color: var(--text-on-dark-secondary); }

.gallery-rule {
  display: none;
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 4px;
  background-color: var(--button-primary-background-default);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

.gallery-motion .gallery-rule { display: block; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px 36px;
  margin-bottom: clamp(24px, 3.1vw, 42px);
}

h2 {
  font: 600 clamp(2.7rem, 6vw, 5.75rem)/.98 var(--display-font);
  letter-spacing: -.052em;
}

.section-heading p, .join-panel p, .support-panel p {
  max-width: 30ch;
  font-size: clamp(1.14rem, 1.8vw, 1.45rem);
  line-height: 1.22;
}

.join-panel p { color: var(--text-secondary); }

.gallery-title-word { white-space: nowrap; }
.gallery-title-letter { display: inline-block; }

.photo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .5fr);
  grid-template-rows: repeat(2, auto);
  gap: clamp(14px, 1.9vw, 24px);
}

.postcard-backing { display: none; }

.story {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 7px;
  min-width: 0;
}

.story--feature { grid-row: span 2; }
.photo-frame { background: var(--background-secondary-default); }
.photo-frame--gathering img { object-position: 39% center; }
.photo-frame--friends, .photo-frame--celebration { aspect-ratio: 1.8; }
.photo-frame--friends img { object-position: center 46%; }
.photo-frame--celebration img { object-position: center 96%; }

figcaption {
  color: var(--text-secondary);
  font-size: 1.04rem;
  line-height: 1.14;
}

.join-section { padding-top: clamp(48px, 7.4vw, 104px); }

.join-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .63fr);
  align-items: center;
  gap: 18px 36px;
  padding: clamp(26px, 5vw, 64px);
  border: 1px solid var(--separator-border);
  border-radius: var(--radius);
  background: var(--background-secondary-default) var(--paper-grain);
}

.join-panel h2, .support-panel h2 { font-size: clamp(2.6rem, 5.6vw, 5.1rem); }
.join-photos {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  color: var(--text-link);
  font-weight: 600;
  text-underline-offset: 4px;
}

.support-section { padding-top: clamp(14px, 2vw, 24px); }

.support-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--text-primary);
  color: var(--background-primary-default);
}

.support-content {
  padding: clamp(26px, 5vw, 64px);
}

.support-content > p { margin-top: 18px; color: var(--text-on-dark-secondary); }
.support-photo img { object-position: 56% center; }
.support-photo { min-height: 260px; }

.site-footer {
  position: relative;
  margin-top: clamp(40px, 5.6vw, 80px);
  overflow: clip;
}

.footer-brush { position: absolute; }

.footer-painted {
  background: var(--text-primary) var(--paper-grain);
  color: var(--background-primary-default);
}

.footer-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(24px, 5svh, 44px);
  min-height: clamp(250px, 45svh, 365px);
  padding-block: clamp(30px, 4.5vw, 62px);
}

.footer-name {
  max-width: 14ch;
  font: 600 clamp(3rem, 9.3vw, 8.25rem)/.92 var(--display-font);
  letter-spacing: -.055em;
}

.footer-name span { color: var(--button-primary-background-default); }

.site-footer a {
  align-self: flex-end;
  text-decoration-color: var(--button-primary-background-default);
}

.site-footer a:focus-visible { outline-color: var(--button-primary-background-default); }

@media (prefers-reduced-motion: no-preference) {
  .footer-motion .page-scroll-stage::after {
    display: block;
    height: clamp(340px, 53svh, 420px);
    content: "";
  }

  .footer-motion .page-end-frame {
    position: sticky;
    top: var(--footer-frame-top, auto);
  }

  .footer-motion .site-footer:not(:has(:focus-visible)) .footer-paper {
    background: var(--button-primary-background-default) var(--paper-grain);
    transform: translateY(var(--footer-rise));
  }

  .footer-motion .site-footer:not(:has(:focus-visible)) .footer-painted {
    mask-image: url("#footer-brush-mask");
  }

  .footer-stroke path {
    fill: none;
    stroke: white;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: var(--footer-dash, 1);
  }

  .footer-stroke .footer-bristle {
    stroke-linecap: butt;
    stroke-dashoffset: clamp(0, calc(var(--footer-dash, 1) * 1.13 - .13), 1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .join-panel, .support-panel {
      animation: panel-entry linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 90%;
    }

    .join-panel { --panel-turn: -2.3deg; --panel-rise: 64px; }
    .support-panel { --panel-turn: 3.1deg; --panel-rise: 96px; }

    @media (min-width: 768px) {
      .join-section { position: sticky; top: clamp(12px, 8vh, 76px); }
      .support-section { position: relative; z-index: 1; }
    }
  }
}

@keyframes panel-entry {
  from { transform: translateY(var(--panel-rise)) rotate(var(--panel-turn)) scale(.91); }
  to { transform: none; }
}

@media (max-width: 767px) {
  .site-header { padding-block: 10px; }
  .footer-content { min-height: clamp(245px, 36svh, 305px); }
  .section-heading { align-items: start; flex-direction: column; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    background: var(--text-primary);
  }

  .hero-figure, .hero-welcome { grid-area: 1 / 1; }

  .hero-photo img { object-position: 53% 44%; }

  .hero-welcome {
    position: relative;
    isolation: isolate;
    align-self: end;
    margin-block-start: calc(var(--home-nav-height, 0px) + 3.5rem);
    gap: clamp(12px, 2.5svh, 24px);
    padding: 20px var(--gutter) max(clamp(26px, 5svh, 48px), calc(env(safe-area-inset-bottom) + 18px));
    color: var(--background-primary-default);
  }

  .hero-welcome::before {
    position: absolute;
    z-index: -1;
    inset: -5.5rem 0 0;
    background: linear-gradient(to bottom, transparent,
      color-mix(in srgb, var(--text-primary) 82%, transparent) 5.5rem,
      color-mix(in srgb, var(--text-primary) 96%, transparent));
    pointer-events: none;
    content: "";
  }

  .hero h1 {
    max-inline-size: 12ch;
    font-size: clamp(2.5rem, 10.55vw, 4.6rem);
    text-wrap: initial;
  }

  .hero-period, .hero-support:hover { color: var(--button-primary-background-default); }
  .hero-welcome p { color: var(--text-on-dark-secondary); }
  .hero-support { color: inherit; }
  .hero-actions .button--primary { color: var(--text-primary); }
  .hero-actions :focus-visible { outline-color: var(--button-primary-background-default); }

  .gallery-content .photo-grid {
    width: min(100% - 18px, 28rem);
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }

  .gallery-content .story {
    grid-row: auto;
    gap: 8px;
    padding: 8px 8px 10px;
    border-radius: var(--radius);
    background: var(--background-primary-default) var(--paper-grain);
  }

  .gallery-content .photo-frame {
    aspect-ratio: 3 / 2;
    border-radius: 6px;
    background: transparent;
  }

  .gallery-content .photo-frame img { object-fit: contain; }
  .gallery-content .story figcaption {
    padding-inline: 4px;
    color: var(--text-primary);
    font-weight: 600;
  }

  .postcard-motion .gallery-panel {
    display: grid;
    align-items: center;
    min-height: calc(100svh - var(--stage-inset) * 2);
    padding-block: clamp(24px, 4svh, 40px);
  }
  .postcard-motion .gallery-frame { overflow: clip; }

  .postcard-motion .photo-grid {
    position: relative;
    clip-path: inset(-14px -24px -78%);
  }

  .postcard-motion .postcard-backing {
    display: block;
    position: absolute;
    inset: 4% -2% 0;
    border-radius: 20% 7% 16% 8%;
    background: var(--button-primary-background-default);
    transform: var(--postcard-transform, rotate(-5deg));
    pointer-events: none;
  }

  .postcard-motion .story {
    grid-area: 1 / 1;
    position: relative;
    opacity: var(--postcard-opacity, 0);
    transform: var(--postcard-transform, none);
  }

  .postcard-motion .photo-frame { max-height: clamp(150px, 39svh, 294px); }

  .postcard-motion .get-involved { --mobile-card-inset: clamp(18px, 6svh, 46px); }

  .postcard-motion .get-involved::after {
    display: block;
    height: clamp(150px, 25svh, 235px);
    content: "";
  }

  .postcard-motion .join-section { position: sticky; top: var(--mobile-card-inset); }

  .postcard-motion .support-section {
    position: sticky;
    top: calc(var(--mobile-card-inset) + clamp(48px, 7.4vw, 104px));
    z-index: 1;
  }

  .join-panel, .support-panel { grid-template-columns: 1fr; }
  .support-photo { min-height: 0; aspect-ratio: 1.76; }
}

@media (max-width: 539px) {
  .site-header { flex-wrap: wrap; }
  .site-header nav { gap: 11px; }
  .site-header nav a { font-size: .91rem; }
  .brand { gap: 6px; font-size: .90rem; }
  .brand-mark { width: 25px; height: 25px; font-size: 16px; }
}

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