/*
 * The About page (about/, and its pt/ and es/ versions): what the word means, then what Zelo is. One quiet screen,
 * with the home page's colors and its corners (the wordmark and languages on top, the links at the bottom).
 */

:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --text: #0b0b0c;
  --text-2: #6e6e73;
  --rule: rgba(15, 23, 42, 0.1);
  --chip: rgba(255, 255, 255, 0.92);
  --card: #ffffff;
  --card-line: rgba(15, 23, 42, 0.06);
  --blue: #007aff;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --text: #f5f5f7;
  --text-2: #98989d;
  --rule: rgba(255, 255, 255, 0.12);
  --chip: rgba(44, 44, 46, 0.92);
  --card: #1c1c1e;
  --card-line: rgba(255, 255, 255, 0.07);
  --blue: #0a84ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 2.6vw, 32px);
  font-size: 13px;
  color: var(--text-2);
}
header {
  padding-top: max(16px, env(safe-area-inset-top));
}
footer {
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

.home img {
  display: block;
  width: 64px;
  height: auto;
}
/* The wordmark's dark drawing (lighter blues) on the dark theme. */
.home .dark,
:root[data-theme="dark"] .home .light {
  display: none;
}
:root[data-theme="dark"] .home .dark {
  display: block;
}

/* The languages, as the home page's segmented control, but links: each is its own page. */
.seg {
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--chip);
  outline: 1px solid var(--card-line);
}
.seg a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.seg a[aria-current="page"] {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(32px, 6vh, 72px) 16px;
}

/* A dictionary entry: the word, how it sounds and what it is, then its sense. */
.entry {
  padding-bottom: clamp(22px, 4vh, 36px);
  margin-bottom: clamp(22px, 4vh, 36px);
  border-bottom: 1px solid var(--rule);
}
.entry h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}
.entry .say {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--text-2);
}
.entry .say i {
  font-style: italic;
}
.entry .sense {
  margin: 16px 0 0;
  font-size: clamp(17px, 1.7vw, 19px);
  line-height: 1.45;
}

.story {
  margin: 0;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.55;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.links {
  display: flex;
  gap: clamp(14px, 2vw, 24px);
}
.links a:hover {
  color: var(--text);
}
footer b {
  font-weight: 600;
  color: var(--text);
}

main > *,
header,
footer {
  animation: rise 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
main > :nth-child(2) {
  animation-delay: 0.12s;
}
header,
footer {
  animation-name: fade;
  animation-delay: 0.3s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  footer {
    flex-direction: column-reverse;
    gap: 8px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  main > *,
  header,
  footer {
    animation: none;
  }
}
