@font-face {
  font-family: "Literata";
  src: url("fonts/literata-latin-standard-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Literata";
  src: url("fonts/literata-latin-standard-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

/* Colors sampled from the app icon. The page gets darker toward the bottom. */
:root {
  --sunlit: #0087b6;
  --surface: #00497f;
  --current: #003e76;
  --deep: #002055;
  --abyss: #00112e;
  --page: #feebcb;
  --page-dim: rgb(254 235 203 / 0.76);
  --apricot: #ffbf84;
  --teal: #68d5da;

  --serif: "Literata", Georgia, serif;
  --ui: system-ui, -apple-system, "Segoe UI", sans-serif;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--page);
  background: linear-gradient(
    180deg,
    var(--current) 0,
    var(--current) 60rem,
    #002d65 72rem,
    var(--deep) 96rem,
    var(--abyss) 100%
  );
}

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

a {
  color: var(--teal);
  text-underline-offset: 0.18em;
}

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

p {
  margin: 0;
}

/* Hero: the icon's jellyfish, freed from its tile, drifting in the page's water. */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem 5rem;
  text-align: center;
  overflow: hidden;
  /* Matches the icon's water around the jellyfish so the image edge disappears. */
  background: linear-gradient(180deg, var(--surface), #003c75 40%, var(--current));
}

/* Sunlight from the upper left, continuing the glow in the icon. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 70% 55% at 0% 0%, rgb(0 135 182 / 0.7), transparent 70%);
}

/* Rays fall in front of the jellyfish, as they would through water. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    conic-gradient(
      from 118deg at 4% -6%,
      transparent 0deg,
      rgb(104 213 218 / 0.11) 5deg,
      transparent 11deg,
      transparent 17deg,
      rgb(104 213 218 / 0.08) 21deg,
      transparent 28deg,
      transparent 36deg,
      rgb(104 213 218 / 0.06) 39deg,
      transparent 45deg
    );
  mask-image: linear-gradient(180deg, black 40%, transparent 95%);
}

.jelly {
  width: min(92vw, 34rem);
  mask-image: radial-gradient(closest-side, black 60%, transparent 98%);
  animation: drift 9s ease-in-out infinite;
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

.hero h1 {
  margin: -3.5rem 0 0;
  font-size: clamp(3.5rem, 13vw, 6.5rem);
  font-style: italic;
  font-weight: 460;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 0 2.5rem rgb(255 191 132 / 0.35);
}

.lede {
  margin-top: 1rem;
  max-width: 28ch;
  text-wrap: balance;
  font-size: clamp(1.3125rem, 3.4vw, 1.5rem);
  line-height: 1.35;
}

/* Apple's badge, unmodified. Guidelines: at least 40px tall, clear space of a
   quarter of its height on every side, and no effects or animation. */
.store {
  margin-top: 2rem;
  /* Rounds the focus ring to match the badge's corners. */
  border-radius: 0.5rem;
}

.store img {
  height: 3rem;
  width: auto;
}

.needs {
  margin-top: 1rem;
  font-family: var(--ui);
  font-size: 0.875rem;
  color: var(--page-dim);
}

/* Reading column */
main {
  max-width: 36rem;
  margin: 0 auto;
  padding: 0 1rem;
}

main section + section {
  margin-top: 4.5rem;
}

h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--apricot);
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85em;
  white-space: nowrap;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 2.25rem;
  counter-increment: step;
}

.steps li + li {
  margin-top: 1rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.2rem;
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--apricot);
}

.features {
  margin: 0;
}

.features div + div {
  margin-top: 1rem;
}

.features dt {
  font-style: italic;
  font-weight: 600;
}

.features dd {
  margin: 0;
  color: var(--page-dim);
}

@media (min-width: 40rem) {
  .features div {
    display: grid;
    grid-template-columns: 8rem 1fr;
    column-gap: 1.25rem;
  }
}

.needs-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--page-dim);
}

.needs-list li + li {
  margin-top: 0.5rem;
}

.needs-list li::marker {
  color: var(--teal);
}

footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 36rem;
  margin: 6rem auto 0;
  padding: 2rem 1rem 3rem;
  font-family: var(--ui);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgb(254 235 203 / 0.6);
}

footer img {
  flex: none;
  border-radius: 22.37%;
}

@media (prefers-reduced-motion: reduce) {
  .jelly {
    animation: none;
  }
}
