/* =============================================================================
   ARUNTE — Base CSS
   ============================================================================= */

:root {
    --color-bg: #0a0a0a;
    --color-surface: #141414;
    --color-border: #222;
    --color-text: #e0e0e0;
    --color-text-muted: #888;
    --color-accent: #c8ff00;
    --color-label-bg: #1a1a1a;
    --font-display: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --max-width: 1200px;
    --gap: 1.5rem;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* =============================================================================
   HEADER
   ============================================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem var(--gap);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-accent);
}

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

.btn-newsletter {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    transition: all 0.2s;
}
.btn-newsletter:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Hamburger */
.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s;
}
.hamburger.is-active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
.mobile-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--color-border);
}
.mobile-nav.is-open {
    max-height: 300px;
}
.mobile-nav a {
    padding: 0.75rem var(--gap);
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.mobile-nav a:hover {
    color: var(--color-accent);
}

/* =============================================================================
   MAIN
   ============================================================================= */

.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gap);
}

/* =============================================================================
   HERO (Homepage)
   ============================================================================= */

.hero-featured {
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
}
.hero-link {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}
.hero-image img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}
.hero-text .label {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}
.hero-text h1 {
    font-size: 2.25rem;
    line-height: 1.15;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.hero-text .excerpt {
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}
.hero-text .author {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.hero-link:hover h1 {
    color: var(--color-accent);
    transition: color 0.2s;
}

/* =============================================================================
   ARTICLES GRID
   ============================================================================= */

.articles-grid-section {
    padding: 2rem 0;
}

.articles-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.filter-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--color-border);
    transition: all 0.2s;
}
.filter-tag:hover,
.filter-tag.active {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
}

.article-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.card-image img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-body .label {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-bg);
    background: var(--color-accent);
    padding: 0.2rem 0.5rem;
    margin-bottom: 0.5rem;
    align-self: flex-start;
}
.card-body h3 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    flex: 1;
}
.card-body time {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
.card-body .excerpt {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.no-articles {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-text-muted);
    padding: 3rem;
}

/* =============================================================================
   NEWSLETTER SECTION
   ============================================================================= */

.newsletter-section {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}
.newsletter-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.newsletter-section p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--color-accent);
    color: var(--color-bg);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: opacity 0.2s;
}
.btn-primary:hover {
    opacity: 0.85;
}

/* =============================================================================
   FEATURED TOOL
   ============================================================================= */

.featured-tool {
    padding: 3rem 0;
    border-bottom: 1px solid var(--color-border);
}
.featured-tool .label {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    padding: 0.25rem 0.6rem;
    margin-bottom: 1rem;
}
.featured-tool h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}
.featured-tool p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    max-width: 600px;
}
.featured-tool img {
    margin-bottom: 1.5rem;
}

/* =============================================================================
   ARTICLE DETAIL
   ============================================================================= */

.article-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.article-header {
    margin-bottom: 2rem;
}
.article-meta-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.article-meta-top .label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-bg);
    background: var(--color-accent);
    padding: 0.2rem 0.5rem;
}
.article-meta-top time {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.article-header h1 {
    font-size: 2.5rem;
    line-height: 1.15;
    font-weight: 700;
}
.article-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
}

.article-featured-image {
    margin-bottom: 2rem;
}
.article-featured-image img {
    width: 100%;
}
.article-featured-image figcaption {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}
.article-featured-image .credits {
    font-style: italic;
}

/* Author box */
.author-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    margin-bottom: 2rem;
}
.author-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.author-info strong {
    display: block;
    font-size: 0.9rem;
}
.author-info a {
    font-size: 0.8rem;
    color: var(--color-accent);
}

/* Article body */
.article-body p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
}
.article-body h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
}
.article-body h3 {
    font-size: 1.25rem;
    margin: 2rem 0 0.75rem;
}
.article-body blockquote {
    border-left: 3px solid var(--color-accent);
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: var(--color-text-muted);
    font-style: italic;
}
.article-body ul, .article-body ol {
    margin: 1rem 0 1.25rem 1.5rem;
}
.article-body a {
    color: var(--color-accent);
    text-decoration: underline;
}

/* Tags */
.article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}
.tag {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

/* Related articles in detail */
.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}
.related-articles h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* =============================================================================
   FLEX PAGE & INDEX PAGES
   ============================================================================= */

.flex-page,
.tool-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.page-header {
    margin-bottom: 2rem;
}
.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.15;
}
.page-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.page-featured-image {
    margin-bottom: 2rem;
}
.page-featured-image figcaption {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.page-body p { margin-bottom: 1.25rem; line-height: 1.75; }
.page-body h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.page-body h3 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }

.index-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
}
.index-header h1 {
    font-size: 2rem;
    font-weight: 700;
}
.index-header .intro {
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.index-filters {
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.filter-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-right: 0.25rem;
}

/* =============================================================================
   TOOL
   ============================================================================= */

.tool-description {
    color: var(--color-text-muted);
    max-width: 600px;
    margin-bottom: 2rem;
}

.tool-embed {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    margin-bottom: 2rem;
    overflow: hidden;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
    padding: 2rem 0;
}
.tool-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: all 0.2s;
}
.tool-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

/* =============================================================================
   STREAMFIELD BLOCKS
   ============================================================================= */

.block-image { margin: 2rem 0; }
.block-image.layout-left { float: left; width: 45%; margin: 0 2rem 1rem 0; }
.block-image.layout-right { float: right; width: 45%; margin: 0 0 1rem 2rem; }
.block-image figcaption {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.numbers-row {
    display: flex;
    gap: var(--gap);
    margin: 2rem 0;
    flex-wrap: wrap;
}
.number-box {
    flex: 1;
    min-width: 150px;
    padding: 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    text-align: center;
}
.number-box .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
}
.number-box .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.5rem;
    color: var(--color-text-muted);
}
.number-box .description {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.block-related-articles { margin: 2rem 0; }
.block-embed-post { margin: 2rem 0; }
.block-embed-post .caption {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

.block-data {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-accent);
}
.block-data h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}
.block-data .data-source {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
    font-style: italic;
}

.block-custom-embed { margin: 2rem 0; }

/* =============================================================================
   FOOTER
   ============================================================================= */

.site-footer {
    border-top: 1px solid var(--color-border);
    margin-top: 4rem;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem var(--gap);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 2rem;
}
.footer-logo {
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-accent);
}
.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-nav a {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.footer-nav a:hover { color: var(--color-accent); }

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-info p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    .hero-link {
        grid-template-columns: 1fr;
    }
    .hero-text h1 { font-size: 1.75rem; }
    .articles-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .article-header h1,
    .page-header h1 { font-size: 1.75rem; }
    .block-image.layout-left,
    .block-image.layout-right {
        float: none;
        width: 100%;
        margin: 1.5rem 0;
    }
    .numbers-row { flex-direction: column; }
}
