/* until.danfry.dev: the app's sky, lights and type. Tokens mirror Shared/DesignSystem.swift. */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/Fraunces.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #1F1C24;
  --ink-secondary: #57525F;
  --hairline: rgba(31, 28, 36, 0.12);
  --accent: #963549;
  --you: #FF8A6B;
  --them: #8C9BFF;
  --sky-top: #D6E2F5;
  --sky-bottom: #F3EEEA;
  --space-inline: 8px;
  --space-group: 16px;
  --space-section: 40px;
  --margin: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F3F0F5;
    --ink-secondary: #A39EAA;
    --hairline: rgba(243, 240, 245, 0.12);
    --accent: #F2A0AE;
    --you: #FF8F70;
    --them: #8FA0FF;
    --sky-top: #0D1030;
    --sky-bottom: #241A3A;
  }
}

* { box-sizing: border-box; margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
  /* The sky runs the full length of the page, however long. */
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
  background-color: var(--sky-bottom);
}

body {
  color: var(--ink);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-section) var(--margin) 64px;
}

/* The two lights: soft colour with a white heart, as in the app. */
.lights {
  position: relative;
  height: 180px;
  margin-bottom: var(--space-group);
}
.light {
  position: absolute;
  top: 50%;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
/* A small white heart in a wide, soft bloom of colour. */
.light.you {
  left: 28%;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, color-mix(in srgb, var(--you) 55%, #fff) 9%, color-mix(in srgb, var(--you) 85%, transparent) 20%, color-mix(in srgb, var(--you) 35%, transparent) 40%, color-mix(in srgb, var(--you) 10%, transparent) 58%, transparent 70%);
  animation: drift 7s ease-in-out infinite;
}
.light.them {
  left: 72%;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, color-mix(in srgb, var(--them) 55%, #fff) 9%, color-mix(in srgb, var(--them) 85%, transparent) 20%, color-mix(in srgb, var(--them) 35%, transparent) 40%, color-mix(in srgb, var(--them) 10%, transparent) 58%, transparent 70%);
  animation: drift 7s ease-in-out -3.5s infinite;
}
@keyframes drift {
  0%, 100% { margin-top: -6px; }
  50% { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .light { animation: none; }
}

.wordmark {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 380;
  font-size: 72px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.wordmark span { color: var(--accent); }

h1, h2 {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 420;
  letter-spacing: -0.005em;
}
h1 { font-size: 34px; line-height: 1.15; }
h2 { font-size: 22px; font-weight: 460; line-height: 1.25; }

.lede { color: var(--ink-secondary); margin-top: var(--space-inline); }

/* Ruled typographic lists, like Someday in the app. */
.ruled { margin-top: var(--space-section); border-top: 1px solid var(--hairline); }
.ruled > div { padding: var(--space-group) 0; border-bottom: 1px solid var(--hairline); }
.ruled h2 { font-size: 18px; font-weight: 500; }
.ruled p { color: var(--ink-secondary); margin-top: 4px; }
.ruled p + p { margin-top: var(--space-inline); }

a { color: var(--ink); text-decoration-color: var(--hairline); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

nav {
  display: flex;
  gap: var(--space-group);
  margin-top: var(--space-section);
  font-size: 15px;
  font-weight: 600;
}
nav a { text-decoration: none; color: var(--ink-secondary); }
nav a[aria-current] { color: var(--ink); }

footer {
  margin-top: var(--space-section);
  font-size: 13px;
  color: var(--ink-secondary);
}

@media (max-width: 480px) {
  .wordmark { font-size: 60px; }
  h1 { font-size: 30px; }
}
