/* =========================================================================
   Prodyflow Apps – landing pages
   ========================================================================= */

:root {
  --bg: #eef2f7;
  --panel: #ffffff;
  --surface: #f8fafc;
  --surface-2: #f1f5f9;
  --line: #e2e8f0;
  --ink: #1f2937;
  --ink-2: #475569;
  --muted: #64748b;

  --brand: #713AE8;
  --brand-2: #B460DC;
  --brand-soft: #faf5ff;
  --brand-tint: #ede9fe;
  --brand-ring: rgba(180, 96, 220, 0.16);

  --night-1: #0f172a;
  --night-2: #020617;

  --r-lg: 16px;
  --r-md: 12px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.16);
  --shadow-lg: 0 24px 64px rgba(2, 6, 23, 0.4);

  --font: 'IBM Plex Sans', 'Segoe UI', Tahoma, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.mono { font-family: var(--mono); }

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.nav-brand:hover { color: #fff; }

.nav-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  box-shadow: 0 4px 14px rgba(113, 58, 232, 0.45);
}

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

.nav-link {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav-link.active { color: #fff; background: rgba(255, 255, 255, 0.12); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  padding: 7px 10px;
  cursor: pointer;
}

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

.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(180, 96, 220, 0.35), transparent 60%),
    radial-gradient(700px 420px at 0% 10%, rgba(113, 58, 232, 0.4), transparent 55%),
    linear-gradient(180deg, #0f172a, #0b1120 60%, #020617);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-inner {
  padding: 92px 24px 84px;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 40px;
}

.hero-app-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d8c7ff;
  background: rgba(180, 96, 220, 0.14);
  border: 1px solid rgba(180, 96, 220, 0.35);
  border-radius: 999px;
  padding: 6px 14px;
}
.hero-app-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); }

.hero h1 {
  font-size: clamp(34px, 5.5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.hero h1 .grad {
  background: linear-gradient(90deg, #c9b3ff, #b460dc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: 18px;
  color: #b6c2d4;
  max-width: 52ch;
  margin-top: 16px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-foot { color: #8494ab; font-size: 13px; margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hero-foot .tick { color: #7fd1a3; }

.hero-visual {
  border-radius: var(--r-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-visual .shot {
  background:
    radial-gradient(700px 380px at 70% -20%, rgba(180, 96, 220, 0.25), transparent 60%),
    #0b1120;
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 40px;
}
.hero-visual .shot img { border-radius: 10px; box-shadow: 0 20px 60px rgba(2, 6, 23, 0.6); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn svg { flex-shrink: 0; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); box-shadow: 0 8px 20px rgba(180, 96, 220, 0.35); color: #fff; }

.btn-ghost { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.06); color: #fff; }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.1); color: #fff; }

.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--night-1); color: #fff; }

.btn-lg { padding: 16px 30px; font-size: 16px; }

.dl-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.dl-btn:hover { border-color: var(--brand-2); color: var(--brand); box-shadow: 0 8px 20px var(--brand-ring); }
.dl-btn .os { font-weight: 600; color: var(--muted); display: block; font-size: 12px; }
.dl-btn strong { display: block; }
.dl-btn svg { flex-shrink: 0; }
.dl-btn.dl-current { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 8px 20px var(--brand-ring); }
.dl-btn.dl-current .os { color: var(--brand); }
.dl-btn.dl-off { opacity: 0.45; pointer-events: none; }

.dl-note { color: var(--muted); font-size: 13px; margin-top: 12px; }
.dl-note .mono { color: var(--ink-2); }

.dl-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 20px;
}
.dl-modal[hidden] { display: none; }
.dl-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(2px);
}
.dl-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px;
  animation: riseIn .18s ease-out;
}
.dl-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .15s, color .15s;
}
.dl-modal-close:hover { border-color: var(--brand-2); color: var(--brand); }
.dl-modal-head { display: flex; gap: 14px; align-items: flex-start; padding-right: 28px; margin-bottom: 20px; }
.dl-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  flex-shrink: 0;
}
.dl-modal-head h3 { font-size: 19px; margin-bottom: 4px; }
.dl-modal-head p { color: var(--muted); font-size: 14px; }
.dl-modal-options { display: grid; gap: 10px; }
.dl-modal-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.dl-modal-option:hover { border-color: var(--brand-2); background: var(--brand-soft); color: var(--ink); box-shadow: 0 8px 20px var(--brand-ring); }
.dl-modal-option-body strong { display: block; font-size: 15px; }
.dl-modal-option-body span { font-size: 13px; color: var(--muted); }
.dl-modal-option svg { color: var(--brand); flex-shrink: 0; }
body.modal-open { overflow: hidden; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------------------- sections */

.section { padding: 72px 0; }
.section.alt { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.soft { background: var(--brand-soft); }

.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(26px, 3.5vw, 36px); letter-spacing: -0.02em; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 16px; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover { border-color: #ddd6fe; box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-tint);
  margin-bottom: 16px;
}

.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }

/* ----------------------------------------------------------------- app cards (index) */

.apps-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 34px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
.app-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  opacity: 0.7;
}
.app-card:hover { border-color: #ddd6fe; box-shadow: var(--shadow-md); transform: translateY(-3px); color: inherit; }

.app-card-head { display: flex; align-items: center; gap: 14px; }
.app-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  box-shadow: 0 8px 22px rgba(113, 58, 232, 0.35);
}
.app-card h3 { font-size: 21px; }
.app-card .tag { font-family: var(--mono); font-size: 11px; color: var(--brand); }

.app-card p { color: var(--muted); font-size: 15px; flex: 1; }

.app-card .os-list { display: flex; gap: 8px; flex-wrap: wrap; }
.app-card .os-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
}

.app-card .go { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; font-size: 14.5px; }
.app-card:hover .go { gap: 10px; }
.app-card .go svg { transition: transform .15s; }
.app-card:hover .go svg { transform: translateX(2px); }

/* ----------------------------------------------------------------- code block */

.code-block {
  background: var(--night-1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-lg);
  padding: 24px;
  overflow-x: auto;
  box-shadow: var(--shadow-md);
}
.code-block pre { margin: 0; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; color: #d7dcf0; }
.code-block .c-key { color: #c9b3ff; }
.code-block .c-str { color: #7ee2a8; }
.code-block .c-num { color: #ffc38a; }

/* ----------------------------------------------------------------- requirements */

.req-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.req-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.req-item svg { flex-shrink: 0; color: var(--brand); }
.req-item .lbl { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.req-item .val { font-weight: 700; font-size: 15px; }

/* ----------------------------------------------------------------- steps */

.steps { display: grid; gap: 14px; }
.step {
  display: flex;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 22px;
}
.step-num {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
}
.step h3 { font-size: 15.5px; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 14.5px; }

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

.site-footer {
  background: var(--night-2);
  color: #8494ab;
  padding: 40px 0;
  font-size: 14px;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: #a5b4cf; font-weight: 600; font-size: 13.5px; }
.footer-links a:hover { color: #fff; }

/* ----------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .apps-grid { grid-template-columns: 1fr; }
  .req-grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 64px 24px 56px; }
}

@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 14px;
    background: #0b1120;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 11px 14px; }
  .nav-toggle { display: block; }
  .section { padding: 52px 0; }
  .dl-row .dl-btn { flex: 1 1 100%; }
}
