/**
 * Editorial Cinematic — global nav + homepage video hero
 *
 * Minimalist Editorial design system: Instrument Serif (display) + Inter
 * (body/UI), deep navy/black on a bright, immersive background, fade-rise
 * entrance animation.
 */

:root {
    --ed-navy: #0f172a;
    --ed-muted: hsl(215, 25%, 32%);
    --ed-black: #000000;
    --ed-white: #ffffff;
    --ed-bg-fallback: hsl(201, 100%, 13%);
}

@keyframes ed-fade-rise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.ed-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    /* Always solid white — was transparent-until-scroll, which let whatever
       hero photo/video sat underneath show through the nav. Logo/link text
       is dark navy (see .ed-nav__logo etc.), so that only stayed readable by
       accident, whenever the photo happened to be light in the right spot.
       A solid backing guarantees the text is legible on every page. */
    background-color: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
    transition: box-shadow 0.3s ease;
}

.ed-nav.is-scrolled {
    backdrop-filter: blur(8px);
}

body.admin-bar .ed-nav {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .ed-nav {
        top: 46px;
    }
}

.ed-nav__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 24px 32px;
}

.ed-nav__col--left {
    justify-self: start;
    min-width: 0;
}

.ed-nav__col--center {
    justify-self: center;
    display: none;
    align-items: center;
    gap: 40px;
}

.ed-nav__col--right {
    justify-self: end;
}

.ed-nav__logo {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 30px;
    line-height: 1;
    color: var(--ed-navy);
    text-decoration: none;
    white-space: nowrap;
}

.ed-nav__logo sup {
    font-size: 0.5em;
}

.ed-nav__logo img {
    display: block;
    height: 40px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

@media (max-width: 767px) {
    .ed-nav__logo img {
        height: 32px;
        max-width: 160px;
    }
}

.ed-nav__col--center a {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: var(--ed-navy);
    text-decoration: none;
    white-space: nowrap;
}

.ed-nav__col--center a:hover {
    opacity: 0.65;
}

@media (min-width: 768px) {
    .ed-nav__col--center {
        display: flex;
    }
}

/* ==========================================================================
   Pill Action Button
   ========================================================================== */
.ed-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background-color: var(--ed-black);
    color: var(--ed-white) !important;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.2s ease-in-out;
}

.ed-pill:hover {
    transform: scale(1.03);
}

.ed-pill--nav {
    padding: 10px 24px;
    font-size: 14px;
}

.ed-pill--hero {
    padding: 20px 56px;
    font-size: 16px;
    transition: transform 0.3s ease;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.ed-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--ed-bg-fallback);
}

.ed-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.ed-hero__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.ed-hero__content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 140px 24px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ed-hero__title {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 48px;
    line-height: 0.95;
    letter-spacing: -2.46px;
    color: var(--ed-white);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
    margin: 0;
    opacity: 0;
    animation: ed-fade-rise 0.8s ease-out forwards;
}

.ed-hero__title em {
    font-style: normal;
}

.ed-hero__desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.625;
    color: var(--ed-white);
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
    max-width: 670px;
    margin: 24px auto 0;
    opacity: 0;
    animation: ed-fade-rise 0.8s ease-out 0.2s forwards;
}

.ed-hero__cta {
    margin-top: 48px;
    opacity: 0;
    animation: ed-fade-rise 0.8s ease-out 0.4s forwards;
}

@media (min-width: 768px) {
    .ed-hero__title {
        font-size: 80px;
    }
}

/* ==========================================================================
   Interior Page Hero (static — no video, shorter than the homepage ed-hero)
   Added for template-parts/*.php rebuild. Reuses the same tokens, keyframe
   and pill button as the homepage hero so interior pages read as the same
   design system, just without the full-bleed video treatment.
   ========================================================================== */
.ed-hero-page {
    position: relative;
    min-height: 46vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background-color: var(--ed-navy);
}

.ed-hero-page__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.55;
}

.ed-hero-page__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.85) 100%);
    z-index: 1;
}

.ed-hero-page__content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 150px 24px 56px;
    width: 100%;
}

.ed-hero-page__crumb {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    animation: ed-fade-rise 0.8s ease-out forwards;
}

.ed-hero-page__crumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.ed-hero-page__crumb a:hover {
    color: #fff;
}

.ed-hero-page__title {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 40px;
    line-height: 1;
    letter-spacing: -1.2px;
    color: var(--ed-white);
    margin: 14px 0 0;
    max-width: 780px;
    opacity: 0;
    animation: ed-fade-rise 0.8s ease-out 0.15s forwards;
}

.ed-hero-page__desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.625;
    color: rgba(255, 255, 255, 0.8);
    max-width: 620px;
    margin: 16px 0 0;
    opacity: 0;
    animation: ed-fade-rise 0.8s ease-out 0.3s forwards;
}

@media (min-width: 768px) {
    .ed-hero-page {
        min-height: 52vh;
    }
    .ed-hero-page__title {
        font-size: 60px;
    }
    .ed-hero-page__desc {
        font-size: 18px;
    }
}

/* ==========================================================================
   Section Eyebrow — small numbered label above a section heading
   ========================================================================== */
.ed-eyebrow {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.ed-eyebrow__num {
    font-family: 'Instrument Serif', serif;
    font-size: 44px;
    line-height: 1;
    color: var(--ed-navy);
    opacity: 0.18;
}

.ed-eyebrow__label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ed-muted);
}

.ed-section-title {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 34px;
    line-height: 1.05;
    letter-spacing: -0.8px;
    color: var(--ed-navy);
    margin: 10px 0 0;
}

@media (min-width: 768px) {
    .ed-section-title {
        font-size: 48px;
    }
}

/* ==========================================================================
   Prose — long-form article body (About/Guides/Insights content)
   ========================================================================== */
.ed-prose {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    line-height: 1.75;
    color: var(--ed-muted);
}

.ed-prose h2 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 30px;
    letter-spacing: -0.6px;
    color: var(--ed-navy);
    margin: 2.2em 0 0.6em;
}

.ed-prose h2:first-child {
    margin-top: 0;
}

.ed-prose p {
    margin: 0 0 1.2em;
}

.ed-prose ul,
.ed-prose ol {
    margin: 0 0 1.2em;
    padding-left: 1.4em;
}

.ed-prose li {
    margin: 0.4em 0;
}

.ed-prose a {
    color: var(--ed-navy);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Added for the Dynamic Page UI Engine's default/fallback layout — content
   shapes (h3 subheadings, quotes, tables, bare images) that don't have a
   dedicated layout type still need in-flow typography instead of unstyled
   browser defaults. */
.ed-prose h3 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 22px;
    color: var(--ed-navy);
    margin: 1.8em 0 0.5em;
}

.ed-prose blockquote {
    margin: 1.6em 0;
    padding: 0.2em 0 0.2em 1.2em;
    border-left: 3px solid var(--ed-navy);
    font-style: italic;
    color: var(--ed-navy);
}

.ed-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 1.2em 0;
}

.ed-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: 15px;
}

.ed-prose table th,
.ed-prose table td {
    padding: 10px 14px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    text-align: left;
}

.ed-prose table th {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--ed-navy);
    background: rgba(15, 23, 42, 0.04);
}

.ed-prose .ed-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   Card — used for property/guide/insight grids
   ========================================================================== */
.ed-card {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    background: var(--ed-white);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ed-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.ed-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: var(--ed-bg-fallback);
}

.ed-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ed-card__body {
    padding: 20px 22px 24px;
}

.ed-card__eyebrow {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ed-muted);
}

.ed-card__title {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 1.15;
    color: var(--ed-navy);
    margin: 8px 0 0;
}

.ed-card__desc {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ed-muted);
    margin: 8px 0 0;
}

.ed-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

@media (min-width: 640px) {
    .ed-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .ed-grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   Bento Grid — magazine-style asymmetric image grid
   Breaks up long-form prose with a mix of one large + three smaller tiles,
   like a photo essay spread. Stacks to a single column on mobile.
   ========================================================================== */
.ed-bento {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 2.8em 0;
}

.ed-bento__tile {
    position: relative;
    display: block;
    border-radius: 20px;
    overflow: hidden;
    background-color: var(--ed-bg-fallback);
    aspect-ratio: 4 / 3;
}

.ed-bento__tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.ed-bento__tile:hover img {
    transform: scale(1.05);
}

.ed-bento__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.75) 100%);
    color: var(--ed-white);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 13px;
}

@media (min-width: 768px) {
    .ed-bento {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 190px;
    }
    .ed-bento__tile {
        aspect-ratio: auto;
    }
    .ed-bento__tile--a {
        grid-column: 1 / span 2;
        grid-row: 1 / span 2;
    }
    .ed-bento__tile--b {
        grid-column: 3;
        grid-row: 1;
    }
    .ed-bento__tile--c {
        grid-column: 4;
        grid-row: 1;
    }
    .ed-bento__tile--d {
        grid-column: 3 / span 2;
        grid-row: 2;
    }
}

/* ==========================================================================
   Accordion — FAQ
   ========================================================================== */
.ed-accordion {
    border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.ed-accordion__item {
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.ed-accordion__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 22px 4px;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 17px;
    color: var(--ed-navy);
}

.ed-accordion__icon {
    flex: none;
    font-size: 20px;
    color: var(--ed-muted);
    transition: transform 0.25s ease;
}

.ed-accordion__item[open] .ed-accordion__icon {
    transform: rotate(45deg);
}

.ed-accordion__a {
    padding: 0 4px 22px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--ed-muted);
}

/* ==========================================================================
   Form — Contact page
   ========================================================================== */
.ed-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ed-field label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: var(--ed-navy);
}

.ed-field input,
.ed-field textarea,
.ed-field select {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--ed-navy);
    background: var(--ed-white);
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 12px;
    padding: 13px 16px;
    outline: none;
    transition: border-color 0.2s ease;
}

.ed-field input:focus,
.ed-field textarea:focus,
.ed-field select:focus {
    border-color: var(--ed-navy);
}

/* ==========================================================================
   Dynamic Page UI Engine — small helper classes used only by
   template-parts/dynamic-layout-*.php. These style real HTML tags coming out
   of the_content() (headings, blockquotes, images) via wrapper/descendant
   selectors rather than injecting classes into that markup directly, so the
   original semantic tags (and anything wp_filter_content_tags added, like
   lazy-load/srcset attributes) are never rebuilt or stripped.
   ========================================================================== */
.ed-bento__tile figure {
    margin: 0;
    height: 100%;
}

.dyn-media-full,
.dyn-gallery-tile {
    overflow: hidden;
}

.dyn-media-full {
    aspect-ratio: 16 / 7;
}

.dyn-gallery-tile {
    aspect-ratio: 4 / 3;
}

.dyn-media-full img,
.dyn-media-full figure,
.dyn-gallery-tile img,
.dyn-gallery-tile figure {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    display: block;
}

.dyn-card-heading h2,
.dyn-card-heading h3,
.dyn-card-heading h4,
.dyn-card-heading h5,
.dyn-card-heading h6 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 22px;
    color: var(--ed-navy);
    margin: 0 0 8px;
}

.dyn-numbered-row__num {
    font-family: 'Instrument Serif', serif;
    font-size: 40px;
    line-height: 1;
    color: var(--ed-navy);
    opacity: 0.25;
    flex: none;
}

.dyn-centered-heading h2 {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 34px;
    letter-spacing: -0.6px;
    color: var(--ed-navy);
    margin: 0;
}

@media (min-width: 768px) {
    .dyn-centered-heading h2 {
        font-size: 44px;
    }
}

.dyn-pull-quote {
    font-family: 'Instrument Serif', serif;
    font-size: 28px;
    line-height: 1.35;
    color: var(--ed-navy);
}

.dyn-pull-quote blockquote {
    margin: 0;
    padding: 0;
    border: 0;
    font-style: italic;
}

.dyn-pull-quote--light,
.dyn-pull-quote--light blockquote {
    color: #fff;
}

.dyn-accordion-q h3,
.dyn-accordion-q h4,
.dyn-accordion-q h5,
.dyn-accordion-q h6 {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 17px;
    color: var(--ed-navy);
}

.ed-prose--light,
.ed-prose--light p {
    color: rgba(255, 255, 255, 0.85);
}

.ed-prose--light h2,
.ed-prose--light h3 {
    color: #fff;
}

.ed-prose--light a {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Stat strip — Dynamic Page UI Engine's 'stat' section type. Figures are
   real, extracted from the page's own text (see dynamic_page_extract_stats
   in dynamic-analyzer.php), never invented — this is purely presentation.
   ========================================================================== */
.dyn-stat__figure {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 40px;
    line-height: 1;
    color: var(--ed-navy);
}

.dyn-stat__caption {
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ed-muted);
}

@media (min-width: 768px) {
    .dyn-stat__figure {
        font-size: 52px;
    }
}

.dyn-stat__figure--hero {
    font-size: 72px;
    color: #fff;
}

@media (min-width: 768px) {
    .dyn-stat__figure--hero {
        font-size: 104px;
    }
}

.dyn-stat__figure--light {
    color: #fff;
    font-size: 36px;
}

.dyn-stat__caption--light {
    color: rgba(255, 255, 255, 0.75);
}

.dyn-stat--light {
    max-width: 220px;
}
