/* --- Core Reset & Variables --- */
:root {
    --bg-dark: #0a0a0c;
    --bg-surface: #121216;
    --bg-card: #1a1a22;
    --accent: #ff4757;
    --accent-dim: #ff475715;
    --text-main: #f1f2f6;
    --text-muted: #a4b0be;
    --border: #2f3542;
    --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- Typography --- */
h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.noscript-notice {
    margin: 0;
    padding: 0.75rem 1rem;
    background: #fff3cd;
    color: #2b2300;
    text-align: center;
    font-size: 0.95rem;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1000;
    padding: 0.65rem 1rem;
    color: var(--bg-dark);
    background: var(--text-main);
    border-radius: 4px;
    font-weight: 600;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

/* --- Buttons & UI Elements --- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-dark);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent);
}

.btn-secondary {
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--border);
}

.badge {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

/* --- Header --- */
.site-header {
    background-color: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-toggle {
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    color: var(--text-main);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    display: block;
    width: 1.25rem;
    height: 2px;
    margin: 0 auto;
    background: currentColor;
    content: "";
    transition: transform 0.2s ease;
}

.nav-toggle-icon {
    position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
    position: absolute;
    left: 0;
}

.nav-toggle-icon::before { top: -0.4rem; }
.nav-toggle-icon::after { top: 0.4rem; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

.logo {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--accent);
}

.main-nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--text-main);
}

.btn-nav {
    border: 1px solid var(--accent);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    color: var(--accent) !important;
}

.btn-nav:hover {
    background: var(--accent);
    color: var(--bg-dark) !important;
}

/* --- Hero Section --- */
.hero {
    padding: 8rem 0;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(circle at 80% 20%, #ff475708 0%, transparent 50%);
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--accent);
    text-decoration: line-through;
    text-decoration-thickness: 4px;
}

.hero h1 span:last-of-type {
    text-decoration: none;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* --- Philosophy Section --- */
.philosophy-section {
    background-color: var(--bg-surface);
    padding: 6rem 0;
    border-bottom: 1px solid var(--border);
}

.section-intro {
    margin-bottom: 4rem;
    max-width: 600px;
}

.section-intro h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.section-intro p {
    color: var(--text-muted);
}

.grid-three {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    position: relative;
}

.card-focus {
    border-color: var(--accent);
    box-shadow: 0 10px 30px -15px rgba(255, 71, 87, 0.2);
}

.card-num {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.03);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Articles Section --- */
.articles-section {
    padding: 6rem 0;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
}

.section-header-flex h2 {
    font-size: 2.2rem;
}

.view-all {
    color: var(--accent);
    font-weight: 600;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 3rem;
}

.blog-card .category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-weight: 600;
}

.blog-card h2,
.blog-card h3 {
    font-size: 1.35rem;
    margin: 0.5rem 0 1rem 0;
}

.blog-card h2 a:hover,
.blog-card h3 a:hover {
    color: var(--accent);
}

.blog-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.blog-card time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Newsletter Section --- */
.newsletter {
    padding: 4rem 0 6rem 0;
}

.news-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 4rem;
    border-radius: 8px;
    text-align: center;
    max-width: 800px;
}

.news-box h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.news-box p {
    color: var(--text-muted);
    max-width: 550px;
    margin: 0 auto 2.5rem auto;
}

.news-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 0.5rem;
}

.news-form input {
    flex: 1;
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 0.8rem 1rem;
    border-radius: 4px;
    color: var(--text-main);
    font-family: var(--font);
}

.news-form input:focus {
    outline: none;
    border-color: var(--accent);
}

/* --- Subscription Modal --- */
.subscribe-modal {
    width: min(90%, 520px);
    padding: 0;
    color: var(--text-main);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.subscribe-modal::backdrop {
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(3px);
}

.subscribe-modal-content {
    position: relative;
    padding: 2.5rem;
}

.subscribe-modal h2 {
    margin-bottom: 0.75rem;
    font-size: 2rem;
}

.subscribe-modal-content > p {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.75rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-main);
    border-color: var(--border);
}

.subscribe-form {
    display: grid;
    gap: 1rem;
}

.form-field {
    display: grid;
    gap: 0.5rem;
    text-align: left;
}

.form-field label {
    font-size: 0.9rem;
    font-weight: 600;
}

.form-field input {
    width: 100%;
    padding: 0.85rem 1rem;
    color: var(--text-main);
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 4px;
    font: inherit;
}

.form-field input:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-status {
    min-height: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-status.is-error {
    color: #ff9aa4;
}

.form-status.is-success {
    color: #7bed9f;
}

.subscribe-form.is-submitting button {
    cursor: wait;
    opacity: 0.7;
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.footer-links a:hover {
    color: var(--text-main);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
dialog:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* --- Responsive Layout Rules --- */
@media (max-width: 768px) {
    .footer-flex, .news-form {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .header-flex {
        position: relative;
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        flex-basis: 100%;
        padding-top: 1rem;
    }

    .main-nav.is-open {
        display: block;
    }

    .main-nav ul {
        align-items: stretch;
        flex-direction: column;
        gap: 0.25rem;
    }

    .main-nav a {
        display: block;
        padding: 0.75rem;
        text-align: left;
    }

    .btn-nav {
        margin-top: 0.5rem;
        text-align: center !important;
    }
    
    .hero {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 2.3rem;
    }
    
    .section-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
