/* =====================================================================
   Independent Developer — refined modern minimalist theme
   ===================================================================== */

@import url('https://rsms.me/inter/inter.css');

:root {
  /* Surface palette — near-black with a slight cool tint */
  --bg: #050507;
  --bg-elev: #0a0a0d;
  --surface: #0e0f13;
  --surface-2: #14151b;
  --surface-hover: #181a21;

  /* Hairline borders use alpha so they blend into any surface */
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);

  /* Text scale */
  --text: #fafafa;
  --text-dim: #b3b5bd;
  --text-muted: #7c7f8a;
  --text-faint: #4a4d56;

  /* Accents — used sparingly */
  --accent: #c4b5fd;
  --accent-2: #93b4ff;
  --accent-3: #f0abfc;
  --gradient-brand: linear-gradient(135deg, #c4b5fd 0%, #93b4ff 50%, #7dd3fc 100%);
  --gradient-text: linear-gradient(180deg, #ffffff 0%, #9ca3af 100%);

  --success: #4ade80;
  --danger: #f87171;

  /* Geometry */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadows / glow */
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 28px -8px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 24px 60px -16px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(196, 181, 253, 0.18);
  --glow-accent: 0 0 24px rgba(196, 181, 253, 0.35);

  --max-w: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

@supports (font-variation-settings: normal) {
  :root { --font: 'InterVariable', sans-serif; --font-display: 'InterVariable', sans-serif; }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

::selection { background: rgba(196, 181, 253, 0.3); color: #fff; }

/* Custom scrollbar (WebKit) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* =====================================================================
   Background — layered aurora + subtle grain
   ===================================================================== */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg);
  overflow: hidden;
}

.bg-gradient::before,
.bg-gradient::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  pointer-events: none;
}

.bg-gradient::before {
  width: 680px;
  height: 680px;
  top: -200px;
  left: -160px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.55), rgba(167, 139, 250, 0) 70%);
  animation: drift1 28s ease-in-out infinite alternate;
}

.bg-gradient::after {
  width: 560px;
  height: 560px;
  top: -60px;
  right: -120px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.45), rgba(125, 211, 252, 0) 70%);
  animation: drift2 36s ease-in-out infinite alternate;
}

/* A tiny SVG grain layer for depth */
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

@keyframes drift1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.12); }
}
@keyframes drift2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 30px) scale(0.92); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-gradient::before, .bg-gradient::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   Typography helpers
   ===================================================================== */
a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover { opacity: 0.78; }

p { margin: 0 0 1em; }

img { max-width: 100%; height: auto; display: block; }

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

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* =====================================================================
   Header / Nav
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 7, 0.65);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.nav-brand:hover { opacity: 1; }

.brand-dot {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(196, 181, 253, 0.12), 0 0 16px rgba(196, 181, 253, 0.55);
}

.brand-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(196, 181, 253, 0.55);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(2.0);  opacity: 0; }
}

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

.nav-links a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  opacity: 1;
}

.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

/* =====================================================================
   Hero
   ===================================================================== */
.hero {
  padding: 120px 0 88px;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  text-transform: none;
  margin-bottom: 28px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
  font-weight: 600;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  max-width: 18ch;
}

.hero h1 .accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--text-dim);
  max-width: 60ch;
  margin: 0 0 40px;
  line-height: 1.6;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  opacity: 1;
}

.btn-primary {
  background: #fff;
  border-color: #fff;
  color: #0a0a0d;
  font-weight: 600;
  box-shadow: 0 8px 24px -8px rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
  background: #fff;
  color: #0a0a0d;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -8px rgba(255, 255, 255, 0.4);
  opacity: 1;
}

/* =====================================================================
   Sections — numbered with subtle index marker
   ===================================================================== */
main {
  counter-reset: section;
}

section {
  padding: 88px 0;
  position: relative;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
  font-weight: 600;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.02rem;
  margin: 0 0 48px;
  max-width: 56ch;
}

/* =====================================================================
   App grid / cards
   ===================================================================== */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card {
  position: relative;
  display: block;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0) 50%),
    var(--surface);
  color: var(--text);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s ease,
              box-shadow 0.3s ease,
              background 0.25s ease;
  overflow: hidden;
  isolation: isolate;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.0), rgba(196, 181, 253, 0.3), rgba(125, 211, 252, 0.0));
  -webkit-mask: linear-gradient(#fff, #fff) content-box, linear-gradient(#fff, #fff);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.card:hover {
  transform: translateY(-3px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0) 50%),
    var(--surface-hover);
  box-shadow: var(--shadow-card-hover);
  opacity: 1;
}

.card:hover::before { opacity: 1; }

.card .badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.22rem;
  letter-spacing: -0.015em;
  font-weight: 600;
  color: var(--text);
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.6;
}

.card .meta {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

/* =====================================================================
   Feature grid
   ===================================================================== */
.features {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 60%),
    var(--surface);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.25s ease;
}

.feature:hover {
  border-color: var(--border-strong);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0) 60%),
    var(--surface-hover);
  transform: translateY(-2px);
}

.feature h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.feature p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
}

/* =====================================================================
   Legal / long-form pages
   ===================================================================== */
.legal {
  padding: 80px 0 96px;
}

.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  font-weight: 600;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.legal .updated {
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  margin-bottom: 40px;
}

.legal h2 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  letter-spacing: -0.005em;
  margin: 40px 0 12px;
  color: var(--text);
  font-weight: 600;
}

.legal p, .legal li {
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.72;
}

.legal ul {
  padding-left: 22px;
}

.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(196, 181, 253, 0.35);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.legal a:hover {
  text-decoration-color: var(--accent);
  opacity: 1;
}

.callout {
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  background:
    linear-gradient(135deg, rgba(196, 181, 253, 0.08), rgba(125, 211, 252, 0.03)),
    var(--surface);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.65;
}

.callout strong { color: var(--text); }

/* =====================================================================
   App hero (per-app pages)
   ===================================================================== */
.app-hero {
  padding: 100px 0 32px;
}

.app-hero .eyebrow {
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--accent);
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.app-hero .eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.app-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 16px 0 18px;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-weight: 600;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.app-hero .tagline {
  color: var(--text-dim);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 64ch;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0 0;
}

.tag {
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 13.5px;
  background: rgba(5, 5, 7, 0.4);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
}

.site-footer a {
  color: var(--text-muted);
  margin-left: 20px;
  transition: color 0.18s ease;
}

.site-footer a:first-of-type { margin-left: 0; }

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

/* =====================================================================
   Utility
   ===================================================================== */
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.mono { font-family: var(--font-mono); }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 720px) {
  .hero { padding: 72px 0 48px; }
  section { padding: 56px 0; }
  .legal { padding: 56px 0 72px; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 8px 10px; font-size: 13px; }
  .card { padding: 22px; }
  .feature { padding: 18px; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
  .site-footer a:first-of-type { margin-left: 0; }
  .site-footer a { margin-left: 14px; }
  .site-footer a:nth-of-type(1) { margin-left: 0; }
  .bg-gradient::before, .bg-gradient::after { opacity: 0.35; }
}

@media (max-width: 420px) {
  .container { padding: 0 20px; }
  .hero h1 { letter-spacing: -0.03em; }
  .btn { padding: 11px 18px; font-size: 14px; }
}
