/* =========================================================
   CIBERRA BASE STYLES
   Shared by every page
   ========================================================= */


/* ---------- Design System ---------- */

:root {
    --bg: #f7f3ea;
    --surface: #ffffff;
    --surface-muted: #efe8dc;

    --ink: #17211e;
    --ink-soft: #4d5c56;

    --line: rgba(23, 33, 30, .14);

    --primary: #2f5d50;
    --primary-dark: #16352e;

    --sage: #8fa99b;
    --ochre: #c9a24a;
    --clay: #a75d3a;
    --plum: #5e465f;

    --shadow: 0 24px 80px rgba(22, 53, 46, .12);

    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;

    --max-width: 1180px;
}


/* ---------- Reset ---------- */

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--ink);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

.page {
    display: flex;
    flex-direction: column;

    min-height: 100vh;
}

main {
    flex: 1;
}

.container {
    width: min(calc(100% - 40px), var(--max-width));
    margin-inline: auto;
}


/* ---------- Typography ---------- */

h1,
h2,
h3 {
    color: var(--ink);
}

h1 {
    max-width: 780px;
    margin-bottom: 28px;

    font-size: clamp(3rem, 7vw, 6.6rem);
    line-height: .93;
    letter-spacing: -.075em;
}

h2 {
    margin-bottom: 18px;

    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1;
    letter-spacing: -.065em;
}

p {
    color: var(--ink-soft);
}


/* ---------- Header ---------- */

header {
    position: sticky;
    top: 0;
    z-index: 100;

    border-bottom: 1px solid var(--line);

    background: rgba(247, 243, 234, .88);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;

    height: 76px;
}

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

    font-size: 1.15rem;
    font-weight: 700;
}

.brand-mark {
    width: 34px;
    height: 34px;

    border-radius: 50%;

    background:
        radial-gradient(circle at 36% 35%,
            var(--ochre) 0 10%,
            transparent 11%),
        conic-gradient(from 140deg,
            var(--primary),
            var(--sage),
            var(--ochre),
            var(--clay),
            var(--primary));

    box-shadow:
        inset 0 0 0 4px rgba(255, 255, 255, .55);
}


/* ---------- Navigation ---------- */

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;

    color: var(--ink-soft);

    font-size: .94rem;
}


/* Standard desktop navigation links */

.nav-links a {
    position: relative;
    display: inline-block;

    padding-bottom: 7px;

    transition: color .25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--ink);
}


/* Animated underline */

.nav-links a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: 0;

    width: 100%;
    height: 2px;

    border-radius: 999px;

    background: var(--ochre);

    transform: scaleX(0);
    transform-origin: right;

    transition: transform .3s ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
}


/* Client Access button */

.nav-cta {
    padding: 11px 20px;

    border-radius: 999px;

    background: var(--primary-dark);
    color: white;

    font-weight: 700;

    box-shadow:
        0 14px 30px rgba(22, 53, 46, .18);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease;
}

.nav-cta:hover,
.nav-cta:focus-visible {
    color: white;

    background: var(--primary);

    transform: translateY(-2px);

    box-shadow:
        0 18px 36px rgba(22, 53, 46, .24);
}


/* Do not underline the Client Access button */

.nav-links .nav-cta::after {
    display: none;
}


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

.site-footer {
    position: relative;

    margin-top: 110px;

    overflow: hidden;

    background:
        radial-gradient(circle at 8% 15%,
            rgba(201, 162, 74, .14),
            transparent 25rem),
        linear-gradient(145deg,
            var(--primary-dark),
            #102822);

    color: var(--bg);
}

.site-footer::after {
    content: "";

    position: absolute;
    top: -180px;
    right: -180px;

    width: 430px;
    height: 430px;

    border: 1px solid rgba(247, 243, 234, .08);
    border-radius: 50%;

    box-shadow:
        0 0 0 70px rgba(247, 243, 234, .025),
        0 0 0 140px rgba(247, 243, 234, .018);

    pointer-events: none;
}

.footer-main {
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns:
        minmax(260px, 1.45fr) repeat(3, minmax(135px, .65fr));

    gap: clamp(38px, 6vw, 78px);

    padding-top: 72px;
    padding-bottom: 58px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;

    margin-bottom: 23px;

    color: var(--bg);

    font-size: 1.35rem;
    font-weight: 800;
}

.footer-brand-column>p {
    max-width: 340px;

    color: rgba(247, 243, 234, .7);

    font-size: .94rem;
    line-height: 1.75;
}

.footer-contact {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin-top: 25px;
    padding: 11px 17px;

    border: 1px solid rgba(247, 243, 234, .23);
    border-radius: 999px;

    color: var(--bg);

    font-size: .82rem;
    font-weight: 750;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.footer-contact:hover {
    border-color: rgba(247, 243, 234, .5);

    background: rgba(247, 243, 234, .08);

    transform: translateY(-2px);
}

.footer-column h2 {
    margin: 5px 0 24px;

    color: var(--sage);

    font-size: .72rem;
    line-height: 1;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.footer-column ul {
    display: grid;
    gap: 14px;

    list-style: none;
}

.footer-column a {
    display: inline-block;

    color: rgba(247, 243, 234, .82);

    font-size: .91rem;

    transition:
        color .2s ease,
        transform .2s ease;
}

.footer-column a:hover {
    color: var(--bg);

    transform: translateX(3px);
}

.footer-bottom {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    padding-top: 24px;
    padding-bottom: 27px;

    border-top: 1px solid rgba(247, 243, 234, .13);
}

.footer-bottom p {
    color: rgba(247, 243, 234, .55);

    font-size: .76rem;
    line-height: 1.55;
}


/* ---------- Reveal animation ---------- */

.reveal {
    opacity: 0;

    transform: translateY(20px);

    transition:
        opacity .7s ease,
        transform .7s ease;
}

.reveal.visible {
    opacity: 1;

    transform: none;
}


/* =========================================================
   MOBILE NAVIGATION
   Added because menu disappears on mobile
   ========================================================= */

.nav-toggle {
    display: none;

    width: 46px;
    height: 46px;
    padding: 10px;

    border: 1px solid var(--line);
    border-radius: 14px;

    background: rgba(255, 255, 255, .72);
    color: var(--ink);

    cursor: pointer;
}

.nav-toggle span {
    display: block;

    width: 100%;
    height: 2px;
    margin: 5px 0;

    border-radius: 999px;

    background: currentColor;

    transition:
        transform .2s ease,
        opacity .2s ease;
}


/* ---------- Tablet ---------- */

@media (max-width: 900px) {

    .site-header {
        position: relative;
        z-index: 1000;
    }

    .nav {
        position: relative;

        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-toggle {
        display: block;
        flex-shrink: 0;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        left: 0;

        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;

        padding: 14px;

        border: 1px solid var(--line);
        border-radius: 20px;

        background: rgba(247, 243, 234, .98);

        box-shadow: var(--shadow);

        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

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

    .nav-links a {
        display: block;

        width: 100%;
        padding: 13px 14px;

        border-radius: 12px;

        color: var(--ink);
        text-decoration: none;
    }

    .nav-links a:hover,
    .nav-links a:focus-visible {
        background: var(--surface-muted);
    }

    /* Disable animated underline on mobile menu */

    .nav-links a::after {
        display: none;
    }

    /* Keep Client Access styled as a button */

    .nav-links .nav-cta {
        margin-top: 5px;

        background: var(--primary-dark);
        color: white;

        text-align: center;
    }

    .nav-links .nav-cta:hover,
    .nav-links .nav-cta:focus-visible {
        background: var(--primary);
        color: white;
    }

    /* Turn hamburger into an X */

    .nav-toggle.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .footer-main {
        grid-template-columns: 1.25fr repeat(2, 1fr);
    }

    .footer-brand-column {
        grid-column: 1 / -1;
    }
}


/* ---------- Mobile ---------- */

@media (max-width: 720px) {

    .container {
        width: min(calc(100% - 28px), var(--max-width));
    }

    h1 {
        font-size: clamp(3rem, 15vw, 4.7rem);
    }

    .footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 42px 30px;

        padding-top: 58px;
    }

    .footer-brand-column {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}


/* ---------- Small mobile ---------- */

@media (max-width: 480px) {

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

    .footer-brand-column {
        grid-column: auto;
    }
}