/* ============================================================
   Brand Design Tokens & Global Chrome — The Freelancer Portal
   Mirrors the Oliva Advisory brand palette.
   Page-specific styles live in landing.css
   ============================================================ */

:root {
    --ink:      #2b3445;
    --ink-2:    #1f2733;
    --grey:     #6b7789;
    --grey-2:   #8b95a5;
    --line:     #e6eaf1;
    --bg:       #ffffff;
    --bg-alt:   #f4f6fa;
    --blue:     #1f6fe5;
    --blue-d:   #1656c4;
    --green:    #17c79a;
    --green-l:  #4ecfa8;

    --grad:   linear-gradient(90deg, #1f6fe5 0%, #17c79a 100%);
    /* Same sweep, lifted, for gradient text on the dark footer */
    --grad-on-dark: linear-gradient(90deg, #4f9bff 0%, #2ee0ae 100%);

    --shadow:    0 1px 2px rgba(31, 45, 71, .04), 0 8px 24px rgba(31, 45, 71, .06);
    --shadow-lg: 0 2px 4px rgba(31, 45, 71, .04), 0 20px 48px rgba(31, 45, 71, .10);

    --r: 14px;
    --maxw: 1180px;
}

/* ============================================================
   Base reset / typography
   ============================================================ */

* { box-sizing: border-box }
html { scroll-behavior: smooth }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 17px;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    margin: 0;
    letter-spacing: -.022em;
    color: var(--ink-2);
    font-weight: 800;
    line-height: 1.1;
}

p { margin: 0 }
a { color: inherit; text-decoration: none }

/* ============================================================
   Layout & section primitives
   ============================================================ */

.wrap    { max-width: var(--maxw); margin: 0 auto; padding: 0 32px }
.sec     { padding: 72px 0 }
.sec-alt { background: var(--bg-alt) }
.center  { text-align: center }

.eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--green);
}

.h2   { font-size: clamp(30px, 3.6vw, 46px) }
.lead { color: var(--grey); font-size: 19px; margin-top: 14px; max-width: 680px }
.center .lead { margin-left: auto; margin-right: auto }
.mini { font-size: 11.5px; color: var(--grey-2) }

/* Section anchors clear the sticky header */
section[id] { scroll-margin-top: 96px }

/* ============================================================
   Buttons
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15.5px;
    padding: 12px 26px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: .18s;
    font-family: inherit;
}
.btn-ghost { border-color: var(--line); background: #fff; color: var(--ink) }
.btn-ghost:hover { border-color: #cfd7e3; box-shadow: var(--shadow) }
/* background-origin defaults to padding-box, so with the transparent 1px
   border on .btn the gradient wrapped into the border and showed a green
   sliver on the left edge and a blue one on the right. */
.btn-grad {
    background: var(--grad);
    background-origin: border-box;
    color: #fff;
    box-shadow: 0 6px 18px rgba(31, 111, 229, .24);
}
.btn-grad:hover { filter: brightness(1.05); transform: translateY(-1px) }
.btn-lg { padding: 16px 34px; font-size: 17px }
.btn-outline { width: 100%; border: 1.5px solid #bcd3f5; color: var(--blue); background: #fff }
.btn-outline:hover { background: #f5f9ff }
.btn-plain { width: 100%; border: 1px solid var(--line); background: #fff; color: var(--ink) }
.btn-plain:hover { border-color: #cfd7e3 }
.btn-full { width: 100% }

/* ============================================================
   Header / navigation
   ============================================================ */

header.site {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 78px }

/* "Portal" is the gradient half of the wordmark, wherever it appears —
   the navbar, the footer, the diagram core and in running copy. */
.g {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.logo { font-weight: 800; font-size: 19px; letter-spacing: .01em; color: var(--ink-2) }
.logo small {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 9.5px;
    letter-spacing: .16em;
    color: var(--grey-2);
    font-weight: 600;
    margin-top: 4px;
}
.oliva { height: 16px; width: auto; display: block; image-rendering: -webkit-optimize-contrast }

.navlinks {
    display: flex;
    gap: 38px;
    align-items: center;
    font-size: 15.5px;
    color: var(--grey);
    font-weight: 500;
}
.navlinks a:hover { color: var(--ink) }
.navcta { display: flex; gap: 12px; align-items: center }
/* Language switch: both flags, the current language's marked as active */
.langsw { display: flex; gap: 4px; align-items: center }
.langsw > * {
    display: flex;
    padding: 5px;
    border-radius: 8px;
    border: 1px solid transparent;
}
.langsw a { opacity: .45; filter: grayscale(.6); transition: opacity .15s, filter .15s }
.langsw a:hover { opacity: 1; filter: none }
.langsw .on { border-color: var(--line); background: #fff }
.flag {
    display: block;
    width: 22px;
    height: 15px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .12);
}
.mobilenav a.mlang { display: flex; align-items: center; gap: 10px }

/* Mobile menu */
.navburger {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: var(--ink-2);
}
.navburger:hover { border-color: #cfd7e3 }
.mobilenav {
    display: none;
    border-top: 1px solid var(--line);
    background: #fff;
    padding: 14px 32px 22px;
}
.mobilenav.open { display: block }
.mobilenav a.ml {
    display: block;
    padding: 13px 4px;
    font-size: 16.5px;
    font-weight: 600;
    color: var(--ink-2);
    border-bottom: 1px solid var(--line);
}
.mobilenav .mcta { display: grid; gap: 10px; margin-top: 18px }
.mobilenav .mcta .btn { width: 100% }

/* ============================================================
   Footer
   ============================================================ */

footer.site { background: #1f2733; color: #9aa6b6; padding: 56px 0 38px; font-size: 14.5px }
footer.site .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 44px }
footer.site h4 {
    color: #fff;
    font-size: 13px;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 18px;
    font-weight: 700;
}
footer.site a { display: block; margin-bottom: 11px; color: #9aa6b6 }
footer.site a:hover { color: #fff }

.flogo { color: #fff; font-weight: 800; font-size: 18px }
/* background-image, not the background shorthand — the shorthand would reset
   background-clip back to border-box and paint a solid bar over the text. */
.flogo .g { background-image: var(--grad-on-dark) }
.foliva {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 9.5px;
    letter-spacing: .16em;
    font-weight: 600;
    color: #7d8798;
    margin-top: 14px;
}
.oliva.inv { height: 15px; filter: brightness(2.6) contrast(.75) }

.fbot {
    border-top: 1px solid #2e3949;
    margin-top: 48px;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #7d8798;
}

/* ============================================================
   Scroll reveal
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: .7s cubic-bezier(.2, .7, .3, 1);
}
.reveal.in { opacity: 1; transform: none }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto }
    .reveal { opacity: 1; transform: none; transition: none }
}

/* ============================================================
   Legal pages — imprint, privacy, terms

   Long-form prose, so the column is narrower than .wrap's full
   width: past roughly 70 characters a line is hard to track back.
   ============================================================ */

.legal .wrap { max-width: 760px }
.legal h1 { margin-bottom: 10px }
.legal .lead { margin-bottom: 40px }
.legal h2 {
    font-size: 20px;
    margin: 36px 0 10px;
    color: var(--ink-2);
}
.legal p, .legal li { color: var(--grey); line-height: 1.75 }
.legal ul { padding-left: 20px; margin: 10px 0 }
.legal li { margin-bottom: 6px }
.legal a { color: var(--blue); font-weight: 600 }
.legal a:hover { color: var(--blue-d); text-decoration: underline }
/* Unresolved legal placeholders should be impossible to miss in review. */
.legal strong { color: var(--ink-2) }

/* ============================================================
   Responsive — global chrome
   ============================================================ */

@media (max-width: 1000px) {
    .wrap { padding: 0 22px }
    .sec { padding: 56px 0 }
    .navlinks { display: none }
    .navcta .btn,
    .navcta .langsw { display: none }
    .navburger { display: flex }
    footer.site .cols { grid-template-columns: 1fr 1fr; gap: 32px }
    .mobilenav { padding-left: 22px; padding-right: 22px }
}

@media (max-width: 620px) {
    footer.site .cols { grid-template-columns: 1fr }
}
