/* GutAgent: dark first, restrained. Tokens follow DESIGN.md. */
:root {
  color-scheme: dark light;
  --bg: #1c1f24;
  --text: #f2f3f5;
  --secondary: #8b919a;
  --hairline: #2c3037;
  --teal: #3fb39a;
  --gutter: 20px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', system-ui, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafaf8;
    --text: #1b1f24;
    --secondary: #6e747c;
    --hairline: #e3e3df;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-color: var(--hairline);
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-color: currentColor;
}

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

.wrap {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- Brand -------------------------------------------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand svg {
  width: 22px;
  height: 22px;
  color: var(--teal);
  flex: none;
}

header.site {
  padding-top: 28px;
}

/* --- Home --------------------------------------------------------------------------------------- */

main.home {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 72px 0 88px;
}

.home h1 {
  margin: 0;
  font-size: clamp(40px, 6.4vw + 14px, 68px);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.home .lede {
  margin: 20px 0 0;
  max-width: 30em;
  color: var(--secondary);
  font-size: clamp(17px, 0.6vw + 14px, 19px);
  line-height: 1.5;
  text-wrap: pretty;
}

/* --- Waitlist form ------------------------------------------------------------------------------ */

.waitlist {
  margin-top: 44px;
}

.waitlist .row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.waitlist input[type='email'] {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  transition: border-color 160ms ease;
}

.waitlist input[type='email']::placeholder {
  color: var(--secondary);
  opacity: 1;
}

.waitlist input[type='email']:focus {
  outline: none;
  border-bottom-color: var(--text);
}

.waitlist button {
  flex: none;
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 26px;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 120ms ease, opacity 160ms ease;
}

.waitlist button:active {
  transform: scale(0.97);
}

.waitlist button:disabled {
  opacity: 0.5;
  cursor: default;
}

.waitlist .note,
.waitlist .status {
  margin: 14px 0 0;
  min-height: 1.5em;
  color: var(--secondary);
  font-size: 15px;
}

.waitlist .status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.waitlist .status:empty {
  display: none;
}

.waitlist .status svg {
  width: 18px;
  height: 18px;
  color: var(--teal);
  flex: none;
}

.waitlist.done .row,
.waitlist.done .note {
  display: none;
}

.turnstile {
  margin-top: 12px;
}

.turnstile:empty {
  display: none;
}

/* Honeypot: off-screen for people, visible to naive bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

@media (max-width: 480px) {
  main.home {
    align-items: flex-start;
    padding: 64px 0 72px;
  }
  .waitlist .row {
    flex-direction: column;
    gap: 16px;
  }
  .waitlist button {
    width: 100%;
  }
}

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

footer.site {
  padding: 20px 0 32px;
  color: var(--secondary);
  font-size: 15px;
}

footer.site .wrap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 20px;
}

/* Hairline aligned with the text column, not the padded box. */
footer.site .wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--hairline);
}

footer.site nav {
  display: flex;
  gap: 20px;
}

footer.site a {
  text-decoration: none;
}

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

/* --- Legal pages -------------------------------------------------------------------------------- */

main.doc {
  flex: 1;
  padding: 56px 0 72px;
}

.doc h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.doc .updated {
  margin: 8px 0 0;
  color: var(--secondary);
  font-size: 15px;
}

.doc .callout {
  margin: 28px 0 0;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  color: var(--secondary);
}

.doc h2 {
  margin: 40px 0 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.doc p,
.doc ul {
  margin: 12px 0 0;
}

.doc ul {
  padding-left: 1.2em;
}

.doc li + li {
  margin-top: 6px;
}

/* --- Motion ------------------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .rise.d1 {
    animation-delay: 80ms;
  }
  .rise.d2 {
    animation-delay: 160ms;
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }
}
