/* Trove — project site. Tokens follow apps/desktop-ui/src/styles/tokens.css. */

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  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: "Space Grotesk";
  src: url("fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  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 Serif 4";
  src: url("fonts/source-serif-4-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  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: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
  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: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  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: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  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;
}

:root {
  color-scheme: light;
  --paper: #f4f2ec;
  --paper-raised: #fffefa;
  --ink: #171d26;
  --muted: #5d6571;
  --line: #dedbd1;
  --line-strong: #c9c5b9;
  --accent: #234e9d;
  --accent-ink: #fffefa;
  --accent-soft: #e7edf8;
  --amber: #b45309;
  --amber-text: #974406;
  --amber-soft: #fdf3e4;
  --code-bg: #171d26;
  --code-ink: #e8e6df;
  --shadow-window: 0 1px 0 #d8d4c9, 0 24px 60px -24px rgba(23, 29, 38, 0.35);
  --shadow-stack: 0 1px 0 #d8d4c9, 7px 9px 0 -4px #ebe8df;
  --font-ui: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 14px;
  --max: 1160px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #11151c;
  --paper-raised: #181e28;
  --ink: #f1efe8;
  --muted: #a5acb7;
  --line: #2a313d;
  --line-strong: #3a4250;
  --accent: #9ab8f0;
  --accent-ink: #11151c;
  --accent-soft: #1d2940;
  --amber: #f0a24a;
  --amber-text: #f0a24a;
  --amber-soft: #2c2114;
  --code-bg: #0b0e13;
  --code-ink: #e8e6df;
  --shadow-window: 0 1px 0 #232a35, 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --shadow-stack: 0 1px 0 #232a35, 7px 9px 0 -4px #1a2029;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

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

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

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

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

h1,
h2,
h3 {
  font-family: var(--font-ui);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 3.9rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 650;
}

h3 {
  font-size: 1.25rem;
  font-weight: 620;
}

p {
  margin: 0 0 1em;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

kbd {
  display: inline-block;
  padding: 0.05em 0.45em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--paper-raised);
  color: var(--ink);
  line-height: 1.4;
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  border-radius: 8px;
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* ------------------------------------------------------------ header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 34px;
  height: 34px;
}

.site-nav {
  display: none;
  gap: 1.4rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

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

.site-nav a:hover {
  color: var(--ink);
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switch,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper-raised);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.lang-switch:hover,
.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun,
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

/* -------------------------------------------------------------- hero -- */

.hero {
  padding: 3.5rem 0 2rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1000px) {
  .hero-grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 3rem;
  }
  .hero {
    padding: 5rem 0 3rem;
  }
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.22rem;
  color: var(--muted);
  max-width: 34em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.8rem 0 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0 1.3rem;
  border-radius: 12px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button svg {
  width: 18px;
  height: 18px;
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 20px -10px var(--accent);
}

.button-secondary {
  background: var(--paper-raised);
  color: var(--ink);
  border-color: var(--line-strong);
}

.fine-print {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}

/* A macOS window around each screenshot. */
.window {
  margin: 0;
  border-radius: var(--radius);
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-window);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  background: color-mix(in srgb, var(--paper) 70%, var(--line));
  border-bottom: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--muted);
}

.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ec6a5e;
}

.window-bar span:nth-child(2) {
  background: #f4bf4f;
}

.window-bar span:nth-child(3) {
  background: #61c554;
  margin-right: 8px;
}

.window img {
  width: 100%;
}

.hero .window {
  transform: rotate(-0.6deg);
}

@media (min-width: 1000px) {
  .hero .window {
    margin-right: -6rem;
  }
}

/* ---------------------------------------------------------- sections -- */

section {
  padding: 4rem 0;
}

@media (min-width: 900px) {
  section {
    padding: 5.5rem 0;
  }
}

.section-alt {
  background: var(--paper-raised);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2.5rem;
}

.section-head p {
  color: var(--muted);
  font-size: 1.12rem;
}

.cards {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 700px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-stack);
}

.section-alt .card {
  background: var(--paper-raised);
}

.card p:last-child {
  margin-bottom: 0;
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 0.9rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

/* Features: text beside its screenshot, alternating. */
.feature {
  display: grid;
  gap: 1.8rem;
  align-items: center;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.feature:first-of-type {
  border-top: none;
  padding-top: 0;
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 3.5rem;
  }
  .feature:nth-of-type(even) .feature-text {
    order: 2;
  }
  .feature.feature-narrow {
    grid-template-columns: 1fr 0.8fr;
  }
}

.feature-text ul {
  padding-left: 1.1rem;
  margin: 0;
}

.feature-text li {
  margin-bottom: 0.4rem;
}

.feature-text li::marker {
  color: var(--amber);
}

.feature-shot {
  max-width: 100%;
}

.feature-narrow .feature-shot {
  max-width: 460px;
  justify-self: center;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.mini-features {
  display: grid;
  gap: 1.1rem;
  margin-top: 2.5rem;
}

@media (min-width: 700px) {
  .mini-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .mini-features {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Privacy table. */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

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

tr:last-child td {
  border-bottom: none;
}

th {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--paper-raised);
}

td:first-child {
  font-family: var(--font-ui);
  font-weight: 600;
}

@media (min-width: 700px) {
  td:first-child {
    white-space: nowrap;
  }
}

/* Grid items holding <pre> or long code must be allowed to shrink. */
.hero-grid > *,
.feature > *,
.dev-grid > *,
.cards > *,
.mini-features > * {
  min-width: 0;
}

/* Steps. */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.1rem;
  counter-reset: step;
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.steps li {
  counter-increment: step;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  color: var(--amber-text);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.steps h3 {
  font-size: 1.08rem;
}

.steps p {
  margin: 0;
  font-size: 0.98rem;
}

/* Numbers. */
.stats {
  display: grid;
  gap: 1.1rem;
  margin: 0;
}

@media (min-width: 700px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stats div {
  padding: 1.3rem;
  border-left: 3px solid var(--amber);
  background: var(--paper);
  border-radius: 0 10px 10px 0;
}

.stats dt {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--muted);
}

.stats dd {
  margin: 0.2rem 0 0;
  font-family: var(--font-ui);
  font-size: 1.9rem;
  font-weight: 700;
}

.note {
  margin-top: 1.4rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Gallery + lightbox. */
.gallery {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}

.gallery button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-raised);
  cursor: zoom-in;
  text-align: left;
  color: var(--ink);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.gallery button:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.gallery img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  object-position: top left;
  background: var(--paper);
}

.gallery span {
  display: block;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

.lightbox {
  width: min(96vw, 1240px);
  max-height: 94vh;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper-raised);
  color: var(--ink);
}

.lightbox::backdrop {
  background: rgba(10, 13, 18, 0.78);
}

.lightbox figure {
  margin: 0;
}

.lightbox img {
  width: 100%;
  max-height: calc(94vh - 4.5rem);
  object-fit: contain;
  background: var(--paper);
}

.lightbox-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-top: 1px solid var(--line);
}

.lightbox figcaption {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

/* Developers. */
.dev-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .dev-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.stack-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-list li {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  background: var(--paper);
}

pre {
  margin: 0 0 1.4rem;
  padding: 1.1rem 1.2rem;
  border-radius: 12px;
  background: var(--code-bg);
  color: var(--code-ink);
  overflow-x: auto;
  line-height: 1.55;
  font-size: 0.86rem;
}

pre .c {
  color: #8b93a1;
}

.layout-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.layout-list li {
  display: grid;
  grid-template-columns: minmax(0, 13rem) 1fr;
  gap: 0.8rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--line);
}

.layout-list code {
  color: var(--accent);
  overflow-wrap: anywhere;
}

/* Footer. */
.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

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

.dev-grid h3:not(:first-child) {
  margin-top: 1.6rem;
}
