/* Copyright © 2026 Wayne Davies. Free software under the GNU General Public License, version 3 or later. */
/* See LICENSE for the full text. */
/* SPDX-License-Identifier: GPL-3.0-or-later */

/* Brainstead's product page. Colours are the app's tokens (src/styles.css). */
/* Geist and Geist Mono, served from here (fonts/OFL.txt), so the first paint waits on no other site. */
@font-face {
  font-family: "Geist";
  src: url("fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ground: #fff;
  --surface: #fff;
  --sunk: #f5f5f7;
  --line: #e3e7ed;
  --ink: #151a22;
  --ink2: #4d5664;
  --ink3: #6e7785;
  --accent: #1d5fd6;
  --accent-ink: #174fb3;
  --accent-soft: #e8f0fd;
  --on-accent: #fff;
  --grad-a: #1d5fd6;
  --grad-b: #0d7f74;
  --shadow: 0 2px 6px rgb(15 20 30 / 6%), 0 30px 80px -20px rgb(15 20 30 / 28%);
  --sans: "Geist", -apple-system, "SF Pro Display", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: light;
}

/* A soft grey band to set a section apart. */
.tint {
  background: var(--sunk);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.5 var(--sans);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--accent);
  text-decoration: none;
}
h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-weight: 700;
}
p {
  margin: 0;
}
code,
kbd {
  font: 500 0.88em var(--mono);
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05em 0.4em;
}

.center {
  text-align: center;
}
.eyebrow {
  color: var(--ink3);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.lede {
  color: var(--ink2);
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.4;
  max-width: 34em;
  margin: 22px auto 0;
  letter-spacing: -0.015em;
}
.grad {
  background: linear-gradient(100deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 {
  font-size: clamp(40px, 6.4vw, 80px);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ground) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav-in {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 14px;
}
.nav-links a {
  color: var(--ink2);
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  font-size: 17px;
  padding: 12px 24px;
  border-radius: 980px;
  transition:
    transform 0.2s var(--ease),
    filter 0.2s;
}
.btn:hover {
  filter: brightness(1.08);
}
.btn:active {
  transform: scale(0.97);
}
.btn-sm {
  font-size: 13px;
  padding: 6px 14px;
}
.link {
  font-size: 19px;
}
.link:hover {
  text-decoration: underline;
}
.cta {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 34px;
}

/* Window frame around a screenshot (the screenshots carry their own title bar). */
.window {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  outline: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  outline-offset: -1px;
  aspect-ratio: 1400 / 875;
}
.window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* A soft shimmer where a screenshot will be, until it has loaded (main.js marks it). */
.window:not(.loaded) {
  background: linear-gradient(100deg, var(--sunk) 30%, color-mix(in srgb, var(--sunk) 40%, #fff) 50%, var(--sunk) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer {
  to {
    background-position: -150% 0;
  }
}

/* Crossfading stack of screenshots */
.stack {
  position: relative;
}
.stack > picture,
.stack > img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition:
    opacity 0.7s var(--ease),
    transform 1.1s var(--ease);
}
.stack > .on {
  opacity: 1;
  transform: none;
}

/* Hero */
.hero {
  text-align: center;
  padding: 96px 16px 0;
}
.hero h1 {
  font-size: clamp(48px, 9vw, 112px);
  letter-spacing: -0.045em;
  line-height: 1;
}
.hero-stage {
  position: relative;
  max-width: 1180px;
  margin: 72px auto 0;
  perspective: 1600px;
}
.hero-window {
  transform-origin: 50% 0;
  will-change: transform;
}
.glow {
  position: absolute;
  inset: 10% 8% -4%;
  z-index: -1;
  filter: blur(80px);
  opacity: 0.28;
  background:
    radial-gradient(40% 50% at 30% 40%, var(--grad-a), transparent 70%), radial-gradient(40% 50% at 72% 60%, var(--grad-b), transparent 70%);
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift {
  to {
    transform: translate3d(3%, -3%, 0) scale(1.06);
  }
}

/* Statement */
.statement {
  max-width: 980px;
  margin: 0 auto;
  padding: 120px 16px 56px;
}
.statement p {
  font-size: clamp(32px, 4.6vw, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
}
.statement .dim {
  color: var(--ink3);
}

/* GTD story */
.story {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 16px 24px;
}
.story-head {
  text-align: center;
  margin-bottom: 40px;
}
.story-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: 56px;
  align-items: start;
}
.story-steps {
  padding: 6vh 0 14vh;
}
.step {
  min-height: 52vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0.25;
  transition: opacity 0.5s var(--ease);
}
.step.on {
  opacity: 1;
}
.step h3 {
  font-size: 34px;
  margin-bottom: 14px;
}
.step p {
  color: var(--ink2);
  font-size: 19px;
  line-height: 1.5;
}
.story-sticky {
  position: sticky;
  top: calc(50vh - min(26vw, 380px) / 2 - 10px);
}
.dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 22px;
}
.dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition:
    background 0.3s,
    width 0.3s;
}
.dots i.on {
  background: var(--ink2);
  width: 22px;
  border-radius: 4px;
}

/* Features */
.feature {
  padding: 96px 16px;
}
.feature .window {
  max-width: 1080px;
  margin: 56px auto 0;
}

/* Segmented control */
.seg {
  position: relative;
  display: inline-flex;
  margin-top: 40px;
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 980px;
  padding: 3px;
}
.seg button {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  font: 500 15px var(--sans);
  color: var(--ink2);
  padding: 7px 22px;
  cursor: pointer;
  border-radius: 980px;
  transition: color 0.3s;
}
.seg button[aria-selected="true"] {
  color: var(--ink);
}
.seg-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  background: var(--surface);
  border-radius: 980px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
  transition: transform 0.45s var(--ease);
}
.seg[data-mode="1"] .seg-thumb {
  transform: translateX(100%);
}
.feature .modes {
  margin-top: 32px;
}

/* Wiki layers */
.layers {
  position: relative;
  max-width: 1120px;
  margin: 72px auto 0;
  padding-bottom: 14%;
}
.layers .window {
  margin: 0;
}
.layer-back {
  width: 82%;
}
.layer-front {
  position: absolute;
  width: 62%;
  right: 0;
  bottom: 0;
}
.js .layer-front.reveal {
  transform: translate3d(8%, 12%, 0) scale(0.96);
}
.js .layer-front.reveal.in {
  transform: none;
  transition-delay: 0.25s;
}
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 980px;
  margin: 64px auto 0;
  text-align: center;
}
.fact b {
  display: block;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fact span {
  color: var(--ink2);
  font-size: 17px;
}

/* Graph */
.graph {
  position: relative;
  overflow: hidden;
  padding: 24px 0 96px;
}
.graph-frame {
  margin: 0 auto;
  max-width: 1400px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  mask-image: radial-gradient(40% 52% at 47% 50%, #000 62%, transparent 100%);
  -webkit-mask-image: radial-gradient(40% 52% at 47% 50%, #000 62%, transparent 100%);
}
.graph-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 46% 48%;
  will-change: transform;
}
.graph-copy {
  text-align: center;
  margin-top: 8px;
  position: relative;
  padding: 0 16px;
}
.graph-copy p {
  color: var(--ink2);
  font-size: clamp(19px, 2.2vw, 24px);
  margin-top: 16px;
}

/* Ask */
.split {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
}
.split h2 {
  font-size: clamp(40px, 5vw, 64px);
  margin-bottom: 22px;
}
.split-copy p:not(.eyebrow) {
  color: var(--ink2);
  font-size: 19px;
}
.feature .split-shot {
  margin: 0;
  max-width: none;
}
.chips {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 980px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* Trust tiles */
.trust {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 16px 96px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.tile {
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px 28px;
  transition:
    transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.tile svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 18px;
}
.tile h3 {
  font-size: 22px;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.tile p {
  color: var(--ink2);
  font-size: 16px;
}
.tiles .tile:nth-child(3n + 2) {
  transition-delay: 0.08s;
}
.tiles .tile:nth-child(3n) {
  transition-delay: 0.16s;
}

/* Download */
.download {
  padding: 96px 16px 110px;
}
.big-mark {
  margin: 0 auto 32px;
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 12px 30px rgb(29 95 214 / 35%));
}
.fine {
  color: var(--ink3);
  font-size: 14px;
  margin-top: 28px;
}

.foot {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 28px 16px 40px;
  font-size: 13px;
  color: var(--ink3);
  background: var(--sunk);
  border-top: 1px solid var(--line);
}

/* The hero rises in by itself, without waiting for the script. */
.rise {
  animation: rise 0.8s var(--ease) both;
}
.hero .rise:nth-child(2) {
  animation-delay: 0.06s;
}
.hero .rise:nth-child(3) {
  animation-delay: 0.12s;
}
.hero .rise:nth-child(4) {
  animation-delay: 0.18s;
}
.hero .rise:nth-child(5) {
  animation-delay: 0.26s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
}

/* Scroll reveal: only hidden while the script is there to show it again. */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* Narrow screens */
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .nav-in .btn-sm {
    margin-left: auto;
  }
  .story-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .story-sticky {
    top: 64px;
    order: -1;
    z-index: 2;
    padding: 8px 0 16px;
    background: var(--ground);
  }
  .story-steps {
    padding: 0 0 20vh;
  }
  .step {
    min-height: 40vh;
  }
  .split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .tiles {
    grid-template-columns: 1fr;
  }
  .facts {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .layer-back {
    width: 100%;
  }
  .layer-front {
    width: 78%;
  }
  .statement {
    padding: 80px 16px 40px;
  }
  .feature {
    padding: 72px 16px;
  }
}

/* Source types, under the wiki's headline */
.formats {
  list-style: none;
  padding: 0;
  margin: 40px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 760px;
}
.formats li {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 980px;
  padding: 8px 16px;
}

/* Split with the picture first */
.split.flip {
  grid-template-columns: 1.6fr 1fr;
}
.split-copy p + p {
  margin-top: 16px;
}

/* There's more: a grid of cards */
.more {
  max-width: 1120px;
  margin: 0 auto;
  padding: 96px 16px 24px;
}
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.card {
  position: relative;
  overflow: hidden;
  background: var(--sunk);
  border-radius: 26px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}
.card h3 {
  font-size: 26px;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 10px;
}
.card p {
  color: var(--ink2);
  font-size: 16px;
}
.card > svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 20px;
}
.c-wide {
  grid-column: span 4;
}
.c-tall {
  grid-column: span 2;
}
.c-half {
  grid-column: span 3;
}
.c-third {
  grid-column: span 2;
  min-height: 0;
  padding: 28px 26px;
}
.c-third h3 {
  font-size: 21px;
}
.c-third > svg {
  width: 30px;
  height: 30px;
  margin-bottom: 16px;
}
.bento .card:nth-child(even) {
  transition-delay: 0.08s;
}

/* A screenshot at the foot of a card, shown whole */
.card-copy {
  margin-bottom: 28px;
}
.card-shot {
  margin-top: auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgb(15 20 30 / 8%),
    0 16px 40px -12px rgb(15 20 30 / 22%);
  outline: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  outline-offset: -1px;
  background: var(--surface);
}
.card-shot img {
  width: 100%;
  height: auto;
  transition: transform 1.2s var(--ease);
}
.card:hover .card-shot img {
  transform: scale(1.03);
}
/* The menu-bar window is tall: show its top and fade the rest out. */
.card-shot.tray {
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  height: 340px;
  mask-image: linear-gradient(#000 70%, transparent);
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  border-radius: 16px 16px 0 0;
  box-shadow: none;
}

/* Quick capture, typed out */
.capture {
  margin-top: auto;
  padding-top: 28px;
}
.cap-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 16px;
  min-height: 58px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
}
.cap-plus {
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}
.cap-text {
  white-space: pre-wrap;
}
.chip {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  padding: 2px 8px;
  margin: 0 2px;
  animation: pop 0.35s var(--ease);
}
.chip.date {
  background: #fbf0df;
  color: #9a5600;
}
.chip.ctx {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.chip.tag {
  background: #dcead9;
  color: #1b7a4c;
}
@keyframes pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.cap-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink3);
}
.cap-tab {
  padding: 3px 10px;
  border-radius: 980px;
}
.cap-tab.on {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 500;
}
.cap-key {
  margin-left: auto;
}

/* Pills of what notes can hold */
.pills {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pills li {
  font-size: 14px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 980px;
  padding: 6px 13px;
  color: var(--ink2);
}

/* Terminal */
.term {
  margin: auto 0 0;
  margin-top: 24px;
  background: #15171b;
  color: #e9ecf1;
  border-radius: 14px;
  padding: 18px 20px;
  font: 500 13.5px/1.7 var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: var(--shadow);
}
.term .t-dim {
  color: #8d95a1;
}
.term .t-out {
  color: #3fd0b8;
  opacity: 0;
  transition: opacity 0.4s;
}
.term.done .t-out {
  opacity: 1;
}
.term .caret {
  background: #e9ecf1;
}

/* Questions */
.faq {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 16px 24px;
}
.qs {
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.qs details {
  border-bottom: 1px solid var(--line);
}
.qs summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.qs summary::-webkit-details-marker {
  display: none;
}
.qs summary::after {
  content: "+";
  font-weight: 400;
  font-size: 26px;
  color: var(--ink3);
  transition: transform 0.3s var(--ease);
}
.qs details[open] summary::after {
  transform: rotate(45deg);
}
.qs details p {
  color: var(--ink2);
  font-size: 17px;
  padding: 0 40px 24px 0;
}

@media (max-width: 860px) {
  .split.flip {
    grid-template-columns: 1fr;
  }
  .split.flip .split-shot {
    order: 2;
  }
  .bento {
    grid-template-columns: 1fr;
  }
  .c-wide,
  .c-tall,
  .c-half,
  .c-third {
    grid-column: auto;
    grid-row: auto;
  }
  .more {
    padding-top: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
  .js .reveal,
  .js .layer-front.reveal {
    opacity: 1;
    transform: none;
  }
}
.statement .w {
  transition: opacity 0.25s linear;
}
