/* Durpin teaser. Safelight palette from docs/product/03-design-system.md. */

@font-face {
  font-family: 'Space Mono';
  src: url('/fonts/SpaceMono_700Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --ground: #0C0A09;
  --raised: #171412;
  --paper: #F6F1EA;
  --paper2: #B4ABA1;
  --paper3: #8C8379;
  --safelight: #FF6A3D;
  --stamp: #FF9A4A;
  --darkroom: #6B1A0E;
  --darkroom-deep: #1A0B07;
  --print: #F4EDE3;
  --hairline: rgba(255, 238, 220, 0.10);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  /* Dim red light from the top, across the whole page width */
  background:
    radial-gradient(ellipse 70% 520px at 50% 0%, rgba(107, 26, 14, 0.45), transparent 100%) no-repeat,
    var(--ground);
  color: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main,
footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.stamp {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--stamp);
  text-shadow: 0 0 10px rgba(255, 120, 40, 0.55);
  margin: 0;
}

/* Hero */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--paper);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.mark {
  width: 30px;
  height: 30px;
  color: var(--safelight);
}

.hero {
  padding: 72px 0 56px;
  text-align: center;
}

h1 {
  font-size: clamp(28px, 9vw, 56px);
  overflow-wrap: break-word;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 16px auto 12px;
  max-width: 14ch;
}

.lede {
  font-size: clamp(17px, 2.4vw, 20px);
  color: var(--paper2);
  margin: 0 auto 48px;
  max-width: 32ch;
}

.status {
  color: var(--paper3);
  font-size: 15px;
  margin: 40px 0 0;
}

/* The print: rises out of the darkroom red and develops */

.print {
  width: min(300px, 78vw);
  margin: 0 auto;
  padding: 12px 12px 44px;
  background: var(--print);
  border-radius: 3px;
  transform: rotate(1.2deg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  animation: rise 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.photo {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    /* Sun low over the water, its glow, then the sky */
    radial-gradient(circle at 50% 52%, #FBE3A6 0 9%, rgba(251, 227, 166, 0) 9.5%),
    radial-gradient(ellipse 80% 36% at 50% 54%, rgba(255, 176, 110, 0.75), rgba(255, 176, 110, 0) 70%),
    /* Water below the horizon */
    linear-gradient(180deg, transparent 0 56%, #3B2F45 56%, #2A2538 74%, #1C1A28 100%),
    linear-gradient(180deg, #E8A06B 0%, #D9805E 28%, #B9625A 46%, #8E4E5A 56%);
}

/* The sun's path on the water */
.photo::after {
  content: '';
  position: absolute;
  left: 44%;
  right: 44%;
  top: 57%;
  bottom: 8%;
  background: repeating-linear-gradient(180deg, rgba(251, 214, 150, 0.55) 0 3px, transparent 3px 9px);
  filter: blur(0.6px);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent);
  mask-image: linear-gradient(180deg, #000, transparent);
}

/* Darkroom red over the photo, clearing slowly */
.photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--darkroom);
  animation: develop 4s 0.8s ease-in-out both;
}

/* The date stamp (03-design-system.md): bottom right, 3.6% of the
   width, inset 4%. It lands once the photo has developed. */
.photo {
  container-type: inline-size;
}

.date {
  position: absolute;
  right: 4cqw;
  bottom: 3.2cqw;
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: max(3.6cqw, 9px);
  line-height: 1.2;
  color: var(--stamp);
  text-shadow: 0 0 6px rgba(255, 120, 40, 0.65);
  transform-origin: right bottom;
  z-index: 2;
  animation: stamp 0.3s 4.6s ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(40px) rotate(1.2deg) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(1.2deg) scale(1);
  }
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: scale(1.1);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes develop {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* How it works */

section h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper3);
  margin: 0 0 20px;
}

.loop,
.promises,
.story {
  padding: 48px 0;
  border-top: 1px solid var(--hairline);
}

.loop ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px;
}

.step {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 13px;
  color: var(--stamp);
}

.loop h3 {
  font-size: 20px;
  margin: 6px 0 6px;
}

.loop p,
.promises li {
  color: var(--paper2);
  margin: 0;
}

.promises ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.promises strong {
  color: var(--paper);
  font-weight: 600;
}

/* Footer */

footer {
  padding: 40px 20px 56px;
  border-top: 1px solid var(--hairline);
  color: var(--paper3);
  font-size: 14px;
}

footer p {
  margin: 4px 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .print,
  .photo::before,
  .date {
    animation: none;
  }
  .photo::before {
    opacity: 0;
  }
}

/* Invite page */

.invite .code-label {
  margin: 8px 0 6px;
  color: var(--paper3);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.invite .code {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 40px;
  letter-spacing: 0.18em;
  color: var(--paper);
  margin: 0 0 32px;
}

.button {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 999px;
  background: var(--safelight);
  color: var(--ground);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
}

.invite .status {
  max-width: 34ch;
  margin: 32px auto 0;
}

.status a {
  color: var(--paper);
  text-underline-offset: 3px;
}

footer a {
  color: inherit;
  text-decoration: none;
}

footer .links a {
  color: var(--paper2);
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 3px;
}

footer .links a:hover,
footer .links a:focus-visible {
  color: var(--paper);
}

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

/* Why it's built this way */

.story > p {
  color: var(--paper2);
  margin: 0 0 28px;
  max-width: 60ch;
}

.story dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px 28px;
}

.story dt {
  font-weight: 600;
  margin: 0 0 4px;
}

.story dd {
  margin: 0;
  color: var(--paper2);
}

/* Privacy page */

.updated {
  color: var(--paper3);
  font-size: 14px;
  margin: 0;
}

/* Not found */

.lost .button {
  margin-top: 8px;
}
