/* Muna waitlist site. One stylesheet, two self-hosted fonts, no outside requests. */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fonts/newsreader-latin-wght-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2');
}

:root {
  --mist: #e6ebf2; /* browser chrome behind the tabs */
  --page: #fbfcfd; /* the "window" the content sits in */
  --ink: #111c36;
  --soft: #4d5873; /* secondary text, 6.9:1 on --page */
  --line: #cfd7e3;
  --action: #2b48d4;
  --action-dark: #1f36a8;
  --mark: #ffe35a; /* only where the product highlights a search match */

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --wide: 70rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.4rem + 5vw, 4.5rem);
  line-height: 1.03;
}

h2 {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem);
  line-height: 1.1;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 650;
  line-height: 1.3;
}

a {
  color: var(--action);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--action-dark);
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
}

.skip:focus {
  top: 0.75rem;
  color: #fff;
}

/* ---- Tab strip: the site navigation, drawn as the thing the product is about ---- */

.strip {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--mist);
  padding: 0.6rem max(var(--gutter), (100% - var(--wide)) / 2) 0;
}

.strip-inner {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.strip-inner::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
  padding: 0.55rem 1.05rem 0.6rem;
  border-radius: 11px 11px 0 0;
  color: var(--soft);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.tab:hover {
  background: rgb(255 255 255 / 0.55);
  color: var(--ink);
}

.tab-current,
.tab-current:hover {
  background: var(--page);
  color: var(--ink);
  font-weight: 700;
}

.tab-action {
  margin-left: auto;
  color: var(--action);
  font-weight: 650;
}

/* ---- The window ---- */

.missing {
  min-height: 60vh;
}

.window {
  background: var(--page);
}

.hero,
.band {
  /* The side padding grows on wide screens so the content keeps to one --wide column. */
  padding: clamp(3.5rem, 9vw, 7rem) max(var(--gutter), (100% - var(--wide)) / 2);
}

.band {
  border-top: 1px solid var(--line);
}

.band > h2 {
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.hero {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  padding-top: clamp(3rem, 8vw, 6rem);
}

.lede {
  max-width: 34rem;
  margin-top: 1.5rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
  color: var(--soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 2rem;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--action);
  color: #fff;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--action-dark);
  color: #fff;
}

.quiet-link {
  color: var(--ink);
  font-weight: 500;
}

/* ---- Hero: a drawing of the Muna popup ---- */

.popup {
  align-self: center;
  width: 100%;
  max-width: 31rem;
}

.popup-search,
.popup-results {
  background: #fff;
  border: 1px solid var(--line);
}

.popup-search {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1rem;
  border-radius: 14px 14px 0 0;
  color: var(--soft);
  box-shadow: 0 1.5rem 3rem -1.5rem rgb(17 28 54 / 0.35);
}

.popup-search svg {
  flex: none;
}

.popup-query {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.3;
}

.caret {
  flex: none;
  width: 2px;
  height: 1.25em;
  margin-left: -0.45rem;
  background: var(--action);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.popup-results {
  border-top: 0;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 1.5rem 3rem -1.5rem rgb(17 28 54 / 0.35);
}

.result {
  padding: 0.85rem 1rem 0.95rem;
}

.result + .result {
  border-top: 1px solid var(--line);
}

.result:first-child {
  background: #f3f6ff;
  box-shadow: inset 3px 0 0 var(--action);
}

.result-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.1rem 1rem;
}

.result-title {
  font-weight: 650;
  line-height: 1.35;
}

.when {
  font-size: 0.8125rem;
  color: var(--soft);
  white-space: nowrap;
}

.when-closed {
  color: var(--ink);
  font-weight: 600;
}

.result-snippet {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--soft);
}

mark {
  padding: 0.05em 0.15em;
  border-radius: 3px;
  background: var(--mark);
  color: var(--ink);
}

.popup figcaption,
.demo figcaption {
  margin-top: 0.9rem;
  font-size: 0.9375rem;
  color: var(--soft);
}

/* ---- Shared two-column layout: statement on the left, detail on the right ---- */

.split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.prose > * + * {
  margin-top: 1.25rem;
}

.prose {
  max-width: 36rem;
}

.fails > div {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.fails dt {
  display: inline;
  margin-right: 0.3em;
  font-weight: 650;
}

.fails dd {
  display: inline;
  color: var(--soft);
}

/* ---- Steps: a real sequence, so it is numbered ---- */

.steps {
  display: grid;
  gap: 2.25rem;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}

.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--serif);
  font-size: 3.25rem;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.steps h3 {
  margin-bottom: 0.4rem;
}

.steps p {
  color: var(--soft);
  max-width: 28rem;
}

kbd {
  display: inline-block;
  padding: 0.05em 0.45em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.875em;
  font-weight: 500;
  line-height: 1.5;
}

/* ---- Demo placeholder ---- */

.demo {
  max-width: 54rem;
}

.demo-frame {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 2px dashed #9aa6bd;
  border-radius: 14px;
  background: var(--mist);
  color: var(--soft);
  font-weight: 500;
  text-align: center;
}

/* ---- Privacy: the one dark band ---- */

.band-ink {
  border-top: 0;
  background: var(--ink);
  color: #e9edf5;
}

.band-ink + .band {
  border-top: 0;
}

.promise {
  font-size: clamp(2.2rem, 1.3rem + 3.6vw, 3.75rem);
  line-height: 1.05;
  color: #fff;
}

.band-ink a {
  color: var(--mark);
}

.band-ink :focus-visible {
  outline-color: var(--mark);
}

.facts li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.6rem;
  border-top: 1px solid rgb(255 255 255 / 0.16);
}

.facts li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 1.25rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--mark);
}

/* ---- Pricing: two plans side by side, the paid one carries the detail ---- */

.plans {
  display: grid;
  gap: 2.5rem;
}

.plan {
  padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
}

.plan > * + * {
  margin-top: 0.75rem;
}

.plan p {
  max-width: 30rem;
}

.price {
  color: var(--soft);
  font-size: 1.125rem;
}

.amount {
  font-family: var(--serif);
  font-size: 2.75rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}

.plan ul li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.6rem;
  border-top: 1px solid var(--line);
}

.plan ul li::before {
  content: '+';
  position: absolute;
  left: 0.2rem;
  color: var(--action);
  font-weight: 700;
}

/* ---- Waitlist ---- */

.waitlist {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.waitlist > * + * {
  margin-top: 1.25rem;
}

.waitlist-form > * + * {
  margin-top: 0.9rem;
}

.waitlist-frame {
  display: block;
  width: 100%;
  height: 26rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.status:empty {
  display: none;
}

.status {
  font-weight: 500;
}

.fine {
  font-size: 0.9375rem;
  color: var(--soft);
}

[hidden] {
  display: none !important;
}

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

.foot {
  padding: 2rem max(var(--gutter), (100% - var(--wide)) / 2) 3rem;
  font-size: 0.9375rem;
  color: var(--soft);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.foot-inner > p:first-child {
  max-width: 38rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

/* ---- Privacy policy page (generated from PRIVACY.md) ---- */

.policy {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) clamp(3rem, 8vw, 6rem);
}

.policy h1 {
  font-size: clamp(2.2rem, 1.5rem + 3vw, 3.25rem);
  margin-bottom: 1.5rem;
}

.policy h1 + p {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.3;
}

.policy h2 {
  font-size: clamp(1.5rem, 1.3rem + 1vw, 1.9rem);
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.policy p,
.policy ul,
.policy ol,
.policy .table-scroll {
  margin-top: 1rem;
}

.policy ul,
.policy ol {
  padding-left: 1.4rem;
}

.policy ul {
  list-style: disc;
}

.policy ol {
  list-style: decimal;
}

.policy li + li {
  margin-top: 0.45rem;
}

.policy code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--mist);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

.table-scroll {
  overflow-x: auto;
}

.policy table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.policy th,
.policy td {
  padding: 0.7rem 0.9rem 0.7rem 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.policy thead th {
  border-top: 0;
  border-bottom: 2px solid var(--ink);
}

.policy td:first-child {
  min-width: 11rem;
}

/* ---- Wider screens ---- */

@media (min-width: 44rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .plans {
    grid-template-columns: 2fr 3fr;
    gap: 3.5rem;
  }
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: center;
  }

  .popup {
    justify-self: end;
  }

  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 4rem;
    align-items: start;
  }
}

@media (max-width: 43.99rem) {
  /* On a phone the strip keeps the name and the one action; the page is short enough to scroll. */
  .tab:not(.tab-current):not(.tab-action) {
    display: none;
  }
}

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

  .caret {
    animation: none;
  }
}
