/* Copyright (c) 2025-2026 Ioannis Belesiotis. All rights reserved.
   This source code is proprietary and confidential. */
/* ═══════════════════════════════════════════════════════════════════════════
   Mermix Portal — Design System
   Marketing site + self-care portal styles.
   Design tokens align with apps/planner/styles/catalyst.css.
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --accent:          #5B73F5;
  --accent-dark:     #4558d4;
  --accent-light:    #eef1ff;
  --accent-subtle:   #f5f7ff;

  --text:            #0f172a;
  --text-secondary:  #475569;
  --text-muted:      #94a3b8;

  --bg:              #ffffff;
  --bg-alt:          #f8fafc;
  --bg-dark:         #0f172a;

  --border:          #e2e8f0;
  --border-strong:   #cbd5e1;

  --success:         #10b981;
  --warning:         #f59e0b;
  --danger:          #ef4444;

  --radius-sm:       6px;
  --radius-md:       10px;
  --radius-lg:       16px;
  --radius-xl:       24px;
  --radius-full:     9999px;

  --shadow-sm:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:       0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:       0 12px 32px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --shadow-accent:   0 8px 24px rgba(91,115,245,.30);

  --nav-h:           64px;
  --content-w:       1180px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-subtle); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }

.btn-white {
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  box-shadow: var(--shadow-md);
}
.btn-white:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

/* ── Badge ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
}
.badge-accent { background: var(--accent-light); color: var(--accent); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-soon { background: #f1f5f9; color: var(--text-muted); }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 100%;
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.nav-logo img { height: 40px; width: auto; position: relative; top: -3px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.12s, background 0.12s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); background: var(--accent-subtle); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px;
  background: linear-gradient(160deg, var(--accent-subtle) 0%, #fff 60%);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.hero h1 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
}
.hero h1 span { color: var(--accent); }
.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  grid-column: 1 / -1;
  text-align: center;
}
.hero-punchline {
  font-family: 'DM Serif Display', serif;
  font-size: 46px;
  font-weight: 400;
  background: linear-gradient(135deg, var(--accent) 0%, #818cf8 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
  line-height: 1.25;
  animation: punchline-in 0.8s ease-out both;
}
@keyframes punchline-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 480px;
}
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.hero-meta {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Product mockup ─────────────────────────────────────────────────────── */
.hero-visual { position: relative; }
.mockup-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.06);
  background: #1e293b;
}
.mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.mockup-dot:nth-child(1) { background: #ef4444; }
.mockup-dot:nth-child(2) { background: #f59e0b; }
.mockup-dot:nth-child(3) { background: #10b981; }
.mockup-screen {
  position: relative;
  aspect-ratio: 16/10;
  background: #f8fafc;
  overflow: hidden;
}
.mockup-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.mockup-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
}
.mockup-placeholder-icon { font-size: 48px; opacity: 0.4; }

/* Video CTA overlay */
.mockup-video-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,0.35);
  backdrop-filter: blur(2px);
  transition: background 0.2s;
  cursor: pointer;
}
.mockup-video-btn:hover { background: rgba(15,23,42,0.5); }
.play-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s;
}
.mockup-video-btn:hover .play-circle { transform: scale(1.08); }
.play-circle svg { color: var(--accent); margin-left: 3px; }

/* ── Section base ───────────────────────────────────────────────────────── */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}


/* ── Feature grid ───────────────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.feature-card.coming-soon {
  opacity: 0.6;
  pointer-events: none;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
}
.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Feature detail (alternating) ───────────────────────────────────────── */
.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.feature-detail.reverse { direction: rtl; }
.feature-detail.reverse > * { direction: ltr; }
.feature-detail-text .section-label { text-align: left; }
.feature-detail-text h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.feature-detail-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}
.feature-checklist {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--text-secondary);
}
.feature-checklist li::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-light);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%235B73F5'%3E%3Cpath d='M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
  flex-shrink: 0;
  margin-top: 2px;
}
.feature-screenshot {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.06);
}
.feature-screenshot img { width: 100%; display: block; }
.screenshot-placeholder {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--accent-light) 0%, #e0e7ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

/* ── Pricing cards ──────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: start;
}
.pricing-card {
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border);
  background: var(--bg);
  padding: 32px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}
.pricing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}
.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.plan-name {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.plan-price {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.plan-price sup { font-size: 22px; font-weight: 700; vertical-align: super; }
.plan-price span { font-size: 16px; font-weight: 500; color: var(--text-muted); }
.plan-price.custom { font-size: 32px; }
.plan-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  min-height: 44px;
}
.plan-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.plan-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}
.plan-feature svg { color: var(--success); flex-shrink: 0; }
.plan-feature.muted { color: var(--text-muted); }
.plan-feature.muted svg { color: var(--border-strong); }
.plan-feature.soon { color: var(--text-muted); font-style: italic; }

/* ── CTA banner ─────────────────────────────────────────────────────────── */
.cta-banner {
  padding: 80px 0;
  background: var(--accent);
  text-align: center;
  color: #fff;
}
.cta-banner h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.cta-banner p {
  font-size: 18px;
  opacity: 0.85;
  margin-bottom: 36px;
}
.cta-banner .btn-white { font-size: 16px; padding: 14px 32px; }
.cta-meta {
  margin-top: 16px;
  font-size: 13px;
  opacity: 0.7;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  padding: 48px 0 32px;
  background: var(--bg-dark);
  color: rgba(255,255,255,0.6);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .nav-logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.6; max-width: 240px; }
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 14px;
  transition: color 0.12s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-group label { font-size: 14px; font-weight: 500; color: var(--text); }
.form-group input,
.form-group textarea,
.form-group select {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,115,245,.12); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 12px; color: var(--text-muted); }
.form-error { font-size: 12px; color: var(--danger); display: none; }
.form-error.visible { display: block; }

/* Auth / account pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg-alt);
}
.auth-card {
  background: var(--bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: min(440px, 100%);
  overflow: hidden;
}
.auth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 36px 28px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-align: center;
}
.auth-header img { height: 40px; width: auto; margin-bottom: 4px; }
.auth-header h1 { font-size: 22px; font-weight: 700; }
.auth-header p { font-size: 14px; color: var(--text-secondary); }
.auth-body { padding: 32px 36px 36px; }
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-footer a { color: var(--accent); font-weight: 500; }

/* Alert */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}
.alert.visible { display: block; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error   { background: #fee2e2; color: #991b1b; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .hero h1 { font-size: 28px; }
  .hero-subtitle { font-size: 16px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-detail { grid-template-columns: 1fr; gap: 40px; }
  .feature-detail.reverse { direction: ltr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  /* Nav expands in-place when menu opens; sticky height becomes auto */
  .nav { height: auto; min-height: var(--nav-h); }
  .nav-inner { flex-wrap: wrap; gap: 0; align-items: center; }
  .nav-logo { height: var(--nav-h); align-items: center; }
  .nav-links, .nav-actions { display: none; width: 100%; }
  .nav-hamburger { display: flex; height: var(--nav-h); align-items: center; }

  .nav.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 0 4px;
    border-top: 1px solid var(--border);
  }
  .nav.menu-open .nav-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0 16px;
  }
  .section { padding: 56px 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}
