/* ==========================================================================
   Abbey Investment — abbeyinvestment.com
   Brand: navy #0B1C3F / blue #1A4BAD / bright #3A86FF / teal #2EC19B
   ========================================================================== */

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/manrope-variable.woff2') format('woff2-variations');
    font-weight: 200 800;
    font-display: swap;
}

:root {
    --navy: #0B1C3F;
    --navy-mid: #0d2350;
    --navy-deep: #0a1836;
    --blue: #1A4BAD;
    --bright: #3A86FF;
    --teal: #2EC19B;
    --paper: #f6f7fa;
    --ink: #16223f;
    --ink-soft: #46527a;
    --mist: #c9d5ee;
    --card-line: rgba(201, 213, 238, 0.14);
    --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --wrap: 1160px;
    --radius: 14px;

    /* Theme tokens — dark (night) is the default */
    --t-text: #ffffff;
    --t-text-soft: var(--mist);
    --t-eyebrow: var(--bright);
    --t-link: var(--bright);
    --g1: var(--navy);
    --g2: var(--navy-mid);
    --g3: var(--navy-deep);
    --t-glow: rgba(58, 134, 255, 0.30);
    --t-card-bg: rgba(13, 35, 80, 0.55);
    --t-card-line: rgba(201, 213, 238, 0.14);
    --t-card-shadow: 0 18px 44px rgba(4, 10, 25, 0.45);
    --t-field-bg: rgba(10, 24, 54, 0.65);
    --t-field-border: rgba(201, 213, 238, 0.25);
    --t-status-ok: var(--teal);
    --t-status-err: #ffb4ab;
    --t-header-bg: rgba(10, 24, 54, 0.9);
    --t-footer-bg: rgba(7, 16, 36, 0.82);
    --t-footer-text: var(--mist);
    --hero-glow: rgba(58, 134, 255, 0.28);
    --hero-veil-a: rgba(11, 28, 63, 0.96);
    --hero-veil-b: rgba(13, 35, 80, 0.82);
    --hero-veil-c: rgba(10, 24, 54, 0.55);
    --hero-eyebrow: var(--bright);
    --hero-text: #ffffff;
    --hero-sub: var(--mist);
}

/* Day mode — every pair pre-verified >= 4.5:1 (see PROJECT-CONTEXT) */
[data-theme="light"] {
    --t-text: #16223f;
    --t-text-soft: #46527a;
    --t-eyebrow: var(--blue);
    --t-link: var(--blue);
    --g1: #f7f9fd;
    --g2: #eef3fa;
    --g3: #e6edf8;
    --t-glow: rgba(58, 134, 255, 0.16);
    --t-card-bg: #ffffff;
    --t-card-line: #dfe6f2;
    --t-card-shadow: 0 18px 44px rgba(11, 28, 63, 0.10);
    --t-field-bg: #f6f8fc;
    --t-field-border: #cbd5ea;
    --t-status-ok: #0c7a58;
    --t-status-err: #b3261e;
    --t-header-bg: rgba(247, 249, 253, 0.9);
    --t-footer-bg: rgba(233, 239, 248, 0.9);
    --t-footer-text: #3b4767;
    --hero-glow: rgba(58, 134, 255, 0.10);
    --hero-veil-a: rgba(247, 250, 254, 0.95);
    --hero-veil-b: rgba(240, 245, 252, 0.82);
    --hero-veil-c: rgba(235, 241, 250, 0.42);
    --hero-eyebrow: var(--blue);
    --hero-text: #16223f;
    --hero-sub: #3b4767;
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

html { background: var(--g3); }

body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    color: var(--t-text);
    /* transparent so the fixed .site-bg (painted above the html background but
       below in-flow content) shows through every section without its own bg */
    background: transparent;
}

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

/* the <symbol> sprite container — `hidden` alone has no effect on SVG-namespace elements */
svg[hidden] { display: none; }

.wrap { width: min(var(--wrap), 92vw); margin-inline: auto; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; top: -48px; left: 0; z-index: 200;
    background: var(--navy); color: #fff; padding: 10px 18px;
    text-decoration: none; border-radius: 0 0 6px 0; font-weight: 600;
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 3px solid var(--bright); outline-offset: 2px; }

section { scroll-margin-top: 64px; }

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    padding: 16px 0;
    transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
    background: var(--t-header-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 17.25px 0;
    box-shadow: 0 1px 0 var(--card-line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; }
/* SVG height:auto = 150px default box (no intrinsic ratio) — set the real ratio */
.brand svg { width: 168px; aspect-ratio: 362 / 102; height: auto; transition: width 0.3s ease; }
.site-header.scrolled .brand svg { width: 132px; }

.site-nav { display: flex; gap: 34px; align-items: center; }

/* Day mode: hero veil is light too, so header text/logo are dark throughout */
[data-theme="light"] .site-nav a { color: var(--t-text-soft); }
[data-theme="light"] .site-nav a:hover { color: var(--t-text); }
[data-theme="light"] .site-header { --logo-ink: #16223f; }

.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; margin-left: 26px;
    background: transparent; border: 1.5px solid rgba(201, 213, 238, 0.35);
    border-radius: 50%; cursor: pointer; color: var(--mist);
    transition: color 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover { color: #fff; border-color: rgba(201, 213, 238, 0.7); }
[data-theme="light"] .theme-toggle { color: var(--t-text-soft); border-color: #b9c6de; }
[data-theme="light"] .theme-toggle:hover { color: var(--t-text); border-color: #8194b8; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.site-nav a {
    color: var(--mist); text-decoration: none; font-weight: 600;
    font-size: 15px; letter-spacing: 0.02em;
    transition: color 0.2s ease;
}
.site-nav a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative; min-height: 100svh;
    display: flex; align-items: center;
    background: var(--navy); overflow: hidden;
    color: var(--hero-text);
}
.hero-photo { position: absolute; inset: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-veil {
    position: absolute; inset: 0;
    background:
        radial-gradient(1200px 620px at 50% -8%, var(--hero-glow), transparent 60%),
        linear-gradient(100deg, var(--hero-veil-a) 0%, var(--hero-veil-b) 45%, var(--hero-veil-c) 100%);
    transition: background 0.4s ease;
}
.hero .wrap { position: relative; z-index: 2; padding: 120px 0 90px; }
.hero-eyebrow {
    font-size: 15px; font-weight: 700; letter-spacing: 0.24em;
    text-transform: uppercase; color: var(--hero-eyebrow); margin-bottom: 22px;
}
.hero-title {
    font-size: clamp(40px, 6.4vw, 76px);
    line-height: 1.04; font-weight: 800; letter-spacing: -0.02em;
    max-width: 13ch; margin-bottom: 26px;
}
.hero-sub { font-size: clamp(17px, 1.6vw, 20px); color: var(--hero-sub); max-width: 54ch; margin-bottom: 38px; }

.btn {
    /* white text needs a deeper blue than --bright to reach WCAG 4.5:1 */
    display: inline-block; background: #2A66D9; color: #fff;
    font-weight: 700; font-size: 16px; letter-spacing: 0.01em;
    padding: 15px 34px; border: 0; border-radius: 8px;
    text-decoration: none; cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { background: #2E6FE0; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(58, 134, 255, 0.35); }

/* --------------------------------------------------------------------------
   Section scaffolding
   -------------------------------------------------------------------------- */
.section { padding: 72px 0; }
.section-eyebrow {
    font-size: 14px; font-weight: 700; letter-spacing: 0.22em;
    text-transform: uppercase; color: var(--t-eyebrow); margin-bottom: 14px;
}
.section-title {
    font-size: clamp(30px, 3.6vw, 44px);
    line-height: 1.12; font-weight: 800; letter-spacing: -0.015em;
    margin-bottom: 26px; color: var(--t-text);
}

/* --------------------------------------------------------------------------
   Site-wide animated backdrop — the brand cover treatment (gradient + orbs)
   behind every section that has no picture background
   -------------------------------------------------------------------------- */
.site-bg {
    position: fixed; inset: 0; z-index: -1; overflow: hidden;
    background:
        radial-gradient(1200px 620px at 50% -8%, var(--t-glow), transparent 60%),
        linear-gradient(160deg, var(--g1) 0%, var(--g2) 46%, var(--g3) 100%);
    transition: background 0.4s ease;
}
.orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.orbs span { position: absolute; border-radius: 50%; filter: blur(95px); }
.orbs span:nth-child(1) { width: 560px; height: 560px; background: #3a86ff; top: -140px; left: -100px; animation: drift 22s ease-in-out infinite, glow 9s ease-in-out infinite; }
.orbs span:nth-child(2) { width: 500px; height: 500px; background: #2ec19b; bottom: -150px; right: -90px; animation: drift 27s ease-in-out infinite reverse, glow 11s ease-in-out infinite; }
.orbs span:nth-child(3) { width: 420px; height: 420px; background: #1a4bad; top: 40%; left: 60%; animation: drift 32s ease-in-out infinite, glow 13s ease-in-out infinite; }
.orbs span:nth-child(4) { width: 360px; height: 360px; background: #3a86ff; top: 55%; left: -120px; animation: drift 36s ease-in-out infinite reverse, glow 15s ease-in-out infinite; }

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(80px, -55px) scale(1.15); }
    66% { transform: translate(-60px, 45px) scale(0.92); }
}
@keyframes glow {
    0%, 100% { opacity: 0.18; }
    50% { opacity: 0.34; }
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about-grid {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(40px, 6vw, 84px); align-items: center;
}
.about-copy p:not(.section-eyebrow) { margin-bottom: 20px; color: var(--t-text-soft); }
.about-copy h2 + p:not(.section-eyebrow) { color: var(--t-text); font-size: 18.5px; }
.about-photo { position: relative; }
.about-photo::after {
    content: ''; position: absolute; inset: 26px -26px -26px 26px;
    border: 2px solid var(--bright); border-radius: var(--radius);
    z-index: -1; opacity: 0.55;
}
.about-photo img { border-radius: var(--radius); }

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */
.services-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px; margin-top: 36px;
}
.card {
    background: var(--t-card-bg);
    border: 1px solid var(--t-card-line);
    border-radius: var(--radius); overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-5px); border-color: rgba(58, 134, 255, 0.5); }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card-body { padding: 26px 28px 30px; }
.card h3 { font-size: 21px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 12px; }
.card p { color: var(--t-text-soft); font-size: 16px; }

/* --------------------------------------------------------------------------
   Photo band
   -------------------------------------------------------------------------- */
.band { position: relative; }
.band img { width: 100%; height: clamp(260px, 38vh, 420px); object-fit: cover; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-grid {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(40px, 6vw, 84px); align-items: start; margin-top: 10px;
}
.contact-intro { color: var(--t-text-soft); max-width: 46ch; margin-bottom: 8px; }

.form-card {
    background: var(--t-card-bg);
    border: 1px solid var(--t-card-line);
    border-radius: var(--radius);
    padding: clamp(26px, 3.4vw, 42px);
    box-shadow: var(--t-card-shadow);
    color: var(--t-text);
    color-scheme: dark;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 7px; color: var(--t-text); }
.field input, .field select, .field textarea {
    width: 100%; font: inherit; font-size: 16px; color: var(--t-text);
    background: var(--t-field-bg); border: 1.5px solid var(--t-field-border); border-radius: 8px;
    padding: 12px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--bright);
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.25);
}
.field textarea { min-height: 130px; resize: vertical; }
[data-theme="light"] .form-card { color-scheme: light; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-status { margin-top: 16px; font-weight: 600; display: none; }
.form-status.ok { display: block; color: var(--t-status-ok); }
.form-status.err { display: block; color: var(--t-status-err); }

.contact-aside h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; color: var(--t-text); }
.contact-aside .aside-block { margin-bottom: 30px; }
.contact-aside a { color: var(--t-link); font-weight: 700; text-decoration: none; }
.contact-aside a:hover { text-decoration: underline; }
.contact-aside address { font-style: normal; color: var(--t-text-soft); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--t-footer-bg); color: var(--t-footer-text);
    border-top: 1px solid var(--t-card-line);
    padding: 40px 0 34px; font-size: 14px;
}
.footer-brand svg { width: 138px; aspect-ratio: 362 / 102; height: auto; margin-bottom: 20px; }
[data-theme="light"] .site-footer { --logo-ink: #16223f; }
.site-footer p { margin-bottom: 12px; max-width: 84ch; }
.site-footer a { color: var(--t-text); font-weight: 600; }
.legal { color: var(--t-footer-text); opacity: 0.85; font-size: 13px; }

/* --------------------------------------------------------------------------
   Reveal animations
   -------------------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero-eyebrow { animation: rise 0.9s 0.1s both; }
.hero-title { animation: rise 0.9s 0.25s both; }
.hero-sub { animation: rise 0.9s 0.4s both; }
.hero .btn { animation: rise 0.9s 0.55s both; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-eyebrow, .hero-title, .hero-sub, .hero .btn { animation: none; }
    .orbs span { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .btn, .card { transition: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .section { padding: 60px 0; }
}

@media (max-width: 768px) {
    .site-nav { gap: 22px; }
    .site-nav a { font-size: 14px; }
    .brand svg { width: 138px; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .about-photo { order: -1; max-width: 480px; }
    .about-photo::after { inset: 18px -14px -14px 18px; }
    .services-grid { grid-template-columns: 1fr; gap: 22px; }
    .section { padding: 52px 0; }
}

@media (max-width: 576px) {
    body { font-size: 16px; }
    .hero .wrap { padding: 112px 0 72px; }
    .site-nav { gap: 16px; }
}

@media (max-width: 450px) {
    .brand svg { width: 118px; }
    .site-nav a { font-size: 13px; }
    .btn { width: 100%; text-align: center; }
}
