:root {
    --ink: #1A0B5E;
    --ink-muted: #7B6BD2;
    --paper: #FFFFFF;
    --paper-2: #F4F0FF;
    --white: #ffffff;
    --navy: #1A0B5E;
    --navy-soft: #2E1A6E;
    --line: rgba(26, 11, 94, 0.08);
    --accent: #9B8CF2;
    --accent-hover: #7B6BD2;
    --focus: #1A0B5E;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    --radius: 8px;
    --font-serif: "Cormorant Garamond", serif;
    --font-sans: "Source Sans 3", sans-serif;
    --step--1: 0.9rem;
    --step-0: 1.05rem;
    --step-1: 1.5rem;
    --step-2: 2.25rem;
    --step-3: 3.5rem;
    --container: min(1140px, 92vw);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--step-0);
    line-height: 1.7;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

a {
    color: var(--navy-soft);
    text-decoration: none;
    transition: var(--transition);
}

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

.container {
    width: var(--container);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 2rem;
    background: var(--navy);
    color: var(--white);
    padding: 0.5rem 1.25rem;
    z-index: 2000;
    font-weight: 600;
    border-radius: 0 0 4px 4px;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Header */
#header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    padding: 0.5rem 0;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
    background: transparent;
}

.header-inner {
    width: var(--container);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.logo img {
    height: 34px;
    width: auto;
    display: block;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

nav a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--white); /* Default white for dark hero background */
    opacity: 0.9;
    position: relative;
    text-decoration: none;
    transition: var(--transition);
}

#header.scrolled nav a {
    color: var(--navy); /* Switch to navy when header background is white */
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

nav a:hover {
    opacity: 1;
    color: var(--accent);
}

nav a:hover::after {
    width: 100%;
}

nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    position: relative;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: var(--transition);
}

#header:not(.scrolled) .menu-toggle span {
    background: var(--white);
}

.menu-toggle span:nth-child(1) { top: 8px; }
.menu-toggle span:nth-child(2) { top: 16px; }
.menu-toggle span:nth-child(3) { top: 24px; }

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    background: var(--navy);
    color: var(--white);
    overflow: hidden;
}

@keyframes heroPan {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.1) translate(-1%, -1%); }
    100% { transform: scale(1) translate(0, 0); }
}

.hero-media {
    position: absolute;
    inset: -5%;
    background: linear-gradient(135deg, rgba(26, 11, 94, 0.85) 0%, rgba(46, 30, 110, 0.7) 100%), 
                url('assets/hero.jpeg') center/cover no-repeat;
    opacity: 1;
    animation: heroPan 30s ease-in-out infinite;
}

.hero-inner {
    position: relative;
    width: var(--container);
    margin-inline: auto;
    max-width: 800px;
}

.eyebrow {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 1rem;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: var(--step-3);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-lead {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.btn {
    display: inline-flex;
    padding: 0.7rem 1.1rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none; /* Removed stroke/border */
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: none;
}

.btn-primary:hover::before {
    animation: sheen 1.5s infinite;
}

@keyframes sheen {
    100% {
        left: 200%;
    }
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

/* Sections */
section {
    padding: 6rem 0;
}

.section-heading {
    font-family: var(--font-serif);
    font-size: var(--step-2);
    color: var(--navy);
    margin-bottom: 1.5rem;
}

.about-enhanced {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem;
    align-items: center;
}

.about-editorial-lead {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    line-height: 1.3;
    color: var(--navy);
    margin-bottom: 2rem;
    font-weight: 500;
}

.about-main-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--ink-muted);
}

.about-main-text p + p {
    margin-top: 1.5rem;
}

.about-branding-block {
    display: flex;
    justify-content: center;
}

.brand-card {
    background: #F4F0FF;
    padding: 4rem;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(26, 11, 94, 0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1 / 1;
    transition: var(--transition);
}

.brand-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 70px rgba(26, 11, 94, 0.12);
}

.brand-card img {
    width: 100%;
    height: auto;
}

.kicker {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

/* Service Cards - Redesigned for Minimalist Icons */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--paper-2);
    padding: 3rem 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.service-card:hover {
    background: var(--white);
    box-shadow: 0 10px 40px rgba(0, 27, 68, 0.05);
    border-color: var(--accent);
}

.service-card__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--accent);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--navy);
}

.service-card p {
    color: var(--ink-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Loan Calculator Refresh */
.loan-portal {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.amount-display .value {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    color: var(--navy);
}

#loan-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: var(--line);
    border-radius: 2px;
    margin: 2rem 0;
}

#loan-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 6px rgba(155, 140, 242, 0.15);
}

/* Form Styling */
.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.form-group input {
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    background: var(--white);
    border-top: 1px solid var(--line);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-actions {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 2rem;
}

.btn-full {
    width: 100%;
    margin-top: 2rem;
    border: none;
}

.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.partner-card {
    background: var(--paper-2);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.partner-logo {
    height: 42px;
    width: auto;
    margin-bottom: 1.25rem;
}

.partner-card--emphasis {
    background: var(--white);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.contact-split {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(1.5rem, 4vw, 2.5rem);
    align-items: start;
}

.contact-list {
    margin: 0;
    padding: 1.25rem 1.35rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.contact-list > div + div {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.contact-list dt {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 0.25rem;
}

.contact-list dd {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.contact-list a {
    text-decoration: none;
    color: var(--navy);
    border-bottom: 1px solid rgba(26, 11, 94, 0.2);
}

.contact-list a:hover {
    color: var(--accent);
    border-bottom-color: rgba(123, 107, 210, 0.45);
}

/* Trust bar */
.trust-bar {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.88);
    padding: 1.1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.trust-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.trust-bar__sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

/* Footer */
.footer {
    background: #1A0B5E;
    color: rgba(255, 255, 255, 0.82);
    padding: 2.25rem 0 1.5rem;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-brand {
    margin: 0 0 0.35rem;
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--white);
}

.footer-note {
    margin: 0;
    max-width: 36ch;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.92rem;
}

.footer-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-nav a:hover {
    color: var(--white);
}

.footer-copy {
    margin: 0;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.25rem;
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .loans-layout {
        grid-template-columns: 1fr;
    }

    .loans-visual {
        position: static;
    }

    .loans-visual img {
        aspect-ratio: 16 / 10;
        max-height: 320px;
    }

    .contact-split {
        grid-template-columns: 1fr;
    }

    section {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: clamp(2.25rem, 8vw, 3rem);
    }
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 0.4rem 0;
}

@media (max-width: 900px) {
    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    nav ul {
        display: none;
        position: fixed;
        top: 60px;
        right: 1.25rem;
        width: min(300px, calc(100% - 2.5rem));
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem;
        background: var(--white);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }

    nav ul.open {
        display: flex;
    }

    nav ul li a {
        display: block;
        padding: 0.65rem 0.75rem;
        color: var(--navy);
        border-radius: 6px;
        border-bottom: none;
    }

    nav ul li a:hover {
        background: var(--paper);
        color: var(--accent);
    }

    #header:not(.scrolled) nav ul {
        background: rgba(255, 255, 255, 0.98);
    }

    #header:not(.scrolled) nav ul li a {
        color: var(--navy);
    }

    .about-enhanced {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }

    .about-editorial-lead {
        font-size: 1.45rem;
        margin-bottom: 1.75rem;
        border-left: 3px solid var(--accent);
        padding-left: 1.25rem;
        line-height: 1.4;
    }

    .brand-card {
        padding: 2.5rem;
        max-width: 100%;
        border-radius: 16px;
        background: #F4F0FF;
        border: 1px solid rgba(155, 140, 242, 0.1);
        box-shadow: 0 10px 30px rgba(26, 11, 94, 0.04);
    }

    .hero-inner {
        max-width: none;
    }

    .hero-actions {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.75rem;
        width: 100%;
        max-width: 320px;
        margin-inline: auto;
    }

    .hero-actions .btn {
        flex: 1;
        width: auto;
        justify-content: center;
        padding: 0.6rem 0.4rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }

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

    .service-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 1.25rem !important;
        margin: 0 -1.5rem !important;
        padding: 0 1.5rem 2rem 1.5rem !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        grid-template-columns: none !important;
    }

    .service-grid::-webkit-scrollbar {
        display: none !important;
    }

    .service-card {
        flex: 0 0 85% !important;
        min-width: 85% !important;
        scroll-snap-align: center !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    :root {
        --container: calc(100% - 1.5rem);
    }

    .trust-bar__inner {
        flex-direction: column;
        text-align: center;
    }

    .trust-bar__sep {
        display: none;
    }

    .hero {
        padding-top: 80px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .amount-display .value {
        font-size: 2.75rem;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed !important;
    bottom: -100px;
    left: 0;
    width: 100%;
    background: var(--navy);
    color: var(--white);
    padding: 1.25rem 0;
    z-index: 100000;
    transition: transform 0.5s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    visibility: hidden;
    opacity: 0;
}

.cookie-banner.active {
    bottom: 0;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.cookie-banner__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-banner__actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.cookie-banner p {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.cookie-banner a {
    color: var(--white);
    text-decoration: underline;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
    color: #fff;
}

.whatsapp-float:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

@media (max-width: 768px) {
    .cookie-banner__inner {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }
    
    .cookie-banner__actions {
        width: 100%;
        justify-content: center;
    }
}
