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

/* app/assets/css/styles.css */

@font-face {
    font-family: 'Saxmono';
    src: url('../fonts/saxmono.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    /* Improves loading performance */
}

/* Base styles with dark mode support */
body {
    font-family: 'Saxmono', 'Cardo', 'Inter', 'Georgia', 'system-ui', 'sans-serif', 'serif', 'monospace';
    background-color: #fff;
    background-image: url('../images/subtle-pattern.png');
    background-repeat: repeat;
}

.dark body {
    background-color: #0a0a0a;
    background-image: none;
}

header {
    backdrop-filter: blur(8px);
    background-color: rgba(44, 44, 53, 0.85);
}

.dark header {
    background-color: rgba(26, 26, 26, 0.95);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #c0a062;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Active nav link - always underlined */
.nav-link.active::after {
    width: 100%;
}

.hero-mask {
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark .card-hover:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

.plague-logo {
    position: relative;
    font-family: 'Saxmono', 'Cardo', serif;
    font-weight: bold;
}

.plague-logo::before {
    content: '87';
    position: absolute;
    top: 0;
    left: 0;
    color: #c0a062;
    opacity: 0.1;
    font-size: 1.5em;
    transform: translateX(-10%) translateY(-10%);
    z-index: -1;
}

.dark .plague-logo::before {
    opacity: 0.05;
}

.plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 0.75rem;
    height: 0.75rem;
    background-color: #c0a062;
    border-radius: 50%;
}

.feature-disabled {
    opacity: 0.5;
}

.feature-disabled::before {
    background-color: #888 !important;
}

/* Mobile menu animations */
.mobile-menu-enter {
    transform: translateY(-100%);
    opacity: 0;
}

.mobile-menu-enter-active {
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s ease-out;
}

.mobile-menu-exit {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-exit-active {
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease-in;
}

/* Add slow pulse animation for floating cards */
@keyframes pulse-slow {

    0%,
    100% {
        opacity: 0.1;
    }

    50% {
        opacity: 0.3;
    }
}

.dark @keyframes pulse-slow {

    0%,
    100% {
        opacity: 0.05;
    }

    50% {
        opacity: 0.15;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* Modular Typography System */
.modular-typo {
  display: inline-grid;       /* shrink-to-fit width */
  grid-auto-flow: column;     /* place children in a row */
  gap: 0.75rem;               /* original spacing */
  align-items: center;        /* truly center the box of each item */
  font-family: 'Saxmono','Cardo',serif;
  margin: 0;                  /* remove any legacy tweaks */
}

.modular-typo .big {
  font-size: 2.5rem;
  font-weight: bold;
  line-height: 1;
  margin: 0;
}

.modular-typo .divider {
  font-size: 2.5rem;
  line-height: 1;
  color: #c0a062;
  font-weight: 300;
  margin: 0;
}

.modular-typo .sub {
  display: flex;
  flex-direction: column;
  justify-content: center;    /* stack's mid-point lines up too */
  margin: 0;
}

.modular-typo .sub div {
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 400;
  margin: 0;
}

/* Hero / Section / Card variants */
.modular-typo.hero    .big     { font-size: 4rem; }
.modular-typo.hero    .divider { font-size: 4rem; }
.modular-typo.hero    .sub div { font-size: 1.25rem; }

.modular-typo.section .big     { font-size: 3rem; }
.modular-typo.section .divider { font-size: 3rem; }
.modular-typo.section .sub div { font-size: 1.1rem; }

.modular-typo.card    .big     { font-size: 1.75rem; }
.modular-typo.card    .divider { font-size: 1.75rem; }
.modular-typo.card    .sub div { font-size: 0.9rem; }

/* Scientific notation style */
.modular-typo .sub .notation {
    font-family: 'Saxmono', monospace;
    font-size: 0.8em;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

.dark .modular-typo .sub .notation {
    opacity: 0.5;
}

.modular-typo .sub .emphasis {
    font-weight: 600;
    color: #c0a062;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modular-typo.hero .big {
        font-size: 2.5rem;
        line-height: 1;
    }

    .modular-typo.hero .divider {
        font-size: 2.5rem;
        line-height: 1;
    }

    .modular-typo.section .big {
        font-size: 2rem;
        line-height: 1;
    }

    .modular-typo.section .divider {
        font-size: 2rem;
        line-height: 1;
    }

    .modular-typo {
        gap: 0.5rem;
    }
}

/* Scientific badge style */
.sci-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: 'Saxmono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    background: rgba(192, 160, 98, 0.1);
    border: 1px solid rgba(192, 160, 98, 0.3);
    border-radius: 0.25rem;
    color: #c0a062;
}

.dark .sci-badge {
    background: rgba(192, 160, 98, 0.15);
    border-color: rgba(192, 160, 98, 0.4);
}

.sci-badge::before {
    content: '◊';
    font-size: 0.8em;
}

/* Alchemical list styling */
.alchemical-list {
    list-style: none;
    padding: 0;
}

.alchemical-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
    font-family: 'Saxmono', serif;
}

.alchemical-list li::before {
    content: '⚬';
    position: absolute;
    left: 0;
    top: 0;
    color: #c0a062;
    font-size: 1.2em;
    line-height: 1;
}

.alchemical-list li .formula {
    font-family: 'Saxmono', monospace;
    font-size: 0.85em;
    color: #c0a062;
    opacity: 0.8;
    margin-left: 0.5rem;
}

.dark .alchemical-list li .formula {
    opacity: 0.6;
}

/* Enhanced plan cards with scientific styling */
.plan-card-enhanced {
    position: relative;
    overflow: visible;
}

.plan-card-enhanced::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, transparent, rgba(192, 160, 98, 0.1), transparent);
    border-radius: 0.5rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dark .plan-card-enhanced::before {
    background: linear-gradient(45deg, transparent, rgba(192, 160, 98, 0.2), transparent);
}

.plan-card-enhanced:hover::before {
    opacity: 1;
}

/* Dark mode specific styles */
.dark {
    color-scheme: dark;
}

/* Dark mode cards */
.dark .bg-white {
    background-color: #1f1f1f;
}

.dark .text-gray-600 {
    color: #a0a0a0;
}

.dark .text-gray-700 {
    color: #b0b0b0;
}

.dark .border-gray-100 {
    border-color: #333;
}

.dark .border-gray-200 {
    border-color: #444;
}

.dark .bg-gray-50 {
    background-color: #1a1a1a;
}

.dark .bg-gray-200 {
    background-color: #2a2a2a;
}

.dark .bg-gray-100 {
    background-color: #252525;
}

.dark .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* Theme transition for smooth switching */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Prevent transition on page load */
.no-transition * {
    transition: none !important;
}