/* ============================================================
   comment.gg — marketing site styles
   Layout + components adapted from the design system's
   marketing UI kit. Tokens live in tokens.css.
   ============================================================ */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-primary);
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-radius: var(--radius-sm);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--space-10);
  padding-right: var(--space-10);
}

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-lg);
  padding: 0 var(--space-5);
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--text-on-accent);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-colors), transform var(--duration-fast) var(--ease-standard);
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { background: var(--accent-press); transform: scale(0.99); }
.btn--lg {
  height: 48px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-lg);
  font-size: var(--text-md);
}
.btn--sm { height: var(--control-sm); padding: 0 var(--space-3); font-size: var(--text-sm); }
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.btn--ghost:hover { background: var(--bg-subtle); border-color: var(--border-strong); }
.btn--ghost:active { background: var(--bg-muted); }
.btn .arrow { flex: none; }
.btn .gicon {
  flex: none;
  /* The four-color G sits on the coral button — give it its own chip. */
  box-sizing: content-box;
  padding: 5px;
  background: #fff;
  border-radius: var(--radius-pill);
}

/* ---- Eyebrow / badges -------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--accent-text);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
}
.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--accent-text);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}

/* ---- Nav ---------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 19px;
  font-weight: var(--weight-display);
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.brand:hover { text-decoration: none; }
.brand img { width: 17px; height: 21px; }
.brand .gg { color: var(--accent); }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: var(--space-4); }

/* ---- Hero ---------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 72px;
}
.hero h1 {
  font-size: clamp(var(--text-5xl), 6vw, var(--text-6xl));
  line-height: 1.02;
  letter-spacing: var(--tracking-tighter);
  font-weight: var(--weight-display);
  margin: var(--space-5) 0 18px;
}
.hero .lede {
  font-size: 18px;
  line-height: var(--leading-normal);
  color: var(--text-secondary);
  margin: 0 0 var(--space-6);
  max-width: 500px;
}
.lede code {
  font-size: 0.86em;
  background: var(--bg-sunken);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--accent-text);
}

.cta { max-width: 500px; }
.cta__row { display: flex; gap: var(--space-3); }
.cta__note {
  margin: var(--space-2-5) 0 0;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.hero__trust {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
  font-size: 13.5px;
  color: var(--text-tertiary);
  line-height: var(--leading-snug);
  max-width: 470px;
}
.faces { display: flex; flex: none; gap: 4px; }

/* ---- Flags (identity pennants) ------------------------------ */
.flag {
  --size: 24px;
  --bg: var(--identity-slate);
  width: calc(var(--size) * 1.25);
  height: var(--size);
  padding-right: calc(var(--size) * 0.25);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: #fff;
  font-weight: var(--weight-bold);
  font-size: calc(var(--size) * 0.44);
  line-height: 1;
  user-select: none;
  border-radius: calc(var(--size) * 0.21);
  clip-path: polygon(0 0, 100% 0, 84% 50%, 100% 100%, 0 100%);
}
.flag--emoji { font-weight: var(--weight-regular); font-size: calc(var(--size) * 0.56); }
/* No ring shadows on flags: the swallowtail clip-path clips box-shadow to the
   border box, leaving white corner wedges. Adjacent flags separate with gaps. */
.flag--clay { --bg: var(--identity-clay); }
.flag--teal { --bg: var(--identity-teal); }
.flag--ochre { --bg: var(--identity-ochre); }
.flag--denim { --bg: var(--identity-denim); }

/* ---- Pins (always ring + halo — never a bare dot) ----------- */
.pin {
  --c: var(--status-open);
  width: var(--pin-size);
  height: var(--pin-size);
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--c);
  color: #fff;
  font-weight: var(--weight-bold);
  font-size: var(--text-2xs);
  line-height: 1;
  box-shadow: var(--pin-shadow);
}
.pin--resolved { --c: var(--status-resolved); }
.pin--orphaned {
  background: color-mix(in srgb, var(--status-orphaned) 55%, transparent);
  border: 1.5px dashed #fff;
  box-shadow: 0 0 0 2px #fff, 0 2px 5px var(--pin-halo), 0 0 0 4.5px var(--pin-halo);
}
.pin--active { box-shadow: var(--pin-shadow-active); transform: scale(1.12); }

/* ---- Hero product mock -------------------------------------- */
.mock {
  background: var(--stone-900);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(40, 30, 20, 0.28);
  overflow: hidden;
  width: 100%;
}
.mock__bar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: var(--space-2-5);
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.mock__bar img { width: 14px; height: 18px; }
.mock__title { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: #e9e6e0; }
.mock__people { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.mock__people .flag { --size: 22px; }
.mock__stage { position: relative; padding: var(--space-5); background: var(--stone-950); }
.mock__snap {
  position: relative;
  background: #fff;
  border-radius: 9px;
  overflow: hidden;
  height: 280px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.snap__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}
.snap__logo { width: 22px; height: 10px; border-radius: 4px; background: var(--flare-500); }
.snap__links { display: flex; gap: var(--space-2); }
.snap__links i { width: 22px; height: 7px; border-radius: 4px; background: #e7e7ec; }
.snap__hero { padding: 26px 22px 18px; text-align: center; }
.snap__h1 { font-size: 26px; font-weight: var(--weight-display); color: #1c1c22; letter-spacing: -0.02em; }
.snap__p { height: 8px; background: #ededf0; border-radius: 4px; margin: 14px auto 7px; width: 70%; }
.snap__p2 { height: 8px; background: #ededf0; border-radius: 4px; margin: 0 auto 16px; width: 54%; }
.snap__btn {
  display: inline-block;
  background: #1c1c22;
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 8px 16px;
  border-radius: 7px;
}
.snap__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2-5); padding: 0 22px 22px; }
.snap__grid i { height: 56px; background: #f1f1f4; border-radius: var(--radius-md); }
.mock__pin { position: absolute; }
.mock__pin--1 { left: 12%; top: 24%; }
.mock__pin--2 { left: 63%; top: 30%; }
.mock__pin--3 { left: 44%; top: 74%; }

.mock__float {
  position: absolute;
  right: 30px;
  bottom: 26px;
  width: 246px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #ece9e2;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.float__top { display: flex; align-items: center; gap: var(--space-2); }
.float__top .flag { --size: 26px; }
.float__name { font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--stone-900); line-height: 1.1; }
.float__meta { font-size: var(--text-2xs); color: #9a948b; }
.float__body { font-size: var(--text-sm); color: var(--stone-800); line-height: 1.45; }
.status-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  color: var(--status-open-fg);
  background: var(--status-open-bg);
  border-radius: var(--radius-pill);
  padding: 3px 9px;
}
.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--status-open);
}
.reactions { display: flex; gap: var(--space-1-5); }
.reaction {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--stone-700);
  background: var(--stone-50);
  border: 1px solid var(--stone-150);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
}
.reaction--mine { background: var(--accent-subtle); border-color: var(--accent-border); color: var(--accent-text); }

/* ---- Loop (01 / 02 / 03) ------------------------------------- */
.loop {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.loop__inner {
  padding-top: 52px;
  padding-bottom: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-10);
}
.step { display: flex; flex-direction: column; gap: var(--space-2-5); }
.step__num { font-family: var(--font-mono); font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--accent); }
.step h3 { font-size: var(--text-xl); font-weight: var(--weight-bold); letter-spacing: var(--tracking-tight); margin: 0; }
.step p { font-size: var(--text-md); line-height: 1.55; color: var(--text-secondary); margin: 0; }

/* ---- Feature sections ----------------------------------------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding-top: 76px;
  padding-bottom: 76px;
}
.feature__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); min-width: 0; }
.feature h2 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-display);
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.1;
}
.feature p { font-size: 16.5px; line-height: var(--leading-relaxed); color: var(--text-secondary); margin: 0; max-width: 460px; }

.pin-demo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.pin-tile {
  height: 120px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  border: 1px solid var(--border-subtle);
}
.pin-tile--white { background: #fff; }
.pin-tile--photo { background: linear-gradient(135deg, #f6d365, #fda085); }
.pin-tile--chaos { background: repeating-linear-gradient(45deg, #3b6ea5 0 12px, #c44 12px 24px); }
.pin-tile--black { background: #15171b; }

.feature--dark { background: var(--stone-900); }
.feature--dark h2 { color: var(--stone-25); }
.feature--dark p { color: var(--stone-300); }
.codeblock {
  background: var(--stone-950);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--stone-200);
  overflow-x: auto;
  margin: 0;
}
.codeblock .k { color: var(--flare-300); }
.codeblock .s { color: var(--go-200); }
.codeblock .b { color: var(--stone-400); }

/* ---- GG band --------------------------------------------------- */
.gg-band {
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}
.gg-band__sweep {
  position: absolute;
  inset: 0;
  background: radial-gradient(110% 80% at 50% 130%, color-mix(in oklch, var(--go-500) 18%, transparent), transparent 70%);
}
.gg-band__inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 80px var(--space-10);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.gg-band__gg { font-size: 64px; font-weight: var(--weight-display); letter-spacing: var(--tracking-tighter); color: var(--go-500); line-height: 1; }
.gg-band__gg span { color: var(--accent); }
.gg-band h2 { font-size: 32px; font-weight: var(--weight-display); letter-spacing: -0.02em; margin: 0; line-height: 1.12; }
.gg-band p { font-size: 16.5px; line-height: var(--leading-relaxed); color: var(--text-secondary); margin: 0 0 var(--space-2); max-width: 520px; }

/* ---- Footer ----------------------------------------------------- */
.footer { border-top: 1px solid var(--border-subtle); }
.footer__inner {
  padding-top: 52px;
  padding-bottom: var(--space-10);
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: var(--space-10);
}
.footer__brand { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.footer__brand .brand { font-size: 17px; }
.footer__brand .brand img { width: 15px; height: 19px; }
.footer__tag { font-size: var(--text-base); color: var(--text-tertiary); max-width: 240px; line-height: var(--leading-normal); }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.footer__col { display: flex; flex-direction: column; gap: var(--space-2-5); }
.footer__h {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-tertiary);
}
.footer__col a { font-size: var(--text-base); color: var(--text-secondary); }
.footer__copy {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ---- Prose pages (terms / privacy / thanks / 404) -------------- */
.prose-page { max-width: var(--container-prose); margin: 0 auto; padding: 0 var(--space-6) var(--space-20); }
.prose-page h1 {
  font-size: var(--text-4xl);
  font-weight: var(--weight-display);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: var(--space-12) 0 var(--space-2);
}
.prose-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  font-size: var(--text-base);
  color: var(--text-tertiary);
}
.draft-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--status-pending-fg);
  background: var(--status-pending-bg);
  border: 1px solid color-mix(in srgb, var(--status-pending) 35%, transparent);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}
.prose-page h2 {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  margin: var(--space-8) 0 var(--space-3);
}
.prose-page p, .prose-page li {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}
.prose-page strong { color: var(--text-primary); }
.prose-page .placeholder {
  background: var(--status-pending-bg);
  border-radius: var(--radius-xs);
  padding: 1px 4px;
  color: var(--status-pending-fg);
  font-style: normal;
}

/* ---- Centered message pages (thanks / 404) ---------------------- */
.center-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-4);
  padding: var(--space-16) var(--space-6);
}
.center-page h1 { font-size: var(--text-4xl); font-weight: var(--weight-display); letter-spacing: -0.025em; margin: 0; }
.center-page p { font-size: var(--text-lg); color: var(--text-secondary); max-width: 440px; margin: 0; line-height: var(--leading-relaxed); }

/* ---- Responsive -------------------------------------------------- */
@media (max-width: 960px) {
  .container { padding-left: var(--space-6); padding-right: var(--space-6); }
  .hero { grid-template-columns: 1fr; gap: var(--space-10); padding-top: var(--space-8); padding-bottom: var(--space-12); }
  .feature { grid-template-columns: 1fr; gap: var(--space-8); padding-top: 56px; padding-bottom: 56px; }
  .loop__inner { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .cta__row { flex-direction: column; gap: var(--space-3); }
  .cta .btn { width: 100%; height: 52px; }
  .hero h1 { font-size: var(--text-5xl); }
  .hero h1 br { display: none; }
  .pin-demo { grid-template-columns: 1fr; }
  .mock__float { right: 12px; bottom: 12px; width: 210px; }
  .nav { gap: var(--space-3); }
}
