/* ============================================
   FIFTH ESTATE — Shared Styles
   ============================================ */

:root {
    --orange: #f8a036;
    --orange-dark: #e8902a;
    --blue: #1682c6;
    --blue-dark: #0a5a8a;
    --ink: #141414;
    --ink-light: #1e1e1e;
    --ink-mid: #2a2a2a;
    --paper: #ffffff;
    --paper-warm: #fafaf8;
    --grey: #555555;
    --grey-light: #999999;
    --grey-border: #e0e0e0;
    --logo-height: 96px;
    --logo-height-scrolled: 76px;
    --logo-height-footer: 116px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    letter-spacing: 0.03em;
}

a { color: inherit; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-narrow {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   LOGO MARK (PNG)
   ============================================ */
.fe-mark {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.fe-mark img {
    display: block;
    height: var(--logo-height);
    width: auto;
    transition: opacity 0.2s ease, height 0.3s ease;
}
.fe-mark:hover img { opacity: 0.85; }
nav.site-nav.scrolled .fe-mark img { height: var(--logo-height-scrolled); }
.fe-mark-footer img { height: var(--logo-height-footer); }

/* ============================================
   NAV
   ============================================ */
nav.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(20,20,20,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}
nav.site-nav.scrolled { padding: 0.6rem 0; box-shadow: 0 4px 30px rgba(0,0,0,0.3); }
nav.site-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}
.nav-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.2s ease;
    position: relative;
}
.nav-links a:hover { color: white; }
.nav-links a.active { color: white; }
.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    bottom: -6px;
    height: 2px;
    background: var(--orange);
}
.nav-links a.cta-btn {
    background: var(--orange);
    color: white;
    padding: 0.65rem 1.5rem;
    border-radius: 3px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}
.nav-links a.cta-btn:hover { background: var(--orange-dark); transform: translateY(-1px); }
.nav-links a.cta-btn::after { display: none; }

/* Services dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a::after {
    content: '';
    display: inline-block;
    width: 5px; height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 0.45rem;
    vertical-align: 0.15em;
    opacity: 0.55;
}
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(20,20,20,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    min-width: 240px;
    padding: 0.4rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    box-shadow: 0 24px 50px rgba(0,0,0,0.45);
    border-radius: 4px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -18px; left: 0; right: 0; height: 18px;
}
.nav-dropdown-menu a {
    display: block;
    padding: 0.8rem 1rem;
    color: rgba(255,255,255,0.75);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
    border-radius: 2px;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown-menu a:hover {
    color: var(--orange);
    background: rgba(248,160,54,0.06);
}
.nav-dropdown-menu a::after { display: none; }

@media (max-width: 860px) {
    .nav-links { gap: 1.25rem; }
    .nav-links a:not(.cta-btn):not(.nav-mobile-show) { display: none; }
    .nav-dropdown { display: none; }
}

/* ============================================
   COMMON ELEMENTS
   ============================================ */
.label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--orange);
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: inline-block;
}

.label-dark { color: var(--orange); }
.label-quiet { color: rgba(255,255,255,0.4); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border-radius: 3px;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: none;
    font-family: 'DM Sans', sans-serif;
}
.btn-primary {
    background: var(--orange);
    color: white;
}
.btn-primary:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(248,160,54,0.25);
}
.btn-ghost {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.25);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn-ghost-dark {
    background: transparent;
    color: var(--ink);
    border: 1px solid rgba(0,0,0,0.2);
}
.btn-ghost-dark:hover { border-color: var(--orange); color: var(--orange); }
.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 0;
    border-bottom: 2px solid var(--orange);
    transition: color 0.2s ease, gap 0.2s ease;
}
.btn-link:hover { color: var(--orange); gap: 0.9rem; }
.btn-link-light {
    color: white;
    border-bottom-color: var(--orange);
}
.btn-link-light:hover { color: var(--orange); }
.btn .arr { transition: transform 0.2s ease; }
.btn:hover .arr { transform: translateX(4px); }

/* Page hero (used on all sub-pages) */
.page-hero {
    background: var(--ink);
    color: white;
    padding: 11rem 0 5.5rem;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    border: 1px solid rgba(248,160,54,0.1);
    border-radius: 50%;
    top: -120px;
    right: -120px;
    pointer-events: none;
}
.page-hero::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 160px;
    background: linear-gradient(to bottom, var(--orange), transparent);
    opacity: 0.3;
    bottom: 0;
    left: 12%;
    pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .crumb {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.page-hero .crumb a { color: rgba(255,255,255,0.4); text-decoration: none; }
.page-hero .crumb a:hover { color: var(--orange); }
.page-hero h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 0.96;
    margin-bottom: 1.75rem;
    max-width: 900px;
}
.page-hero h1 .accent { color: var(--orange); display: block; }
.page-hero .lede {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
    max-width: 640px;
}

/* Section utilities */
.section { padding: 7rem 0; }
.section-dark { background: var(--ink); color: white; }
.section-paper { background: var(--paper); }
.section-warm { background: var(--paper-warm); }

.h2 {
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    line-height: 1;
    margin-bottom: 1.5rem;
}
.h2 .accent { color: var(--orange); }

.eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--orange);
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: inline-block;
}

/* Callout — for the homepage typographic callouts */
.callout {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    line-height: 1.05;
    letter-spacing: 0.015em;
    color: var(--ink);
    margin: 2rem 0;
}
.callout-light { color: white; }
.callout em {
    color: var(--orange);
    font-style: normal;
}

/* Corner-bracketed dark block */
.framed-dark {
    background: var(--ink);
    color: rgba(255,255,255,0.88);
    padding: 3rem;
    position: relative;
}
.framed-dark::before, .framed-dark::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
}
.framed-dark::before {
    top: -12px; left: -12px;
    border-top: 3px solid var(--orange);
    border-left: 3px solid var(--orange);
}
.framed-dark::after {
    bottom: -12px; right: -12px;
    border-bottom: 3px solid var(--orange);
    border-right: 3px solid var(--orange);
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: #0a0a0a;
    color: rgba(255,255,255,0.55);
    padding: 4.5rem 0 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
@media (max-width: 800px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h4 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 1.25rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.footer-col a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--orange); }
.footer-col p { font-size: 0.92rem; line-height: 1.6; max-width: 280px; }
.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.04em;
}
.footer-bottom a { color: rgba(255,255,255,0.4); text-decoration: none; }
.footer-bottom a:hover { color: var(--orange); }

/* ============================================
   FAVICON SVG-IN-LINK fallback handled inline
   ============================================ */
