:root {
  --sky: #dce9f8;
  --gallery: #f5f6f2;
  --paper: #fffefa;
  --night: #111318;
  --ink: #101216;
  --signal: #f13d52;
  --slate: #68717d;
  --line: rgba(16, 18, 22, 0.16);
  --display: "Familjen Grotesk", "Arial Narrow", sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --shell: min(100% - 48px, 1440px);
  color-scheme: light;
  font-family: var(--display);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--ink);
  background: var(--gallery);
  font-size: 18px;
  line-height: 1.42;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

button {
  color: inherit;
  font: inherit;
}

p,
h1,
h2,
figure {
  margin: 0;
}

h1,
h2 {
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.92;
  text-wrap: balance;
}

h1 {
  max-width: 720px;
  font-size: clamp(4rem, 7.2vw, 7.7rem);
}

h2 {
  font-size: clamp(3.2rem, 6vw, 6.6rem);
}

.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 {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

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

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 22px 28px;
  transition: padding 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.has-js .site-header {
  position: fixed;
}

.site-header.is-scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(245, 246, 242, 0.9);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.wordmark {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
  text-decoration: none;
}

.wordmark span {
  color: var(--signal);
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: white;
  background: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.button:hover {
  color: var(--ink);
  background: transparent;
  transform: translateY(-2px);
}

.button-small {
  min-height: 44px;
  padding: 10px 16px;
  font-size: 0.8rem;
}

.index {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: clamp(48px, 7vw, 112px);
  width: var(--shell);
  margin: 0 auto;
  padding: 118px 0 72px;
}

.hero::before {
  position: absolute;
  top: 0;
  right: 0;
  z-index: -1;
  width: 48vw;
  height: min(82vh, 830px);
  border-bottom-left-radius: 42vw;
  background: var(--sky);
  content: "";
}

.hero-copy {
  align-self: center;
}

.hero-deck {
  max-width: 540px;
  margin-top: 30px;
  color: #30343c;
  font-size: clamp(1.15rem, 1.65vw, 1.5rem);
  line-height: 1.28;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 36px;
}

.hero-actions > span {
  color: var(--slate);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}

.ritual {
  width: min(100%, 650px);
  justify-self: end;
}

.ritual-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}

.ritual-stage::before {
  position: absolute;
  inset: -15%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  filter: blur(20px);
  content: "";
}

.ritual-grid,
.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.ritual-grid {
  width: 100%;
  height: 100%;
  gap: clamp(5px, 0.55vw, 9px);
  padding: clamp(10px, 1.1vw, 17px);
  background: var(--paper);
  box-shadow: 0 34px 80px rgba(43, 52, 67, 0.17), 0 3px 12px rgba(43, 52, 67, 0.08);
  transform: rotate(1.25deg);
}

.ritual-photo {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
  opacity: 1;
  transform: translate3d(0, 0, 0) rotate(0);
  transition: transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 360ms ease;
  will-change: transform;
}

.has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(1) {
  transform: translate3d(-19%, 14%, 0) rotate(-8deg);
}

.has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(2) {
  transform: translate3d(2%, -13%, 0) rotate(4deg);
}

.has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(3) {
  transform: translate3d(17%, 9%, 0) rotate(8deg);
}

.has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(4) {
  transform: translate3d(-14%, 0, 0) rotate(5deg);
}

.has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(5) {
  transform: translate3d(1%, 4%, 0) rotate(-3deg);
}

.has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(6) {
  transform: translate3d(15%, -5%, 0) rotate(-6deg);
}

.has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(7) {
  transform: translate3d(-16%, -9%, 0) rotate(7deg);
}

.has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(8) {
  transform: translate3d(-2%, 13%, 0) rotate(-5deg);
}

.has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(9) {
  transform: translate3d(18%, -10%, 0) rotate(5deg);
}

.ritual figcaption,
.mini-nine figcaption,
.memory-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.03em;
}

.ritual figcaption {
  padding: 18px 2px 0;
}

.ritual figcaption > span {
  font-weight: 500;
  text-transform: uppercase;
}

.ritual-replay {
  display: none;
  min-height: 44px;
  padding: 8px 0 8px 18px;
  border: 0;
  background: transparent;
  color: var(--slate);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.66rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.has-js .ritual-replay {
  display: inline-block;
}

.photo-story {
  position: relative;
  display: grid;
  min-height: 900px;
  grid-template-columns: minmax(260px, 0.8fr) minmax(380px, 0.78fr) minmax(180px, 0.42fr);
  align-items: center;
  gap: clamp(40px, 6vw, 108px);
  padding: 110px max(24px, calc((100vw - 1440px) / 2));
  background: var(--paper);
}

.photo-story-copy {
  align-self: center;
}

.photo-story-copy .index,
.friends-copy .index {
  margin-bottom: 24px;
  color: var(--signal);
}

.photo-story-copy h2 {
  max-width: 670px;
}

.photo-story-copy > p:last-child,
.friends-copy > p:last-child {
  max-width: 510px;
  margin-top: 30px;
  color: var(--slate);
  font-size: 1.1rem;
}

.memory-card {
  justify-self: center;
  width: min(100%, 480px);
  padding: 13px 13px 16px;
  background: var(--gallery);
  box-shadow: 0 24px 70px rgba(16, 18, 22, 0.13);
  transform: rotate(2.3deg);
}

.memory-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.memory-card figcaption {
  align-items: flex-start;
  padding-top: 12px;
}

.memory-card figcaption span:last-child {
  max-width: 145px;
  color: var(--slate);
  text-align: right;
}

.selection-note {
  align-self: end;
  margin-bottom: 80px;
  padding-left: 20px;
  border-left: 1px solid var(--ink);
}

.selection-note > span {
  display: block;
  color: var(--signal);
  font-size: clamp(4.5rem, 8vw, 8.8rem);
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 0.8;
}

.selection-note p {
  max-width: 120px;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.friends {
  min-height: 960px;
  padding: 116px max(24px, calc((100vw - 1440px) / 2));
  color: white;
  background: var(--night);
}

.friends-copy {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 24px 9vw;
  align-items: end;
}

.friends-copy .index {
  grid-column: 1 / -1;
}

.friends-copy > p:last-child {
  align-self: end;
  margin: 0 0 6px;
  color: #afb6c0;
}

.nine-pair {
  display: grid;
  grid-template-columns: minmax(300px, 560px) minmax(300px, 560px);
  justify-content: space-between;
  gap: clamp(42px, 7vw, 110px);
  max-width: 1240px;
  margin: 88px auto 0;
}

.mini-nine {
  padding: clamp(8px, 1vw, 14px);
  color: var(--ink);
  background: var(--gallery);
}

.mini-nine-yours {
  transform: rotate(-2deg);
}

.mini-nine-theirs {
  margin-top: 54px;
  transform: rotate(2.5deg);
}

.mini-grid {
  gap: 5px;
}

.mini-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.mini-nine figcaption {
  padding: 14px 2px 1px;
}

.mini-nine figcaption span:last-child {
  color: var(--slate);
  text-align: right;
}

.final-call {
  display: flex;
  min-height: 720px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px;
  text-align: center;
  background: var(--signal);
}

.final-call h2 {
  font-size: clamp(5rem, 12vw, 12rem);
}

.final-call > p:not(.eyebrow) {
  margin-top: 28px;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}

.final-call .button {
  margin-top: 34px;
}

.button-light {
  border-color: white;
  color: var(--ink);
  background: white;
}

.button-light:hover {
  border-color: var(--ink);
  color: white;
  background: var(--ink);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 150px;
  padding: 36px max(24px, calc((100vw - 1440px) / 2));
  color: white;
  background: var(--night);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.site-footer p {
  color: #afb6c0;
}

.site-footer > a:last-child {
  justify-self: end;
  text-underline-offset: 4px;
}

.wordmark-footer {
  color: white;
}

@media (max-width: 980px) {
  :root {
    --shell: min(100% - 40px, 760px);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 70px;
    padding-top: 150px;
    padding-bottom: 100px;
  }

  .hero::before {
    width: 74vw;
    height: 62vh;
  }

  .ritual {
    width: min(82vw, 650px);
    justify-self: center;
  }

  .photo-story {
    min-height: auto;
    grid-template-columns: minmax(240px, 0.8fr) minmax(340px, 1fr);
    gap: 64px;
    padding: 100px max(24px, calc((100vw - 760px) / 2));
  }

  .selection-note {
    grid-column: 1 / -1;
    margin: 0;
  }

  .friends {
    min-height: auto;
    padding-right: max(24px, calc((100vw - 760px) / 2));
    padding-left: max(24px, calc((100vw - 760px) / 2));
  }

  .friends-copy {
    grid-template-columns: 1fr;
  }

  .friends-copy .index {
    grid-column: auto;
  }

  .nine-pair {
    gap: 34px;
    margin-top: 70px;
  }
}

@media (max-width: 680px) {
  :root {
    --shell: calc(100% - 32px);
  }

  body {
    font-size: 16px;
  }

  h1 {
    font-size: clamp(3.65rem, 16.4vw, 5rem);
  }

  h2 {
    font-size: clamp(3.15rem, 14.5vw, 4.5rem);
  }

  .site-header {
    padding: 16px;
  }

  .site-header.is-scrolled {
    padding: 9px 16px;
  }

  .hero {
    min-height: auto;
    gap: 62px;
    padding: 124px 0 80px;
  }

  .hero::before {
    top: 42vh;
    width: 100vw;
    height: 64vh;
    border-bottom-left-radius: 55vw;
  }

  .hero-deck {
    max-width: 360px;
    margin-top: 22px;
    font-size: 1.12rem;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
  }

  .ritual {
    width: min(92vw, 520px);
  }

  .ritual-grid {
    gap: 4px;
    padding: 8px;
  }

  .has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(1),
  .has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(4),
  .has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(7) {
    transform: translate3d(-10%, 4%, 0) rotate(-5deg);
  }

  .has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(3),
  .has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(6),
  .has-js .ritual[data-ritual="loose"] .ritual-photo:nth-child(9) {
    transform: translate3d(10%, -3%, 0) rotate(5deg);
  }

  .photo-story {
    grid-template-columns: 1fr;
    gap: 55px;
    padding: 86px 16px;
  }

  .photo-story-copy,
  .selection-note {
    width: 100%;
  }

  .memory-card {
    width: min(86vw, 430px);
  }

  .selection-note {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding: 0 0 0 16px;
  }

  .selection-note p {
    margin: 0 0 4px;
  }

  .friends {
    padding: 86px 16px 104px;
  }

  .friends-copy > p:last-child {
    margin-top: 0;
  }

  .nine-pair {
    grid-template-columns: 1fr;
    gap: 38px;
    width: min(94%, 520px);
    margin-top: 60px;
  }

  .mini-nine-yours,
  .mini-nine-theirs {
    transform: none;
  }

  .mini-nine-theirs {
    margin-top: 0;
  }

  .final-call {
    min-height: 620px;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
  }

  .site-footer p {
    display: none;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .site-header {
    padding: 10px 18px;
  }

  .hero {
    min-height: 100svh;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.75fr);
    gap: 40px;
    width: calc(100% - 48px);
    padding: 74px 0 28px;
  }

  .hero::before {
    top: 0;
    width: 45vw;
    height: 100vh;
  }

  .hero h1 {
    font-size: clamp(3rem, 7.3vw, 4.4rem);
  }

  .hero-deck {
    margin-top: 14px;
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: row;
    align-items: center;
    margin-top: 18px;
  }

  .ritual {
    width: min(44vw, calc(100vh - 98px));
    justify-self: end;
  }

  .ritual figcaption {
    padding-top: 8px;
  }
}

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

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

  .ritual-replay {
    display: none;
  }
}
