/* Peermint — the coming-soon page.
   Built from the canvas page "Peermint Coming Soon v3" (the design Artifact,
   project/Peermint Coming Soon v3.dc.html). The values are the canvas's; the
   tokens are the app's own (design/tokens/*.css), copied only as far as this
   page uses them. */

/* ---------- Fonts: self-hosted, Latin only (the page is English) ---------- */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("assets/fonts/geist-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/geist-mono-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/quicksand-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/quicksand-latin-700.woff2") format("woff2");
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  --stone-50: #FAF9F7;
  --stone-100: #F5F3F1;
  --stone-150: #F2F0EE;
  --stone-250: #E7E5E4;
  --stone-400: #A8A29E;
  --stone-600: #78716C;
  --stone-650: #6B6661;
  --stone-700: #57534E;
  --stone-900: #1C1917;
  --ink-900: #1A1918;
  --ink-800: #1E1D1C;
  --ink-700: #211F1E;
  --teal-700: #155E75;
  --teal-600: #0E7490;
  --teal-400: #2FA8B8;

  --surface-app: var(--stone-50);
  --surface-panel: #FFFFFF;
  --surface-rail: var(--stone-150);
  --surface-subtle: var(--stone-100);
  --surface-hover: rgba(28, 25, 23, 0.07);
  --text-primary: var(--stone-900);
  --text-secondary: var(--stone-700);
  --text-muted: var(--stone-650);
  --border-hairline: rgba(28, 25, 23, 0.09);
  --border-control: rgba(28, 25, 23, 0.12);
  --accent: var(--teal-600);
  --accent-hover: var(--teal-700);
  --status-seeding: #3F7D4B;

  /* The two teals of the mark: the wordmark takes the darker one on a light page. */
  --wordmark: var(--teal-600);

  --radius-md: 7px;
  --radius-xl: 10px;
  --radius-2xl: 12px;
  --shadow-card: 0 1px 2px rgba(28, 25, 23, 0.04);

  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-soft: "Quicksand", var(--font-sans);

  --tracking-widest: 0.14em;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

/* The theme is always set on <html> before first paint (the script in <head>):
   a stored choice, else the system's. */
[data-theme="dark"] {
  color-scheme: dark;

  --surface-app: var(--ink-900);
  --surface-panel: var(--ink-700);
  --surface-rail: var(--ink-800);
  --surface-subtle: var(--ink-800);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --text-primary: #F5F3F1;
  --text-secondary: var(--stone-250);
  --text-muted: var(--stone-400);
  --border-hairline: rgba(255, 255, 255, 0.06);
  --border-control: rgba(255, 255, 255, 0.10);
  --accent-hover: #14859F;
  --status-seeding: #5F9E6B;

  --wordmark: var(--teal-400);
}

/* ---------- Base ---------- */

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--surface-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

h1, h2, p, figure { margin: 0; }

.icon {
  display: block;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Theme-swapped images: the mark in the header and footer. */
[data-theme="dark"] .only-light,
:root:not([data-theme="dark"]) .only-dark { display: none !important; }

::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Page frame ---------- */

.page {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
  box-sizing: border-box;
}
@media (max-width: 560px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
}

/* The piece-map pattern: an accent layer showing through a tiled mask of
   rounded squares at three strengths, faded out from the top of the page and
   up from its foot. */
.backdrop {
  position: absolute;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
}
.backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0.16;
  -webkit-mask-image: url("assets/pieces.svg");
  mask-image: url("assets/pieces.svg");
}
.backdrop-top {
  top: 0;
  height: 1100px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 80%);
}
.backdrop-bottom {
  bottom: 0;
  height: 900px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 100%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 100%, #000 0%, rgba(0, 0, 0, 0.5) 45%, transparent 80%);
}

/* ---------- Header ---------- */

.site-header {
  height: 84px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--wordmark);
}
.lockup:hover { color: var(--wordmark); text-decoration: none; }
.lockup img { display: block; width: 32px; height: 35px; }
.wordmark {
  font-family: var(--font-soft);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  /* Optically centres the x-height band on the leaf. */
  position: relative;
  top: -0.125em;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13.5px;
}
.site-nav a { color: var(--text-secondary); }
.site-nav a:hover { color: var(--text-secondary); }

.theme-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-control);
  background: var(--surface-panel);
  color: var(--text-secondary);
  cursor: pointer;
}
.theme-toggle:hover { background: var(--surface-hover); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 560px) {
  .site-nav .nav-wide { display: none; }
  .site-nav { gap: 16px; }
}

/* ---------- Shared type ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow .icon { color: var(--accent); }
.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.feat-title {
  margin-top: 16px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.feat-body {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  text-wrap: pretty;
}
/* Centred copy of more than one sentence: one sentence per line. */
.lines > span { display: block; text-wrap: balance; }

.feat { min-width: 0; max-width: 460px; }

/* ---------- Hero ---------- */

.hero {
  padding-top: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero h1 {
  margin-top: 20px;
  font-family: var(--font-soft);
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.04em;
  max-width: 900px;
  text-wrap: balance;
}
.hero-sub {
  margin-top: 22px;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 560px;
  text-wrap: balance;
}
.hero-note {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.hero-shot { padding-top: 64px; }

/* ---------- Screenshot slots ---------- */

/* Every picture of the app on this page is a screenshot of the running app,
   light and dark (assets/shots/<slot>-light.png, <slot>-dark.png, exported at
   2x). Until a slot's file exists it shows what the shot should be. */
.shot {
  position: relative;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  aspect-ratio: var(--ratio, 4 / 3);
  max-width: var(--max, 560px);
  border-radius: var(--radius-xl);
  background: var(--surface-panel);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
/* The hero window is drawn at its real size, 1120 x 620, and scaled down as a
   whole below that width (script.js), so it keeps the app's proportions. */
.hero-fit {
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  aspect-ratio: 1120 / 620;
}
.hero-win {
  position: absolute;
  left: 0;
  top: 0;
  width: 1120px;
  transform-origin: top left;
}
.shot-wide { --ratio: 2 / 1; --max: 880px; margin: 0 auto; }
.shot-169 { --ratio: 16 / 9; }

.shot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
/* The current theme's image is laid out (so lazy loading starts) but stays
   invisible until it has actually loaded: a missing file never shows broken. */
:root:not([data-theme="dark"]) .shot-img[data-for="light"],
[data-theme="dark"] .shot-img[data-for="dark"] { display: block; opacity: 0; }
.shot[data-has-light] .shot-img[data-for="light"],
.shot[data-has-dark] .shot-img[data-for="dark"] { opacity: 1; }

:root:not([data-theme="dark"]) .shot[data-has-light] .shot-ph,
[data-theme="dark"] .shot[data-has-dark] .shot-ph { display: none; }

.shot-ph {
  position: absolute;
  inset: 12px;
  border: 1px dashed var(--border-control);
  border-radius: calc(var(--radius-xl) - 4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
}
.shot-ph .ph-what {
  max-width: 420px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  text-wrap: balance;
}
@media (max-width: 480px) {
  .shot-ph .ph-what { display: none; }
}

/* The assistant card is drawn, not shot (see index.html). It keeps 16:9
   while the exchange fits and grows when it does not, as on a phone: with
   .shot's overflow: hidden the ratio is a fixed height and clips both ends,
   with overflow visible it is only a minimum. Nothing in it needs clipping. */
.chat {
  overflow: visible;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.chat-ask {
  align-self: flex-end;
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface-subtle);
  font-size: 13.5px;
  line-height: 1.5;
}
.chat-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
}
.chat-tools > div { display: flex; gap: 10px; min-width: 0; }
.chat-tools .tool { flex-shrink: 0; color: var(--accent); }
.chat-tools .arg {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-reply { max-width: 88%; font-size: 13.5px; line-height: 1.55; }
.chat-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
  font-size: 12px;
  color: var(--text-muted);
}
.seed-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--status-seeding);
}

/* ---------- Intro band ---------- */

.intro { padding-top: 96px; }
.intro-head { max-width: 760px; margin: 0 auto; text-align: center; }
.intro-head .eyebrow { justify-content: center; }
.intro-head h2 {
  margin-top: 16px;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.038em;
  text-wrap: balance;
}

.piece-band { margin-top: 48px; }
.piece-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 14px);
  grid-auto-rows: 14px;
  gap: 4px;
  justify-content: space-between;
  height: 104px;
  overflow: hidden;
}
.piece-grid i {
  display: block;
  border-radius: 2px;
  background: var(--accent);
}
.piece-caption {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.piece-caption .file { color: var(--text-secondary); }
.piece-caption .state { margin-left: auto; color: var(--accent); }

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

.search-sec {
  padding-top: 136px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.search-sec .feat { max-width: 640px; margin: 0 auto; text-align: center; }
.search-sec .eyebrow { justify-content: center; }

/* Every other block sits on a full-width strip one step darker. In dark the
   rail tone equals the subtle one, so the strip takes the panel's tone and its
   cards sink to the app's. */
.band {
  margin-top: 120px;
  background: var(--surface-rail);
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
}
[data-theme="dark"] .band { background: var(--surface-panel); }
[data-theme="dark"] .band .shot { background: var(--surface-app); }

/* Two features side by side; each column is a two-row subgrid, so titles and
   pictures line up across the columns. They stack below about 930px. */
.pair {
  padding-top: 104px;
  padding-bottom: 104px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 36px 48px;
  align-items: stretch;
}
.pair-col {
  min-width: 0;
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
  gap: 36px;
}

.split {
  padding-top: 136px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px 72px;
}
.split > .split-text { flex: 1 1 340px; min-width: 0; }
.split > .split-shot { flex: 1 1 440px; min-width: 0; }

/* ---------- Also in the box ---------- */

.more { padding-top: 128px; }
.more > h2.eyebrow { font-weight: 400; }
.more-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  border-top: 1px solid var(--border-hairline);
}
.more-item {
  padding: 24px 24px 28px 0;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.more-item h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
}
.more-item h3 .icon { color: var(--text-secondary); }
.more-item p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* ---------- Coming soon ---------- */

.soon { padding-top: 128px; }
.soon-card {
  padding: clamp(40px, 6vw, 72px) 32px;
  border-radius: var(--radius-2xl);
  background: var(--surface-panel);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.soon-card > img { display: block; width: 88px; height: 88px; }
.soon-card .eyebrow { margin-top: 28px; }
.soon-card h2 {
  margin-top: 16px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.soon-card .feat-body { margin-top: 18px; max-width: 560px; }
.contact {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.contact-label { font-size: 13px; color: var(--text-muted); }
.contact a {
  font-family: var(--font-mono);
  font-size: clamp(17px, 2vw, 22px);
}

/* On a phone the desktop rhythm leaves a screen of air between blocks; the
   design draws no phone width, so the gaps shrink by about a third here. */
@media (max-width: 560px) {
  .hero { padding-top: 56px; }
  .hero-shot { padding-top: 48px; }
  .intro { padding-top: 72px; }
  .search-sec, .split { padding-top: 96px; }
  .search-sec { gap: 40px; }
  .band { margin-top: 88px; }
  .pair { padding-top: 72px; padding-bottom: 72px; }
  .more, .soon { padding-top: 88px; }
}

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

.site-footer {
  padding-top: 56px;
  padding-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.site-footer .mark { display: flex; align-items: center; gap: 8px; }
.site-footer .mark img { display: block; width: 14px; height: 15px; }
.site-footer .rights {
  flex-basis: 100%;
  font-family: var(--font-sans);
  font-size: 12px;
}
