:root {
  /* Premium SaaS Color Palette */
  --primary: #0f172a;
  --primary-muted: #334155;
  --accent-indigo: #4f46e5;
  --accent-blue: #2563eb;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  --accent-purple: #7c3aed;
  
  /* Modern Surface & Border Colors */
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --card-bg-glass: rgba(255, 255, 255, 0.85);
  --card-border: rgba(15, 23, 42, 0.08);
  --card-border-hover: rgba(79, 70, 229, 0.3);
  
  /* Text colors */
  --text-title: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;

  /* Perfect Nested Corner Radii */
  --radius-xl: 20px;  /* Outer Main Cards */
  --radius-lg: 14px;  /* Inner Sub Cards / Tables */
  --radius-md: 10px;  /* Buttons / Tags / Small Boxes */
  --radius-sm: 6px;   /* Tiny Badges */
  
  /* Layered Enterprise Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --shadow-hover: 0 12px 30px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(79, 70, 229, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Noto Sans Sinhala', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-body);
  line-height: 1.6;
  padding: 60px 20px;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================
   1. AMBIENT BACKGROUND & MOUSE SPOTLIGHT
   ========================================== */

#cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 999;
}

.floating-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.6;
  animation: floatAnimation 14s infinite alternate ease-in-out;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: rgba(99, 102, 241, 0.07);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 450px;
  height: 450px;
  background: rgba(16, 185, 129, 0.06);
  top: 45%;
  right: -100px;
  animation-delay: -5s;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: rgba(124, 58, 237, 0.05);
  bottom: 2%;
  left: 15%;
  animation-delay: -9s;
}

@keyframes floatAnimation {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(25px, 30px) scale(1.04); }
  100% { transform: translate(-20px, 15px) scale(0.96); }
}

.container {
  max-width: 960px;
  margin: 0 auto;
}

/* ==========================================
   2. HEADER & PROFESSIONAL BADGES
   ========================================== */

.phase-header {
  text-align: center;
  margin-bottom: 56px;
}

.badge-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: var(--accent-indigo);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(79, 70, 229, 0.2);
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.3px;
}

.pulse-badge {
  position: relative;
}

.pulse-badge::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-indigo);
  opacity: 0;
  animation: pulseBorder 2.5s infinite;
}

@keyframes pulseBorder {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.08); opacity: 0; }
}

.gradient-text {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--primary);
  background: linear-gradient(135deg, #0f172a 30%, #312e81 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  letter-spacing: -0.6px;
}

.phase-header .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  font-weight: 400;
}

/* ==========================================
   3. SECTION HEADERS & ICON CONTAINERS
   ========================================== */

.card-section {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.icon-pill {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
}

.blue-glow { color: var(--accent-indigo); border-color: rgba(79, 70, 229, 0.2); }
.red-glow { color: var(--accent-rose); border-color: rgba(225, 29, 72, 0.2); }
.purple-glow { color: var(--accent-purple); border-color: rgba(124, 58, 237, 0.2); }

.section-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.2px;
}

/* ==========================================
   4. CARDS, NESTED SHAPES & HOVER STATES
   ========================================== */

.content-card {
  background: var(--card-bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl); /* Outer Smooth Corner */
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.interactive-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--card-border-hover);
}

.hero-card {
  border-top: 3px solid var(--accent-indigo);
}

.accent-border {
  border-top: 3px solid var(--accent-emerald);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.content-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.quote-pill {
  background: #f0fdf4;
  color: var(--accent-emerald);
  border: 1px solid rgba(5, 150, 105, 0.2);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-md);
}

.desc-text {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 24px;
}

/* Sub-Cards (Nested Corner Radii = --radius-lg) */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.sub-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); /* Inner Smooth Corner */
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.card-glow-hover:hover {
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.06);
}

.sub-card-top {
  margin-bottom: 12px;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.3px;
}

.dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  position: relative;
}

.dot-pulse.green { background: var(--accent-emerald); }
.dot-pulse.amber { background: var(--accent-amber); }

.card-tag.low-risk { background: #f0fdf4; color: #166534; border: 1px solid rgba(22, 101, 52, 0.15); }
.card-tag.hedge-risk { background: #fffbeb; color: #92400e; border: 1px solid rgba(146, 64, 14, 0.15); }

.sub-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.sub-card p {
  font-size: 0.92rem;
  color: var(--text-body);
}

/* Info Glass Boxes */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.glass-box {
  display: flex;
  gap: 14px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.glass-box:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
}

.info-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-icon.blue { background: #e0e7ff; color: var(--accent-indigo); }
.info-icon.green { background: #dcfce7; color: var(--accent-emerald); }

.info-box h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.info-box p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Banner Alert Box */
.banner-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--accent-rose);
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  color: #9f1239;
  font-size: 0.95rem;
}

.banner-icon {
  color: var(--accent-rose);
  flex-shrink: 0;
}

/* Calculator & Highlight Box */
.calc-box {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
}

.calc-row .val { font-weight: 700; color: var(--primary); }

.calc-multiplier {
  text-align: right;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-indigo);
  margin: 4px 0;
}

.calc-row.total {
  border-top: 1px dashed #cbd5e1;
  padding-top: 10px;
  margin-top: 8px;
  font-size: 1rem;
  font-weight: 700;
}

.glowing-text {
  color: var(--accent-emerald);
  font-size: 1.2rem;
  font-weight: 800;
}

.sub-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sub-note svg {
  margin-top: 3px;
  flex-shrink: 0;
  color: var(--accent-indigo);
}

/* Features List */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 6px;
}

.feature-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-list strong {
  color: var(--primary);
  display: block;
  font-size: 0.95rem;
}

.feature-list p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================
   5. PROFESSIONAL SaaS DATA TABLE
   ========================================== */

.table-card {
  background: var(--card-bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all 0.25s ease;
}

.table-responsive {
  overflow-x: auto;
}

.finance-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.finance-table th {
  background: #fafafa;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--card-border);
}

.finance-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-body);
}

.finance-table tr:last-child td {
  border-bottom: none;
}

.finance-table tr:hover td {
  background: rgba(248, 250, 252, 0.8);
}

.font-bold {
  font-weight: 600;
  color: var(--primary);
}

/* Professional Table Badges */
.badge-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.bg-blue { background: #eff6ff; color: #1e40af; border: 1px solid rgba(30, 64, 175, 0.12); }
.bg-emerald { background: #ecfdf5; color: #065f46; border: 1px solid rgba(6, 95, 70, 0.12); }
.bg-green { background: #f0fdf4; color: #166534; border: 1px solid rgba(22, 101, 52, 0.12); }
.bg-teal { background: #f0fdfa; color: #115e59; border: 1px solid rgba(17, 94, 89, 0.12); }
.bg-rose { background: #fff1f2; color: #9f1239; border: 1px solid rgba(159, 18, 57, 0.12); }
.bg-amber { background: #fffbeb; color: #92400e; border: 1px solid rgba(146, 64, 14, 0.12); }
.bg-slate { background: #f8fafc; color: #475569; border: 1px solid rgba(71, 85, 105, 0.12); }

/* Responsive Adjustments */
@media (max-width: 640px) {
  body { padding: 30px 14px; }
  .gradient-text { font-size: 1.9rem; }
  .content-card { padding: 22px 18px; border-radius: var(--radius-lg); }
  #cursor-glow { display: none; }
}

/* Footer */
footer {
    padding: 50px 24px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    background-color: var(--bg-main);
}

/* Next Page Button Styling */
.next-page-container {
    text-align: center;
    margin: 60px 0 20px 0;
}

.next-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    color: #ffffff;
    padding: 16px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.35);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.next-page-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: 0.5s;
}

.next-page-btn:hover::before {
    left: 100%;
}

.next-page-btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 15px 35px rgba(236, 72, 153, 0.45);
}

.btn-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.next-page-btn:hover .btn-arrow {
    transform: translateX(6px);
}