/* opustype.app
   Same materials as the app: a cool slate desk, white paper, ink lettering,
   and the teal underscore cursor as the one accent. */

@font-face { font-family: 'Roboto'; font-weight: 300; font-style: normal; font-display: swap; src: url('fonts/roboto-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/roboto-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-weight: 400; font-style: italic; font-display: swap; src: url('fonts/roboto-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/roboto-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/roboto-latin-700-normal.woff2') format('woff2'); }

:root {
  --desk: #e4e8ed;
  --paper: #ffffff;
  --ink: #171715;
  --graphite: #5e6875;
  --rule: #d3d9e1;
  --teal: #087388;
  --link: #087388;
  --shadow: 0 1px 2px rgba(23, 23, 21, 0.06), 0 18px 48px rgba(23, 23, 21, 0.1);
  --font: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --wordmark: url('img/wordmark-letters-light.png');
  --wordmark-small: url('img/wordmark-light.png');
  --screenshot: url('img/screenshot-light.webp');
  color-scheme: light;
}

:root[data-theme='dark'] {
  --desk: #15191e;
  --paper: #1e242b;
  --ink: #e8ebee;
  --graphite: #9aa4b1;
  --rule: #303843;
  --link: #5cc0d3;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 48px rgba(0, 0, 0, 0.35);
  --wordmark: url('img/wordmark-letters-dark.png');
  --wordmark-small: url('img/wordmark-dark.png');
  --screenshot: url('img/screenshot-dark.webp');
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(8, 115, 136, 0.22); }

.wrap { width: min(1080px, 100% - 48px); margin: 0 auto; }

/* Top bar ------------------------------------------------------------------ */

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
}

.icon-link, .theme-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--graphite);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-link:hover, .theme-toggle:hover { background: var(--rule); color: var(--ink); }
.icon-link svg, .theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
:root[data-theme='dark'] .theme-toggle .sun { display: none; }
:root[data-theme='dark'] .theme-toggle .moon { display: block; }

/* Hero --------------------------------------------------------------------- */

.hero { padding: 9vh 0 56px; }

.wordmark {
  position: relative;
  width: min(620px, 88vw);
  aspect-ratio: 4.549;
  margin: 0 0 40px;
}
.wordmark-letters {
  position: absolute;
  inset: 0;
  background: var(--wordmark) left center / contain no-repeat;
}
/* The logo's underscore, drawn separately so it can blink like a cursor. */
.wordmark-cursor {
  position: absolute;
  left: 91.19%;
  top: 65.88%;
  width: 8.28%;
  height: 11.87%;
  border-radius: 6.9% / 22%;
  background: var(--teal);
  animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wordmark-cursor { animation: none; } }

.tagline {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 400;
  line-height: 1.3;
  max-width: 30ch;
}
.lede {
  margin: 0 0 36px;
  color: var(--graphite);
  max-width: 56ch;
}

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  min-width: 220px;
}
.store svg { width: 26px; height: 26px; flex: 0 0 auto; }
.store-text { display: flex; flex-direction: column; line-height: 1.25; }
.store-name { font-weight: 500; font-size: 16px; }
.store-status { font-size: 13px; color: var(--graphite); }
.store[aria-disabled='true'] { cursor: default; }
a.store:hover { border-color: var(--graphite); }

/* App view ----------------------------------------------------------------- */

.showcase {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0 88px;
}
.icon-card { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.icon-card img { width: 160px; height: 160px; filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.18)); }
.icon-card p { margin: 0; font-size: 14px; color: var(--graphite); }
.icon-card strong { display: block; color: var(--ink); font-size: 16px; font-weight: 500; }

.screenshot {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: var(--screenshot) center / cover no-repeat, var(--paper);
  box-shadow: var(--shadow);
  border: 1px solid var(--rule);
}

/* Features ----------------------------------------------------------------- */

.features { padding: 0 0 96px; }
.features h2 {
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 400;
  margin: 0 0 28px;
}
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 56px;
  border-top: 1px solid var(--rule);
}
.feature-list li { padding: 24px 0; border-bottom: 1px solid var(--rule); }
.feature-list h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 500;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
/* A small cursor mark before each feature, from the logo. */
.feature-list h3::before {
  content: '';
  flex: 0 0 auto;
  width: 14px;
  height: 4px;
  border-radius: 1px;
  background: var(--teal);
  transform: translateY(-3px);
}
.feature-list p { margin: 0 0 0 26px; color: var(--graphite); font-size: 16px; }

/* Footer ------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--rule);
  padding: 32px 0 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--graphite);
}
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-wordmark { width: 120px; aspect-ratio: 4.549; background: var(--wordmark-small) left center / contain no-repeat; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer nav a { color: var(--graphite); text-decoration: none; }
.footer nav a:hover { color: var(--ink); text-decoration: underline; }

/* Modals ------------------------------------------------------------------- */

dialog.policy {
  width: min(760px, 100% - 32px);
  max-height: min(84vh, 900px);
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}
dialog.policy::backdrop { background: rgba(21, 25, 30, 0.5); }
.policy-head {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 18px 32px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.policy-head h2 { margin: 0; font-size: 20px; font-weight: 500; }
.policy-body { padding: 8px 32px 32px; }

/* Policy text, shared by the modals and the standalone pages */
.legal { font-size: 16px; line-height: 1.65; max-width: 68ch; }
.legal h2 { font-size: 19px; font-weight: 500; margin: 32px 0 8px; }
.legal h3 { font-size: 16px; font-weight: 500; margin: 20px 0 4px; }
.legal p, .legal ul { margin: 0 0 12px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal .effective { color: var(--graphite); font-size: 14px; margin-top: 16px; }

/* Standalone policy pages */
.page { padding: 8px 0 80px; }
.page-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 40px 48px;
  box-shadow: var(--shadow);
}
.page-card > h1 { margin: 0; font-size: 30px; font-weight: 400; }
.back { display: inline-block; margin: 0 0 24px; }
.topbar.with-brand { justify-content: space-between; }
.topbar .footer-wordmark { width: 140px; }

/* Small screens ------------------------------------------------------------ */

@media (max-width: 760px) {
  .hero { padding-top: 4vh; }
  .showcase { grid-template-columns: 1fr; gap: 28px; }
  .icon-card { flex-direction: row; align-items: center; }
  .icon-card img { width: 88px; height: 88px; }
  .feature-list { grid-template-columns: 1fr; }
  .page-card { padding: 28px 22px; }
  .policy-body { padding: 4px 22px 24px; }
  .policy-head { padding-left: 22px; }
  .store { flex: 1 1 100%; }
}

/* In dark mode the icon's dark tile needs a faint edge to separate it from the page. */
:root[data-theme='dark'] .icon-card img { border-radius: 22%; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1); }
