/*
 * Paneglow's website, in the extension's own look (assets/tailwind.css): a
 * quiet frosted pane in dusk colors, and one bold thing, the home page's demo
 * new tab, whose wallpaper glows out around its window as the Settings
 * header's does. Window frames divide the rest: a four-pane window of
 * screenshots, and thin mullions between sections. Outfit, the extension's
 * own interface font, comes with the site.
 */
@font-face {
  font-family: 'Outfit';
  src: url('outfit.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --frost: #f6f5fa;
  --pane: #ffffff;
  --ink: #1f1c2f;
  /* 7:1 on the page and on panes. */
  --muted: #5a556e;
  --rule: #e2dfec;
  --link: #5134b8;
  --link-hover: #382873;
  --button: #5134b8;
  --button-hover: #432d92;
  /* The window frame, in the icon's evening sky. */
  --night: #221749;
  --night-ink: #cfc6f0;
  --glow: 0.85;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --frost: #15121f;
    --pane: #1f1c2f;
    --ink: #eeecf4;
    --muted: #aaa5bd;
    --rule: #2e2a40;
    --link: #b6a3ff;
    --link-hover: #d4c9ff;
    --button: #6142d6;
    --button-hover: #7655e6;
    --night: #0e0b19;
    --glow: 1;
  }
}

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

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

body {
  margin: 0;
  background: var(--frost);
  color: var(--ink);
  font: 400 1.0625rem/1.6 Outfit, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* The demo's glow spills past the window, up to the edges of the screen and no further. */
main {
  overflow-x: clip;
}

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

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

a:hover {
  color: var(--link-hover);
  text-decoration-thickness: 2px;
}

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

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--pane);
  color: var(--ink);
}

.skip:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.masthead ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.masthead nav a {
  display: block;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.masthead nav a:hover {
  background: color-mix(in srgb, var(--link) 10%, transparent);
}

.masthead nav a[aria-current='page'] {
  background: var(--pane);
  box-shadow: inset 0 0 0 1px var(--rule);
}

/* Home: the hero */

/* The words, then the window across the page's width, so the glow has room. */
.hero {
  display: grid;
  gap: 48px;
  padding-block: 32px 88px;
}

.hero-text {
  display: grid;
  gap: 28px 64px;
}

@media (min-width: 960px) {
  .hero {
    gap: 64px;
    padding-block: 48px 112px;
  }

  .hero-text {
    grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
    align-items: end;
  }

  .hero h1 {
    grid-column: 1 / -1;
  }
}

.hero h1 {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(2.5rem, 1.4rem + 3.6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lead {
  max-width: 44ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--pane);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.button.primary {
  border-color: var(--button);
  background: var(--button);
  color: #fff;
}

.button.primary:hover {
  border-color: var(--button-hover);
  background: var(--button-hover);
  color: #fff;
}

.soon {
  margin: 0;
  font-weight: 500;
}

.aside {
  margin: 0;
  color: var(--muted);
}

/* The demo new tab. Its parts are sized to the window (cqw), so it's the same picture at any width. */

.demo {
  position: relative;
  isolation: isolate;
  margin: 0;
}

.demo-glow {
  position: absolute;
  inset: 4% -3% -4%;
  z-index: -1;
  filter: blur(clamp(40px, 7vw, 96px)) saturate(1.6);
  opacity: var(--glow);
  transform: scale(1.04);
  animation: light-up 1.8s ease-out both;
}

@keyframes light-up {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
}

.demo-glow img,
.demo-walls img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.demo-glow img.is-on,
.demo-walls img.is-on {
  opacity: 1;
}

.demo-window {
  overflow: hidden;
  border: 1px solid rgb(34 23 73 / 0.2);
  border-radius: 18px;
  background: var(--night);
  box-shadow: 0 40px 80px -40px rgb(34 23 73 / 0.7);
}

.demo-bar {
  display: flex;
  align-items: flex-end;
  height: 36px;
  padding-inline: 12px;
  background: #2a2052;
}

.demo-tab {
  padding: 6px 16px 7px;
  border-radius: 10px 10px 0 0;
  background: #3a2d6c;
  color: #e9e3ff;
  font-size: 0.75rem;
  font-weight: 500;
}

.demo-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  container-type: inline-size;
}

.demo-walls {
  position: absolute;
  inset: 0;
}

.demo-newtab {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.4cqw;
  padding-top: 9cqw;
  color: #fff;
  text-shadow: 0 1px 2px rgb(21 18 31 / 0.25);
}

.demo-clock,
.demo-search,
.demo-links {
  background: rgb(255 255 255 / 0.15);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1cqw 3cqw rgb(21 18 31 / 0.18);
}

.demo-clock {
  display: grid;
  justify-items: center;
  padding: 1.4cqw 4.6cqw 2cqw;
  border-radius: 3.2cqw;
}

[data-time] {
  font-size: 10.5cqw;
  font-weight: 250;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

[data-date] {
  margin-top: 0.4cqw;
  font-size: 1.9cqw;
  font-weight: 600;
  opacity: 0.88;
}

.demo-search {
  width: 47cqw;
  padding: 1.5cqw 2.4cqw;
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: 999px;
  color: rgb(255 255 255 / 0.85);
  font-size: 1.6cqw;
}

.demo-links {
  display: flex;
  gap: 4.2cqw;
  margin: 0;
  padding: 1.7cqw 3cqw;
  border-radius: 2.6cqw;
  list-style: none;
}

.demo-links li {
  display: grid;
  justify-items: center;
  gap: 0.8cqw;
  font-size: 1.15cqw;
  font-weight: 500;
}

.demo-links span {
  display: grid;
  place-items: center;
  width: 4.4cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--c);
  font-size: 1.7cqw;
  font-weight: 700;
}

.demo-dock {
  position: absolute;
  right: 2cqw;
  bottom: 2cqw;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgb(21 18 31 / 0.72);
}

.demo-dock button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.demo-dock button:hover {
  background: rgb(255 255 255 / 0.16);
}

.demo-dock button:focus-visible {
  outline-color: #fff;
  outline-offset: 1px;
}

.demo-dock svg {
  width: 18px;
  height: 18px;
}

[data-state='playing'] .icon-play,
[data-state='paused'] .icon-pause {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .demo-glow {
    animation: none;
  }

  .demo-glow img,
  .demo-walls img {
    transition: none;
  }
}

/* Home: sections */

.section {
  padding-block: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--rule);
}

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section > h2:last-child {
  margin-bottom: 0;
}

.section-lead {
  max-width: 58ch;
  margin: 0 0 40px;
  color: var(--muted);
  font-size: 1.125rem;
}

/* Four panes of screenshots in one window frame. */
.mullions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border-radius: 24px;
  background: var(--night);
}

.mullions figure {
  display: grid;
  align-content: start;
  gap: 14px;
  margin: 0;
  padding-bottom: 16px;
}

.mullions img {
  border-radius: 12px;
}

.mullions figcaption {
  padding-inline: 10px;
  color: var(--night-ink);
  font-size: 1rem;
  line-height: 1.5;
}

.mullions strong {
  display: block;
  margin-bottom: 2px;
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 600;
}

@media (max-width: 720px) {
  .mullions {
    grid-template-columns: minmax(0, 1fr);
  }
}

.promises {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 32px;
  border-block: 1px solid var(--rule);
}

.promises > div {
  padding: 28px 28px 28px 0;
}

.promises > div + div {
  padding-left: 28px;
  border-left: 1px solid var(--rule);
}

.promises h3,
.plan h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.promises p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 800px) {
  .promises {
    grid-template-columns: minmax(0, 1fr);
  }

  .promises > div,
  .promises > div + div {
    padding: 24px 0;
    border-left: 0;
  }

  .promises > div + div {
    border-top: 1px solid var(--rule);
  }
}

.more {
  margin: 24px 0 0;
  font-weight: 500;
}

/* Free and Pro, two panes of one window. */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 32px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 24px;
  background: var(--pane);
}

.plan {
  padding: clamp(24px, 4vw, 40px);
}

.plan + .plan {
  border-left: 1px solid var(--rule);
}

/* Pro has the moon's lamplight in its corner, faintly. */
.plan-pro {
  background:
    radial-gradient(90% 60% at 100% 0%, rgb(245 196 81 / 0.16), transparent 70%),
    radial-gradient(80% 70% at 85% 10%, rgb(118 85 230 / 0.1), transparent 70%);
}

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

.price {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1.125rem;
}

.plan ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.2em;
}

.plan li::marker,
.doc li::marker {
  color: var(--link);
}

.plan-note {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}

@media (max-width: 800px) {
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .plan + .plan {
    border-top: 1px solid var(--rule);
    border-left: 0;
  }
}

.fine {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Support, terms and the privacy policy */

.doc-page {
  display: grid;
  gap: 32px;
  padding-block: 24px 96px;
}

@media (min-width: 1024px) {
  .doc-page.has-toc {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px 72px;
  }

  .doc-head {
    grid-column: 1 / -1;
  }

  .toc {
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }
}

.toc-title {
  margin: 0 0 10px;
  font-weight: 600;
}

.toc ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.toc a {
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--link);
  text-decoration: underline;
}

@media (max-width: 1023px) {
  .toc {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--rule);
  }

  .toc ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .toc a {
    display: block;
    padding: 4px 12px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--pane);
  }
}

.doc {
  max-width: 68ch;
  min-width: 0;
  overflow-wrap: break-word;
}

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

.doc-head h1 {
  margin: 0 0 12px;
  font-size: clamp(2.25rem, 1.6rem + 2.2vw, 3.25rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.doc h2 {
  margin: 48px 0 12px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  scroll-margin-top: 16px;
}

.doc p,
.doc ul {
  margin: 0 0 16px;
}

.doc ul {
  padding-left: 1.25em;
}

.doc li + li,
.doc li > ul {
  margin-top: 8px;
}

.doc-head p {
  max-width: 60ch;
  margin: 0;
}

/* "Last updated" */
.doc-head p:not(.intro) {
  color: var(--muted);
}

.intro {
  font-size: 1.2rem;
}

.doc code {
  padding: 0.05em 0.35em;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--pane);
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 0.88em;
}

/* Footer */

.footer {
  border-top: 1px solid var(--rule);
}

.footer-inner {
  display: grid;
  gap: 14px;
  padding-block: 40px 56px;
}

.footer p {
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 500;
}

.footer .fine {
  margin: 0;
}
