/* =============================================
   WE MEET .MEDIA — EDITORIAL DESIGN SYSTEM
   ============================================= */

:root {
    --ink: #0d0d0e;
    --ink-soft: #3a3a3c;
    --ink-muted: #6b6b70;
    --paper: #faf9f7;
    --paper-warm: #f3f1ec;
    --accent: #1a6b4a;
    --accent-bright: #22c178;
    --accent-glow: rgba(34, 193, 120, 0.12);
    --border: #e5e3de;
    --white: #ffffff;
    --serif: 'Fraunces', Georgia, serif;
    --sans: 'DM Sans', system-ui, sans-serif;
    --radius: 12px;
    --shadow: 0 4px 30px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 60px rgba(0,0,0,0.15);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

/* ── NAVBAR ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.3s ease;
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.nav-logo em { 
    color: var(--accent); 
    font-style: italic; 
    font-weight: 400;
}

.logo-dot {
    width: 12px; height: 12px;
    background: var(--accent-bright);
    border-radius: 4px; /* Square dots are trendy */
    display: inline-block;
    box-shadow: 0 0 15px var(--accent-glow);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink-soft);
    padding: 8px 4px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { width: 100%; }

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

.search-toggle {
    background: none;
    border: none;
    color: var(--ink-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

.search-toggle:hover {
    background: var(--paper-warm);
    color: var(--ink);
}

.logout-link {
    font-size: 0.8rem !important;
    opacity: 0.6;
}

.logout-link:hover { opacity: 1; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle .bar {
    width: 24px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ── HERO ── */
.hero-section {
    max-width: 100%;
    margin: 0 auto;
    padding: 180px 4rem 160px;
    position: relative;
    overflow: hidden;
    background: url('/images/hero-bg-premium.png') no-repeat center center / cover;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 0 0 40px 40px;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(105deg, rgba(13, 13, 14, 0.92) 0%, rgba(13, 13, 14, 0.4) 60%, transparent 100%);
    z-index: 1;
}

.hero-section > * { position: relative; z-index: 2; }

.hero-section::before {
    content: '';
    position: absolute;
    top: -100px; right: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(34,193,120,0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 2;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-eyebrow::before {
    content: '';
    width: 32px; height: 1px;
    background: var(--accent);
}

.hero-headline {
    font-family: var(--serif);
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 600;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--white);
    margin-bottom: 2rem;
    max-width: 1200px;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.hero-headline em {
    font-style: italic;
    color: var(--accent);
    font-weight: 300;
}

.hero-sub {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 800px;
    line-height: 1.6;
    margin-bottom: 3rem;
    font-weight: 300;
    animation: fadeIn 1s ease 0.3s both;
}

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

.glass-card {
    background: var(--glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    animation: fadeIn 1.2s ease forwards;
}

.trending-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-bright);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-headline {
    font-family: var(--serif);
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-headline em {
    font-style: italic;
    font-weight: 400;
    color: var(--accent-bright);
}


.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-bright);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 600;
    padding: 16px 36px;
    border-radius: 100px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(34, 193, 120, 0.3);
}

.btn-primary:hover { 
    background: var(--white); 
    color: var(--ink); 
    transform: translateY(-2px); 
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.hero-scroll-hint {
    position: absolute;
    bottom: 3rem; right: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 5;
}

.scroll-text {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    writing-mode: vertical-rl;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -60px; left: 0;
    width: 100%; height: 60px;
    background: var(--accent-bright);
    animation: scrollMove 2s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scrollMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(120px); }
}

/* ── FEATURED ── */
.featured-section {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 4rem 80px;
}

.featured-label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.featured-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--radius);
}

.featured-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-card:hover .featured-image img { transform: scale(1.03); }

.featured-category-tag {
    position: absolute;
    top: 16px; left: 16px;
    background: var(--white);
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 100px;
    letter-spacing: 0.04em;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--ink-muted);
    margin-bottom: 1rem;
}

.post-meta.small { font-size: 0.78rem; margin-bottom: 0.75rem; }

.post-dot { opacity: 0.4; font-size: 0.6rem; }

.featured-title {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
    color: var(--ink);
}

.featured-excerpt {
    font-size: 1rem;
    color: var(--ink-soft);
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 1px solid var(--accent);
    padding-bottom: 2px;
    transition: all 0.2s;
}

.btn-read-more:hover { gap: 10px; }

/* ── GRID ── */
.recent-section {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 4rem 80px;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 600;
}

.section-link {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

/* Accessible contrast: #007AFF fails WCAG AA on white; use site accent */
.view-all {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.view-all:hover { border-color: var(--accent); }

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

.posts-grid.wide {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.post-card { }

.post-card-link { display: block; }

.post-image-wrap {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    background: var(--paper-warm);
}

.post-image-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card-link:hover .post-image-wrap img { transform: scale(1.04); }

.post-category-tag {
    position: absolute;
    bottom: 12px; left: 12px;
    background: rgba(250,249,247,0.92);
    backdrop-filter: blur(8px);
    color: var(--ink);
    font-size: 0.68rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 100px;
    letter-spacing: 0.04em;
}

.post-card-body { padding: 0 4px; }

.post-card-title {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--ink);
    transition: color 0.2s;
}

.post-card-link:hover .post-card-title { color: var(--accent); }

.post-card-excerpt {
    font-size: 0.875rem;
    color: var(--ink-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── CTA ── */
.cta-section {
    background: var(--ink);
    padding: 80px 2rem;
    margin-top: 40px;
}

.cta-inner {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.cta-section h2 {
    font-family: var(--serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--white);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.cta-section p {
    color: rgba(255,255,255,0.6);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.cta-form {
    display: flex;
    gap: 12px;
    max-width: 420px;
    margin: 0 auto;
}

.cta-input {
    flex: 1;
    padding: 13px 18px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: var(--white);
    font-family: var(--sans);
    font-size: 0.9rem;
}

.cta-input::placeholder { color: rgba(255,255,255,0.35); }
.cta-input:focus { outline: none; border-color: var(--accent-bright); }

/* ── BLOG PAGE ── */
.blog-page {
    max-width: 100%;
    margin: 0 auto;
    padding: 60px 4rem 80px;
}

.blog-page-header { text-align: center; margin-bottom: 3rem; }

.page-title {
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.page-sub { color: var(--ink-muted); font-size: 1rem; }

.blog-filters {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 3rem;
}

.search-bar { display: flex; gap: 0.75rem; width: 100%; max-width: 500px; }

.search-input {
    flex: 1;
    padding: 11px 18px;
    border: 1.5px solid var(--border);
    border-radius: 100px;
    font-family: var(--sans);
    font-size: 0.9rem;
    background: var(--white);
    color: var(--ink);
    transition: border-color 0.2s;
}

.search-input:focus { outline: none; border-color: var(--accent); }

.search-btn {
    padding: 11px 22px;
    border-radius: 100px;
    background: var(--ink);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-family: var(--sans);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
}

.search-btn:hover { background: var(--accent); }

.category-pills { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.pill {
    padding: 7px 18px;
    border-radius: 100px;
    border: 1.5px solid var(--border);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-soft);
    transition: all 0.2s;
    background: var(--white);
}

.pill:hover, .pill.active {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
}

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 3rem;
}

.page-num {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1.5px solid var(--border);
    transition: all 0.2s;
    color: var(--ink-soft);
}

.page-num:hover, .page-num.active {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
}

.empty-state {
    text-align: center;
    padding: 80px 2rem;
    color: var(--ink-muted);
}

/* ── ARTICLE ── */
.article-page {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 4rem;
}

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

.article-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.article-category {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 4px 14px;
    border-radius: 100px;
}

.article-title {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-excerpt {
    font-size: 1.15rem;
    color: var(--ink-soft);
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.article-byline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.author-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 600;
    flex-shrink: 0;
}

.author-name { font-weight: 500; font-size: 0.9rem; }
.post-date { font-size: 0.8rem; color: var(--ink-muted); }

.article-hero-image {
    margin: 2rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
}

.article-hero-image img { width: 100%; height: 100%; object-fit: cover; }

.article-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--ink-soft);
}

.article-body p { margin-bottom: 1.4em; }
.article-body h2 {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--ink);
    margin: 2em 0 0.75em;
}
.article-body h3 {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    margin: 1.5em 0 0.5em;
}
.article-body strong { color: var(--ink); }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.related-section {
    max-width: 100%;
    margin: 60px auto;
    padding: 0 4rem;
    border-top: 1px solid var(--border);
    padding-top: 3rem;
}

.related-title {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.article-back {
    max-width: 1100px;
    margin: 0 auto 80px;
    padding: 0 4rem;
}

.btn-back {
    color: var(--ink-muted);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.btn-back:hover { color: var(--accent); }

/* ── FOOTER ── */
.site-footer {
    background: var(--paper-warm);
    border-top: 1px solid var(--border);
    padding: 60px 2rem 32px;
}

.footer-inner {
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .nav-logo {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--ink-muted);
    line-height: 1.7;
    max-width: 280px;
}

.footer-links h4,
.footer-links .footer-heading {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 1rem;
}

.footer-links a {
    display: block;
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
    max-width: 100%;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--ink-muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .featured-card { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1/-1; }
}

@media (max-width: 640px) {
    .nav-links { 
        display: none; 
        flex-direction: column; 
        position: absolute;
        top: 64px; left: 0; right: 0;
        background: var(--paper);
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--border);
        gap: 0;
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .posts-grid { grid-template-columns: 1fr; }
    .cta-form { flex-direction: column; }
    .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
    .hero-section { padding: 60px 1.5rem 50px; }
    /* Remove expensive blur effects on mobile */
    .navbar {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(255, 255, 255, 0.98);
    }
    .post-category-tag {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(250,249,247,0.98);
    }
    /* Disable hero animation on mobile to reduce TBT */
    .hero-headline { animation: none; }
    .hero-sub { animation: none; }
    .glass-card { animation: none; }
    /* Remove non-critical transitions on mobile */
    .featured-image img,
    .post-image-wrap img { transition: none; }
}

/* Prevent CLS: aspect-ratio fallback for image containers */
.post-image-wrap { aspect-ratio: 16/10; }
.featured-img { aspect-ratio: 8/5; }
.article-hero-image { aspect-ratio: 16/9; }

/* content-visibility for below-fold heavy sections */
.related-section,
.cta-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 400px;
}
