:root {
    --bg: #f5f2df;
    --bg-2: #e9efd6;
    --panel: rgba(255, 252, 232, 0.88);
    --panel-2: rgba(245, 249, 220, 0.94);
    --line: rgba(83, 124, 71, 0.22);
    --line-strong: rgba(83, 124, 71, 0.42);
    --text: #243322;
    --muted: #64745b;
    --faint: #8b967f;
    --accent: #b97418;
    --accent-2: #3f8f55;
    --water: #478f94;
    --accent-soft: rgba(185, 116, 24, 0.13);
    --leaf-soft: rgba(63, 143, 85, 0.12);
    --shadow: rgba(49, 74, 39, 0.18);
    --serif: Georgia, "Times New Roman", serif;
    --sans: "Segoe UI", Arial, sans-serif;
    --mono: "Cascadia Mono", "Consolas", monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--sans);
    background:
        radial-gradient(circle at 16% 8%, rgba(164, 213, 132, 0.42), transparent 25rem),
        radial-gradient(circle at 82% 14%, rgba(116, 181, 184, 0.28), transparent 28rem),
        radial-gradient(circle at 50% 100%, rgba(229, 180, 91, 0.24), transparent 34rem),
        linear-gradient(180deg, #f8f5df 0%, #e6efd4 52%, #d7ead0 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle, rgba(45, 86, 48, 0.055) 1px, transparent 1.4px),
        linear-gradient(120deg, transparent 0 46%, rgba(45, 86, 48, 0.035) 46% 47%, transparent 47% 100%);
    background-size: 56px 56px, 180px 180px;
    opacity: 0.72;
    z-index: 50;
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    color: #3f4d3a;
    line-height: 1.7;
}

li {
    color: #3f4d3a;
    line-height: 1.6;
    margin: 10px 0;
}

.page-frame {
    width: min(1420px, calc(100% - 32px));
    margin: 16px auto;
    min-height: calc(100vh - 32px);
    border: 1px solid var(--line-strong);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.65) inset, 0 24px 80px var(--shadow);
    position: relative;
    padding: 28px;
    background: rgba(255, 253, 237, 0.64);
    border-radius: 22px;
    backdrop-filter: blur(6px);
}

.site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: start;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    gap: 16px;
    align-items: center;
}

.logo-mark {
    width: 62px;
    height: 62px;
    border: 1px solid var(--line-strong);
    position: relative;
    display: grid;
    place-items: center;
    background: url("../images/logo/newtopia-logo-mark.svg") center / cover no-repeat;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(63, 143, 85, 0.16);
}

.logo-mark::before { content: none; }

.logo-mark::after { content: none; }

.brand h1 {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #20341d;
}

.brand .sub {
    margin-top: 5px;
    font-family: var(--mono);
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.top-nav {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-family: var(--mono);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.top-nav a,
.status-pill {
    border: 1px solid var(--line);
    padding: 10px 13px;
    color: #536348;
    background: rgba(255, 255, 246, 0.58);
    border-radius: 999px;
}

.top-nav a:hover {
    color: #193619;
    border-color: var(--accent-2);
    background: var(--leaf-soft);
}

.status-pill {
    color: #8d5a12;
    background: rgba(255, 246, 213, 0.72);
}

.hero {
    display: grid;
    grid-template-columns: 1.04fr 0.96fr;
    gap: 24px;
    padding: 36px 0 28px;
}

.directive {
    font-family: var(--mono);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
}

.hero-title {
    margin: 18px 0 18px;
    font-family: var(--serif);
    font-size: clamp(2.7rem, 6vw, 6rem);
    line-height: 0.96;
    font-weight: 400;
    letter-spacing: -0.04em;
    color: #1f321d;
}

.hero-title span {
    color: var(--accent);
    text-shadow: 0 5px 18px rgba(185,116,24,0.16);
}

.hero-copy {
    width: min(700px, 100%);
    font-size: 1.12rem;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 24px;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line-strong);
    padding: 13px 16px;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #243322;
    background: rgba(255,255,246,0.66);
    border-radius: 999px;
}

.button.primary {
    border-color: rgba(185,116,24,0.45);
    background: var(--accent-soft);
    color: #6f460f;
}

.button:hover {
    transform: translateY(-1px);
    border-color: var(--accent-2);
    background: rgba(63,143,85,0.10);
}

.quote {
    margin-top: 24px;
    padding-left: 16px;
    border-left: 1px solid var(--line-strong);
    color: #65745c;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.05rem;
}

.panel {
    border: 1px solid var(--line-strong);
    background: var(--panel);
    box-shadow: 0 18px 48px rgba(49,74,39,0.16);
    position: relative;
    overflow: hidden;
    border-radius: 18px;
}

.panel::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(83,124,71,0.08);
    pointer-events: none;
    border-radius: 14px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
    font-family: var(--mono);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    background: rgba(255,255,246,0.32);
}

.panel-body {
    padding: 18px;
}

.pond-graphic {
    min-height: 330px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(ellipse at 50% 52%, rgba(71,143,148,0.28), transparent 11rem),
        radial-gradient(circle at 30% 60%, rgba(63,143,85,0.15), transparent 13rem),
        linear-gradient(180deg, rgba(255,255,255,0.50), rgba(218,235,206,0.28));
}

.pond-shape {
    width: min(440px, 94%);
    aspect-ratio: 1.48 / 1;
    border-radius: 48% 52% 44% 56% / 54% 42% 58% 46%;
    border: 1px solid rgba(62,111,74,0.55);
    background:
        radial-gradient(circle at 34% 36%, rgba(255,255,255,0.48), transparent 8%),
        radial-gradient(circle at 62% 60%, rgba(229,180,91,0.14), transparent 13%),
        radial-gradient(circle at 50% 50%, rgba(85,158,157,0.70), rgba(91,165,142,0.60) 62%, rgba(105,143,83,0.46));
    box-shadow: inset 0 0 32px rgba(255,255,255,0.22), 0 0 46px rgba(71,143,148,0.16);
    position: relative;
}

.pond-shape::before,
.pond-shape::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: linear-gradient(135deg, #6fb65b, #3d874d);
    box-shadow: 0 0 18px rgba(63,143,85,0.22);
}

.pond-shape::before {
    width: 76px;
    height: 34px;
    left: 38px;
    top: 52px;
    transform: rotate(-25deg);
}

.pond-shape::after {
    width: 98px;
    height: 42px;
    right: 46px;
    bottom: 50px;
    transform: rotate(18deg);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px;
    font-family: var(--mono);
    color: var(--muted);
    font-size: 0.88rem;
}

.section-title {
    margin: 18px 0 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-size: 0.9rem;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card {
    min-height: 215px;
    border: 1px solid var(--line);
    background: rgba(255, 252, 232, 0.72);
    padding: 20px;
    position: relative;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(49,74,39,0.10);
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(63,143,85,0.55);
    background: rgba(255, 255, 244, 0.94);
}

.card-kicker {
    font-family: var(--mono);
    color: var(--accent);
    letter-spacing: 0.1em;
    font-size: 0.74rem;
    text-transform: uppercase;
}

.card h3 {
    margin: 12px 0 8px;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.45rem;
    color: #21341f;
}

.card p {
    margin: 0 0 18px;
    color: #4b5c43;
}

.card-link {
    font-family: var(--mono);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-size: 0.8rem;
}

.two-column {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    gap: 18px;
}

.status-list {
    display: grid;
    gap: 10px;
    font-family: var(--mono);
}

.status-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(83,124,71,0.13);
    padding-bottom: 8px;
    color: var(--muted);
}

.status-row strong {
    color: var(--text);
    font-weight: 400;
}

.article-list {
    display: grid;
    gap: 14px;
}

.article-row {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    background: rgba(255,255,246,0.58);
    padding: 12px;
    border-radius: 16px;
}

.thumb {
    min-height: 92px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 35% 45%, rgba(185,116,24,0.12), transparent 32%),
        rgba(230,239,212,0.9);
    overflow: hidden;
    border-radius: 12px;
}

.thumb img {
    width: 100%;
    height: 100%;
    min-height: 92px;
    display: block;
    object-fit: cover;
    filter: saturate(0.98) contrast(1.00) brightness(1.06);
}

.article-row:hover .thumb img,
.card:hover .thumb img {
    width: 100%;
    height: 100%;
    min-height: 92px;
    display: block;
    object-fit: cover;
    filter: saturate(0.98) contrast(1.00) brightness(1.06);
}

.article-card-thumb {
    margin: -20px -20px 16px;
    height: 140px;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    background: rgba(230,239,212,0.9);
}

.article-card-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter: saturate(0.98) contrast(1.00) brightness(1.06);
}

.article-row h3 {
    margin: 0 0 6px;
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 400;
    color: #21341f;
}

.article-row p {
    margin: 0;
}

.article-meta {
    font-family: var(--mono);
    color: var(--faint);
    font-size: 0.76rem;
    text-transform: uppercase;
}

.page-title {
    margin: 38px 0 20px;
    font-family: var(--serif);
    font-size: clamp(2.5rem, 5vw, 4.8rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.04em;
    color: #20341d;
}

.content-page {
    max-width: 980px;
    margin: 0 auto;
}

.content-page .panel-body {
    padding: clamp(24px, 5vw, 54px);
}

.content-page h2 {
    margin-top: 36px;
    font-family: var(--serif);
    font-weight: 400;
    color: var(--text);
    font-size: 2rem;
}

.youtube-embed,
.local-video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 28px 0;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.60);
    box-shadow: 0 18px 48px rgba(49,74,39,0.16);
    overflow: hidden;
    border-radius: 16px;
}

.youtube-embed iframe,
.local-video-embed video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.youtube-fallback,
.media-caption {
    margin-top: -18px;
    margin-bottom: 28px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.youtube-fallback a {
    color: var(--accent);
    border-bottom: 1px solid rgba(185,116,24,0.45);
}

.footer {
    margin-top: 28px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: var(--faint);
    font-family: var(--mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

@media (max-width: 980px) {
    .site-header,
    .hero,
    .two-column {
        grid-template-columns: 1fr;
    }

    .top-nav {
        justify-content: flex-start;
    }

    .card-grid {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 640px) {
    .page-frame {
        width: calc(100% - 16px);
        margin: 8px auto;
        padding: 16px;
    }

    .logo-mark {
    width: 62px;
    height: 62px;
    border: 1px solid var(--line-strong);
    position: relative;
    display: grid;
    place-items: center;
    background: url("../images/logo/newtopia-logo-mark.svg") center / cover no-repeat;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(63, 143, 85, 0.16);
}

.content-image {
    margin: 30px 0;
    border: 1px solid var(--line-strong);
    background: rgba(255, 252, 232, 0.72);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(49,74,39,0.14);
}

.content-image img {
    width: 100%;
    height: auto;
    max-height: none;
    display: block;
    object-fit: contain;
}

.content-image figcaption {
    padding: 12px 16px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-top: 1px solid var(--line);
    background: rgba(255,255,246,0.45);
}

.content-image.no-caption figcaption {
    display: none;
}

/* Click-to-view full image lightbox. */
.content-image {
    cursor: zoom-in;
}

.content-image .image-lightbox-trigger {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(22, 32, 20, 0.78);
    backdrop-filter: blur(8px);
}

.image-lightbox.is-open {
    display: flex;
}

.image-lightbox img {
    max-width: min(96vw, 1400px);
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid rgba(83, 124, 71, 0.45);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    background: #f8f5df;
}

.image-lightbox-close {
    position: fixed;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(83, 124, 71, 0.45);
    border-radius: 999px;
    background: rgba(255, 252, 232, 0.92);
    color: #243322;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(49, 74, 39, 0.18);
}

.image-lightbox-caption {
    position: fixed;
    left: 28px;
    right: 28px;
    bottom: 18px;
    text-align: center;
    color: #f8f5df;
    font-family: var(--mono);
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

body.lightbox-open {
    overflow: hidden;
}

/* Strong image fitting and lightbox overlay fix. */

/* Inline article image blocks: show the entire image, never crop it. */
.content-image {
    display: block;
    width: 100%;
    margin: 30px 0;
    border: 1px solid var(--line-strong);
    background: rgba(255, 252, 232, 0.72);
    border-radius: 18px;
    overflow: visible;
    box-shadow: 0 18px 48px rgba(49,74,39,0.14);
    cursor: zoom-in;
}

.content-image .image-lightbox-trigger {
    display: block;
    width: 100%;
    height: auto;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    line-height: 0;
}

.content-image img,
.content-image .image-lightbox-trigger img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    display: block !important;
    object-fit: contain !important;
}

/* Keep thumbnails tidy; these are previews and can crop. */
.thumb img,
.article-card-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Full-screen image popup. Use !important so older rules cannot leave it at the bottom of the page. */
.image-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 32px !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(22, 32, 20, 0.82) !important;
    backdrop-filter: blur(8px);
}

.image-lightbox.is-open {
    display: flex !important;
}

.image-lightbox img {
    width: auto !important;
    height: auto !important;
    max-width: 96vw !important;
    max-height: 88vh !important;
    object-fit: contain !important;
    border: 1px solid rgba(83, 124, 71, 0.45);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    background: #f8f5df;
}

.image-lightbox-close {
    position: fixed !important;
    top: 18px !important;
    right: 22px !important;
    z-index: 2147483647 !important;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(83, 124, 71, 0.45);
    border-radius: 999px;
    background: rgba(255, 252, 232, 0.96);
    color: #243322;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(49, 74, 39, 0.18);
}

.image-lightbox-caption {
    position: fixed !important;
    left: 28px !important;
    right: 28px !important;
    bottom: 18px !important;
    z-index: 2147483647 !important;
    text-align: center;
    color: #f8f5df;
    font-family: var(--mono);
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

body.lightbox-open {
    overflow: hidden !important;
}

/* Final inline image behaviour:
   Article images are normal responsive images and must never crop.
   Thumbnails/cards may still crop because they are previews. */

.content-page .content-image,
.content-image {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    margin: 30px 0 !important;
    padding: 0 !important;
    border: 1px solid var(--line-strong);
    background: rgba(255, 252, 232, 0.72);
    border-radius: 18px;
    overflow: visible !important;
    box-shadow: 0 18px 48px rgba(49,74,39,0.14);
    cursor: zoom-in;
}

.content-page .content-image .image-lightbox-trigger,
.content-image .image-lightbox-trigger {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    cursor: zoom-in;
    line-height: normal !important;
    overflow: visible !important;
}

.content-page .content-image img,
.content-image img,
.content-page .content-image .image-lightbox-trigger img,
.content-image .image-lightbox-trigger img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    object-fit: initial !important;
    object-position: initial !important;
    transform: none !important;
}

/* Caption sits below the full image. */
.content-image figcaption {
    display: block;
    padding: 12px 16px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-top: 1px solid var(--line);
    background: rgba(255,255,246,0.45);
}

.content-image.no-caption figcaption {
    display: none;
}

/* Card thumbnails are allowed to crop because they are small previews. */
.thumb,
.article-card-thumb {
    overflow: hidden !important;
}

.thumb img,
.article-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    min-height: 92px;
    display: block !important;
    object-fit: cover !important;
}

/* Lightbox still shows the complete full image. */
.image-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 32px !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(22, 32, 20, 0.82) !important;
    backdrop-filter: blur(8px);
}

.image-lightbox.is-open {
    display: flex !important;
}

.image-lightbox img {
    width: auto !important;
    height: auto !important;
    max-width: 96vw !important;
    max-height: 88vh !important;
    min-height: 0 !important;
    object-fit: contain !important;
    border: 1px solid rgba(83, 124, 71, 0.45);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    background: #f8f5df;
}
