/* opustables.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-f: url('img/wordmark-f-light.png');
  --wordmark-x: url('img/wordmark-x-light.png');
  --wordmark-small: url('img/wordmark-light.png');
  --screenshot: url('img/screenshot-light.webp');
  --screenshot-fx: url('img/screenshot-fx-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-f: url('img/wordmark-f-dark.png');
  --wordmark-x: url('img/wordmark-x-dark.png');
  --wordmark-small: url('img/wordmark-dark.png');
  --screenshot: url('img/screenshot-dark.webp');
  --screenshot-fx: url('img/screenshot-fx-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: 5.4659;
  margin: 0 0 40px;
}
.wordmark-letters {
  position: absolute;
  inset: 0;
  background: var(--wordmark) left center / contain no-repeat;
}
/* The teal fx types itself like the OpusType cursor blinks: f, then x,
   a hold, then backspace, on a 4.4 second loop (four cursor blinks). */
.wordmark-f, .wordmark-x { position: absolute; inset: 0; }
.wordmark-f { background: var(--wordmark-f) left center / contain no-repeat; animation: type-f 4.4s step-end infinite; }
.wordmark-x { background: var(--wordmark-x) left center / contain no-repeat; animation: type-x 4.4s step-end infinite; }
@keyframes type-f { 0% { opacity: 1; } 81.4% { opacity: 0; } 100% { opacity: 0; } }
@keyframes type-x { 0% { opacity: 0; } 6.4% { opacity: 1; } 75% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wordmark-f, .wordmark-x { 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.screenshot-fx { background-image: var(--screenshot-fx); }
.showcase-fx { padding-top: 0; }
.showcase-text h2 { margin: 0 0 10px; font-size: 22px; font-weight: 400; }
.showcase-text p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--graphite); }

.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; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
a.family { color: var(--graphite); }
a.family:hover { color: var(--ink); }
.footer-wordmark { width: 140px; aspect-ratio: 5.4659; 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; }

/* Beta callout and application form ------------------------------------------ */

.beta-callout {
  display: flex;
  align-items: center;
  gap: 14px 20px;
  max-width: 640px;
  margin: 4px 0 24px;
  padding: 12px 12px 12px 18px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--teal);
  border-radius: 10px;
  background: var(--paper);
}
.beta-callout p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--graphite); flex: 1; }
.beta-callout strong { color: var(--ink); font-weight: 500; }
.beta-btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.beta-btn:hover { filter: brightness(1.1); }
.beta-btn:disabled { opacity: 0.6; cursor: default; }
:root[data-theme='dark'] .beta-btn { background: #5cc0d3; color: #0f1523; }

dialog.beta-dialog { width: min(560px, 100% - 32px); }
.beta-form, .beta-done { padding: 20px 32px 28px; }
.beta-intro { margin: 0 0 18px; color: var(--graphite); font-size: 15px; line-height: 1.55; }
.beta-form .field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; padding: 0; border: 0; font-size: 14px; color: var(--graphite); }
.beta-form .field em { font-style: normal; opacity: 0.75; }
.beta-form legend { padding: 0; margin-bottom: 6px; }
.beta-form input[type=text], .beta-form input[type=email], .beta-form textarea {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--desk);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 10px 12px;
  resize: vertical;
}
.beta-form input:focus, .beta-form textarea:focus { outline: none; border-color: var(--teal); }
:root[data-theme='dark'] .beta-form input:focus, :root[data-theme='dark'] .beta-form textarea:focus { border-color: #5cc0d3; }
.choices { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 0; accent-color: var(--teal); }
.consent { margin: 2px 0 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.beta-error { min-height: 1.4em; margin: 6px 0 10px; color: #b3261e; font-size: 14px; }
:root[data-theme='dark'] .beta-error { color: #ff8a80; }
.beta-actions { display: flex; justify-content: flex-end; }
.beta-done-title { margin: 8px 0 8px; font-size: 20px; color: var(--ink); }
.beta-done p { color: var(--graphite); margin: 0 0 20px; }

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

@media (max-width: 760px) {
  .beta-callout { flex-direction: column; align-items: flex-start; }
  .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%; }
}
