/* gauzzaDocs landing page. The site reads like a document open in the app:
   pages on a canvas, an outline on the left and comments in the right margin. */

:root {
  --canvas: #f0f3f8;
  --chrome: #f9fbfd;
  --page: #ffffff;
  --ink: #1f1f1f;
  --muted: #5f6368;
  --line: #dadce0;
  --line-soft: #e8eaed;
  --hover: rgba(68, 71, 70, .08);
  --accent: #0b57d0;
  --accent-hover: #0842a0;
  --accent-soft: #d3e3fd;
  --on-accent: #ffffff;
  --pill: #edf2fa;
  --code-bg: #f3f6fb;
  --sel: rgba(11, 87, 208, .16);
  --ph: #e9eef5;
  --ph-bar: #dfe6f0;
  --ph-line: #d3dbe7;
  --ph-page: #f8fafd;
  --mark: rgba(251, 188, 4, .3);
  --mark-line: rgba(251, 188, 4, .95);
  --listen: #137333;
  --heart: #d93025;
  --page-shadow: 0 1px 3px 1px rgba(60, 64, 67, .15);
  --card-shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);

  /* agents, as the app colors them */
  --claude: #d97757;
  --codex: #10a37f;
  --gemini: #4285f4;
  --copilot: #8e44ef;
  --on-claude: #1f1f1f;
  --on-codex: #1f1f1f;
  --on-gemini: #1f1f1f;
  --on-copilot: #ffffff;

  /* file kinds, as the app colors them */
  --doc: #4285f4;
  --sheet: #0f9d58;
  --slides: #f4b400;
  --pdf: #ea4335;
  --code: #8e44ef;

  --font: 'Figtree', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --mono: 'Cascadia Code', 'JetBrains Mono', Consolas, ui-monospace, 'SF Mono', Menlo, monospace;

  --page-w: 816px;
  --pad-x: 80px;
  --pad-y: 72px;
  --bar-h: 60px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #131416;
    --chrome: #1b1c1f;
    --page: #1f2023;
    --ink: #e3e3e3;
    --muted: #9aa0a6;
    --line: #3c4043;
    --line-soft: #2d2f33;
    --hover: rgba(232, 234, 237, .08);
    --accent: #a8c7fa;
    --accent-hover: #d3e3fd;
    --accent-soft: #2f3b52;
    --on-accent: #062e6f;
    --pill: #2a2c30;
    --code-bg: #26282c;
    --sel: rgba(168, 199, 250, .24);
    --ph: #25272b;
    --ph-bar: #2c2e33;
    --ph-line: #3a3d43;
    --ph-page: #2f3136;
    --mark: rgba(251, 188, 4, .22);
    --mark-line: rgba(251, 188, 4, .7);
    --listen: #81c995;
    --heart: #f28b82;
    --page-shadow: 0 1px 4px rgba(0, 0, 0, .5);
    --card-shadow: 0 2px 8px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --canvas: #131416;
  --chrome: #1b1c1f;
  --page: #1f2023;
  --ink: #e3e3e3;
  --muted: #9aa0a6;
  --line: #3c4043;
  --line-soft: #2d2f33;
  --hover: rgba(232, 234, 237, .08);
  --accent: #a8c7fa;
  --accent-hover: #d3e3fd;
  --accent-soft: #2f3b52;
  --on-accent: #062e6f;
  --pill: #2a2c30;
  --code-bg: #26282c;
  --sel: rgba(168, 199, 250, .24);
  --ph: #25272b;
  --ph-bar: #2c2e33;
  --ph-line: #3a3d43;
  --ph-page: #2f3136;
  --mark: rgba(251, 188, 4, .22);
  --mark-line: rgba(251, 188, 4, .7);
  --listen: #81c995;
  --heart: #f28b82;
  --page-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  --card-shadow: 0 2px 8px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ---------- base ---------- */

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

html {
  scroll-padding-top: calc(var(--bar-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 18px/1.6 var(--font);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--sel); }

img, svg, video { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

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

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

h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }

h2 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}

h3 {
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin: 40px 0 8px;
}

code {
  font-family: var(--mono);
  font-size: .84em;
  background: var(--code-bg);
  border-radius: 4px;
  padding: .12em .36em;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 10px; }

/* ---------- top bar ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
  background: var(--chrome);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; }

.bar-nav { display: flex; align-items: center; gap: 4px; }

.bar-nav a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.bar-nav a:hover { background: var(--hover); }

.bar-nav .heart-link {
  width: 40px;
  padding: 0;
  justify-content: center;
  color: var(--heart);
}
.bar-nav .heart-link svg { width: 22px; height: 22px; }

/* ---------- the desk: outline, pages, margin ---------- */

.desk {
  display: grid;
  grid-template-columns: minmax(0, var(--page-w));
  justify-content: center;
  padding: 24px 24px 56px;
}

.pages {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.outline { display: none; }

/* The breakpoints leave room for a 16px scrollbar. */
@media (min-width: 1180px) {
  /* room for comments in the right margin */
  .desk { grid-template-columns: var(--page-w) 288px; }
  .pages { grid-column: 1; }
}

@media (min-width: 1420px) {
  .desk { grid-template-columns: 248px var(--page-w) 288px; }
  .outline { display: block; grid-column: 1; }
  .pages { grid-column: 2; }
}

.outline {
  position: sticky;
  top: calc(var(--bar-h) + 24px);
  align-self: start;
  padding: 16px 32px 0 0;
}

.outline ul { list-style: none; margin: 0; padding: 0; }

.outline a {
  display: block;
  padding: 7px 12px 7px 14px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}
.outline a:hover { color: var(--ink); background: var(--hover); }
.outline a[aria-current="true"] {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}
.outline .outline-title a { color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.outline .outline-title a[aria-current="true"] { color: var(--accent); }

.page {
  background: var(--page);
  box-shadow: var(--page-shadow);
  padding: var(--pad-y) var(--pad-x);
}

.page > section + section { margin-top: 72px; }

/* ---------- comments in the margin ---------- */

.anchor { position: relative; }

.note { margin: 24px 0 0; max-width: 380px; }

@media (min-width: 1180px) {
  .note {
    position: absolute;
    top: 0;
    left: calc(100% + var(--pad-x) + 24px);
    width: 264px;
    margin: 0;
  }
}

.cm {
  background: var(--page);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  padding: 12px 14px 14px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.cm p { margin: 0; }
.cm p + p { margin-top: 8px; }
.cm code { font-size: 12.5px; }

.cm-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
}

.cm .cm-quote {
  border-left: 3px solid var(--who, var(--mark-line));
  padding: 2px 0 2px 10px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.cm a { font-weight: 600; }

.av {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--who);
  color: var(--who-on);
  font-size: 13px;
  font-weight: 600;
  flex: none;
}

.who-claude { --who: var(--claude); --who-on: var(--on-claude); }
.who-codex { --who: var(--codex); --who-on: var(--on-codex); }
.who-gemini { --who: var(--gemini); --who-on: var(--on-gemini); }
.who-copilot { --who: var(--copilot); --who-on: var(--on-copilot); }
.who-matt { --who: var(--doc); --who-on: #ffffff; }

mark.cmt {
  background: var(--mark);
  border-bottom: 2px solid var(--mark-line);
  color: inherit;
  border-radius: 1px;
}

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

.hero { padding-top: 64px; padding-bottom: 56px; }

.hero h1 {
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
  max-width: 14.5em;
}

/* the agent's caret at the end of the headline, with its name flag */
.caret {
  --who: var(--codex);
  --who-on: var(--on-codex);
  position: relative;
  display: inline-block;
  width: 3px;
  height: .9em;
  margin-left: .1em;
  vertical-align: -0.08em;
  background: var(--who);
  border-radius: 1px;
  animation: blink 1.06s steps(1, end) .9s infinite;
}

.flag {
  position: absolute;
  left: 0;
  bottom: calc(100% - 1px);
  padding: 3px 7px 4px;
  border-radius: 4px 4px 4px 0;
  background: var(--who);
  color: var(--who-on);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  animation: flag-out .5s ease 5s forwards;
}
.flag::before { content: "Codex"; }
/* on a phone the headline ends near the right edge, so the flag hangs to the left of the caret */
@media (max-width: 600px) {
  .flag { left: auto; right: 0; border-radius: 4px 4px 0 4px; }
}

[data-agent="claude"] .caret { --who: var(--claude); --who-on: var(--on-claude); }
[data-agent="gemini"] .caret { --who: var(--gemini); --who-on: var(--on-gemini); }
[data-agent="copilot"] .caret { --who: var(--copilot); --who-on: var(--on-copilot); }
[data-agent="claude"] .flag::before { content: "Claude"; }
[data-agent="gemini"] .flag::before { content: "Gemini"; }
[data-agent="copilot"] .flag::before { content: "Copilot"; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes flag-out { to { opacity: 0; visibility: hidden; } }

.lead {
  font-size: 20px;
  line-height: 1.55;
  max-width: 34em;
  margin-bottom: 36px;
}

.get { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 24px 10px 18px;
  border-radius: 999px;
  font: 600 16px/1.2 var(--font);
  text-decoration: none;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); box-shadow: 0 1px 3px rgba(60, 64, 67, .3); }

.btn-quiet { background: var(--pill); color: var(--ink); }
.btn-quiet:hover { background: var(--accent-soft); color: var(--ink); }

.dl-meta {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--muted);
  min-height: 1.6em;
}

.dl-alt {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 20px;
  font-size: 15px;
}

.media {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 40px 0 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ph);
  border: 1px solid var(--line-soft);
}

/* a quiet app window drawn in CSS, shown until the real media is in place */
.media::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 9%;
  background: var(--ph-bar);
  border-bottom: 1px solid var(--ph-line);
}
.media::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 17%;
  width: 46%;
  height: 90%;
  transform: translateX(-50%);
  padding: 7% 6%;
  background:
    repeating-linear-gradient(180deg, var(--ph-line) 0 8px, transparent 8px 22px) content-box,
    var(--ph-page);
  box-shadow: 0 1px 3px rgba(60, 64, 67, .12);
}

.media > img,
.media > video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media .play {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 2px solid white;
  border-radius: 50%;
  background: rgba(20, 26, 32, .9);
  color: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
  cursor: pointer;
}
.media .play[hidden] { display: none; }
.media .play:hover { background: #141a20; }
.media .play svg { width: 36px; height: 36px; margin-left: 4px; }
.media > video { z-index: 2; background: var(--ph); }

.hero .media { margin-left: calc(48px - var(--pad-x)); margin-right: calc(48px - var(--pad-x)); }

/* ---------- why ---------- */

.letter p { font-size: 21px; line-height: 1.6; }

.letter .sign {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 0;
  font-size: 18px;
  font-weight: 600;
}

/* ---------- what it opens ---------- */

.kinds { list-style: none; margin: 28px 0 0; padding: 0; }

.kind {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line-soft);
}
.kind:last-child { border-bottom: 1px solid var(--line-soft); }

.kind svg { width: 40px; height: 40px; margin-top: 2px; }
.kind h3 { margin: 0 0 6px; }
.kind p { margin: 0; }

.ext {
  margin-left: 10px;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  white-space: nowrap;
}

/* ---------- agents ---------- */

.agents {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.agents li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 16px 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}

/* a little caret with its flag, in the agent's color */
.tick {
  position: relative;
  width: 3px;
  height: 20px;
  border-radius: 1px;
  background: var(--who);
  flex: none;
}
.tick::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 9px;
  height: 7px;
  border-radius: 1px 2px 2px 0;
  background: var(--who);
}

.listening {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sheet) 12%, transparent);
  color: var(--listen);
  font-size: .9em;
  font-weight: 600;
  white-space: nowrap;
}
.listening::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sheet);
}

/* ---------- commands ---------- */

.cli {
  margin: 20px 0 24px;
  padding: 16px 20px;
  background: var(--code-bg);
  border-radius: 8px;
  overflow-x: auto;
  font: 14px/1.7 var(--mono);
  tab-size: 2;
}
.cli code { background: none; padding: 0; font-size: inherit; border-radius: 0; }
.cli .c { color: var(--muted); }

/* ---------- agents working together ---------- */

.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 10px; }
.people li + li { margin-top: 10px; }
.people .role { margin-left: auto; color: var(--muted); font-size: 13px; }
.cm .people-file { color: var(--muted); font-size: 13px; margin-bottom: 10px; }

.turns {
  list-style: none;
  margin: 8px 0 28px;
  padding: 0;
}

.turns li {
  position: relative;
  padding: 0 0 18px 32px;
}
.turns li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .45em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--who);
}
.turns li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: calc(.45em + 16px);
  bottom: 2px;
  width: 2px;
  background: var(--line);
}
.turns li:last-child { padding-bottom: 0; }
.turns li:last-child::after { display: none; }
.turns .me { --who: var(--accent); }

/* ---------- free, local and private ---------- */

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { position: relative; padding-left: 36px; }
.checks li + li { margin-top: 14px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  width: 22px;
  height: 22px;
  background: var(--sheet);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- support ---------- */

.btn-heart {
  background: var(--page);
  color: var(--ink);
  border: 1px solid var(--line);
  margin: 4px 0 28px;
}
.btn-heart svg { color: var(--heart); }
.btn-heart:hover { background: var(--hover); color: var(--ink); }

/* ---------- footer ---------- */

.foot {
  padding: 8px 24px 48px;
  color: var(--muted);
  font-size: 15px;
}

.foot-in {
  max-width: var(--page-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

@media (min-width: 1180px) {
  .foot-in { max-width: calc(var(--page-w) + 288px); padding-right: 288px; }
}
@media (min-width: 1420px) {
  .foot-in { max-width: calc(248px + var(--page-w) + 288px); padding: 0 288px 0 248px; }
}

.foot .brand { font-size: 17px; }
.foot .brand img { width: 24px; height: 24px; }
.foot p { margin: 0; }

.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { color: var(--muted); }
.foot nav a:hover { color: var(--ink); }

/* ---------- smaller screens ---------- */

@media (max-width: 880px) {
  :root { --pad-x: 48px; --pad-y: 56px; }
  .desk { padding: 16px 16px 40px; }
  .hero .media { margin-left: calc(24px - var(--pad-x)); margin-right: calc(24px - var(--pad-x)); }
}

@media (max-width: 600px) {
  :root { --pad-x: 16px; --pad-y: 40px; --bar-h: 56px; }
  body { font-size: 17px; }
  .bar { padding: 0 8px 0 16px; }
  .brand { font-size: 18px; }
  .brand img { width: 28px; height: 28px; }
  .bar-nav .nav-download { display: none; }
  .bar-nav a { padding: 0 12px; }
  .desk { padding: 8px 0 32px; }
  .pages { gap: 8px; }
  .page { box-shadow: none; }
  .hero { padding-top: 40px; padding-bottom: 40px; }
  .hero h1 { font-size: 34px; line-height: 1.14; margin-bottom: 18px; }
  .hero .media { margin-left: 0; margin-right: 0; }
  .lead { font-size: 18px; margin-bottom: 28px; }
  h2 { font-size: 26px; margin-bottom: 16px; }
  h3 { font-size: 19px; margin-top: 32px; }
  .letter p { font-size: 19px; }
  .page > section + section { margin-top: 56px; }
  .btn { width: 100%; justify-content: center; }
  .get .btn-quiet { width: 100%; }
  .kind { grid-template-columns: 32px minmax(0, 1fr); gap: 0 14px; }
  .kind svg { width: 32px; height: 32px; }
  .ext { display: block; margin: 2px 0 0; }
  .cli { margin-left: -16px; margin-right: -16px; border-radius: 0; padding: 14px 16px; font-size: 13px; }
  .note { max-width: none; }
  .media { margin-top: 32px; border-radius: 8px; }
  .media .play { width: 64px; height: 64px; }
  .media .play svg { width: 26px; height: 26px; }
  .foot { padding: 16px 16px 40px; }
  .foot-in { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  .flag { animation-duration: 1ms; }
}
