/* merio.app: four pages with tabs, no scripts, fonts and images served from here. Colors follow the app (Classic). */

@font-face {
  font-family: 'Libre Caslon Text';
  src: url('/fonts/caslon-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/plex-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/fonts/plex-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --midnight: #0a1124;
  --platinum: #cdd2d9;
  --paper: #f4f5f7;
  --ink: #0a1124;
  --graphite: #5c616c;
  --rule: #e2e5ea;
  --serif: 'Libre Caslon Text', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a1124;
    --ink: #e4e7ec;
    --graphite: #9aa1ad;
    --rule: #1e2740;
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* The contour lines live in the dark band at the top of every page. */
.band {
  background: var(--midnight) url('/images/contours-midnight-wide.svg') center / cover no-repeat;
  color: var(--platinum);
}
@media (max-width: 700px) {
  .band {
    background-image: url('/images/contours-midnight-story.svg');
  }
}

/* Tabs: plain links, the current page underlined. */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: 12px;
  font-size: 0.95rem;
}
@media (max-width: 600px) {
  .tabs {
    gap: 0 16px;
    font-size: 0.875rem;
  }
}
@media (max-width: 380px) {
  .tabs {
    gap: 0 12px;
    font-size: 0.8125rem;
  }
}
@media (prefers-color-scheme: dark) {
  .band {
    border-bottom: 1px solid var(--rule);
  }
}
.tabs a {
  flex: none;
  padding: 8px 0;
  color: #aeb5c0;
  text-decoration: none;
}
.tabs a:hover,
.tabs a[aria-current='page'] {
  color: #fff;
}
.tabs a[aria-current='page'] {
  text-decoration: underline;
  text-underline-offset: 8px;
}
.tabs a:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 4px;
}

.hero-inner {
  min-height: min(84vh, 700px);
  padding-top: 48px;
  padding-bottom: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dial {
  display: block;
  width: 56px;
  height: 56px;
  margin-bottom: 32px;
}

.name {
  font-size: clamp(3.5rem, 12vw, 6rem);
  line-height: 1;
  color: #fff;
}

.tagline {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  line-height: 1.35;
}

.lede {
  max-width: 30em;
  margin-top: 24px;
  color: #aeb5c0;
}

.soon {
  margin-top: 40px;
  font-size: 0.95rem;
  color: #aeb5c0;
}

/* The other pages: a shorter band with the page's name. */
.band-inner {
  padding-top: 56px;
  padding-bottom: 56px;
}
.band-inner h1 {
  font-size: clamp(2.25rem, 8vw, 3.25rem);
  line-height: 1.1;
  color: #fff;
}
.band-inner .lede {
  margin-top: 12px;
}

/* Home: a way into each page. */
.overview {
  display: grid;
  gap: 8px;
  padding-top: 56px;
  padding-bottom: 72px;
}
.next {
  display: block;
  padding: 16px 0;
  text-decoration: none;
}
.next h2 {
  font-size: 1.5rem;
  line-height: 1.3;
}
.next h2::after {
  content: ' \2192';
  color: var(--graphite);
}
.next:hover h2 {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.next p {
  max-width: 34em;
  margin-top: 6px;
  color: var(--graphite);
}

/* What it tracks, How it works: a heading per group, then label and line. */
.group {
  padding-top: 48px;
}
.group + .group {
  margin-top: 8px;
  border-top: 1px solid var(--rule);
}
.group:last-child {
  padding-bottom: 72px;
}
.group h2,
.prose h2 {
  font-size: 1.5rem;
  line-height: 1.3;
}
.intro {
  max-width: 36em;
  margin-top: 10px;
}
.list {
  margin: 16px 0 0;
}
.list div {
  display: grid;
  grid-template-columns: minmax(0, 13em) minmax(0, 1fr);
  gap: 4px 24px;
  padding: 10px 0;
}
.list dt {
  font-weight: 500;
}
.list dd {
  margin: 0;
  color: var(--graphite);
}
@media (max-width: 560px) {
  .list div {
    grid-template-columns: 1fr;
  }
}

/* How it works: four numbered steps. */
.steps {
  margin: 0;
  padding: 48px 0 72px;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  padding: 14px 0;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--graphite);
}
.steps h2 {
  font-size: 1.5rem;
  line-height: 1.3;
}
.steps p {
  margin-top: 6px;
  color: var(--graphite);
}

/* FAQ: each answer opens under its question. */
.faq {
  padding-top: 32px;
  padding-bottom: 72px;
}
.qa summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker {
  display: none;
}
.qa summary::after {
  content: '+';
  flex: none;
  font-family: var(--sans);
  color: var(--graphite);
}
.qa[open] summary::after {
  content: '\2212';
}
.qa summary:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}
.qa p {
  max-width: 34em;
  padding-bottom: 16px;
  color: var(--graphite);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  color: var(--graphite);
  font-size: 0.95rem;
}
.footer p:first-child {
  font-family: var(--serif);
  color: var(--ink);
}
