/* 
    Design System for The Scholarly Editorial 
    Based on Academic Atelier North Star
*/

:root {
    /* Color Palette */
    --primary: #785900;
    --primary-container: #ffdf9e;
    --on-primary-container: #261a00;
    --secondary: #006d3b;
    --background: #fcf9f4;
    --surface: #fcf9f4;
    --surface-dim: #dcdad5;
    --surface-variant: #e5e2dd;
    --surface-container-lowest: #ffffff;
    --surface-container-low: #f6f3ee;
    --surface-container: #f0ede9;
    --surface-container-high: #ebe8e3;
    --surface-container-highest: #e5e2dd;

    --on-surface: #1c1c19;
    --on-surface-variant: #4f4632;
    --on-primary: #ffffff;
    --outline: #827660;
    --outline-variant: #d4c5ab;

    /* Spacing & Radii */
    --radius-lg: 0.5rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadow */
    --shadow-atmospheric: 0 16px 32px -12px rgba(28, 28, 25, 0.05);

    /* Animation */
    --transition-standard: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: none;
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--background);
    color: var(--on-surface);
    font-family: 'Work Sans', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.8s ease;
}

/* Typography */
h1,
h2,
h3,
h4,
.font-headline {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--on-surface);
    line-height: 1.2;
}

.display-lg {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.headline-md {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.body-lg {
    font-size: 1.125rem;
    color: var(--on-surface-variant);
}

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

.italic {
    font-style: italic;
}

.text-muted {
    color: var(--on-surface-variant);
    opacity: 0.8;
}

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

.text-white {
    color: white;
}

/* Layout Utilities */
.max-w-7xl {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.grid {
    display: grid;
}

.md-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.md-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-12 {
    gap: 3rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

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

.mt-12 {
    margin-top: 3rem;
}

.py-20 {
    padding: 5rem 0;
}

.w-full {
    width: 100%;
}

/* Sections */
section {
    padding: 3rem 0;
}

/* Header System */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-top {
    background: #002244;
    color: white;
    padding: 0.5rem 0;
    font-size: 0.75rem;
    font-weight: 600;
}

.header-main {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    transition: all 0.4s ease;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-contact,
.header-social {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.contact-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.divider {
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--on-surface);
    letter-spacing: -0.04em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cta-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--on-surface);
}

.login-trigger {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
}

/* Mobile Toggle Bar */
.mobile-toggle .material-symbols-outlined {
    font-size: 2rem;
}

.menu-link {
    text-decoration: none;
    color: var(--on-surface);
    font-weight: 700;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero-section {
    padding-top: 8rem;
    padding-bottom: 2rem;
    min-height: 80vh;
}

.grid-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.badge-accent {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--primary-container);
    color: var(--on-primary-container);
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3.5rem;
}

.stat-pill {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--on-surface);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    opacity: 0.7;
}

/* Lead Form Card */
.lead-form-card {
    background: white;
    padding: 2.5rem;
    border-radius: 2rem;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.form-header {
    margin-bottom: 2.5rem;
}

.form-header h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.lead-form .form-group {
    margin-bottom: 1.5rem;
}

.lead-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    color: var(--on-surface-variant);
}

.lead-form input,
.lead-form textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    border: 1px solid var(--outline-variant);
    background: var(--surface-container-lowest);
    font-family: inherit;
    transition: all 0.3s ease;
}

.lead-form input:focus {
    border-color: var(--primary);
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(120, 89, 0, 0.1);
}

/* Stats Bar */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-box {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-val {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-tag {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--on-surface-variant);
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.expertise-card {
    background: white;
    padding: 3rem;
    border-radius: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.4s ease;
    text-align: center;
}

.expertise-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-container);
}

.expertise-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.expertise-card p {
    color: var(--on-surface-variant);
    font-size: 0.9375rem;
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(8deg);
}

.feature-icon span {
    color: white;
    font-size: 2rem;
}

.bg-green {
    background: #2e7d32;
}

.bg-orange {
    background: #ef6c00;
}

.bg-red {
    background: #c62828;
}

.bg-blue {
    background: #1565c0;
}

.bg-slate {
    background: #455a64;
}

.bg-amber {
    background: #ff8f00;
}

/* Subject Tags */
.subject-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.subject-tag {
    padding: 1rem 2rem;
    background: white;
    border-radius: 3rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: default;
}

.subject-tag:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    border-radius: 3rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(120, 89, 0, 0.3);
}

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

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.2);
}

/* Pricing Calculator */
.calc-card {
    background: white;
    padding: 4rem;
    border-radius: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.form-group select {
    width: 100%;
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid var(--outline-variant);
    background: var(--surface-container-low);
    font-weight: 600;
}

.range-group {
    margin: 3rem 0;
}

.highlight {
    color: var(--primary);
    font-weight: 800;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--surface-container-high);
    border-radius: 5px;
    appearance: none;
    accent-color: var(--primary);
}

.urgency-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.urgency-btn {
    padding: 1rem;
    border-radius: 1rem;
    border: 2px solid transparent;
    background: var(--surface-container-low);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.urgency-btn.active {
    border-color: var(--primary);
    background: white;
    color: var(--primary);
}

.result-card {
    background: var(--primary);
    color: white;
    padding: 4rem;
    border-radius: 3rem;
}

.p-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 3rem 0;
}

.p-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    opacity: 0.9;
}

.p-total {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.display-sm {
    font-size: 3.5rem;
    font-weight: 800;
}

/* FAQ Accordion */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.faq-item summary {
    padding: 2rem;
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item .ans {
    padding: 0 2rem 2rem 2rem;
    color: var(--on-surface-variant);
    line-height: 1.8;
}

.faq-item[open] {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
}

/* Responsive Grid Adjustments */
@media (max-width: 1024px) {
    .grid-hero {
        grid-template-columns: 1fr;
    }

    .md-grid-3 {
        grid-template-columns: 1fr 1fr;
    }

    .grid-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {

    .md-grid-2,
    .md-grid-3,
    .grid-stats {
        grid-template-columns: 1fr;
    }

    .calc-card,
    .result-card {
        padding: 2.5rem;
    }

    .display-sm {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Footer System */
.site-footer {
    background: var(--surface-dim);
    padding: 8rem 0 4rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 6rem;
    margin-bottom: 6rem;
}

.footer-logo {
    font-size: 1.75rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin-bottom: 2rem;
}

.footer-desc {
    font-size: 1.125rem;
    color: var(--on-surface-variant);
    opacity: 0.8;
    max-width: 450px;
    margin-bottom: 2.5rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--on-surface-variant);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary);
}

.footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 4rem;
}

.footer-column h4 {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
    letter-spacing: 0.1em;
    color: var(--on-surface);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 1.25rem;
}

.footer-column ul a {
    text-decoration: none;
    color: var(--on-surface-variant);
    font-weight: 700;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.footer-column ul a:hover {
    color: var(--primary);
}

.ethics-text {
    font-size: 0.875rem;
    color: var(--on-surface-variant);
    opacity: 0.7;
    line-height: 1.8;
}

.footer-bottom {
    padding-top: 4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

/* Step Cards */
.step-card {
    padding: 3rem;
    background: white;
    border-radius: 2rem;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.4s ease;
}

.step-card:hover {
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.1);
}

.step-number {
    width: 3rem;
    height: 3rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-bottom: 2rem;
    font-size: 1.25rem;
}

/* Testimonial Enhancements */
.testimonial-card {
    background: white;
    padding: 3rem;
    border-radius: 2rem;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: var(--shadow-atmospheric);
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-container);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 3rem;
    box-shadow: 0 40px 80px -20px rgba(0,0,0,0.15);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
}

.auth-text {
    margin-left: 2rem;
    color: var(--primary);
}

.payment-methods {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.payment-methods img {
    height: 28px;
    filter: grayscale(1);
    opacity: 0.5;
    transition: all 0.3s;
}

.payment-methods img:hover {
    filter: grayscale(0);
    opacity: 1;
}

/* Support FAB */
.fab-chat {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    background: var(--primary);
    color: white;
    padding: 1.25rem 2.5rem;
    border-radius: 5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    box-shadow: 0 15px 45px rgba(120, 89, 0, 0.4);
    z-index: 2000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-chat:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 20px 60px rgba(120, 89, 0, 0.5);
}

.fab-label {
    font-weight: 800;
    font-size: 0.875rem;
}

/* Content Deep Dive */
.content-rich-section {
    line-height: 1.8;
}

.prose h2 {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
}

.prose p {
    font-size: 1.25rem;
    color: var(--on-surface-variant);
    margin-bottom: 3rem;
    max-width: 900px;
}

.article-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin: 4rem 0;
}

.article-block h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.article-block p {
    font-size: 1rem;
}

@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .footer-nav {
        grid-template-columns: 1fr 1.5fr;
    }
}

@media (max-width: 768px) {
    .footer-nav {
        grid-template-columns: 1fr;
    }

    .footer-column.wide {
        grid-column: auto;
    }

    .fab-label {
        display: none;
    }

    .fab-chat {
        padding: 1.25rem;
        border-radius: 50%;
    }

    .article-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
/* Expertise & Testimonial Cards (Added) */
.expertise-card {
    background: white;
    padding: 2.5rem;
    border-radius: 1.5rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 24px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.02);
    text-align: center;
}

.expertise-card:hover { transform: translateY(-8px); box-shadow: 0 12px 48px rgba(0,0,0,0.08); }
.expertise-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; color: #002244; }
.expertise-card p { font-size: 0.95rem; color: #666; line-height: 1.6; }

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.subject-tags-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.subject-tags-compact .subject-tag {
    background: rgba(var(--primary-rgb), 0.05);
    color: var(--primary);
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
}
