/* ============================================================
   Ophelia — download page
   Palette adapted to Vertex Cloudway: cyan / violet / pink
   on a deep navy-black. Fonts: Space Grotesk + JetBrains Mono.
   ============================================================ */

:root {
  /* Backgrounds */
  --bg:           #04060f;
  --bg-2:         #070b1a;
  --bg-elev:      rgba(12, 18, 40, 0.68);
  --bg-elev-2:    rgba(14, 22, 48, 0.92);

  /* Lines */
  --border:       rgba(125, 226, 255, 0.18);
  --border-soft:  rgba(125, 226, 255, 0.08);
  --border-strong:rgba(125, 226, 255, 0.34);

  /* Text */
  --text:         #f7fbff;
  --text-muted:   #9aacc8;
  --text-faint:   #5f7093;

  /* Accents */
  --accent:       #8d72ff;  /* violet — matches Ophelia icon */
  --accent-2:     #ff5fc9;  /* pink — gradient partner */
  --accent-alt:   #7de2ff;  /* cyan — secondary highlight */
  --accent-glow:  rgba(141, 114, 255, 0.35);

  /* Radii + shadows */
  --radius:       14px;
  --radius-sm:    8px;
  --radius-lg:    24px;
  --shadow:       0 24px 90px rgba(0, 0, 0, 0.45);
  --max:          1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Ambient starfield-style glow behind everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(141, 114, 255, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 15%, rgba(255, 95, 201, 0.08), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(125, 226, 255, 0.06), transparent 60%);
  pointer-events: none;
  z-index: -2;
}

a { color: var(--text); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }

code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .9em;
}

/* ============== NAV ============== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(4, 6, 15, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.nav-brand img {
  display: block;
  border-radius: 7px;
}

.nav-links {
  display: flex;
  gap: 26px;
  font-size: 14px;
  color: var(--text-muted);
}
.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--text); }

@media (max-width: 720px) {
  .nav { padding: 14px 16px; }
  .nav-links { display: none; }
}

/* ============== BUTTONS ============== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s, border-color .15s, box-shadow .2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 18px var(--accent-glow);
}
.btn-primary:hover {
  box-shadow: 0 8px 30px var(--accent-glow);
  color: #fff;
}

.btn-secondary {
  background: var(--bg-elev);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--bg-elev-2);
  border-color: var(--accent);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); }

.btn-sm  { padding: 7px 14px; font-size: 13px; }
.btn-lg  { padding: 14px 26px; font-size: 15px; border-radius: 10px; }

/* ============== HERO ============== */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 90px 32px 80px;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, rgba(141, 114, 255, 0.28), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.hero-badge-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #7affc3;
  box-shadow: 0 0 0 4px rgba(122, 255, 195, 0.18);
  animation: pulse 2.5s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(122, 255, 195, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(122, 255, 195, 0); }
}

.hero-title {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
}
.grad {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 32px;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 13px;
}
.hero-meta .dot { color: var(--text-faint); }
.hero-meta a { color: var(--text-muted); border-bottom: 1px dotted var(--border); }

.btn-os-icon { display: inline-flex; align-items: center; }
.btn-os-icon svg { display: block; }

/* Hero feature image — use the real app icon */
.hero-screenshot {
  perspective: 1500px;
  display: flex;
  justify-content: center;
}
.hero-icon-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow), 0 0 120px rgba(141, 114, 255, 0.18);
  overflow: hidden;
  transform: rotateY(-6deg) rotateX(4deg);
  transition: transform .4s ease;
}
.hero-icon-card:hover { transform: rotateY(-2deg) rotateX(2deg); }
.hero-icon-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding: 60px 20px 40px; gap: 40px; }
  .hero-title { font-size: 40px; }
  .hero-sub { font-size: 16px; }
  .hero-icon-card { transform: none; max-width: 320px; }
}

/* ============== SECTIONS ============== */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 100px 32px;
}
.section-alt {
  background: linear-gradient(180deg, transparent, rgba(12,18,40,0.5) 50%, transparent);
  max-width: none;
  padding: 100px 32px;
}
.section-alt > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

.section-head {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 56px;
}
.section-head.compact { margin-bottom: 28px; }
.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-alt);
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.section-sub {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0;
}

/* ============== FEATURES GRID ============== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.feature-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .15s, border-color .15s, background .15s;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--bg-elev-2);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.feature-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ============== DOWNLOAD CARDS ============== */

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 420px));
  gap: 20px;
  justify-content: center;
}
.download-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: transform .15s, border-color .15s, box-shadow .2s;
  position: relative;
}
.download-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(141, 114, 255, 0.18);
}
.download-card.detected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 40px rgba(141, 114, 255, 0.22);
}
.download-card.detected::before {
  content: "DETECTED";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 999px;
}
.download-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  margin-bottom: 16px;
}
.download-card h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
}
.download-meta {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-muted);
}
.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.download-buttons .btn { width: 100%; }
.download-req {
  margin: 0;
  font-size: 12px;
  color: var(--text-faint);
}

.download-footnote {
  text-align: center;
  margin-top: 36px;
  color: var(--text-muted);
  font-size: 14px;
}
.download-footnote a {
  color: var(--accent-alt);
  border-bottom: 1px dotted var(--accent-alt);
}

/* ============== SYSTEM REQ ============== */

.system-req .req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.req-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.req-card h4 {
  margin: 0 0 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent-alt);
}
.req-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.85;
}
.req-card code { font-size: 12px; }

/* ============== FAQ ============== */

.faq {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq details {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: border-color .15s;
}
.faq details[open] { border-color: var(--accent); }
.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '＋';
  color: var(--accent);
  font-weight: 400;
  font-size: 20px;
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}
.faq a { color: var(--accent-alt); border-bottom: 1px dotted var(--accent-alt); }

/* ============== FOOTER ============== */

.footer {
  border-top: 1px solid var(--border-soft);
  padding: 50px 32px 36px;
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
}
.footer-brand img { border-radius: 6px; }
.footer-tag {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}
.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
}
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-copy {
  margin: 8px 0 0;
  color: var(--text-faint);
  font-size: 12px;
}

/* ============== RESPONSIVE ============== */

@media (max-width: 720px) {
  .section { padding: 70px 20px; }
  .section-alt { padding: 70px 20px; }
  .section-head h2 { font-size: 28px; }
  .hero-title { font-size: 36px; }
}
