/* ==========================================================================
   Wayama News — clear signal design system (distinct from ceyload_insight)
   ========================================================================== */

:root {
    --wn-brand: #e86a12;
    --wn-brand-deep: #c4530a;
    --wn-brand-soft: rgba(232, 106, 18, 0.1);

    --wn-ink: #0b1220;
    --wn-text: #1c2434;
    --wn-muted: #5b667a;
    --wn-faint: #8b95a8;

    --wn-line: #d8dee8;
    --wn-line-soft: #e8edf4;
    --wn-bg: #eef2f7;
    --wn-surface: #ffffff;
    --wn-mast: #0b1220;

    --wn-radius: 4px;
    --wn-radius-md: 8px;

    --wn-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --wn-max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.wayama-body {
    margin: 0;
    color: var(--wn-text);
    background:
        linear-gradient(180deg, #e8edf4 0%, var(--wn-bg) 180px),
        var(--wn-bg);
    font-family: "Noto Sans Sinhala", "Nunito", "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.65;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
    font-family: "Noto Serif Sinhala", "Noto Sans Sinhala", "Nunito", serif;
    color: var(--wn-ink);
    letter-spacing: 0;
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 0.4em;
}

/* Shell ------------------------------------------------------------------ */

.wn-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wn-wrap {
    width: min(var(--wn-max), 92vw);
    margin: 0 auto;
}

.wn-main {
    flex: 1;
    padding: 28px 0 64px;
}

/* Masthead — solid dark bar (not frosted CI topbar) ---------------------- */

.wn-masthead {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--wn-mast);
    color: #f8fafc;
    border-bottom: 3px solid var(--wn-brand);
    box-shadow: 0 8px 20px -12px rgba(11, 18, 32, 0.55);
}

.wn-masthead-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
}

.wn-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.wn-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
}

.wn-logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wn-logo-name {
    margin: 0;
    font-family: "Noto Sans Sinhala", "Nunito", sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0;
    color: #fff;
    line-height: 1;
}

.wn-logo-name span {
    color: var(--wn-brand);
}

.wn-logo-tag {
    margin: 0;
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}

.wn-nav {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 2px;
    align-items: center;
}

.wn-nav a {
    color: #cbd5e1;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s var(--wn-ease), border-color 0.2s var(--wn-ease);
}

.wn-nav a:hover {
    color: #fff;
}

.wn-nav a.is-active {
    color: #fff;
    border-bottom-color: var(--wn-brand);
}

.wn-nav-toggle {
    display: none;
    margin-left: auto;
    background: transparent;
    border: 1px solid #334155;
    color: #fff;
    padding: 8px 12px;
    border-radius: var(--wn-radius);
    cursor: pointer;
    font-size: 1.1rem;
}

/* Page intro (compact) --------------------------------------------------- */

.wn-intro {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--wn-line);
    animation: wn-rise 0.55s var(--wn-ease) both;
}

.wn-intro h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    margin-bottom: 6px;
}

.wn-intro p {
    margin: 0;
    color: var(--wn-muted);
    max-width: 42rem;
    font-size: 1.02rem;
}

.wn-kicker {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--wn-brand-deep);
}

/* Featured story — image-led, not CI gradient hero card ------------------ */

.wn-feature {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr;
    gap: 0;
    margin-bottom: 0;
    background: var(--wn-surface);
    border: 1px solid var(--wn-line);
    border-radius: var(--wn-radius-md);
    overflow: hidden;
    animation: wn-rise 0.65s var(--wn-ease) 0.05s both;
}

.wn-carousel {
    margin-bottom: 36px;
}

.wn-carousel-hint {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wn-muted);
}

.wn-carousel-viewport {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
    border-radius: var(--wn-radius-md);
    user-select: none;
    -webkit-user-select: none;
}

.wn-carousel-viewport:active {
    cursor: grabbing;
}

.wn-carousel-track {
    display: flex;
    will-change: transform;
}

.wn-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    margin-bottom: 0;
    animation: none;
}

.wn-carousel-slide img {
    -webkit-user-drag: none;
    user-select: none;
}

.wn-carousel-slide a {
    -webkit-user-drag: none;
}

.wn-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.wn-carousel-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #c5cedb;
}

.wn-carousel-dot.is-active {
    background: var(--wn-brand);
    transform: scale(1.15);
}

.wn-feature-media {
    position: relative;
    min-height: 320px;
    background: #0b1220;
}

.wn-feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 320px;
    transition: transform 0.6s var(--wn-ease);
}

.wn-feature:hover .wn-feature-media img {
    transform: scale(1.03);
}

.wn-feature-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 30px;
    gap: 12px;
}

.wn-feature-body h2 {
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    margin: 0;
}

.wn-feature-body h2 a:hover {
    color: var(--wn-brand-deep);
}

.wn-feature-body p.lead {
    margin: 0;
    color: var(--wn-muted);
    font-size: 0.98rem;
}

.wn-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    color: var(--wn-faint);
    font-size: 0.84rem;
}

.wn-meta .sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--wn-faint);
}

.wn-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wn-brand-deep);
}

/* Sections --------------------------------------------------------------- */

.wn-section {
    margin-bottom: 40px;
    animation: wn-rise 0.55s var(--wn-ease) both;
}

.wn-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--wn-ink);
}

.wn-section-head h2,
.wn-section-head h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
}

.wn-section-head a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wn-brand-deep);
}

.wn-section-head a:hover {
    text-decoration: underline;
}

/* Story grid — border/spacing, not heavy cards -------------------------- */

.wn-story-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px 20px;
}

.wn-story {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wn-story-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #cbd5e1;
    border-radius: var(--wn-radius);
}

.wn-story-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s var(--wn-ease);
}

.wn-story:hover .wn-story-thumb img {
    transform: scale(1.04);
}

.wn-story h3,
.wn-story h4 {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
}

.wn-story h3 a:hover,
.wn-story h4 a:hover {
    color: var(--wn-brand-deep);
}

.wn-story .wn-meta {
    margin-top: auto;
}

/* Ranked list + topic links ---------------------------------------------- */

.wn-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.wn-rank {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: wn-rank;
}

.wn-rank li {
    counter-increment: wn-rank;
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--wn-line-soft);
}

.wn-rank li::before {
    content: counter(wn-rank, decimal-leading-zero);
    font-family: "Nunito", "Noto Sans Sinhala", sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--wn-brand);
    line-height: 1.4;
}

.wn-rank a {
    font-weight: 650;
    font-size: 0.95rem;
}

.wn-rank a:hover {
    color: var(--wn-brand-deep);
}

.wn-rank .wn-meta {
    margin-top: 4px;
}

.wn-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wn-topic {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid var(--wn-line);
    background: var(--wn-surface);
    color: var(--wn-text);
    font-size: 0.84rem;
    font-weight: 600;
    border-radius: var(--wn-radius);
    transition: border-color 0.2s var(--wn-ease), background 0.2s var(--wn-ease);
}

.wn-topic:hover,
.wn-topic.is-active {
    border-color: var(--wn-brand);
    background: var(--wn-brand-soft);
    color: var(--wn-brand-deep);
}

/* Album strip ------------------------------------------------------------ */

.wn-album-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.wn-album {
    position: relative;
    overflow: hidden;
    border-radius: var(--wn-radius);
    aspect-ratio: 1;
    background: #0b1220;
}

.wn-album img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
    transition: transform 0.45s var(--wn-ease), opacity 0.3s;
}

.wn-album:hover img {
    transform: scale(1.05);
    opacity: 1;
}

.wn-album > span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 12px 10px;
    background: linear-gradient(transparent, rgba(11, 18, 32, 0.85));
    color: #fff;
    font-size: 0.85rem;
    font-weight: 650;
}

/* Surface panel (forms / article body only when needed) ------------------ */

.wn-panel {
    background: var(--wn-surface);
    border: 1px solid var(--wn-line);
    border-radius: var(--wn-radius-md);
    padding: 22px 24px;
}

.wn-empty {
    color: var(--wn-muted);
    margin: 0;
    padding: 18px 0;
}

/* Article page ----------------------------------------------------------- */

.wn-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 36px;
    align-items: start;
}

.wn-article-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 8px 0 12px;
}

.wn-article-hero {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--wn-radius);
    margin: 18px 0;
}

.wn-article-body {
    font-size: 1.12rem;
    line-height: 1.8;
    color: var(--wn-text);
}

.wn-article-body p { margin: 0 0 1.1em; }
.wn-article-body img { margin: 1em 0; border-radius: var(--wn-radius); }
.wn-article-body a { color: var(--wn-brand-deep); text-decoration: underline; }

.wn-aside {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 20px;
}

.wn-aside-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wn-aside-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--wn-line-soft);
}

.wn-aside-list a {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    align-items: start;
}

.wn-aside-list img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--wn-radius);
}

.wn-aside-list strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.35;
}

.wn-aside-list span {
    display: block;
    margin-top: 3px;
    font-size: 0.75rem;
    color: var(--wn-faint);
}

.wn-rule {
    border: 0;
    border-top: 1px solid var(--wn-line);
    margin: 28px 0;
}

/* Share + social --------------------------------------------------------- */

.wn-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wn-actions a,
.wn-actions button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--wn-line);
    background: var(--wn-surface);
    color: var(--wn-text);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    border-radius: var(--wn-radius);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.wn-actions a:hover,
.wn-actions button:hover {
    border-color: var(--wn-brand);
    background: var(--wn-brand-soft);
}

.wn-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--wn-ink);
    color: #fff;
    border: 0;
    border-radius: var(--wn-radius);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s var(--wn-ease);
}

.wn-btn:hover { background: var(--wn-brand-deep); }

.wn-btn-ghost {
    background: transparent;
    color: var(--wn-ink);
    border: 1px solid var(--wn-line);
}

.wn-btn-ghost:hover {
    background: var(--wn-brand-soft);
    border-color: var(--wn-brand);
    color: var(--wn-brand-deep);
}

/* Forms ------------------------------------------------------------------ */

.wn-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 650;
}

.wn-form input,
.wn-form textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 14px;
    border: 1px solid var(--wn-line);
    border-radius: var(--wn-radius);
    background: #fff;
    font: inherit;
    color: var(--wn-text);
}

.wn-form input:focus,
.wn-form textarea:focus {
    outline: 2px solid rgba(232, 106, 18, 0.35);
    border-color: var(--wn-brand);
}

.wn-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Comments --------------------------------------------------------------- */

.wn-comments {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wn-comments li {
    padding: 14px 0;
    border-bottom: 1px solid var(--wn-line-soft);
}

.wn-comments p {
    margin: 0 0 6px;
}

/* Contact links ---------------------------------------------------------- */

.wn-contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wn-contact-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--wn-line);
    background: var(--wn-surface);
    border-radius: var(--wn-radius);
    font-weight: 650;
    transition: border-color 0.2s, background 0.2s;
}

.wn-contact-links a:hover {
    border-color: var(--wn-brand);
    background: var(--wn-brand-soft);
}

/* Modal ------------------------------------------------------------------ */

.wn-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(11, 18, 32, 0.88);
    padding: 24px;
}

.wn-modal-img {
    max-width: min(960px, 92vw);
    max-height: 82vh;
    margin: 4vh auto 0;
    object-fit: contain;
}

.wn-modal-close,
.wn-modal-nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    cursor: pointer;
    border-radius: var(--wn-radius);
}

.wn-modal-close {
    top: 18px;
    right: 18px;
    font-size: 1.6rem;
    line-height: 1;
    padding: 4px 12px;
}

.wn-modal-nav {
    top: 50%;
    transform: translateY(-50%);
    padding: 12px 14px;
    font-size: 1.2rem;
}

.wn-modal-prev { left: 18px; }
.wn-modal-next { right: 18px; }

.wn-modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #e2e8f0;
    font-size: 0.9rem;
}

/* Pagination ------------------------------------------------------------- */

.wn-pagination-wrap {
    margin-top: 28px;
}

.wn-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wn-pagination a,
.wn-pagination span {
    display: inline-flex;
    min-width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--wn-line);
    background: var(--wn-surface);
    border-radius: var(--wn-radius);
    font-size: 0.88rem;
    font-weight: 650;
}

.wn-pagination .active span {
    background: var(--wn-ink);
    border-color: var(--wn-ink);
    color: #fff;
}

.wn-pagination .disabled span {
    opacity: 0.4;
}

/* Footer ----------------------------------------------------------------- */

.wn-footer {
    background: var(--wn-mast);
    color: #94a3b8;
    padding: 40px 0 24px;
    margin-top: auto;
    border-top: 3px solid var(--wn-brand);
}

.wn-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
}

.wn-footer h3,
.wn-footer h4 {
    color: #f8fafc;
    margin-bottom: 10px;
    font-size: 1rem;
}

.wn-footer p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
}

.wn-footer-brand {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.wn-footer-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
}

.wn-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wn-footer-links li { margin-bottom: 6px; }

.wn-footer-links a {
    color: #cbd5e1;
    font-size: 0.9rem;
}

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

.wn-footer-social {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wn-footer-social a {
    color: #cbd5e1;
    font-size: 0.9rem;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.wn-footer-social a:hover { color: var(--wn-brand); }

.wn-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid #1e293b;
    font-size: 0.82rem;
}

.wn-footer-bottom a { color: var(--wn-brand); }

/* Motion ----------------------------------------------------------------- */

@keyframes wn-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 960px) {
    .wn-feature {
        grid-template-columns: 1fr;
    }

    .wn-feature-media,
    .wn-feature-media img {
        min-height: 220px;
    }

    .wn-story-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wn-album-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .wn-article-layout {
        grid-template-columns: 1fr;
    }

    .wn-aside { position: static; }

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

@media (max-width: 720px) {
    .wn-nav-toggle { display: inline-flex; }

    .wn-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        padding-bottom: 10px;
    }

    .wn-nav.is-open { display: flex; }

    .wn-masthead-inner {
        flex-wrap: wrap;
    }

    .wn-story-grid,
    .wn-split,
    .wn-form-row {
        grid-template-columns: 1fr;
    }

    .wn-album-strip {
        grid-template-columns: 1fr 1fr;
    }
}
