/* ===========================================================
   Vitrum design tokens
   =========================================================== */
:root {
    --color-ink: #222222;
    --color-ink-strong: #1a1a1a;
    --color-near-black: #141414;
    --color-blue: #18539F;
    --color-blue-dark: #123f78;
    --color-blue-soft: #7fa8d6;
    --color-cream: #F6F4F1;
    --color-white: #ffffff;
    --color-border: rgba(34, 34, 34, 0.14);
    --color-border-soft: rgba(34, 34, 34, 0.1);
    --color-muted: #6c6c6c;
    --color-muted-light: #999999;

    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Archivo', -apple-system, sans-serif;

    --container: 1280px;
    --container-narrow: 1180px;

    --gap: clamp(16px, 2vw, 28px);
    --section-pad-y: clamp(56px, 7vw, 120px);
    --section-pad-x: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-ink);
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
::selection { background: var(--color-blue); color: #fff; }

h1, h2, h3 { margin: 0; font-family: var(--font-serif); font-weight: 300; color: var(--color-ink-strong); }
p { margin: 0; }

.italic { font-style: italic; font-weight: 400; }

/* ===========================================================
   Layout helpers
   =========================================================== */
.container { max-width: var(--container); margin: 0 auto; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; }

.section { padding: var(--section-pad-y) var(--section-pad-x); }
.section-tight { padding: clamp(28px, 3vw, 48px) var(--section-pad-x) var(--section-pad-y); }
.section-dark { background: var(--color-near-black); color: #fff; }
.section-tint { background: var(--color-cream); }
.section-blue { background: var(--color-blue); color: #fff; }
.section-white { background: #fff; }
.text-center { text-align: center; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-split { grid-template-columns: 1fr 1fr; }
.grid-aside { grid-template-columns: minmax(160px, 260px) 1fr; }
.gap { gap: var(--gap); }
.items-center { align-items: center; }
.items-end { align-items: end; }
.justify-between { justify-content: space-between; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }

@media (max-width: 1080px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 900px) {
    .grid-split, .grid-aside { grid-template-columns: 1fr !important; }
}
@media (max-width: 760px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
}

/* ===========================================================
   Typography components
   =========================================================== */
.eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--color-blue);
    margin-bottom: 22px;
}
.eyebrow-light { color: var(--color-blue-soft); }

.heading-hero { font-size: clamp(48px, 8vw, 120px); line-height: 0.96; letter-spacing: -0.015em; }
.heading-xl { font-size: clamp(44px, 6.5vw, 100px); line-height: 0.98; letter-spacing: -0.015em; }
.heading-lg { font-size: clamp(36px, 5vw, 72px); line-height: 1.02; letter-spacing: -0.01em; }
.heading-md { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.1; font-weight: 400; }
.heading-sm { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; font-weight: 400; }

.lead { font-size: 16.5px; line-height: 1.85; color: #5a5a5a; }
.lead-light { color: rgba(255, 255, 255, 0.72); }
.body-text { font-size: 15px; line-height: 1.8; color: var(--color-muted); }

/* ===========================================================
   Buttons
   =========================================================== */
.btn {
    cursor: pointer;
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 16px 30px;
    border: 1px solid transparent;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
    white-space: nowrap;
}
.btn-primary { background: var(--color-blue); color: #fff; }
.btn-primary:hover { background: var(--color-blue-dark); }
.btn-dark { background: var(--color-ink-strong); color: #fff; }
.btn-dark:hover { background: var(--color-blue); }
.btn-white { background: #fff; color: var(--color-ink-strong); }
.btn-white:hover { background: var(--color-blue); color: #fff; }
.btn-outline-dark { border-color: var(--color-ink-strong); color: var(--color-ink-strong); background: transparent; }
.btn-outline-dark:hover { background: var(--color-ink-strong); color: #fff; }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.6); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); }
.link-underline {
    font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--color-ink); border-bottom: 1.5px solid var(--color-blue); padding-bottom: 6px;
}

/* ===========================================================
   Cards
   =========================================================== */
.media-cover {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}
.media-cover img, .media-cover .bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; background-size: cover; background-position: center;
    transition: transform 1.1s cubic-bezier(.16, .7, .3, 1);
}
.media-cover:hover img, .media-cover:hover .bg { transform: scale(1.06); }

.card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0) 55%);
}
.card-caption { position: absolute; left: 0; bottom: 0; padding: clamp(20px, 2.4vw, 30px); color: #fff; }
.card-tag { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.78); margin-bottom: 8px; }
.card-title { font-family: var(--font-serif); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.05; }

.tile {
    padding: clamp(28px, 3vw, 46px) clamp(20px, 2.4vw, 38px) clamp(34px, 3.5vw, 50px);
    border-bottom: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    background: var(--color-cream);
    transition: background .25s ease;
}
.tile:hover { background: #fff; }
.tile-num { font-family: var(--font-serif); font-size: 22px; color: var(--color-blue); margin-bottom: 24px; }
.tile-title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 14px; }
.tile-desc { font-size: 14.5px; line-height: 1.75; color: var(--color-muted); }

/* ===========================================================
   Reveal animation
   =========================================================== */
@keyframes vreveal { from { transform: translateY(22px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
[data-reveal] { animation: vreveal .85s cubic-bezier(.16, .7, .3, 1) both; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { animation: none; } }

/* ===========================================================
   Header / nav
   =========================================================== */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 80;
    height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    gap: clamp(12px, 1.6vw, 28px); padding: 0 clamp(16px, 2.8vw, 56px);
    background: rgba(255, 255, 255, 0.86); backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--color-border-soft);
}
.site-header .logo { justify-self: start; }
.site-header .logo img { height: 46px; width: auto; }
/* Grid (not flex space-between) so .site-nav is truly centered on the page
   regardless of how wide .logo vs .nav-actions happen to be. */
.site-nav { display: flex; align-items: center; gap: clamp(12px, 1.5vw, 32px); justify-self: center; }
.nav-actions { justify-self: end; }
.nav-link {
    position: relative; font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--color-ink); padding: 6px 0; white-space: nowrap;
}
.nav-link.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px; background: var(--color-blue);
}
.nav-cta {
    background: var(--color-blue); color: #fff; font-size: 11px; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase; padding: 14px 20px;
}
.nav-cta:hover { background: var(--color-blue-dark); }
.nav-alusta {
    color: var(--color-ink); font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
    text-transform: uppercase; border-bottom: 1.5px solid rgba(34, 34, 34, 0.25); padding-bottom: 4px;
}
.nav-alusta:hover { color: var(--color-blue); border-bottom-color: var(--color-blue); }
.nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 38px; height: 38px; border: none; background: transparent; cursor: pointer;
}
.nav-toggle span { display: block; width: 100%; height: 1.5px; background: var(--color-ink); }

.mobile-menu {
    position: fixed; top: 78px; left: 0; right: 0; z-index: 79;
    background: rgba(255, 255, 255, 0.98); backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(34, 34, 34, 0.12);
    padding: clamp(18px, 2.6vw, 30px) clamp(16px, 2.8vw, 56px) clamp(24px, 3.2vw, 38px);
    display: flex; flex-direction: column;
}
.mobile-menu a {
    padding: 13px 0; border-bottom: 1px solid rgba(34, 34, 34, 0.09);
    font-family: var(--font-serif); font-size: 26px; color: var(--color-ink-strong);
}
.mobile-menu a:hover { color: var(--color-blue); }
.mobile-menu a:last-child { border-bottom: none; }

@media (max-width: 1320px) {
    .site-nav, .nav-alusta { display: none; }
    .nav-toggle { display: flex; }
}
@media (max-width: 560px) {
    .site-header .logo img { height: 34px; }
    .nav-cta { padding: 12px 14px; font-size: 10px; letter-spacing: .1em; }
}

main { padding-top: 78px; }

/* ===========================================================
   Footer
   =========================================================== */
.site-footer { background: var(--color-near-black); color: #fff; padding: clamp(56px, 7vw, 100px) var(--section-pad-x) 40px; }
.site-footer .logo img { height: 30px; margin-bottom: 24px; }
.footer-col-title { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); margin-bottom: 20px; }
.footer-links { display: flex; flex-direction: column; gap: 13px; font-size: 15px; }
.footer-links a { color: rgba(255, 255, 255, 0.82); }
.footer-links a:hover { color: #fff; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
    padding-top: 30px; margin-top: clamp(40px, 5vw, 70px); border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12.5px; color: rgba(255, 255, 255, 0.42);
}
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: #fff; }

/* ===========================================================
   Forms
   =========================================================== */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: #888; }
.field input, .field select, .field textarea {
    border: none; border-bottom: 1px solid rgba(34, 34, 34, 0.25); background: transparent;
    padding: 10px 0; font-family: inherit; font-size: 15px; color: var(--color-ink-strong); outline: none;
    width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--color-blue); }
.field-check { display: flex; align-items: center; gap: 9px; font-size: 15px; color: #333; cursor: pointer; }
.field-check input { width: 15px; height: 15px; accent-color: var(--color-blue); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section-label {
    grid-column: 1 / -1; font-size: 11px; font-weight: 600; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--color-blue); margin-top: clamp(14px, 1.8vw, 26px);
}
.dropzone {
    display: flex; align-items: center; gap: 16px; border: 1px dashed rgba(34, 34, 34, 0.25);
    padding: 18px 20px; cursor: pointer; transition: border-color .2s ease, background .2s ease;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--color-blue); background: #fff; }
.dropzone .icon {
    display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex-shrink: 0;
    border: 1px solid rgba(34, 34, 34, 0.18); color: var(--color-blue); font-size: 18px;
}
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }

/* ===========================================================
   Tabs / pill filters
   =========================================================== */
.tabs { display: flex; border-bottom: 1px solid rgba(34, 34, 34, 0.16); }
.tab {
    flex: 1; border: none; background: transparent; cursor: pointer; font-family: inherit;
    font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
    padding: 14px 8px; margin-bottom: -1px; color: rgba(34, 34, 34, 0.45); border-bottom: 2px solid transparent;
}
.tab.active { color: var(--color-blue); border-bottom-color: var(--color-blue); }
.pill {
    border: none; background: transparent; cursor: pointer; font-family: inherit;
    font-size: 10.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase;
    padding: 7px 0 8px; color: rgba(34, 34, 34, 0.5); border-bottom: 1.5px solid transparent;
}
.pill.active { color: var(--color-ink); border-bottom-color: var(--color-blue); }

/* ===========================================================
   Inline-edit affordances (admin only)
   =========================================================== */
.inline-editable { position: relative; outline-offset: 4px; }
body.is-admin .inline-editable { cursor: text; border-radius: 3px; transition: box-shadow .15s ease; }
body.is-admin .inline-editable:hover { box-shadow: 0 0 0 2px rgba(24, 83, 159, 0.35); }
body.is-admin .inline-editable[contenteditable="true"]:focus { box-shadow: 0 0 0 2px var(--color-blue); outline: none; }
.inline-editable.is-saving { opacity: 0.6; }
.inline-image-wrap { position: relative; }
.inline-image-edit {
    position: absolute; top: 10px; right: 10px; z-index: 5;
    width: 34px; height: 34px; display: none; align-items: center; justify-content: center;
    background: rgba(20, 20, 20, 0.75); color: #fff; border-radius: 50%; cursor: pointer; font-size: 14px;
}
body.is-admin .inline-image-wrap:hover .inline-image-edit { display: flex; }

.admin-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--color-near-black); color: #fff; font-size: 12.5px;
    padding: 10px 20px; font-family: var(--font-sans);
}
.admin-bar a { color: rgba(255, 255, 255, 0.82); }
.admin-bar a:hover { color: #fff; }
.admin-bar .sep { opacity: .4; margin: 0 10px; }
