/* ============================================================
   NDICEA Homepage — Earth-Toned Brutalist
   ============================================================ */

/* Google Fonts are loaded via <link> in Home/Index.cshtml */

/* --- Palette & Variables --- */
:root {
    --nd-charcoal:   #2B2926;
    --nd-soil:       #3E3832;
    --nd-clay:       #A0674B;
    --nd-ochre:      #C8843C;
    --nd-rust:       #B85C2F;
    --nd-sand:       #D9CDB8;
    --nd-cream:      #EDEBE4;
    --nd-green:      #3D7A4A;
    --nd-green-light:#5A9E62;
    --nd-green-deep: #2C5E35;
    --nd-moss:       #4A7350;
    --nd-moss-light: #6B9A5E;
    --nd-fog:        #B8B5A8;
    --nd-white:      #F5F3EE;
    --nd-black:      #1A1917;

    --nd-font-head:  'Outfit', system-ui, sans-serif;
    --nd-font-body:  'Figtree', system-ui, sans-serif;
    --nd-font-accent:'Bricolage Grotesque', 'Outfit', sans-serif;

    --nd-grid-gap:   2rem;
    --nd-block-pad:  3rem 2.5rem;
    --nd-border:     3px solid var(--nd-charcoal);
    --nd-border-thin:1px solid rgba(43,41,38,0.15);
}

/* --- Reset overrides for homepage --- */
.nd-home {
    font-family: var(--nd-font-body);
    color: var(--nd-charcoal);
    background-color: var(--nd-cream);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Neutralize the global body margin/padding on the home page so the dark hero
   reaches the top of the viewport (the .nd-topbar floats over it as position:absolute).
   Without the explicit top/left/right reset some browsers fall back to the 8px UA
   default for body margin between page loads / before Bootstrap's reset has settled,
   producing a thin cream band above the hero when the user is not logged in. */
body:has(.nd-home) {
    margin: 0;
    padding: 0;
}

/* When logged in, _LayoutFw renders <header> with the navbar (.mb-3 = 1rem).
   On the home page the navbar sits directly above the dark hero, so the mb-3
   gap would show a cream strip of body background between the two dark blocks.
   Drop the gap on the home page only. !important is required because Bootstrap's
   .mb-3 utility class is itself !important. */
body:has(.nd-home) header .navbar {
    margin-bottom: 0 !important;
}

.nd-home {
    position: relative;
}

/* --- Top bar (replaces navbar on homepage) --- */
.nd-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.1rem 0;
}

.nd-topbar__brand {
    font-family: var(--nd-font-head);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--nd-cream) !important;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nd-topbar__brand:hover {
    color: #fff !important;
    text-decoration: none;
}

.nd-lang-switch--top a {
    color: var(--nd-fog);
    border-color: rgba(196,191,171,0.25);
}

.nd-lang-switch--top a:hover,
.nd-lang-switch--top a.active {
    background: var(--nd-green);
    border-color: var(--nd-green);
    color: #fff;
}

.nd-topbar__login {
    font-family: var(--nd-font-head);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--nd-cream) !important;
    text-decoration: none;
    padding: 0.45rem 1.2rem;
    border: 2px solid rgba(237,230,216,0.35);
    transition: all 0.25s ease;
}

.nd-topbar__login:hover {
    background: var(--nd-green);
    border-color: var(--nd-green);
    color: #fff !important;
    text-decoration: none;
}

.nd-home *::selection {
    background: var(--nd-green);
    color: #fff;
}

/* Grain texture overlay */
.nd-home::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* --- Typography --- */
.nd-home h1,
.nd-home h2,
.nd-home h3,
.nd-home h4 {
    font-family: var(--nd-font-head) !important;
    color: var(--nd-charcoal) !important;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.nd-home h1 { font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 800; }
.nd-home h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
.nd-home h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); font-weight: 600; }

.nd-home p,
.nd-home li,
.nd-home span,
.nd-home a {
    font-family: var(--nd-font-body);
    font-size: 0.925rem;
    font-weight: 400;
    line-height: 1.65;
}

/* --- Section label (uppercase tag) --- */
.nd-label {
    font-family: var(--nd-font-head);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--nd-green);
    display: inline-block;
    border: 2px solid var(--nd-green);
    padding: 0.25rem 0.85rem;
    margin-bottom: 1.5rem;
}

/* --- Buttons --- */
.nd-btn {
    font-family: var(--nd-font-head);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.85rem 2rem;
    border: 3px solid var(--nd-charcoal);
    background: transparent;
    color: var(--nd-charcoal);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.nd-btn:hover {
    background: var(--nd-charcoal);
    color: var(--nd-cream);
    transform: translateY(-2px);
    text-decoration: none;
}

.nd-btn--primary {
    background: var(--nd-green);
    border-color: var(--nd-green);
    color: #fff;
}

.nd-btn--primary:hover {
    background: var(--nd-green-deep);
    border-color: var(--nd-green-deep);
    color: #fff;
}

.nd-btn--ghost {
    border-color: var(--nd-fog);
    color: var(--nd-soil);
}

.nd-btn--ghost:hover {
    border-color: var(--nd-green);
    background: var(--nd-green);
    color: #fff;
}

/* --- Hero --- */
.nd-hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    background: var(--nd-charcoal);
    color: var(--nd-cream);
    position: relative;
    overflow: hidden;
}

.nd-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 60px,
            rgba(237,230,216,0.03) 60px,
            rgba(237,230,216,0.03) 61px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 60px,
            rgba(237,230,216,0.03) 60px,
            rgba(237,230,216,0.03) 61px
        );
    pointer-events: none;
}

.nd-hero h1,
.nd-hero h2,
.nd-hero h3 {
    color: var(--nd-cream) !important;
}

.nd-hero__inner {
    position: relative;
    z-index: 1;
    padding: 6rem 0 4rem 0;
    width: 100%;
}

.nd-hero__title {
    font-size: clamp(3.2rem, 7vw, 6rem) !important;
    line-height: 0.95 !important;
    margin-bottom: 2rem;
}

.nd-hero__title em {
    font-style: normal;
    font-weight: 300;
    color: var(--nd-green-light);
}

.nd-hero__sub {
    font-family: var(--nd-font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nd-fog);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nd-hero__sub span {
    color: var(--nd-fog);
    font-size: 0.8rem;
}

.nd-hero__sub span::after {
    content: '—';
    margin-left: 0.5rem;
    color: var(--nd-green-light);
}

.nd-hero__sub span:last-child::after {
    display: none;
}

.nd-hero__tagline {
    font-family: var(--nd-font-body);
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    font-weight: 300;
    color: var(--nd-sand);
    max-width: 580px;
    margin-bottom: 3rem;
    line-height: 1.55;
}

.nd-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.nd-hero .nd-btn {
    border-color: var(--nd-cream);
    color: var(--nd-cream);
}

.nd-hero .nd-btn:hover {
    background: var(--nd-cream);
    color: var(--nd-charcoal);
}

.nd-hero .nd-btn--primary {
    background: var(--nd-green);
    border-color: var(--nd-green);
    color: #fff;
}

.nd-hero .nd-btn--primary:hover {
    background: var(--nd-green-light);
    border-color: var(--nd-green-light);
    color: #fff;
}

/* Side stripe decoration */
.nd-hero__stripe {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 35%;
    background:
        linear-gradient(135deg, var(--nd-soil) 0%, var(--nd-charcoal) 100%);
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LBI symbol SVG */
.nd-hero__lbi {
    width: 400px;
    height: 400px;
    opacity: 0;
    animation: lbiFadeIn 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
}

/* Path draw-in animation using clip-path */
.nd-hero__lbi-path {
    opacity: 0;
    animation: lbiPathReveal 2s cubic-bezier(0.22, 0.61, 0.36, 1) 0.8s forwards;
}

/* Dot appears after the path */
.nd-hero__lbi-dot {
    opacity: 0;
    transform-origin: center;
    animation: lbiDotPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 2.4s forwards;
}

@keyframes lbiFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 0.45;
        transform: translateY(0) scale(1);
    }
}

@keyframes lbiPathReveal {
    0% {
        opacity: 0;
        clip-path: inset(0 0 100% 0);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0% 0);
    }
}

@keyframes lbiDotPop {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    70% {
        transform: scale(1.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Content sections --- */
.nd-section {
    padding: 5rem 0;
    position: relative;
}

.nd-section--alt {
    background: var(--nd-white);
}

.nd-section--dark {
    background: var(--nd-charcoal);
    color: var(--nd-cream);
}

.nd-section--dark h2,
.nd-section--dark h3 {
    color: var(--nd-cream) !important;
}

.nd-section--dark .nd-label {
    color: var(--nd-green-light);
    border-color: var(--nd-green-light);
}

.nd-section--soil {
    background: var(--nd-soil);
    color: var(--nd-cream);
}

.nd-section--soil h2,
.nd-section--soil h3 {
    color: var(--nd-cream) !important;
}

.nd-section--soil .nd-label {
    color: var(--nd-sand);
    border-color: var(--nd-sand);
}

/* Divider line */
.nd-divider {
    border: none;
    border-top: var(--nd-border);
    margin: 0;
}

/* --- Brutalist card blocks --- */
.nd-block {
    border: var(--nd-border);
    padding: var(--nd-block-pad);
    background: var(--nd-white);
    position: relative;
}

.nd-block--flat {
    border: none;
    padding: 2rem 0;
}

.nd-block__number {
    font-family: var(--nd-font-accent);
    font-size: 4rem;
    font-weight: 900;
    color: var(--nd-sand);
    line-height: 1;
    position: absolute;
    top: -0.3rem;
    right: 1.5rem;
    opacity: 0.3;
}

.nd-block__icon {
    font-size: 1.8rem;
    color: var(--nd-green);
    margin-bottom: 1rem;
    display: block;
}

.nd-block h3 {
    margin-bottom: 1rem;
}

/* --- Waarom NDICEA grid --- */
.nd-why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.nd-why-grid .nd-block {
    border-right: none;
}

.nd-why-grid .nd-block:last-child {
    border-right: var(--nd-border);
}

@media (max-width: 991px) {
    .nd-why-grid {
        grid-template-columns: 1fr;
    }
    .nd-why-grid .nd-block {
        border-right: var(--nd-border);
        border-bottom: none;
    }
    .nd-why-grid .nd-block:last-child {
        border-bottom: var(--nd-border);
    }
}

/* --- How it works --- */
.nd-how-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border: var(--nd-border);
}

.nd-how-grid .nd-how-cell {
    padding: var(--nd-block-pad);
    border-bottom: var(--nd-border);
    position: relative;
}

.nd-how-grid .nd-how-cell:nth-child(odd) {
    border-right: var(--nd-border);
}

.nd-how-grid .nd-how-cell:nth-last-child(-n+2) {
    border-bottom: none;
}

.nd-how-cell__img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-bottom: 2px solid var(--nd-charcoal);
    margin: -3rem -2.5rem 1.5rem -2.5rem;
    width: calc(100% + 5rem);
    filter: saturate(0.8);
}

.nd-how-cell__icon {
    font-size: 1.1rem;
    color: var(--nd-green);
    display: inline-block;
    margin-right: 0.5rem;
    vertical-align: baseline;
    opacity: 0.7;
}

.nd-how-cell__num {
    font-family: var(--nd-font-accent);
    font-weight: 800;
    font-size: 3.5rem;
    color: var(--nd-green);
    line-height: 1;
    margin-bottom: 0.75rem;
    opacity: 0.45;
}

@media (max-width: 767px) {
    .nd-how-grid {
        grid-template-columns: 1fr;
    }
    .nd-how-grid .nd-how-cell:nth-child(odd) {
        border-right: none;
    }
    .nd-how-grid .nd-how-cell {
        border-bottom: var(--nd-border);
    }
    .nd-how-grid .nd-how-cell:last-child {
        border-bottom: none;
    }
}

/* --- Results list --- */
.nd-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nd-results li {
    padding: 1.5rem 0 1.5rem 0;
    border-bottom: var(--nd-border-thin);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    font-size: 0.95rem;
}

.nd-results li:last-child {
    border-bottom: none;
}

.nd-results li::before {
    content: '\25CF';
    font-size: 1.1rem;
    color: var(--nd-green-light);
    min-width: 1.5rem;
    line-height: 1.4;
}

/* --- Testimonial --- */
.nd-testimonial {
    border-left: 6px solid var(--nd-green);
    padding: 2.5rem 3rem;
    background: var(--nd-white);
    position: relative;
}

.nd-testimonial::before {
    content: '\201C';
    font-family: var(--nd-font-accent);
    font-size: 6rem;
    color: var(--nd-sand);
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    line-height: 1;
}

.nd-testimonial blockquote {
    font-family: var(--nd-font-body);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    color: var(--nd-soil);
}

.nd-testimonial__author {
    font-family: var(--nd-font-head);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--nd-green);
}

.nd-testimonial__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: var(--nd-border);
    filter: saturate(0.85);
    transition: filter 0.5s ease;
}

.nd-testimonial__img:hover {
    filter: saturate(1);
}

/* --- News list --- */
.nd-news-item {
    padding: 2rem 0;
    border-bottom: var(--nd-border);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: start;
}

.nd-news-item:last-child {
    border-bottom: none;
}

.nd-news-date {
    font-family: var(--nd-font-accent);
    font-size: 2rem;
    font-weight: 900;
    color: var(--nd-sand);
    line-height: 1;
    min-width: 80px;
    text-align: right;
}

.nd-news-date small {
    display: block;
    font-family: var(--nd-font-body);
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--nd-moss);
}

.nd-news-body h3 {
    margin-bottom: 0.5rem;
}

.nd-news-body p {
    color: var(--nd-soil);
    margin: 0;
}

.nd-news-link {
    align-self: center;
}

@media (max-width: 767px) {
    .nd-news-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .nd-news-date {
        text-align: left;
    }
}

/* --- CTA section --- */
.nd-cta {
    text-align: center;
    padding: 6rem 2rem;
}

.nd-cta h2 {
    margin-bottom: 1rem;
}

.nd-cta p {
    max-width: 500px;
    margin: 0 auto 2.5rem auto;
    color: var(--nd-fog);
}

.nd-cta__url {
    font-family: var(--nd-font-head);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--nd-green-light);
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    display: block;
}

/* --- Footer --- */
.nd-footer {
    background: var(--nd-black);
    color: var(--nd-fog);
    padding: 3rem 0 2rem 0;
    font-size: 0.8rem;
    position: relative;
}

.nd-footer a {
    color: var(--nd-sand);
    text-decoration: none;
    transition: color 0.2s;
}

.nd-footer a:hover {
    color: var(--nd-green-light);
}

.nd-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.nd-footer__brand {
    font-family: var(--nd-font-head);
    font-size: 1.8rem;
    color: var(--nd-cream);
    margin-bottom: 0.75rem;
    display: block;
}

.nd-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nd-footer__links li {
    margin-bottom: 0.5rem;
}

.nd-footer__links li a {
    font-size: 0.8rem;
}

.nd-footer__bottom {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(196,191,171,0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nd-footer h4 {
    color: var(--nd-cream) !important;
    font-size: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 991px) {
    .nd-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575px) {
    .nd-footer__grid {
        grid-template-columns: 1fr;
    }
}

/* --- Language switch in footer --- */
.nd-lang-switch {
    display: flex;
    gap: 0.25rem;
}

.nd-lang-switch a {
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(196,191,171,0.3);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nd-lang-switch a:hover,
.nd-lang-switch a.active {
    background: var(--nd-green);
    border-color: var(--nd-green);
    color: #fff;
}

/* --- Animations --- */
.nd-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nd-reveal.nd-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.nd-delay-1 { transition-delay: 0.1s; }
.nd-delay-2 { transition-delay: 0.2s; }
.nd-delay-3 { transition-delay: 0.3s; }
.nd-delay-4 { transition-delay: 0.4s; }
.nd-delay-5 { transition-delay: 0.5s; }

/* Hero entrance */
.nd-hero .nd-reveal {
    opacity: 0;
    transform: translateY(40px);
}

.nd-hero .nd-reveal.nd-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Partners bar --- */
.nd-partners {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 2rem 0;
}

.nd-partners img {
    max-height: 80px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s ease;
}

.nd-partners img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Mobile: horizontal scrollable carousel */
@media (max-width: 767.98px) {
    .nd-partners {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 2rem;
        padding: 1.5rem 1rem;
        scrollbar-width: none; /* Firefox */
    }

    .nd-partners::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }

    .nd-partners img,
    .nd-partners a {
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .nd-partners img {
        max-height: 60px;
    }
}

/* --- Hero logo --- */
.nd-hero__logo {
    max-width: 260px;
    width: 100%;
    filter: brightness(1.1) drop-shadow(0 4px 24px rgba(0,0,0,0.3));
}

/* --- Footer logo --- */
.nd-footer__logo {
    max-width: 160px;
    filter: brightness(1.2);
    display: block;
}

/* --- Responsive hero stripe --- */
@media (max-width: 991px) {
    .nd-hero__stripe {
        display: none;
    }
    .nd-hero__inner {
        padding: 3rem 0;
    }
}

/* --- General responsive --- */
@media (max-width: 991px) {
    .nd-home .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 575px) {
    .nd-home .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .nd-section {
        padding: 3rem 0;
    }
    .nd-block {
        padding: 2rem 1.5rem;
    }
    .nd-testimonial {
        padding: 2rem 1.5rem;
    }
}
