/* ============================================================
   ReplyMind — base.css
   Shared theme used on every page.
   ============================================================ */

:root {
  --bg: #05070f;
  --bg-2: #080b1a;
  --ink: #ecf1ff;
  --ink-2: #aab3cf;
  --ink-3: #6d7699;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --cyan: #7dd3fc;
  --violet: #7c3aed;
  --indigo: #4f46e5;
  --green: #4ade80;
  --yellow: #fde047;
  --red: #ff5f56;
  --grad: linear-gradient(135deg, #60a5fa 0%, #3b82f6 35%, #6366f1 65%, #8b5cf6 100%);
  --grad-text: linear-gradient(180deg, #d8e6ff 0%, #7dd3fc 50%, #60a5fa 100%);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --shell-w: 1240px;
  --shell-pad: 28px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }

.skip-link {
  position: absolute; top: -40px; left: 12px; z-index: 200;
  padding: 10px 18px; background: var(--blue); color: white;
  border-radius: 8px; font-size: 14px; font-weight: 500;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; outline: 2px solid var(--cyan); outline-offset: 2px; }

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

.shell {
  width: 100%;
  max-width: var(--shell-w);
  margin: 0 auto;
  padding: 0 var(--shell-pad);
}

/* ===== Background field ===== */
.bg-field {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; overflow: hidden;
}
.bg-mesh {
  position: absolute; inset: -20%;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(99,102,241,0.22) 0%, transparent 60%),
    radial-gradient(50% 40% at 10% 30%, rgba(59,130,246,0.18) 0%, transparent 60%),
    radial-gradient(40% 35% at 60% 90%, rgba(124,58,237,0.18) 0%, transparent 60%);
  filter: blur(40px);
  animation: meshDrift 24s ease-in-out infinite alternate;
}
@keyframes meshDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-3%, 2%, 0) scale(1.05); }
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 0%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 0%, transparent 80%);
}
.bg-noise {
  position: absolute; inset: 0;
  opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
}
.stars { position: absolute; inset: 0; }
.star {
  position: absolute; width: 2px; height: 2px;
  background: white; border-radius: 50%; opacity: 0.7;
  animation: twinkle 3s ease-in-out infinite;
}
.star.lg { width: 3px; height: 3px; box-shadow: 0 0 8px rgba(125,211,252,0.8); }
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%      { opacity: 1;   transform: scale(1.2); }
}

/* ===== Top nav ===== */
.top-nav {
  position: sticky; top: 0; z-index: 50;
  -webkit-backdrop-filter: blur(18px);
          backdrop-filter: blur(18px);
  background: rgba(5, 7, 15, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 16px;
}
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; font-size: 17px; letter-spacing: -0.01em;
  color: var(--ink);
}
.nav-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-brand img {
  width: 32px; height: 32px; border-radius: 8px;
  box-shadow: 0 2px 12px rgba(96,165,250,0.4);
}
.nav-brand .by {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px; color: var(--ink-3);
  margin-top: 2px; letter-spacing: 0.04em;
}
.nav-links {
  display: flex; gap: 28px; font-size: 14px;
  color: var(--ink-2); list-style: none;
}
.nav-links a { transition: color 0.18s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; font-size: 13.5px; font-weight: 500;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line-strong);
  border-radius: 999px; transition: 0.18s;
  white-space: nowrap;
}
.nav-cta:hover { background: rgba(255,255,255,0.1); border-color: var(--blue-2); }
.nav-cta .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.8); }
}
.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.04);
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 18px; height: 18px; color: var(--ink); }
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  .top-nav.is-open .nav-links {
    display: flex; position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    padding: 12px var(--shell-pad);
    background: rgba(5,7,15,0.96);
    border-bottom: 1px solid var(--line);
  }
  .top-nav.is-open .nav-links a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }
  .top-nav.is-open .nav-links a:last-child { border-bottom: none; }
}

/* ===== Buttons ===== */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-size: 14.5px; font-weight: 500;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad); color: white;
  box-shadow: 0 8px 30px -8px rgba(96,165,250,0.6), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -10px rgba(96,165,250,0.8), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-ghost {
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: var(--blue-2); }
.btn svg { width: 16px; height: 16px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 8px;
  background: rgba(125,211,252,0.08);
  border: 1px solid rgba(125,211,252,0.22);
  border-radius: 999px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow .badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--cyan); color: #001428;
  font-size: 10px; font-weight: 700;
}
.section-eyebrow {
  display: inline-block;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 5px 12px;
  border: 1px solid rgba(125,211,252,0.22);
  border-radius: 999px;
}

/* ===== Footer ===== */
.ft {
  position: relative; margin-top: 100px;
  border-top: 1px solid var(--line);
  padding: 80px 0 40px; overflow: hidden;
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(96,165,250,0.08) 0%, transparent 70%),
    linear-gradient(180deg, transparent 0%, rgba(8,11,26,0.6) 100%);
}
.ft::before {
  content: ""; position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 50%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.5;
}
.ft-wordmark {
  position: absolute; bottom: -30px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(140px, 22vw, 320px);
  font-weight: 400; line-height: 0.9;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, rgba(96,165,250,0.10) 0%, rgba(96,165,250,0) 60%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  pointer-events: none; white-space: nowrap;
  user-select: none;
}
.ft-top {
  position: relative;
  display: grid; grid-template-columns: 1.3fr 1fr;
  gap: 60px; align-items: end;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 880px) { .ft-top { grid-template-columns: 1fr; gap: 40px; } }
.ft-h {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.05; letter-spacing: -0.025em;
  font-weight: 500;
}
.ft-h em {
  font-family: 'Instrument Serif', serif;
  font-style: italic; font-weight: 400;
  background: var(--grad-text);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.ft-sub {
  margin-top: 14px;
  font-size: 15px; color: var(--ink-2);
  max-width: 460px;
}
.ft-form {
  margin-top: 24px;
  display: flex; align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 5px 5px 16px;
  max-width: 480px; transition: 0.2s;
}
.ft-form:focus-within { border-color: var(--blue-2); background: rgba(96,165,250,0.06); }
.ft-form-icon { color: var(--ink-3); display: grid; place-items: center; }
.ft-form-icon svg { width: 16px; height: 16px; }
.ft-form input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 14.5px; padding: 12px; min-width: 0;
}
.ft-form input::placeholder { color: var(--ink-3); }
.ft-form button {
  background: var(--grad); color: white;
  padding: 10px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.18s; white-space: nowrap;
}
.ft-form button:hover { transform: translateY(-1px); }
.ft-form button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.ft-form-msg {
  margin-top: 10px;
  font-size: 12.5px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  letter-spacing: 0.04em; min-height: 18px;
}
.ft-form-msg.ok  { color: var(--green); }
.ft-form-msg.err { color: #f87171; }

.ft-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.ft-stat {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
  background: rgba(255,255,255,0.02);
  transition: 0.2s;
}
.ft-stat:hover { border-color: var(--line-strong); background: rgba(255,255,255,0.04); }
.ft-stat .n {
  font-family: 'Instrument Serif', serif;
  font-style: italic; font-size: 44px; line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.ft-stat .l {
  margin-top: 8px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
  line-height: 1.4;
}

.ft-grid {
  position: relative;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 50px; padding: 56px 0 40px;
}
@media (max-width: 880px) { .ft-grid { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 520px) {
  .ft-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 20px;
  }
  .ft-brand-col { grid-column: 1 / -1; }
  .ft-brand-col p.tag { max-width: none; }
}
.foot-brand {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.foot-brand img {
  width: 44px; height: 44px; border-radius: 11px;
  box-shadow: 0 4px 16px rgba(96,165,250,0.3);
}
.foot-brand b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.ft-brand-by {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px; color: var(--ink-3);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-top: 2px;
}
.ft-brand-col p.tag {
  font-size: 13.5px; color: var(--ink-2);
  max-width: 320px; line-height: 1.6;
}
.ft-badges {
  margin-top: 20px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.ft-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-2);
}
.ft-badge svg { width: 12px; height: 12px; color: var(--cyan); }
.ft-col h2.ft-h-col,
.ft-col h5 {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 18px; font-weight: 500;
}
.ft-col ul { list-style: none; }
.ft a.flink {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--ink-2); padding: 6px 0;
  transition: color 0.18s, padding-left 0.2s;
  position: relative;
}
.ft a.flink::before {
  content: ""; position: absolute;
  left: 0; top: 50%;
  width: 0; height: 1px; background: var(--cyan);
  transition: width 0.2s;
}
.ft a.flink:hover { color: var(--ink); padding-left: 14px; }
.ft a.flink:hover::before { width: 8px; }
.ft-ext { font-size: 12px; color: var(--ink-3); margin-left: 2px; }
.ft-base {
  position: relative;
  margin-top: 30px; padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.ft-base-l, .ft-base-r { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ft-status {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--green);
}
.ft-status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 10px #22c55e;
  animation: pulseDot 2s ease-in-out infinite;
}
.ft-sep { opacity: 0.5; }
.ft-soc {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--ink-2); transition: 0.2s;
}
.ft-soc:hover {
  background: rgba(96,165,250,0.1);
  border-color: var(--blue-2);
  color: var(--ink);
  transform: translateY(-2px);
}
.ft-soc svg { width: 13px; height: 13px; }

/* ===== Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: 0.08s; }
.reveal[data-d="2"] { transition-delay: 0.16s; }
.reveal[data-d="3"] { transition-delay: 0.24s; }
.reveal[data-d="4"] { transition-delay: 0.32s; }

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

code {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.92em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(125,211,252,0.08);
  color: var(--cyan);
  border: 1px solid rgba(125,211,252,0.18);
  word-break: break-word;
}

/* ============================================================
   Mobile-only refinements (do not affect desktop)
   ============================================================ */
@media (max-width: 768px) {
  :root { --shell-pad: 28px; }
  .shell { padding-left: 28px; padding-right: 28px; }
  .nav-inner { height: 60px; }
  .nav-brand img { width: 28px; height: 28px; }
  .nav-brand { font-size: 15.5px; gap: 10px; }
  .ft { margin-top: 70px; padding: 60px 0 30px; }
  .ft-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ft-stat { padding: 14px 16px; }
  .ft-stat .n { font-size: 36px; }
}

@media (max-width: 520px) {
  :root { --shell-pad: 22px; }
  .shell { padding-left: 22px; padding-right: 22px; }
  .ft-form {
    flex-wrap: wrap;
    border-radius: 18px;
    padding: 10px;
    gap: 8px;
  }
  .ft-form-icon { display: none; }
  .ft-form input {
    flex: 1 1 100%;
    min-width: 0;
    padding: 11px 14px;
    text-align: left;
  }
  .ft-form button {
    flex: 1 1 100%;
    padding: 12px 18px;
    font-size: 14px;
  }
  .ft-wordmark { font-size: clamp(110px, 32vw, 200px); }
  .ft-base {
    flex-direction: column;
    align-items: flex-start;
    font-size: 10px;
    gap: 12px;
  }
  .ft-base-l, .ft-base-r { gap: 10px; flex-wrap: wrap; }
  .skip-link { left: 8px; }
}

@media (max-width: 380px) {
  .nav-brand .by { display: none; }
  .ft-stat .n { font-size: 30px; }
}
