/* ==========================================================================
   Deacons Publishers — header + hero
   Brand palette from the existing site:
     #cc6600  primary orange
     #faf9f6  warm paper background
   ========================================================================== */

:root {
    --brand:        #cc6600;
    --brand-dark:   #a85200;
    --brand-tint:   #fff4e8;
    --ink:          #171719;
    --ink-soft:     #5c5f66;
    --paper:        #faf9f6;
    --line:         #e8e6e1;
    --card:         #ffffff;

    --radius-pill:  999px;
    --radius-lg:    22px;
    --radius-md:    14px;

    --shadow-card:  0 10px 30px -12px rgba(23, 23, 25, .18);
    --shadow-float: 0 18px 40px -16px rgba(23, 23, 25, .22);
    --shadow-mega:  0 24px 60px -18px rgba(23, 23, 25, .26);

    --container:    1240px;
    --gutter:       24px;

    --font: "Inter", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

body.dp-redesign {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

/* Shared centred container — everything sits inside this, so nothing ever
   touches the edge of the screen. */
.dp-container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ----------------------------------------------------------------- rails  */

/* Two vertical lines marking the container edges, running the full height of
   the page. Fixed rather than absolute so they never end mid-scroll. */
.dp-rails {
    position: fixed;
    inset: 0;
    pointer-events: none;
    /* Above the sections — tinted bands and the dark footer would otherwise
       paint over the lines and break them up. Still below the header. */
    z-index: 5;
}

.dp-rails-inner {
    width: 100%;
    max-width: var(--container);
    height: 100%;
    margin: 0 auto;
    /* Neutral grey with alpha, so the same line reads on the light sections
       and on the dark footer. */
    border-left: 1px solid rgba(140, 140, 150, .22);
    border-right: 1px solid rgba(140, 140, 150, .22);
}

/* Page content sits below the rails but above the page background. */
.dp-hero,
.dp-stage,
.dp-section,
.dp-footer { position: relative; z-index: 1; }

/* The header stays on top of everything. */
.dp-headerbar { position: sticky; z-index: 60; }

/* ---------------------------------------------------------------- header  */

/* Pinned to the top, inset from both edges so it stops where the content
   stops rather than spanning the whole viewport. */
.dp-headerbar {
    position: sticky;
    top: 0;
    z-index: 60;
    padding: 16px 0 12px;
}

/* A translucent strip behind the bar keeps content from showing through as
   it scrolls under, without the bar itself touching the screen edges. */
.dp-headerbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--paper);
    opacity: 0;
    transition: opacity .2s ease;
}

.dp-headerbar.is-stuck::before { opacity: .92; backdrop-filter: blur(8px); }

.dp-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    height: 66px;
    padding: 0 10px 0 18px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: box-shadow .2s ease;
}

.dp-headerbar.is-stuck .dp-header {
    box-shadow: 0 10px 30px -16px rgba(23, 23, 25, .32);
}

.dp-logo {
    display: inline-flex;
    align-items: center;
    flex: none;
    text-decoration: none;
}

.dp-logo img {
    height: 34px;
    width: auto;
    display: block;
}

/* Centred nav ------------------------------------------------------------ */

/* The nav group is the only thing carrying a background — a single pill
   holding all the links, as in the reference. */
.dp-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0 auto;
    padding: 5px;
    background: #eef0f4;
    border-radius: var(--radius-pill);
}

.dp-nav-item { position: relative; }

.dp-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    font-size: 14.5px;
    font-weight: 500;
    color: #4a4d55;
    text-decoration: none;
    white-space: nowrap;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;

    /* A parent with a panel but no page of its own is a <button>, so the
       browser's button styling has to be undone to match the links. */
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.dp-nav-link:hover,
.dp-nav-link.is-active,
.dp-nav-item:hover > .dp-nav-link {
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 1px 3px rgba(23, 23, 25, .1);
}

/* The caret is deliberately STATIC — it never rotates or moves on hover. */
.dp-caret {
    width: 11px;
    height: 11px;
    flex: none;
    opacity: .55;
}

/* Mega menu -------------------------------------------------------------- */

.dp-mega {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 12px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, visibility .16s ease;
    z-index: 70;
}

.dp-nav-item:hover .dp-mega,
.dp-nav-item:focus-within .dp-mega {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dp-mega-inner {
    display: flex;
    gap: 34px;
    padding: 26px 30px;
    min-width: 330px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-mega);
}

.dp-mega-col { min-width: 230px; }

/* Title case, so no letter-spacing padding out capitals. */
.dp-mega-heading {
    margin: 0 0 12px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0;
    color: #9a968f;
}

.dp-mega-link {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 9px 10px;
    margin: 0 -10px;
    border-radius: 11px;
    text-decoration: none;
    transition: background .15s ease;
}

.dp-mega-link:hover { background: #f7f5f1; }

.dp-mega-ico {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--brand-tint);
    color: var(--brand-dark);
}

.dp-mega-ico .dp-i { width: 17px; height: 17px; }

.dp-mega-text { display: block; }

.dp-mega-text b {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.35;
}

.dp-mega-text small {
    display: block;
    margin-top: 2px;
    font-size: 12.3px;
    line-height: 1.45;
    color: var(--ink-soft);
}

.dp-ext { width: 11px; height: 11px; flex: none; opacity: .5; }

/* Buttons ---------------------------------------------------------------- */

.dp-header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: none;
}

/* Fully rounded, never flat. */
.dp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    font-size: 14.2px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.dp-btn:hover  { transform: translateY(-1px); }
.dp-btn:active { transform: translateY(1px); }

/* The arrow nudges on hover; icons appear only on buttons. */
.dp-arrow {
    width: 13px;
    height: 13px;
    flex: none;
    transition: transform .2s ease;
}
.dp-btn:hover .dp-arrow { transform: translate(2px, -2px); }

.dp-play {
    width: 15px;
    height: 15px;
    flex: none;
}

/* Transparent, bordered — carries the Play Store mark. */
.dp-btn-ghost {
    background: transparent;
    border-color: #dcdfe4;
    color: var(--ink);
}
.dp-btn-ghost:hover { border-color: var(--ink); background: rgba(23, 23, 25, .03); }

/* Filled, sits last in the row. */
.dp-btn-solid {
    background: var(--brand);
    color: #fff;
}
.dp-btn-solid:hover { background: var(--brand-dark); }

/* Staggered menu icon: short, long, short. No circle around it. */
.dp-burger {
    display: none;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
}

/* The CTA block only exists for the open mobile panel. */
.dp-nav-cta { display: none; }

.dp-burger span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: width .22s ease, transform .28s ease, opacity .18s ease, margin .22s ease;
}

.dp-burger span:nth-child(1) { width: 12px; margin-right: 2px; }
.dp-burger span:nth-child(2) { width: 18px; }
.dp-burger span:nth-child(3) { width: 12px; margin-right: 2px; }

/* Open state folds the bars into a cross, so the same control closes it.
   Bar centres sit 7px apart (2px tall + 5px gap). */
.dp-burger[aria-expanded="true"] span:nth-child(1) {
    width: 20px;
    margin-right: 0;
    transform: translateY(7px) rotate(45deg);
}
.dp-burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(.3);
}
.dp-burger[aria-expanded="true"] span:nth-child(3) {
    width: 20px;
    margin-right: 0;
    transform: translateY(-7px) rotate(-45deg);
}

/* ------------------------------------------------------------------ hero  */

.dp-hero {
    position: relative;
    text-align: center;
    padding: 58px var(--gutter) 0;
}

/* Transparent, with a soft outline rather than a filled pill. */
.dp-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 18px;
    margin-bottom: 24px;
    border-radius: var(--radius-pill);
    background: transparent;
    border: 1px solid rgba(23, 23, 25, .14);
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -.005em;
}

.dp-hero h1 {
    margin: 0 auto 18px;
    max-width: 20ch;
    font-size: clamp(34px, 4.4vw, 58px);
    line-height: 1.08;
    letter-spacing: -.032em;
    font-weight: 700;
}

.dp-hero h1 em {
    font-style: normal;
    color: var(--brand);
}

/* Held to roughly two lines on desktop. */
.dp-hero-sub {
    margin: 0 auto 28px;
    max-width: 68ch;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-soft);
}

.dp-hero-cta {
    display: flex;
    justify-content: center;
    gap: 11px;
    flex-wrap: wrap;
}

.dp-hero-cta .dp-btn { padding: 13px 26px; font-size: 15px; }

/* ---------------------------------------------------- globe + float cards */

.dp-stage {
    position: relative;
    width: 100%;
    max-width: var(--container);
    margin: 4px auto 0;
    padding: 0 var(--gutter);
}

.dp-globe {
    display: block;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    height: auto;
}

.dp-float {
    position: absolute;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-float);
    padding: 13px 15px;
    text-align: left;
    /* Drift is driven by GSAP in assets/js/redesign.js — a CSS keyframe here
       would compete for the same transform property. */
}

.dp-float-activity { top: 10%; left: 0;   width: 252px; }
.dp-float-stat     { top: 42%; left: 2%;  width: 178px; }
.dp-float-hero     { top: 63%; left: 21%; width: 236px; }
.dp-float-chart    { top: 14%; right: 0;  width: 220px; }
.dp-float-gain     { top: 58%; right: 2%; width: 204px; }

.dp-float-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-soft);
    margin: 0 0 9px;
}

.dp-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 9px;
    font-size: 11.5px;
    line-height: 1.32;
    color: var(--ink);
}
.dp-row:last-child { margin-bottom: 0; }

.dp-ico {
    width: 21px;
    height: 21px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    flex: none;
    font-size: 11px;
    background: var(--brand-tint);
    color: var(--brand-dark);
}
.dp-ico.is-green { background: #e8f6ec; color: #1c7a3c; }
.dp-ico.is-blue  { background: #eaf1fd; color: #2a5bc7; }

.dp-metric {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.1;
}
.dp-metric-label {
    font-size: 11px;
    color: var(--ink-soft);
    margin-top: 3px;
}

.dp-delta {
    display: inline-block;
    margin-top: 7px;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    background: #e8f6ec;
    color: #1c7a3c;
    font-size: 10.5px;
    font-weight: 700;
}

.dp-bars {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    height: 54px;
    margin-top: 10px;
}
.dp-bars div {
    flex: 1;
    border-radius: 4px 4px 2px 2px;
    background: var(--brand);
    opacity: .28;
}
.dp-bars div.is-on { opacity: 1; }

.dp-bar-labels { display: flex; gap: 7px; margin-top: 6px; }
.dp-bar-labels span {
    flex: 1;
    text-align: center;
    font-size: 9px;
    color: var(--ink-soft);
}

/* ---------------------------------------------------------------- mobile  */


@media (max-width: 1240px) {
    .dp-nav-link { padding: 9px 13px; font-size: 14px; }
    .dp-header { padding: 0 10px 0 14px; }
}

@media (max-width: 1100px) {
    .dp-float-activity, .dp-float-chart { width: 206px; }
    .dp-float-hero { left: 18%; width: 212px; }
    .dp-float-stat, .dp-float-gain { width: 168px; }
}

@media (max-width: 980px) {
    .dp-float { display: none; }
}

/* ---------------------------------------------------------------- tablet  */


@media (max-width: 900px) {
    .dp-nav { display: none; }
    .dp-burger { display: flex; }

    /* "Get Prep50" stays in the bar; "Contact us" moves into the panel. */
    .dp-header-actions .dp-btn-contact { display: none; }
    .dp-header-actions .dp-btn-ghost { padding: 9px 15px; font-size: 13.4px; }

    .dp-header { height: 62px; padding: 0 12px 0 14px; gap: 10px; }
    .dp-hero { padding-top: 34px; }

    /* Body scroll is frozen while the panel covers the screen. */
    body.dp-menu-open { overflow: hidden; }

    /* The panel is fixed at z-index 55 inside the header's stacking context,
       so the logo and the close button must be lifted above it or they end
       up buried and the menu cannot be closed. */
    .dp-logo,
    .dp-header-actions { position: relative; z-index: 56; }

    /* With the panel behind them, the header card itself would show as a
       half-covered rectangle — drop it while the menu is open. */
    body.dp-menu-open .dp-header {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }

    /* Full-screen menu, scrollable, sitting under the header bar. */
    .dp-nav.is-open {
        display: block;
        position: fixed;
        inset: 0;
        margin: 0;
        padding: 88px var(--gutter) 40px;
        background: var(--paper);
        border-radius: 0;
        box-shadow: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        z-index: 55;
    }

    /* No pill behind the links here — it read as a stray container. */
    .dp-nav.is-open .dp-nav-item { border-bottom: 1px solid var(--line); }

    .dp-nav.is-open .dp-nav-link {
        display: flex;
        justify-content: flex-start;
        width: 100%;
        padding: 16px 2px;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        font-size: 17px;
        font-weight: 600;
        color: var(--ink);
    }

    .dp-nav.is-open .dp-nav-link.is-active { color: var(--brand); }
    .dp-nav.is-open .dp-caret { margin-left: auto; opacity: .4; }

    /* Panels expand inline as accordions, collapsed until tapped. */
    .dp-nav.is-open .dp-mega {
        position: static;
        transform: none;
        display: block;
        padding: 0;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        max-height: 0;
        overflow: hidden;
        transition: max-height .32s ease, padding-bottom .32s ease;
    }

    .dp-nav.is-open .dp-nav-item.is-expanded > .dp-mega {
        max-height: 720px;
        padding-bottom: 16px;
    }

    /* The caret stays static; the expanded row is marked by its colour. */
    .dp-nav.is-open .dp-nav-item.is-expanded > .dp-nav-link { color: var(--brand); }
    .dp-nav.is-open .dp-nav-item.is-expanded > .dp-nav-link .dp-caret { opacity: .9; }
    .dp-nav.is-open .dp-mega-inner {
        flex-direction: column;
        gap: 18px;
        min-width: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    .dp-nav.is-open .dp-mega-col { min-width: 0; }
    .dp-nav.is-open .dp-mega-heading { margin-bottom: 8px; }
    .dp-nav.is-open .dp-mega-link { margin: 0; padding: 9px 0; }

    .dp-nav-cta {
        display: grid;
        gap: 10px;
        margin-top: 26px;
    }
    .dp-nav-cta .dp-btn { width: 100%; padding: 14px 20px; font-size: 15px; }
}

/* ---------------------------------------------------------------- mobile  */

@media (max-width: 768px) {
    /* Rails would land on the screen edge at this width, so they come off. */
    .dp-rails { display: none; }
}

@media (max-width: 560px) {
    :root { --gutter: 14px; }

    .dp-headerbar { padding: 10px 0 8px; }
    .dp-header { height: 58px; border-radius: 10px; padding: 0 10px 0 12px; }
    .dp-logo img { height: 26px; }
    .dp-nav.is-open { padding-top: 78px; }

    .dp-hero { padding-top: 26px; }

    .dp-eyebrow { margin-bottom: 18px; padding: 6px 14px; font-size: 11.5px; }

    .dp-hero h1 { font-size: clamp(29px, 8.4vw, 38px); max-width: 16ch; }

    .dp-hero-sub {
        font-size: 14.6px;
        line-height: 1.58;
        max-width: 40ch;
        margin-bottom: 22px;
    }

    /* Side by side and sized to their text, not two full-width slabs. */
    .dp-hero-cta { flex-direction: row; gap: 8px; }
    .dp-hero-cta .dp-btn {
        width: auto;
        flex: 0 1 auto;
        padding: 11px 17px;
        font-size: 13.6px;
    }

    .dp-stage { margin-top: 10px; }
}

@media (max-width: 400px) {
    .dp-header-actions .dp-btn-ghost { padding: 8px 12px; font-size: 12.6px; }
}

@media (max-width: 360px) {
    .dp-hero-cta { flex-direction: column; align-items: stretch; }
    .dp-hero-cta .dp-btn { width: 100%; }
}
