/*
 * Colours are the app's standard palette, Oat and Oxford (docs/handoff.md,
 * section 6.2). On the landing page the background and text colour come from
 * the sky script; the values here are the Zohr sky, shown if it cannot run.
 */
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/Fraunces_400Regular.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Cardo';
  src: url('/fonts/Cardo_400Regular.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter_400Regular.woff2') format('woff2');
  font-display: swap;
}

:root {
  --bg: #f7f2e9;
  --ink: #1a1e28;
  --muted: #62646f;
  --line: #dfddd8;
  --field: #efebe2;
  --on-field: #1a1e28;
  --title: 'Fraunces', Georgia, serif;
  --body: 'Cardo', Georgia, serif;
  --label: 'Inter', system-ui, sans-serif;
  --edge: max(24px, env(safe-area-inset-left));
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
}

h1,
h2 {
  font-family: var(--title);
  font-weight: 400;
  margin: 0;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 4px;
}

.links {
  display: flex;
  gap: 4px;
  font-family: var(--label);
  font-size: 13px;
}

.links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  text-decoration: none;
  opacity: 0.72;
}

.links a:first-child {
  margin-left: -10px;
}

.links a:hover {
  opacity: 1;
}

/* The landing page: one screen, the sky behind everything. */

.home {
  background: var(--field);
  color: var(--on-field);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--edge) max(12px, env(safe-area-inset-bottom));
  overflow: hidden;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.home main,
.home .links {
  position: relative;
}

.home main {
  padding-bottom: clamp(20px, 5vh, 48px);
}

.home h1 {
  font-size: clamp(52px, 15vw, 68px);
  line-height: 1;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 14px 0 0;
  max-width: 19em;
  font-size: 20px;
  line-height: 1.35;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 136px;
  min-height: 52px;
  padding: 6px 16px;
  border: 1px solid currentColor;
  border-radius: 12px;
  font-family: var(--label);
  text-decoration: none;
  line-height: 1.3;
}

.store-name {
  font-size: 12px;
  opacity: 0.72;
}

.store-state {
  font-size: 15px;
}

a.store:hover {
  background: var(--on-field);
  color: var(--field);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.badge img {
  display: block;
  height: 44px;
  width: auto;
}

@media (min-width: 760px) {
  .home {
    --edge: clamp(48px, 7vw, 112px);
    justify-content: center;
    padding-bottom: 0;
  }

  .home main {
    max-width: 30vw;
    min-width: 300px;
    padding-bottom: 0;
  }

  .home h1 {
    font-size: clamp(64px, 6.4vw, 104px);
  }

  .subtitle {
    font-size: clamp(20px, 1.7vw, 24px);
  }

  .home .links {
    position: absolute;
    left: var(--edge);
    bottom: 20px;
  }
}

/* Short screens, such as a phone on its side: let the page scroll rather than cut the words. */
@media (max-height: 520px) {
  .home {
    overflow: auto;
  }
}

/* Privacy, Terms and Support: plain text on Oat. */

.text {
  background: var(--bg);
  color: var(--ink);
  padding: 0 var(--edge) 24px;
}

.text header,
.text main,
.text .links {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.text header {
  padding-top: max(20px, env(safe-area-inset-top));
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--title);
  font-size: 22px;
  text-decoration: none;
}

.text main {
  padding: 40px 0 56px;
  font-size: 19px;
  line-height: 1.55;
}

.text h1 {
  font-size: 44px;
  line-height: 1.1;
}

.text h2 {
  margin-top: 40px;
  font-size: 24px;
  line-height: 1.25;
}

.text p,
.text ul {
  margin: 14px 0 0;
}

.text ul {
  padding-left: 1.1em;
}

.text li + li {
  margin-top: 6px;
}

.text .dated {
  font-family: var(--label);
  font-size: 13px;
  color: var(--muted);
}

.text .links {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
