:root {
  color-scheme: light;
  --page: #fafafa;
  --surface: #ffffff;
  --ink: #000000;
  --ink-2: #171717;
  --grey: #666666;
  --grey-2: #8f8f8f;
  --grey-3: #b8b8b8;
  --line: #ebebeb;
  --line-2: #d4d4d4;
  --hover: #f5f5f5;
  --tint: #fafafa;
  --sans:
    "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --mono:
    "Geist Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(600px 320px at 50% -80px, rgba(0, 0, 0, 0.07), transparent 70%);
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 0%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 75% at 50% 0%, #000 25%, transparent 78%);
}

::selection {
  background: var(--ink);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea {
  font: inherit;
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 250, 250, 0.82);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.logo {
  display: grid;
  flex: none;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

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

.nav-link {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--grey);
  font-size: 14px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 32px;
  margin-left: 6px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

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

.hero {
  position: relative;
  padding: 96px 24px 72px;
  text-align: center;
  scroll-margin-top: 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--grey);
  font-family: var(--mono);
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.hero h1 {
  margin-bottom: 20px;
  font-size: clamp(48px, 9vw, 84px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.0;
}

.hero-sub {
  max-width: 540px;
  margin: 0 auto 40px;
  color: var(--grey);
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.6;
}

.pay {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.pay-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  margin-top: 20px;
  color: var(--grey-2);
  font-family: var(--mono);
  font-size: 12px;
}

.stats {
  margin-top: 28px;
  color: var(--grey);
  font-family: var(--mono);
  font-size: 13px;
}

.stats strong {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- buttons ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  touch-action: manipulation;
  user-select: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

.pill:active {
  transform: scale(0.98);
}

.pill:focus-visible,
.tool:focus-visible,
.nav-link:focus-visible,
.nav-cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.pill-dark {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

.pill-lg {
  min-height: 52px;
  padding: 0 28px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

.why {
  max-width: 1080px;
  margin: 0 auto;
  padding: 72px 24px;
  text-align: center;
  scroll-margin-top: 72px;
}

.section-label {
  margin-bottom: 12px;
  color: var(--grey-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.why h2 {
  margin-bottom: 40px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  text-align: left;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--line-2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.card-num {
  display: block;
  margin-bottom: 14px;
  color: var(--grey-3);
  font-family: var(--mono);
  font-size: 11px;
}

.card h3 {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--grey);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- signal ---------- */

.signal {
  padding: 24px 24px 72px;
  text-align: center;
}

.signal-copy {
  max-width: 520px;
  margin: 0 auto 28px;
  color: var(--ink-2);
  font-size: clamp(20px, 3vw, 24px);
  letter-spacing: -0.02em;
  line-height: 1.45;
}

.signal-copy strong {
  font-weight: 600;
}

/* ---------- compose ---------- */

.compose {
  display: flex;
  justify-content: center;
  padding: 24px 24px 96px;
  scroll-margin-top: 80px;
}

.compose-card {
  width: 100%;
  max-width: 680px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 24px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.03);
  transition: background-color 0.4s ease, border-color 0.3s ease;
}

.compose-label {
  display: block;
  margin-bottom: 12px;
  color: var(--grey-2);
  font-family: var(--mono);
  font-size: 12px;
}

.compose textarea {
  display: block;
  width: 100%;
  min-height: 64px;
  padding: 0 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.4;
  resize: none;
  overflow: hidden;
}

.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
  color: var(--grey);
  font-family: var(--mono);
  font-size: 12px;
}

.compose-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--grey);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
  touch-action: manipulation;
  user-select: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.tool:first-child {
  margin-left: -10px;
}

.count {
  margin-left: auto;
  padding: 0 12px;
  color: var(--grey-3);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.count.over {
  color: #c4320a;
}

.compose .pill-dark {
  min-height: 36px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
}

.has-sent .compose-card {
  border-color: var(--line-2);
  background: var(--tint);
}

.has-sent .compose-label {
  color: var(--ink);
}

.has-sent .compose .pill-dark {
  animation: ring 1.4s ease 500ms 2;
}

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

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--grey-2);
  font-family: var(--mono);
  font-size: 12px;
  text-align: center;
}

.footer-dot {
  color: var(--grey-3);
}

@keyframes ring {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.28);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0);
  }
}

/* ---------- sticky mobile cta ---------- */

.mobile-cta {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: none;
  visibility: hidden;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(250, 250, 250, 0.88);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  transform: translateY(110%);
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
}

.mobile-cta.is-visible {
  visibility: visible;
  transform: none;
  transition: transform 0.25s ease, visibility 0s;
}

.mobile-cta-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--grey);
  font-family: var(--mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-cta .pill {
  flex: none;
  min-height: 44px;
  padding: 0 22px;
  font-size: 15px;
}

/* ---------- states & media ---------- */

@media (hover: hover) {
  .pill:hover {
    border-color: var(--grey-3);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  }

  .pill-dark:hover {
    border-color: #2e2e2e;
    background: #2e2e2e;
  }

  .tool:hover {
    background: var(--hover);
    color: var(--ink);
  }

  .nav-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--ink);
  }

  .nav-cta:hover {
    border-color: #2e2e2e;
    background: #2e2e2e;
  }
}

@media (pointer: coarse) {
  .pill-lg {
    min-height: 54px;
  }

  .tool {
    height: 44px;
  }

  .compose .pill-dark {
    min-height: 44px;
    padding: 0 22px;
  }
}

@media (max-width: 640px) {
  .nav-inner {
    padding: 0 16px;
  }

  .hero {
    padding: 72px 20px 56px;
  }

  .hero-br {
    display: none;
  }

  .pay {
    flex-direction: column;
    align-items: stretch;
  }

  .why {
    padding: 56px 20px;
  }

  .compose {
    padding: 16px 20px 80px;
  }

  .nav-link {
    display: none;
  }

  .mobile-cta {
    display: flex;
  }

  body.has-mobile-cta {
    padding-bottom: calc(66px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) {
  .compose-card {
    padding: 18px;
  }

  .tool {
    padding: 0 8px;
  }

  .tool:first-child {
    margin-left: -8px;
  }

  .count {
    display: none;
  }

  .compose .pill-dark {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
