/* RingFollow: one stylesheet, no build step. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

:root {
  color-scheme: dark;
  --bg: #0F172A;
  --surface: #1E293B;
  --surface-2: #273449;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.36);
  --text: #E2E8F0;
  --text-muted: #94A3B8;
  --accent: #10B981;
  --accent-hover: #34D399;
  --accent-2: #22D3EE;
  /* accent used as text: the hover shade is the higher-contrast one in both modes */
  --accent-text: var(--accent-hover);
  --on-accent: #04130D;
  --bubble-out: var(--accent);
  --bubble-out-text: var(--on-accent);
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-2));

  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
  --content: 1120px;
  --gutter: 16px;
  --header-h: 64px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --surface-2: #F1F5F9;
    --border: #E2E8F0;
    --border-strong: #CBD5E1;
    --text: #0F172A;
    --text-muted: #475569;
    --accent: #059669;
    --accent-hover: #047857;
    --accent-2: #0891B2;
    --bubble-out: var(--accent-hover);
    --bubble-out-text: #FFFFFF;
  }
}

@media (min-width: 768px) {
  :root { --gutter: 24px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 32px; }
}

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

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background ribbons: fixed behind all content (isolation keeps z-index -1 above the body background). */
body {
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* lvh: fixed size while mobile address bars show/hide, so the ribbons don't rescale mid-scroll */
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background: url("/bg-dark.svg") center top / cover no-repeat;
}

@media (prefers-color-scheme: light) {
  body::before {
    background-image: url("/bg-light.svg");
  }
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
}

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

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

a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[id] {
  scroll-margin-top: var(--header-h);
}

.wrap {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
}

.skip:focus {
  top: 8px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: var(--on-accent);
}

.btn-primary:hover {
  color: var(--on-accent);
  filter: brightness(1.08);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface);
  color: var(--text);
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

.logo::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.logo:hover {
  color: var(--text);
}

.header-cta {
  margin-left: auto;
}

.nav-desktop {
  display: none;
}

.nav-desktop ul,
.menu-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-desktop ul {
  display: flex;
  gap: 32px;
}

.nav-desktop a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.nav-desktop a:hover {
  color: var(--text);
}

.menu summary {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu summary svg {
  width: 20px;
  height: 20px;
}

.menu[open] summary {
  background: var(--surface);
}

/* Narrow phones: icon-only toggle; the label stays for screen readers. */
@media (max-width: 399px) {
  .menu summary {
    padding: 0 10px;
  }

  .menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.menu-panel ul {
  padding: 8px var(--gutter) 16px;
}

.menu-panel li + li {
  border-top: 1px solid var(--border);
}

.menu-panel a {
  display: block;
  padding: 12px 0;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
}

@media (min-width: 768px) {
  .nav-desktop {
    display: block;
    margin-left: auto;
  }

  .header-cta {
    margin-left: 16px;
  }

  .menu {
    display: none;
  }
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 56px 80px;
}

/* Gradient use 1 of 3: a soft wash along the top edge. It ends above the
   eyebrow text; any lower and the eyebrow drops below 4.5:1 in light mode. */
.hero::before {
  content: "";
  position: absolute;
  top: -224px;
  left: 0;
  right: 0;
  height: 256px;
  background: var(--gradient);
  opacity: 0.18;
  filter: blur(72px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  gap: 56px;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 500;
}

.hero h1 {
  font-size: 30px;
}

.hero-sub {
  max-width: 52ch;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.hero-actions .btn {
  flex: 1 1 auto;
}

.hero-note {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

@media (min-width: 480px) {
  .hero h1 { font-size: 44px; }
  .hero-actions .btn { flex: 0 0 auto; }
}

@media (min-width: 1024px) {
  .hero {
    padding-block: 96px 128px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) 344px;
    align-items: center;
    gap: 64px;
  }

  .hero h1 {
    font-size: 60px;
  }
}

/* Phone mockup */

.mockup {
  justify-self: center;
  width: 100%;
  max-width: 344px;
  margin: 0;
}

.phone {
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 44px;
  background: var(--surface);
}

.screen {
  padding: 16px 16px 32px;
  border-radius: 36px;
  background: var(--bg);
}

.notch {
  width: 88px;
  height: 24px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: var(--surface);
}

.thread-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  line-height: 1.4;
}

.thread-name {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.thread-meta {
  color: var(--text-muted);
  font-size: 14px;
}

.thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
}

.sys {
  align-self: center;
  padding-bottom: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.bubble {
  max-width: 84%;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
}

.bubble.in {
  align-self: flex-start;
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
}

.bubble.out {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: var(--bubble-out);
  color: var(--bubble-out-text);
}

.mockup figcaption {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .phone {
    animation: rise 640ms cubic-bezier(0.2, 0.7, 0.2, 1) 120ms both;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: 80px;
}

.section h2 {
  font-size: 30px;
}

.lede {
  max-width: 60ch;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 18px;
}

@media (min-width: 1024px) {
  .section {
    padding-block: 120px;
  }

  .section h2 {
    font-size: 44px;
  }
}

/* Why */

.why-grid {
  display: grid;
  gap: 40px;
}

.example {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.example-label {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.example dl {
  margin: 16px 0 24px;
  border-top: 1px solid var(--border);
}

.example dl div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-block: 12px;
  border-bottom: 1px solid var(--border);
}

.example dt {
  color: var(--text-muted);
}

.example dd {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 1024px) {
  .why-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
    gap: 64px;
  }

  .example {
    padding: 32px;
  }
}

/* How it works */

.steps {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  column-gap: 16px;
  padding-block: 24px;
  border-top: 1px solid var(--border);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  grid-row: span 2;
  padding-top: 4px;
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.steps h3,
.steps p {
  grid-column: 2;
}

.steps h3 {
  font-size: 22px;
}

.steps p {
  max-width: 40ch;
  margin-top: 8px;
  color: var(--text-muted);
}

.steps-note {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

@media (min-width: 1024px) {
  .steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    margin-top: 56px;
  }

  .steps li {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 24px 32px;
  }

  .steps li::before {
    grid-row: auto;
    padding: 0 0 32px;
  }

  .steps h3,
  .steps p {
    grid-column: 1;
  }

  .steps-note {
    margin-top: 0;
  }
}

/* Trades strip */

.trades {
  padding-block: 24px;
  border-block: 1px solid var(--border);
}

.trades-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 32px;
}

.trades h2 {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

/* Every item gets a leading dot; the list is pulled left 20px and that strip is
   clipped, so the dot that starts each wrapped line is hidden. */
.trades ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 0 0 0 -20px;
  padding: 0;
  list-style: none;
  clip-path: inset(0 0 0 20px);
  font-size: 18px;
  font-weight: 500;
}

.trades li {
  display: flex;
  align-items: center;
  gap: 16px;
}

.trades li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* Pricing */

.center {
  text-align: center;
}

.price-card {
  max-width: 440px;
  margin: 40px auto 0;
  padding: 32px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.price-card h3 {
  font-size: 22px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 16px;
}

/* Gradient use 3 of 3: the price figure. */
.price-amount {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 60px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.price-period {
  color: var(--text-muted);
  font-size: 18px;
}

.included {
  display: grid;
  gap: 12px;
  margin: 24px 0 32px;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  font-variant-numeric: tabular-nums;
}

.included li {
  display: flex;
  gap: 12px;
}

.included li::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  background: var(--accent-text);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3 3 7-7'/%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 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3 3 7-7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.price-card .btn {
  width: 100%;
}

.fine {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

@media (min-width: 768px) {
  .price-card {
    padding: 40px;
  }
}

@media (forced-colors: active) {
  .price-amount {
    background: none;
    color: CanvasText;
  }
}

/* FAQ */

.faq-grid {
  display: grid;
  gap: 32px;
}

.faq-list {
  border-top: 1px solid var(--border);
}

.faq-list details {
  border-bottom: 1px solid var(--border);
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 20px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M8 2.5v11M2.5 8h11'/%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 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M8 2.5v11M2.5 8h11'/%3E%3C/svg%3E") center / contain no-repeat;
}

.faq-list details[open] summary::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M2.5 8h11'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M2.5 8h11'/%3E%3C/svg%3E");
}

.faq-list details p {
  max-width: 65ch;
  padding-bottom: 24px;
  color: var(--text-muted);
}

@media (min-width: 1024px) {
  .faq-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 64px;
  }
}

/* Final CTA band */

.cta {
  padding-block: 80px;
  border-block: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}

.cta h2 {
  font-size: 30px;
}

.cta .btn {
  margin-top: 32px;
}

.cta p {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

@media (min-width: 768px) {
  .cta h2 { font-size: 44px; }
}

@media (min-width: 1024px) {
  .cta { padding-block: 120px; }
}

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

.site-footer {
  padding-block: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

main + .site-footer {
  border-top: 1px solid var(--border);
}

main:has(> .cta:last-child) + .site-footer {
  border-top: 0;
}

.footer-inner {
  display: grid;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
}

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

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 32px;
  }

  .footer-sms {
    grid-column: 1 / -1;
  }
}

/* ---------- Text pages (legal, welcome, 404) ---------- */

.page {
  max-width: 720px;
  padding-block: 64px 96px;
}

.page h1 {
  font-size: 30px;
}

.page h2 {
  margin-top: 48px;
  font-size: 22px;
}

.page h3 {
  margin-top: 32px;
  font-size: 18px;
}

.page p,
.page ul,
.page dl {
  max-width: 65ch;
  margin-top: 16px;
}

.page ul {
  padding-left: 24px;
}

.page li + li {
  margin-top: 8px;
}

.page .meta {
  margin-top: 8px;
  color: var(--text-muted);
}

.page .btn {
  margin-top: 32px;
}

.page dl {
  margin-bottom: 0;
  border-top: 1px solid var(--border);
}

.page dl div {
  display: grid;
  gap: 4px;
  padding-block: 12px;
  border-bottom: 1px solid var(--border);
}

.page dt {
  font-weight: 600;
}

.page dd {
  margin: 0;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .page {
    padding-block: 96px 128px;
  }

  .page h1 {
    font-size: 44px;
  }

  .page dl div {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 24px;
  }
}
