/*
 * Flyrt site. Colours from src/ui/theme.ts (After Dark), Fraunces for the
 * wordmark and headings (self-hosted, SIL OFL, see fonts/OFL.txt), the
 * system font for body text. No external requests.
 */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Fraunces_600SemiBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Fraunces_600SemiBold_Italic.ttf') format('truetype');
}

:root {
  --ink: #151119;
  --surface: #231a29;
  --elevated: #322039;
  --border: #49374e;
  --rose: #e98aa4;
  --rose-pressed: #f3a1b7;
  --rose-dark: #3c2536;
  --text: #f4ebef;
  --muted: #c2b3c5;
  --subtle: #a493aa;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body:
    system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

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

html {
  background: var(--ink);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

main {
  flex: 1;
}

.wrap {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Type */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
  margin: 1.5rem 0 1rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.5rem;
  margin: 2.75rem 0 0.75rem;
  scroll-margin-top: 1rem;
}

h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.5rem;
  scroll-margin-top: 1rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin: 0 0 0.5rem;
}

li::marker {
  color: var(--subtle);
}

strong {
  font-weight: 650;
  color: var(--text);
}

.intro,
.lede {
  font-size: 1.15rem;
  color: var(--text);
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

a {
  color: var(--rose);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--rose-pressed);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--rose-pressed);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Placeholders the owner must fill before publishing. Deliberately loud. */

mark.placeholder {
  background: #4a3b0f;
  color: #ffe7a3;
  border: 1px dashed #f2c94c;
  border-radius: 4px;
  padding: 0 0.3em;
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Wordmark: Fraunces italic with the rose dot, as in the app's mark. */

.wordmark {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--text);
  white-space: nowrap;
}

.wordmark .dot {
  display: inline-block;
  width: 0.24em;
  height: 0.24em;
  margin-left: 0.06em;
  border-radius: 50%;
  background: var(--rose);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 1;
  padding: 0.6rem 1rem;
  background: var(--rose);
  color: var(--ink);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Header and footer */

.site-header {
  padding-top: 1.25rem;
}

.home-link {
  display: inline-block;
  padding: 0.4rem 0;
  font-size: 2rem;
  text-decoration: none;
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-footer li {
  margin: 0;
}

.site-footer a {
  display: inline-block;
  padding: 0.5rem 0;
}

.site-footer a[aria-current='page'] {
  color: var(--text);
  text-decoration: none;
}

.site-footer p {
  margin: 0;
}

/* Legal pages */

.toc {
  margin: 1.75rem 0 0;
  padding: 1rem 1.25rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.toc .toc-title {
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.toc ol {
  margin: 0 0 0.5rem;
}

.toc li {
  margin: 0 0 0.3rem;
}

/* The terms number their own headings. */
.toc ol.numbered {
  list-style: none;
  padding-left: 0;
}

/* Deletion and support pages */

.steps li {
  padding-left: 0.25rem;
  margin-bottom: 0.75rem;
}

.steps li::marker {
  color: var(--rose);
  font-weight: 600;
}

.callout {
  padding: 1rem 1.25rem;
  background: var(--rose-dark);
  border: 1px solid var(--border);
  border-radius: 14px;
}

/* Home page */

.home {
  background: radial-gradient(
      ellipse 90% 60% at 50% 28%,
      #432a40 0%,
      rgba(21, 17, 25, 0) 70%
    )
    var(--ink);
}

.home main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 4rem;
  padding-bottom: 2rem;
  text-align: center;
}

.home main p {
  color: var(--muted);
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.home .hero-title {
  font-size: clamp(5rem, 24vw, 8.5rem);
  margin: 0 0 1.5rem;
}

.home .lede {
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1.45;
  font-family: var(--display);
  text-wrap: balance;
}

.home .soon {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  text-wrap: balance;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
}

.home .site-footer {
  margin-top: 2rem;
  text-align: center;
}

.home .site-footer ul {
  justify-content: center;
}

@media (min-width: 48rem) {
  body {
    font-size: 1.125rem;
  }

  .site-header {
    padding-top: 2rem;
  }

  h1 {
    margin-top: 2.25rem;
  }
}

/* Motion only for people who haven't asked for less. */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  a {
    transition: color 120ms ease;
  }

  .home .hero-title .dot {
    /* A wink, like the app's opening animation. At rest the dot is always
       drawn, so a paused or skipped animation never hides it. */
    animation: wink 500ms ease-in-out 600ms;
  }
}

@keyframes wink {
  0%,
  100% {
    transform: scaleY(1);
  }
  45% {
    transform: scaleY(0.15);
  }
}
