/* ==========================================================================
   essia - site styles
   Dark ground, teal identity accent, amber action accent.
   ========================================================================== */

:root {
    /* Structural dark ground - slightly cool near-black, never pure #000 so
       panels and rules can still read against it. */
    --bg: #0a0b0d;
    --bg-elevated: #1c2027;
    --bg-tint: #262b33;
    --ink: #eef1f3;
    --muted: #9aa1a9;
    --rule: #24272c;
    /* Identity colour - used for headings accents, icons, links, the logo mark. */
    --brand: #35d0c0;
    --brand-dark: #21a596;
    --brand-light: #8de8dc;
    --brand-tint: rgba(53, 208, 192, 0.1);
    /* Action colour - warm counterpoint so buttons stand apart from the teal
       identity colour rather than competing with it. */
    --accent: #f2a93b;
    --accent-dark: #d68f22;
    --accent-hover: #ffbb55;
    scroll-padding-top: 96px;
}

/* Sticky footer: min-height, not height - a fixed 100% height clips pages
   taller than the viewport and breaks the flex sizing of <main>. */
html { margin: 0; padding: 0; }
body { margin: 0; padding: 0; min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--ink);
    background-color: var(--bg);
    line-height: 1.65;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); font-weight: 700; margin-bottom: 1rem; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.1rem); margin-bottom: 0.875rem; }
h3 { font-size: 1.3rem; margin-top: 2rem; margin-bottom: 0.625rem; }
h4 { font-size: 1.1rem; margin-top: 1.75rem; margin-bottom: 0.5rem; color: var(--brand-light); }

p { margin-bottom: 1rem; }
.lead { font-size: 1.125rem; color: #c7ccd1; }

a { color: var(--brand-light); text-decoration: none; }
a:hover { color: var(--brand); text-decoration: underline; }

.text-muted-sm { font-size: 0.8125rem; color: var(--muted); }

.eyebrow {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 0.75rem;
}

/* ---------- Buttons ---------- */
.btn.brand, button.brand {
    background-color: var(--accent) !important;
    color: #1a1305 !important;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.15s ease;
    border: none;
    border-radius: 6px;
    padding: 0.625rem 1.5rem;
    box-shadow: none;
}
.btn.brand:hover, button.brand:hover { background-color: var(--accent-hover) !important; color: #1a1305 !important; text-decoration: none; }
.btn.brand:focus, button.brand:focus { outline: 3px solid var(--accent); outline-offset: 2px; box-shadow: none; }

.btn-outline-brand {
    border: 2px solid var(--brand); color: var(--brand-light); background: transparent;
    font-weight: 600; border-radius: 6px; padding: 0.5rem 1.25rem;
}
.btn-outline-brand:hover { background: var(--brand); color: #06201d; }

/* ---------- Domain-based branding ----------
   Both logo variants are always in the markup; data-brand (set synchronously
   in <head>, before these images are even parsed) picks which is visible -
   so there's no flash of the wrong brand and no extra image request. */
.logo-simon { display: none; }
[data-brand="simon"] .logo-essia { display: none; }
[data-brand="simon"] .logo-simon { display: inline-block; }

/* ---------- Navigation ---------- */
#mainNav {
    background-color: var(--bg-elevated) !important;
    padding-top: 0.75rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--rule);
    transition: none;
}
#mainNav.navbar-shrink {
    transition: padding 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    padding-top: 0.4rem; padding-bottom: 0.4rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    background-color: rgba(17,19,23,0.94) !important;
    backdrop-filter: blur(6px);
}
#mainNav .navbar-brand img { transition: height 0.3s ease; height: 34px; }
#mainNav.navbar-shrink .navbar-brand img { height: 28px; }
#mainNav .nav-link { color: rgba(238,241,243,0.75); font-weight: 600; padding: 0.5rem 1rem; position: relative; }
#mainNav .nav-link:hover, #mainNav .nav-link.active { color: #fff; text-decoration: none; }
@keyframes navUnderlineGrow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}
#mainNav .nav-link.active::after {
    content: "";
    position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.1rem;
    height: 3px; border-radius: 3px;
    background: var(--brand);
    transform-origin: center;
    animation: navUnderlineGrow 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding-top: calc(68px + 5rem);
    padding-bottom: 5rem;
    background-color: var(--bg);
    overflow: hidden;
}
/* Two soft, off-centre glows rather than a tiled pattern - reads as
   deliberate lighting rather than wallpaper. */
.hero-glow {
    position: absolute; inset: -20% -10%;
    background:
        radial-gradient(ellipse 60% 50% at 78% 28%, rgba(53,208,192,0.18), transparent 60%),
        radial-gradient(ellipse 55% 45% at 12% 92%, rgba(242,169,59,0.10), transparent 55%);
    pointer-events: none;
}
/* A single line, drawn once, that untangles from left to right and settles
   into the brand teal - a literal picture of what the practice does, not
   decoration for its own sake. */
.hero-art {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0.55;
    pointer-events: none;
}
@media (max-width: 767.98px) {
    .hero-art { opacity: 0.3; }
}
.hero .container { position: relative; max-width: 760px; }
.hero h1 { margin-bottom: 1.25rem; }
.hero .lead { font-size: 1.2rem; max-width: 620px; }

/* ---------- Interior page banner ---------- */
.page-banner {
    margin-top: 0;
    background-color: var(--bg-elevated);
    border-bottom: 1px solid var(--rule);
    color: var(--ink);
    padding: calc(68px + 3rem) 0 2.5rem;
}
.page-banner h1 { margin-bottom: 0.25rem; }
.page-banner p { color: var(--muted); margin-bottom: 0; }

/* ---------- Sections ---------- */
section { padding: 4rem 0; }
section.tint { background: var(--bg-elevated); }
section + section { border-top: 1px solid var(--rule); }
section.tint + section, section + section.tint { border-top: none; }

/* ---------- Cards ---------- */
.card-plain {
    background: var(--bg); border: 1px solid var(--rule); border-radius: 12px;
    padding: 1.75rem; height: 100%;
}
.card-icon {
    width: 42px; height: 42px; margin-bottom: 1rem;
    color: var(--brand);
}
.card-icon svg { width: 100%; height: 100%; }

/* ---------- About photo ---------- */
.about-photo {
    width: 100%; max-width: 220px; aspect-ratio: 1 / 1; object-fit: cover;
    border-radius: 50%; border: 3px solid var(--brand-tint);
    box-shadow: 0 0 0 1px var(--rule);
}

/* ---------- CTA band ---------- */
.cta-band h2 { color: var(--ink); }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: 0.9375rem; color: var(--ink); }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 0.2rem rgba(53,208,192,0.2); }

/* Bootstrap toggles .invalid-feedback from display:none to block, which grows the
   form and shunts every field below it down the page. Instead, lay the message
   over the right-hand end of the control itself, next to the warning icon: it is
   taken out of flow, so showing it moves nothing and costs no idle spacing when
   clean. The message stays after the control in the markup, so Bootstrap's own
   ".was-validated :invalid ~ .invalid-feedback" rule still drives it. */
.needs-validation .control { position: relative; }
.needs-validation.was-validated .form-control:invalid,
.needs-validation .form-control.is-invalid { background-image: none; padding-right: 8.5rem; }

.needs-validation .invalid-feedback {
    position: absolute;
    top: 0;
    right: 0.75rem;
    height: calc(1.5em + 0.75rem + 2px);
    width: auto;
    margin: 0;
    display: none;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #dc3545;
    white-space: nowrap;
    pointer-events: none;
}
.needs-validation.was-validated :invalid ~ .invalid-feedback,
.needs-validation .is-invalid ~ .invalid-feedback { display: flex; }
.needs-validation .invalid-feedback::before {
    content: "";
    flex: 0 0 0.875rem;
    width: 0.875rem; height: 0.875rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: contain;
}

/* ---------- Footer ---------- */
footer.site-footer {
    background-color: var(--bg-elevated);
    border-top: 1px solid var(--rule);
    color: var(--ink);
    padding: 2.75rem 0 1.75rem;
}
.footer-logo { display: block; }
.footer-tagline { color: var(--muted); max-width: 34ch; }
footer.site-footer .text-muted-sm { color: var(--muted); }
footer.site-footer a { color: var(--ink); }
footer.site-footer a:hover { color: var(--brand-light); }
.footer-bottom { margin-top: 2.5rem; font-size: 0.875rem; color: var(--muted); }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--brand-light); }

/* ---------- Back to top ---------- */
#scroll {
    position: fixed; right: 20px; bottom: 20px; cursor: pointer;
    width: 40px; height: 40px; background-color: var(--bg-elevated); text-indent: -9999px;
    display: none; border-radius: 50%; opacity: 0; z-index: 1000;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    border: 1px solid var(--rule); box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
#scroll.visible { display: block; opacity: 0.85; }
#scroll span {
    position: absolute; top: 50%; left: 50%; margin-left: -6px; margin-top: -10px;
    height: 0; width: 0; border: 6px solid transparent; border-bottom-color: var(--brand);
}
#scroll:hover { opacity: 1; background-color: var(--bg-tint); }

/* ---------- Print ---------- */
@media print {
    #mainNav, #scroll, .no-print { display: none !important; }
    .hero, .page-banner { margin-top: 0; }
    body { color: #000; background: #fff; }
}
