/*
 * The website wears the extension's default world, the Aqua Plaza (DESIGN.md): a day sky over a
 * lagoon, navy ink, frosted glass for reading, gel and pearl capsules for pressing. Scrolling the
 * home page goes from the sky down into the water; the footer is the lagoon floor.
 * No script, no remote asset: fonts, scenery and pictures are copied next to this file by build.mjs.
 */

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url('/fonts/source-sans-3-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url('/fonts/source-sans-3-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: 'M PLUS Rounded 1c';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('/fonts/m-plus-rounded-1c-latin-700-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'M PLUS Rounded 1c';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url('/fonts/m-plus-rounded-1c-latin-800-normal.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --ink: #0b2e4a;
  --ink-soft: #1d4560;
  --sky-top: #1f9fe6;
  --sky-low: #cdeefd;
  --water-1: #8fdcf0;
  --water-2: #63c6e8;
  --water-3: #45b1de;
  --floor: #083a5e;
  --floor-ink: #e4f6ff;
  --floor-soft: #a9d6ec;
  --link: #01507e;
  --ring: #0b8ad0;
  --glass: rgba(255, 255, 255, 0.9);
  --glass-edge: rgba(255, 255, 255, 0.95);
  --hairline: rgba(16, 96, 148, 0.22);
  --panel-shadow: 0 1px 2px rgba(8, 60, 100, 0.12), 0 18px 40px -18px rgba(8, 60, 100, 0.45);
  --shot-shadow: 0 2px 4px rgba(8, 60, 100, 0.16), 0 30px 60px -24px rgba(4, 50, 90, 0.6);
  --gel-top: #b0efff;
  --gel-mid: #43c0f3;
  --gel-low: #1296da;
  --gel-rim: #0b6fae;
  --gel-ink: #032740;
  --pearl-top: #ffffff;
  --pearl-low: #d6ecf7;
  --pearl-rim: rgba(16, 96, 148, 0.3);
  --leaf: #13994a;
  --amber: #e9a20e;
  --sky-image: url('/ui/sky-day.svg');
  --water-image: url('/ui/water-day.svg');
  --rounded: 'M PLUS Rounded 1c', 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --read: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e4f6ff;
    --ink-soft: #b9dcee;
    --sky-top: #020f20;
    --sky-low: #062b44;
    --water-1: #07405c;
    --water-2: #06354f;
    --water-3: #052c44;
    --floor: #021426;
    --link: #a3e4ff;
    --ring: #79deff;
    --glass: rgba(6, 40, 62, 0.88);
    --glass-edge: rgba(120, 220, 255, 0.4);
    --hairline: rgba(130, 215, 255, 0.26);
    --panel-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    --shot-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 30px 60px -24px rgba(0, 0, 0, 0.8);
    --pearl-top: #1d5878;
    --pearl-low: #0e3f5c;
    --pearl-rim: rgba(130, 215, 255, 0.4);
    --leaf: #46e08a;
    --sky-image: url('/ui/sky-night.svg');
    --water-image: url('/ui/water-night.svg');
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 1.0625rem/1.6 var(--read);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: linear-gradient(
    180deg,
    var(--sky-top) 0,
    var(--sky-low) 30rem,
    var(--water-1) 44rem,
    var(--water-2) 100%
  );
  overflow-wrap: break-word;
  caret-color: var(--ring);
}

::selection {
  background: var(--gel-mid);
  color: var(--gel-ink);
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* The double ring of the extension: a gap, then aqua. */
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--rounded);
  font-weight: 800;
  line-height: 1.12;
  text-wrap: balance;
  margin: 0;
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ------------------------------------------------------------------ Scene */

.scene {
  position: absolute;
  inset: 0 0 auto;
  height: 46rem;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.scene::before,
.scene::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  background-repeat: no-repeat;
  background-size: cover;
}

.scene::before {
  top: 0;
  height: 32rem;
  background-image: var(--sky-image);
  background-position: right top;
}

.scene::after {
  content: none;
}

/* The lagoon is anchored at the bottom of the home page: caustic light, sun shafts, bubbles, and
   water that gets deeper towards the floor. Its file fades in from transparent at the top. */
.home-page main {
  position: relative;
}

.home-page main::before {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: min(100%, 110rem);
  z-index: -1;
  background: var(--water-image) center bottom / cover no-repeat;
  pointer-events: none;
}

.doc-page .scene {
  height: 22rem;
}

.doc-page .scene::before {
  height: 22rem;
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent);
  mask-image: linear-gradient(180deg, #000 40%, transparent);
}

.doc-page {
  background: linear-gradient(180deg, var(--sky-top) 0, var(--sky-low) 20rem, var(--water-1) 100%);
}

/* ------------------------------------------------------------------ Bar */

.wrap {
  width: min(100% - 2.5rem, 70rem);
  margin-inline: auto;
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font: 800 1.125rem/1.1 var(--rounded);
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  filter: drop-shadow(0 3px 6px rgba(4, 60, 100, 0.35));
}

.bar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Pearl capsule: everything you can press that is not the next decision. */
.pearl,
.gel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  font: 700 0.9375rem/1 var(--rounded);
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    filter 0.25s var(--ease);
}

.pearl {
  color: var(--ink);
  border: 1px solid var(--pearl-rim);
  background: linear-gradient(180deg, var(--pearl-top), var(--pearl-low));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 1px 1px rgba(8, 60, 100, 0.12),
    0 6px 12px -8px rgba(8, 60, 100, 0.45);
}

/* Gel capsule: the one next decision of a view. */
.gel {
  min-height: 3.25rem;
  padding: 0 1.75rem;
  font-size: 1.125rem;
  color: var(--gel-ink);
  border: 1px solid var(--gel-rim);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0, rgba(255, 255, 255, 0) 48%),
    linear-gradient(180deg, var(--gel-top), var(--gel-mid) 46%, var(--gel-low));
  box-shadow:
    inset 0 -6px 10px -6px rgba(255, 255, 255, 0.7),
    0 1px 1px rgba(4, 70, 120, 0.25),
    0 10px 20px -8px rgba(4, 86, 150, 0.6);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.pearl:hover,
.gel:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.pearl:active,
.gel:active {
  transform: translateY(1px);
  filter: brightness(0.97);
}

.pearl:focus-visible,
.gel:focus-visible {
  border-radius: 999px;
}

/* Presence orb: a person, or a state. */
.orb {
  --accent: #0b8ad0;
  flex: none;
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95) 0 14%, transparent 42%),
    radial-gradient(circle at 50% 110%, rgba(255, 255, 255, 0.5), transparent 60%), var(--accent);
  box-shadow:
    inset 0 -0.12em 0.2em rgba(0, 0, 0, 0.22),
    0 0.08em 0.2em rgba(4, 50, 90, 0.4);
}

/* ------------------------------------------------------------------ Home: hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 2rem 4rem;
  padding-block: 3rem 5rem;
}

.hero h1 {
  font-size: clamp(2.35rem, 1.2rem + 4.2vw, 4.25rem);
  letter-spacing: -0.015em;
}

.lede {
  max-width: 34rem;
  margin-top: 1.5rem;
  font-size: 1.25rem;
  line-height: 1.5;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-top: 2.25rem;
}

/* While the store reviews the extension there is nothing to press: a plaque says so. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  box-shadow: var(--panel-shadow);
  font: 700 1rem/1.25 var(--rounded);
}

.status .orb {
  --accent: var(--amber);
  font-size: 1.15rem;
}

.fine {
  font-size: 1rem;
  font-weight: 600;
}

.hero-shot {
  position: relative;
  justify-self: center;
  width: min(100%, 21.25rem);
}

.shot {
  border-radius: 12px;
  box-shadow: var(--shot-shadow);
}

/* The one authored moment: a voice is a ripple on water. */
.voice {
  position: absolute;
  inset-inline-start: -2.6rem;
  bottom: 4.5rem;
  width: 5rem;
  height: 5rem;
  display: grid;
  place-items: center;
}

.voice .orb {
  --accent: var(--leaf);
  font-size: 3.6rem;
}

.voice::before,
.voice::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--leaf);
  opacity: 0;
  animation: ripple 2.8s var(--ease) infinite;
}

.voice::after {
  animation-delay: 1.4s;
}

@keyframes ripple {
  0% {
    transform: scale(0.72);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .voice::before {
    animation: none;
    opacity: 0.6;
    transform: scale(1.2);
  }
  .voice::after {
    animation: none;
    opacity: 0.3;
    transform: scale(1.55);
  }
  .pearl,
  .gel {
    transition: none;
  }
}

/* ------------------------------------------------------------------ Lists */

.points {
  max-width: 36rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.points li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0.75rem;
}

.points li::before {
  content: '';
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  transform: translateY(0.02rem);
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95) 0 16%, transparent 44%), #0b8ad0;
  box-shadow: 0 1px 2px rgba(4, 50, 90, 0.4);
}

/* ------------------------------------------------------------------ Home: free and subscription */

.plans {
  padding-block: 3rem 6rem;
}

.plans h2 {
  font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.75rem);
  letter-spacing: -0.01em;
}

/* The deepest water is too dark for ink: prices are read on glass. */
.plans-panel {
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  border-radius: 24px;
  border-top: 1px solid var(--glass-edge);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: var(--panel-shadow);
}

.plan-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 4rem;
  margin-top: 2.75rem;
}

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

.plan h3 {
  font-size: 1.375rem;
}

.price {
  margin-top: 0.4rem;
  font: 800 2.25rem/1.1 var(--rounded);
}

.price small {
  font: 600 1rem/1 var(--read);
}

.plan .points {
  margin-top: 1.25rem;
}

.plan .after {
  margin-top: 1.25rem;
  font-size: 1rem;
}

/* ------------------------------------------------------------------ Documents */

.doc {
  padding-block: 1.5rem 5rem;
}

.doc article {
  max-width: 48rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 1rem + 3vw, 3.25rem);
  border-radius: 20px;
  border-top: 1px solid var(--glass-edge);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: var(--panel-shadow);
}

.doc h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  margin-bottom: 1.25rem;
}

.doc h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.doc h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  margin-top: 2rem;
}

.doc h2 + h3 {
  margin-top: 1.25rem;
}

.doc p,
.doc ul,
.doc ol,
.doc table,
.doc blockquote {
  margin-top: 1rem;
}

.doc ul,
.doc ol {
  padding-inline-start: 1.4rem;
}

.doc li + li {
  margin-top: 0.4rem;
}

.doc li::marker {
  color: var(--ring);
  font-weight: 700;
}

.doc table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.doc th,
.doc td {
  padding: 0.6rem 0.9rem 0.6rem 0;
  border-bottom: 1px solid var(--hairline);
  text-align: start;
  vertical-align: top;
  min-width: 9rem;
}

.doc th {
  font-family: var(--rounded);
  font-weight: 700;
  border-bottom: 2px solid var(--ink);
}

.doc blockquote {
  margin-inline: 0;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: rgba(31, 159, 230, 0.12);
}

.doc blockquote > :first-child {
  margin-top: 0;
}

.doc code {
  font-size: 0.9em;
  padding: 0.08em 0.35em;
  border-radius: 6px;
  background: rgba(31, 159, 230, 0.14);
}

.doc hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin-block: 2.5rem;
}

/* ------------------------------------------------------------------ Lagoon floor */

footer {
  margin-top: auto;
  padding-block: 3.5rem 3rem;
  border-radius: 50% 50% 0 0 / 28px 28px 0 0;
  background: var(--floor);
  color: var(--floor-ink);
  box-shadow: 0 -14px 30px -18px rgba(4, 50, 90, 0.6);
}

footer a {
  color: var(--floor-ink);
}

.floor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 2.5rem 4rem;
}

.floor h2 {
  font-size: 1.125rem;
  font-weight: 700;
}

.floor p {
  margin-top: 0.75rem;
  color: var(--floor-soft);
  font-size: 1rem;
}

.floor .pearl {
  margin-top: 1.25rem;
}

.floor ul {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 2.5rem;
  font-size: 1rem;
}

.floor li {
  break-inside: avoid;
  padding-block: 0.3rem;
}

/* ------------------------------------------------------------------ Narrow screens */

@media (max-width: 54rem) {
  .hero,
  .plan-list,
  .floor {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-block: 1.5rem 3.5rem;
  }

  .plans {
    padding-block: 3rem;
  }

  /* On a narrow screen the orb would sit on the participant list. */
  .voice {
    display: none;
  }
}

@media (max-width: 30rem) {
  .floor ul {
    columns: 1;
  }

  .brand span {
    font-size: 1rem;
  }
}
