:root {
  --bg: #F3F6F5;
  --surface: #FFFFFF;
  --ink: #16201E;
  --muted: #56635F;
  --accent: #00866A;
  --ring: #FFC145;
  --line: #D3DDDA;

  --title: "Google Sans Flex", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
  --step-3: clamp(2.2rem, 1rem + 4vw, 3.5rem);

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

:root[data-theme="dark"] {
  --bg: #111716;
  --surface: #1A2321;
  --ink: #E5ECEA;
  --muted: #9AA9A4;
  --accent: #3FD1A8;
  --ring: #FFC145;
  --line: #2A3633;
  color-scheme: dark;
}

/* Fallback when scripts are disabled. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #111716;
    --surface: #1A2321;
    --ink: #E5ECEA;
    --muted: #9AA9A4;
    --accent: #3FD1A8;
    --ring: #FFC145;
    --line: #2A3633;
    color-scheme: dark;
  }
}

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

html { scroll-padding-top: env(safe-area-inset-top, 0px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
}

a { color: inherit; }

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

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

/* Top bar */

.topbar {
  padding-block: 1.25rem;
}

.home-link {
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.home-link:hover { color: var(--accent); }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-block: clamp(1.5rem, 6vh, 4rem) clamp(3rem, 8vh, 5rem);
}

.app-icon {
  display: block;
  width: 5rem;
  height: 5rem;
  border-radius: 22%;
  box-shadow: 0 0 0 1px var(--line);
}

.app-name {
  margin: 1.5rem 0 0;
  font-family: var(--title);
  font-size: var(--step-3);
  font-variation-settings: "opsz" 144, "ROND" 100;
  line-height: 1;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.6rem 0 0;
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.25;
  color: var(--muted);
}

.intro {
  max-width: 32rem;
  margin: 1.5rem 0 2rem;
  font-size: var(--step-1);
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

/* The badge image has Google's required padding built in. */
.play-badge {
  display: block;
  margin-left: -0.6rem;
}

.play-badge img {
  display: block;
  width: 13rem;
  height: auto;
}

.text-link {
  font-weight: 600;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.text-link:hover { color: var(--accent); }

/* Screenshot with the ring from the app icon behind it */

.showcase {
  position: relative;
  display: grid;
  place-items: center;
  width: 24rem;
  margin: 0;
}

.ring {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 24rem;
  height: 24rem;
  translate: -50% -50%;
}

.ring circle {
  fill: none;
  stroke: var(--ring);
  stroke-width: 22;
  stroke-linecap: round;
  stroke-dasharray: 410 92.65;
}

.screenshot {
  position: relative;
  display: block;
  width: 16rem;
  max-width: 100%;
  height: auto;
}

/* Sections */

section {
  padding-block: clamp(2.5rem, 6vh, 4rem);
  border-top: 1px solid var(--line);
}

h2 {
  margin: 0 0 1.5rem;
  font-family: var(--title);
  font-size: var(--step-2);
  font-weight: 700;
  font-variation-settings: "opsz" 48;
  line-height: 1.2;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 2rem 3rem;
  margin: 0;
}

.features dt {
  font-size: var(--step-1);
  font-weight: 600;
}

.features dd {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.privacy p {
  max-width: 36rem;
  margin: 0 0 1.25rem;
}

.privacy ul {
  max-width: 36rem;
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
}

.privacy li { margin-bottom: 0.4rem; }

.privacy li::marker { color: var(--accent); }

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .showcase { justify-self: center; width: min(100%, 20rem); }
  .ring { width: min(100vw - 2.5rem, 20rem); height: min(100vw - 2.5rem, 20rem); }
  .screenshot { width: 13rem; }
}
