/* ============================================
   TONAL EMBERS - Chiya Aago Memorial Theme
   ============================================ */

/* Base Reset & Variables */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Surface Colors */
    --surface-base: #131313;
    --surface-low: #1c1b1b;
    --surface-mid: #201f1f;
    --surface-high: #393939;

    /* Ember Colors */
    --ember-primary: #ffb59a;
    --ember-secondary: #ffd799;
    --ember-container: #f95e14;
    --ember-bright: #c44810;

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.5);
    --text-tertiary: rgba(255, 255, 255, 0.3);
    --text-muted: rgba(255, 255, 255, 0.2);

    /* Glass */
    --glass-bg: rgba(28, 27, 27, 0.8);
    --glass-blur: 24px;

    /* Typography */
    --font-body: "Manrope", system-ui, -apple-system, sans-serif;
    --font-display: "Epilogue", system-ui, -apple-system, sans-serif;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--surface-base);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-normal);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Glass Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
}

/* Gradient Text */
.text-gradient-ember {
    background: linear-gradient(135deg, var(--ember-primary), var(--ember-container));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-glow {
    background: linear-gradient(135deg, var(--ember-secondary), var(--ember-primary), var(--ember-container));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-ember {
    background: linear-gradient(135deg, var(--ember-primary), var(--ember-container));
    color: var(--surface-base);
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-ember:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(249, 94, 20, 0.3);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Cards */
.card {
    background: var(--surface-mid);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-slow);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card:hover {
    border-color: rgba(255, 181, 154, 0.3);
    box-shadow: 0 20px 40px rgba(249, 94, 20, 0.1);
    transform: translateY(-4px);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.badge-ember {
    background: rgba(255, 181, 154, 0.1);
    color: var(--ember-primary);
    border: 1px solid rgba(255, 181, 154, 0.2);
}

.badge-secondary {
    background: rgba(255, 215, 153, 0.1);
    color: var(--ember-secondary);
    border: 1px solid rgba(255, 215, 153, 0.2);
}

.badge-container {
    background: rgba(249, 94, 20, 0.1);
    color: var(--ember-container);
    border: 1px solid rgba(249, 94, 20, 0.2);
}

/* Surface Backgrounds */
.bg-base {
    background-color: var(--surface-base);
}

.bg-surface-low {
    background-color: var(--surface-low);
}

.bg-surface-mid {
    background-color: var(--surface-mid);
}

/* Section Divider */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 181, 154, 0.1), transparent);
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface-mid);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: all var(--transition-normal);
}

.form-input:focus {
    outline: none;
    border-color: rgba(255, 181, 154, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 181, 154, 0.1);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Grid Utilities */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* Spacing */
.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.py-32 {
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.text-5xl {
    font-size: 3rem;
}

@media (min-width: 640px) {
    .sm\:text-4xl {
        font-size: 2.25rem;
    }

    .sm\:text-5xl {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .lg\:text-5xl {
        font-size: 3rem;
    }

    .lg\:text-6xl {
        font-size: 3.75rem;
    }

    .lg\:text-7xl {
        font-size: 4.5rem;
    }
}

.text-white {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-tertiary {
    color: var(--text-tertiary);
}

.text-ember-primary {
    color: var(--ember-primary);
}

/* Overflow */
.overflow-hidden {
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Navigation */
.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--ember-primary);
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    min-width: 0;
    flex: 1;
}

.bottom-nav-item.active {
    background: rgba(255, 181, 154, 0.15);
}

.bottom-nav-item.active svg {
    color: var(--ember-primary);
}

.bottom-nav-item svg {
    width: 1.25rem;
    height: 1.25rem;
    color: rgba(255, 255, 255, 0.3);
    transition: color var(--transition-fast);
}

.bottom-nav-item span {
    font-size: 0.625rem;
    font-weight: 500;
    margin-top: 0.125rem;
    color: rgba(255, 255, 255, 0.3);
    transition: color var(--transition-fast);
}

.bottom-nav-item.active span {
    color: var(--ember-primary);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-normal);
}

.pagination a {
    background: var(--surface-mid);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pagination a:hover {
    background: var(--surface-high);
    border-color: rgba(255, 181, 154, 0.3);
}

.pagination .current {
    background: linear-gradient(135deg, var(--ember-primary), var(--ember-container));
    color: var(--surface-base);
}

/* Search Form */
.search-form {
    display: flex;
    gap: 1rem;
    max-width: 28rem;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--surface-mid);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-family: var(--font-body);
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 181, 154, 0.5);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

/* Messages */
.messages {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.message {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.message-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.message-error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Footer */
.footer {
    background: var(--surface-base);
    color: var(--text-tertiary);
    padding-top: 4rem;
    padding-bottom: 1.5rem;
}

.footer-link {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.3);
    transition: color var(--transition-normal);
}

.footer-link:hover {
    color: var(--ember-primary);
}

/* Responsive */
@media (max-width: 767px) {
    .bottom-nav {
        display: flex;
    }

    .desktop-nav {
        display: none;
    }

    main {
        padding-bottom: 5rem;
    }
}

@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }

    .desktop-nav {
        display: flex;
    }

    main {
        padding-bottom: 0;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-base);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-high);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ember-container);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 2px solid rgba(255, 181, 154, 0.2);
    border-radius: 50%;
    border-top-color: var(--ember-primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(19, 19, 19, 0.8), rgba(19, 19, 19, 0.6), rgba(19, 19, 19, 1));
}

.hero-glow-1 {
    position: absolute;
    top: 33%;
    left: 25%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(249, 94, 20, 0.15);
    filter: blur(140px);
}

.hero-glow-2 {
    position: absolute;
    bottom: 25%;
    right: 25%;
    width: 384px;
    height: 384px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.1);
    filter: blur(120px);
}

.hero-glow-3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 181, 154, 0.05);
    filter: blur(160px);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 1rem;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* Timeline */
.timeline-item {
    display: flex;
    gap: 1rem;
}

.timeline-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--ember-primary);
    box-shadow: 0 0 0 4px rgba(255, 181, 154, 0.2);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.timeline-line {
    width: 1px;
    background: rgba(255, 181, 154, 0.2);
    margin-left: calc(0.375rem - 0.5px);
}
