/* ============================================================
   World Political Parties — English Edition
   index2.html  | Editorial Homepage (v3 — grand dark hero)
   Design goals: 简约大气 · Western academic journal feel
   Hero: full-bleed navy editorial with subtle pro motion.
   Reuses brand tokens from styles-en.css (loaded first)
   ============================================================ */

:root {
    --home-max: 1180px;
    --home-gap: 2.25rem;
    --home-rule: 2px solid var(--color-accent);
    --home-cat: var(--color-red);
    /* hero palette */
    --hero-navy-1: #0c1a30;
    --hero-navy-2: #15263f;
    --hero-navy-3: #1a2a4a;
}

/* ---------- Layout helpers ---------- */
.home-wrap { background: var(--color-bg); }
.section-pad { padding: var(--space-xxl) 0; }
.container-home { max-width: var(--home-max); margin: 0 auto; padding: 0 var(--space-lg); }

/* Minimalist section heading */
.home-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: var(--home-rule);
}
.home-head h2 {
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    margin: 0;
}
.home-head .home-more {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 600;
    white-space: nowrap;
}
.home-head .home-more:hover { color: var(--color-red-light); }

/* ============================================================
   HERO — full-bleed navy editorial masthead
   ============================================================ */
.home-hero {
    position: relative;
    overflow: hidden;
    color: #eef2f8;
    background: radial-gradient(120% 120% at 80% 0%, var(--hero-navy-3) 0%, var(--hero-navy-2) 45%, var(--hero-navy-1) 100%);
    padding: clamp(3.5rem, 9vh, 7rem) 0 clamp(5rem, 11vh, 8rem);
    isolation: isolate;
}
/* layered animated background */
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-earth {
    position: absolute;
    right: -8%;
    top: 50%;
    width: 70vw;
    max-width: 900px;
    height: 130%;
    transform: translateY(-50%) scale(1.05);
    background: url('images/photo-1451187580459-43490279c0fa.jpg') center/cover no-repeat;
    opacity: 0.42;
    filter: saturate(1.05) brightness(0.85);
    animation: heroKenBurns 26s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}
.hero-veil {
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, var(--hero-navy-1) 0%, rgba(12,26,48,0.72) 38%, rgba(12,26,48,0.15) 70%, rgba(12,26,48,0.55) 100%),
        linear-gradient(0deg, var(--hero-navy-1) 2%, rgba(12,26,48,0) 38%);
}
.hero-glow {
    position: absolute;
    top: -20%; left: 12%;
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(201,168,76,0.30) 0%, rgba(201,168,76,0) 62%);
    filter: blur(6px);
    animation: heroGlow 9s ease-in-out infinite;
}
/* world connection network (gold, animated flow) */
.hero-net {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    opacity: 0.5;
    animation: heroNetDrift 22s ease-in-out infinite alternate;
}
.hero-net .net-sphere { fill: rgba(201,168,76,0.04); stroke: rgba(201,168,76,0.35); stroke-width: 1; }
.hero-net .net-mer { fill: none; stroke: rgba(201,168,76,0.28); stroke-width: 1; }
.hero-net .net-arc {
    fill: none; stroke: var(--color-accent); stroke-width: 1.4;
    stroke-dasharray: 7 9; stroke-linecap: round;
    opacity: 0.7;
    animation: heroDash 3.2s linear infinite;
}
.hero-net .net-arc:nth-child(2) { animation-delay: -1.1s; opacity: 0.5; }
.hero-net .net-arc:nth-child(3) { animation-delay: -2.0s; opacity: 0.6; }
.hero-net .net-nodes circle {
    fill: var(--color-accent);
    animation: heroNode 2.8s ease-in-out infinite;
}
.hero-net .net-nodes circle:nth-child(2n) { animation-delay: -1.3s; }
.hero-net .net-nodes circle:nth-child(3n) { animation-delay: -2.1s; }

/* hero content */
.hero-inner { position: relative; }
.hero-inner > * { animation: heroRise 0.9s cubic-bezier(.2,.7,.2,1) both; }
.hero-inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.13s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.21s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.29s; }
.hero-inner > *:nth-child(5) { animation-delay: 0.40s; }

.hero-kicker {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--color-accent-light);
    margin-bottom: var(--space-md);
}
.hero-kicker::before {
    content: ""; width: 34px; height: 2px; background: var(--color-accent);
    display: inline-block;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.1rem, 5vw, 3.7rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: #fff;
    margin: 0 0 var(--space-md);
    max-width: 18ch;
    text-wrap: balance;
}
.hero-sub {
    font-size: clamp(1rem, 1.6vw, 1.18rem);
    line-height: 1.7;
    color: rgba(238,242,248,0.82);
    max-width: 56ch;
    margin: 0 0 var(--space-lg);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-xl); }
.btn-hero {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--color-accent); color: var(--hero-navy-1);
    font-weight: 700; font-size: 0.98rem;
    padding: 0.85rem 1.5rem; border-radius: 6px;
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-base), background var(--transition-base);
    box-shadow: 0 8px 24px rgba(201,168,76,0.25);
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(201,168,76,0.4); background: #d8b85e; }
.btn-hero svg { transition: transform var(--transition-fast); }
.btn-hero:hover svg { transform: translateX(3px); }
.btn-hero-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid rgba(238,242,248,0.4); color: #eef2f8;
    font-weight: 600; font-size: 0.98rem;
    padding: 0.85rem 1.5rem; border-radius: 6px; text-decoration: none;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.btn-hero-ghost:hover { border-color: var(--color-accent); background: rgba(201,168,76,0.12); }

/* glassy featured article card */
.hero-feature {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-decoration: none;
    max-width: 760px;
    transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}
.hero-feature:hover {
    border-color: rgba(201,168,76,0.55);
    transform: translateY(-3px);
    box-shadow: 0 18px 44px rgba(0,0,0,0.32);
}
.hero-feature .hf-media { position: relative; overflow: hidden; min-height: 190px; }
.hero-feature .hf-media img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.6s ease;
}
.hero-feature:hover .hf-media img { transform: scale(1.05); }
.hero-feature .hf-body { padding: var(--space-md) var(--space-lg); }
.hf-cat {
    display: inline-block;
    background: var(--color-accent); color: var(--hero-navy-1);
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
    padding: 3px 10px; border-radius: 3px; margin-bottom: var(--space-sm);
}
.hf-title {
    font-family: var(--font-heading);
    font-size: 1.28rem; line-height: 1.28; color: #fff; margin: 0 0 8px;
}
.hero-feature:hover .hf-title { color: var(--color-accent-light); }
.hf-dek {
    font-size: 0.9rem; line-height: 1.55; color: rgba(238,242,248,0.72);
    margin: 0 0 var(--space-sm);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hf-meta { font-size: 0.8rem; color: rgba(238,242,248,0.6); }
.hf-meta time { color: rgba(238,242,248,0.6); }

/* stat strip */
.hero-stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-xl);
    max-width: var(--home-max);
    margin-left: auto; margin-right: auto;
    padding: var(--space-lg) var(--space-lg) 0;
    border-top: 1px solid rgba(255,255,255,0.14);
}
.stat { text-align: left; }
.stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 700; color: #fff; line-height: 1;
    font-variant-numeric: tabular-nums;
}
.stat-num::after { content: ""; }
.stat-label {
    display: block; margin-top: 6px;
    font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase;
    color: rgba(238,242,248,0.6);
}

/* scroll cue */
.hero-scroll {
    position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
    width: 26px; height: 42px; border: 2px solid rgba(238,242,248,0.5);
    border-radius: 14px; display: flex; justify-content: center;
    text-decoration: none;
}
.hero-scroll .wheel {
    width: 4px; height: 9px; background: var(--color-accent);
    border-radius: 2px; margin-top: 7px;
    animation: heroWheel 1.7s ease-in-out infinite;
}

/* ============================================================
   LATEST ARTICLES — clean card grid
   ============================================================ */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--home-gap);
}
.home-card {
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.home-card:hover { box-shadow: 0 6px 24px rgba(26,42,74,0.10); transform: translateY(-3px); }
.home-card .card-media { position: relative; overflow: hidden; }
.home-card .card-media img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-base);
}
.home-card:hover .card-media img { transform: scale(1.04); }
.home-card .card-cat {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 9px;
    border-radius: 3px;
}
.home-card .card-body { padding: var(--space-md); }
.home-card h3 {
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.38;
    margin: 0 0 var(--space-xs);
}
.home-card h3 a { color: var(--color-primary); }
.home-card h3 a:hover { color: var(--color-red-light); }
.home-card .card-excerpt {
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--color-text-light);
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-card .card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}
.home-card .card-meta .author { font-weight: 600; color: var(--color-text-light); }

/* ============================================================
   CHANNELS — compact card grid
   ============================================================ */
.home-channels { background: var(--color-bg-warm); }
.channels-grid2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--home-gap);
}
.chan-card {
    background: #fff;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.chan-card:hover { box-shadow: 0 6px 24px rgba(26,42,74,0.10); transform: translateY(-3px); }
.chan-top {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}
.chan-no {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-accent);
}
.chan-card h3 { margin: 0; font-size: 1.2rem; }
.chan-card h3 a { color: var(--color-primary); }
.chan-card h3 a:hover { color: var(--color-red-light); }
.chan-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}
.chan-links { list-style: none; margin: 0 0 var(--space-md); padding: 0; border-top: 1px solid var(--color-border-light); }
.chan-links li { border-bottom: 1px solid var(--color-border-light); }
.chan-links a {
    display: block;
    padding: var(--space-sm) 0 var(--space-sm) 18px;
    position: relative;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--color-text);
    transition: color var(--transition-fast), padding-left var(--transition-fast);
}
.chan-links a::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    width: 6px; height: 6px;
    border-right: 1.5px solid var(--color-accent);
    border-top: 1.5px solid var(--color-accent);
    transform: translateY(-50%) rotate(45deg);
}
.chan-links a:hover { color: var(--color-red-light); padding-left: 24px; }
.chan-explore {
    margin-top: auto;
    align-self: flex-start;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--color-red);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.chan-explore svg { transition: transform var(--transition-fast); }
.chan-explore:hover svg { transform: translateX(3px); }

/* ============================================================
   ABOUT — three quiet features
   ============================================================ */
.home-about { background: #fff; }
.about-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--home-gap);
    margin-top: var(--space-md);
}
.about-feature { text-align: left; }
.about-feature .af-num {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: var(--space-xs);
}
.about-feature h3 { font-size: 1.1rem; margin: 0 0 6px; }
.about-feature p { font-size: 0.92rem; color: var(--color-text-light); line-height: 1.6; margin: 0; }
.about-intro { max-width: 760px; }
.about-intro p { font-size: 1.05rem; line-height: 1.7; color: var(--color-text-light); }

/* ============================================================
   SUBSCRIBE band
   ============================================================ */
.home-subscribe {
    background: var(--color-primary);
    color: #fff;
    padding: var(--space-xl) 0;
}
.subscribe-grid2 {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--home-gap);
    align-items: center;
}
.home-subscribe h2 { color: #fff; font-size: 1.7rem; margin: 0 0 var(--space-xs); }
.home-subscribe p { color: rgba(255,255,255,0.78); margin: 0; line-height: 1.6; }
.subscribe-form { display: flex; gap: var(--space-sm); }
.subscribe-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.subscribe-form input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 5px;
    font-size: 0.95rem;
}
.subscribe-form input::placeholder { color: rgba(255,255,255,0.55); }
.subscribe-form input:focus { outline: none; border-color: var(--color-accent); background: rgba(255,255,255,0.14); }
.subscribe-form button {
    background: var(--color-accent);
    color: var(--color-primary);
    font-weight: 700;
    padding: 0.8rem 1.4rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-base);
}
.subscribe-form button:hover { background: #fff; }
.subscribe-note { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-top: var(--space-sm); }
.subscribe-note a { color: var(--color-accent-light); }

/* ============================================================
   SCROLL REVEAL (subtle, pro)
   ============================================================ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes heroKenBurns {
    0%   { transform: translateY(-50%) scale(1.04) translateX(0); }
    100% { transform: translateY(-50%) scale(1.14) translateX(-3%); }
}
@keyframes heroGlow {
    0%, 100% { transform: translate(0,0) scale(1); opacity: 0.55; }
    50%      { transform: translate(40px,30px) scale(1.15); opacity: 0.9; }
}
@keyframes heroNetDrift {
    0%   { transform: translate(0,0); }
    100% { transform: translate(-22px,14px); }
}
@keyframes heroDash {
    to { stroke-dashoffset: -32; }
}
@keyframes heroNode {
    0%, 100% { opacity: 0.35; r: 3; }
    50%      { opacity: 1; r: 5; }
}
@keyframes heroRise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
}
@keyframes heroWheel {
    0%   { opacity: 0; transform: translateY(0); }
    30%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(13px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .latest-grid { grid-template-columns: repeat(2, 1fr); }
    .channels-grid2 { grid-template-columns: repeat(2, 1fr); }
    .about-row { grid-template-columns: 1fr; gap: var(--space-lg); }
    .hero-feature { grid-template-columns: 200px 1fr; }
}
@media (max-width: 768px) {
    :root { font-size: 15px; }
    .container-home { padding: 0 var(--space-md); }
    .home-hero { padding: var(--space-xl) 0 4.5rem; }
    .hero-feature { grid-template-columns: 1fr; }
    .hero-feature .hf-media { min-height: 180px; position: relative; }
    .hero-feature .hf-media img { position: relative; height: 180px; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg) var(--space-md); }
    .hero-scroll { display: none; }
    .latest-grid { grid-template-columns: 1fr; }
    .channels-grid2 { grid-template-columns: 1fr; }
    .subscribe-grid2 { grid-template-columns: 1fr; gap: var(--space-lg); }
    .subscribe-form { flex-direction: column; }
    .subscribe-form button { width: 100%; }
    .section-pad { padding: var(--space-xl) 0; }
}
@media (max-width: 480px) {
    .hero-stats { grid-template-columns: 1fr 1fr; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-earth, .hero-glow, .hero-net, .hero-net .net-arc, .hero-net .net-nodes circle,
    .hero-inner > *, .hero-scroll .wheel {
        animation: none !important;
    }
    .hero-net .net-arc { stroke-dasharray: none; }
    .hero-inner > * { opacity: 1 !important; transform: none !important; }
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    .hero-feature:hover .hf-media img,
    .home-card:hover .card-media img { transform: none; }
}
