/* ========================================
   GENERAL STYLES
======================================== */

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

:root {
    /* Brand colors */
    --brand-navy: #123a63;
    --action-blue: #2563eb;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --background-soft: #f8fafc;

    /* Global dimensions */
    --site-max-width: 1200px;
    --reading-max-width: 800px;
    --page-margin: 4%;
    --mobile-page-margin: 16px;

    /* Navigation */
    --nav-height-desktop: 72px;
    --nav-height-tablet: 68px;
    --nav-height-mobile: 60px;

    /* Footer */
    --footer-padding-desktop: 48px;
    --footer-padding-tablet: 36px;
    --footer-padding-mobile: 28px;

    /* Advertising */
    --ad-sidebar-width: 160px;
    --ad-sidebar-height: 600px;
    --ad-mobile-width: 320px;
    --ad-mobile-height: 100px;
}

body {
    font-family: Arial, Helvetica, sans-serif;

    background-color: #ffffff;
    color: #1f2937;
}

main {
    width: 100%;
}


/* ========================================
   GLOBAL NAVBAR & MEGA MENUS
======================================== */
.site-header {
    position: relative;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}
.site-nav {
    width: min(94%, 1320px);
    margin-inline: auto;
    padding-block: clamp(14px, 2vw, 20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--text-dark);
}
.brand-logo, .brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; line-height: 1.1; }
.brand-tagline {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: clamp(8px, .8vw, 10px);
    font-weight: 400;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}
.nav-menu, .nav-mega-column ul { list-style: none; }
.nav-menu { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.nav-item { position: relative; }
.nav-item > a, .nav-parent > a {
    color: #374151;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}
.nav-item > a:hover, .nav-parent > a:hover,
.nav-item.is-current > a, .nav-item.is-current .nav-parent > a { color: var(--action-blue); }
.nav-parent { display: flex; align-items: center; gap: 2px; }
.nav-toggle {
    width: 32px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #64748b;
}

/* Hide dropdown arrows */
.nav-chevron {
    width: 8px;
    height: 8px;
    display: block;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
}

.nav-item-dropdown.is-open .nav-chevron { transform: rotate(225deg) translateY(-2px); }
.nav-dropdown {
    position: absolute;
    top: 100%;
    right: -35px;
    width: min(560px, 90vw);
    padding: 22px;
    display: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 16px 35px rgba(15,23,42,.12);
}
.nav-item-dropdown.is-open > .nav-dropdown { display: block; }
.nav-mega-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.nav-mega-column { min-width: 0; }
.nav-mega-column h2 {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    color: var(--brand-navy);
    font-size: 14px;
}
.nav-mega-column li + li { margin-top: 2px; }
.nav-mega-column li a {
    display: block;
    padding: 8px 6px;
    border-radius: 6px;
    color: #334155;
    font-size: 16px;
    line-height: 1.35;
    text-decoration: none;
}
.nav-mega-column li a:hover { color: var(--action-blue); background: #f8fafc; }


/* Mega menu action buttons */
.nav-mega-all {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 14px;

    background-color: #123a63;
    color: #ffffff;

    border-radius: 6px;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.nav-mega-all:hover {
    background-color: #1d4f80;
    color: #ffffff;
    transform: translateY(-2px);
}

.nav-mega-all:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
}


.nav-mega-note { margin-top: 12px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.mobile-menu-toggle { display: none; }
.site-nav a:focus-visible, .site-nav button:focus-visible {
    outline: 3px solid rgba(37,99,235,.35);
    outline-offset: 3px;
}

/* ========================================
   HERO
======================================== */

.hero {
    width: min(94%, 1320px);

    margin-inline: auto;

    padding-block:
        clamp(40px, 5vw, 75px)
        clamp(55px, 6vw, 85px);

    display: grid;

    grid-template-columns:
        minmax(0, 0.95fr)
        minmax(0, 1.25fr);

    align-items: center;

    gap: clamp(30px, 5vw, 80px);
}


/* ========================================
   HERO LEFT SIDE
======================================== */

.hero-content {
    width: 100%;
}

.hero-eyebrow {
    margin-bottom: 15px;

    color: var(--action-blue);

    font-size: clamp(11px, 1vw, 13px);
    font-weight: 700;

    letter-spacing: 1.5px;
}

.hero-content h1 {
    margin-bottom: clamp(18px, 2vw, 22px);

    color: var(--text-dark);

    font-size: clamp(40px, 5vw, 62px);
    line-height: 1.05;
}

.hero-content h1 span {
    color: var(--brand-navy);
}

.hero-description {
    max-width: 520px;

    margin-bottom: clamp(25px, 3vw, 32px);

    color: var(--text-muted);

    font-size: clamp(16px, 1.6vw, 19px);
    line-height: 1.55;
}


/* ========================================
   HERO BUTTONS
======================================== */

.hero-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 15px;
}

.hero-buttons a {
    padding:
        clamp(12px, 1.4vw, 14px)
        clamp(18px, 2vw, 24px);

    border-radius: 8px;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.primary-btn {
    background-color: var(--action-blue);
    color: #ffffff;
}

.primary-btn:hover {
    transform: translateY(-2px);

    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

.secondary-btn {
    background-color: #ffffff;

    border: 1px solid #dbe2ea;

    color: #334155;
}

.secondary-btn:hover {
    transform: translateY(-2px);

    border-color: #bfdbfe;

    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}


/* ========================================
   HERO CHART
======================================== */

.hero-chart-card {
    padding: clamp(22px, 2.6vw, 30px);
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: clamp(14px, 2vw, 22px);
}

.chart-eyebrow {
    margin-bottom: 7px;
    color: var(--action-blue) !important;
    font-size: 10px !important;
    font-weight: 700;
    letter-spacing: 1.3px;
}

.chart-header h2 {
    margin-bottom: 6px;
    color: var(--text-dark);
    font-size: clamp(19px, 2vw, 22px);
}

.chart-header p:not(.chart-eyebrow) {
    color: var(--text-muted);
    font-size: clamp(13px, 1.3vw, 14px);
}

.chart-value {
    padding: 10px 14px;
    background-color: #eff6ff;
    border-radius: 9px;
    white-space: nowrap;
}

.chart-value span {
    display: block;
    margin-bottom: 2px;
    color: #475569;
    font-size: 11px;
}

.chart-value strong {
    color: #1d4ed8;
    font-size: clamp(20px, 2vw, 23px);
}

.chart-summary {
    margin-top: clamp(18px, 2vw, 22px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.chart-summary > div {
    padding: 9px 12px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.chart-summary span {
    display: block;
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 10px;
}

.chart-summary strong {
    color: var(--text-dark);
    font-size: 14px;
}

.chart-image {
    height: clamp(205px, 23vw, 255px);
    margin-top: clamp(16px, 2vw, 22px);
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.growth-chart {
    width: 100%;
    height: 100%;
    display: block;
}

.chart-grid-line {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.chart-area {
    fill: rgba(37, 99, 235, 0.07);
}

.chart-line {
    fill: none;
    stroke: #2563eb;
    stroke-width: 3;
    stroke-linecap: round;
}

.chart-contribution-line {
    fill: none;
    stroke: #94a3b8;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-dasharray: 7 7;
}

.chart-point {
    fill: #2563eb;
    stroke: #ffffff;
    stroke-width: 3;
}

.chart-axis-label {
    fill: #94a3b8;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
}

.chart-legend {
    margin-top: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--text-muted);
    font-size: 11px;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.chart-legend-line {
    width: 22px;
    height: 0;
    display: inline-block;
    border-top: 2px solid;
}

.chart-legend-line-growth {
    border-color: #2563eb;
}

.chart-legend-line-contributions {
    border-color: #94a3b8;
    border-top-style: dashed;
}


/* ========================================
   PAGE HEADER
======================================== */

.page-header {
    width: min(94%, 1320px);

    margin-inline: auto;

    padding-block:
        clamp(50px, 6vw, 80px)
        clamp(35px, 4vw, 50px);
}

.page-header h1 {
    margin-bottom: 15px;

    color: var(--text-dark);

    font-size: clamp(34px, 4.5vw, 48px);
}

.page-header p {
    max-width: 650px;

    color: #475569;

    font-size: clamp(16px, 1.6vw, 18px);
    line-height: 1.6;
}


/* ========================================
   EXPLORE SECTION
======================================== */

.explore {
    padding-block: clamp(52px, 6vw, 76px);

    background-color: #f1f5f9;
}

.section-heading {
    width: min(94%, 1320px);

    margin-inline: auto;
    margin-bottom: clamp(30px, 4vw, 40px);
	text-align: center;
}

.section-heading > span {
    display: block;

    margin-bottom: 10px;

    color: var(--action-blue);

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 1.5px;
}

.section-heading h2 {
    margin-bottom: 12px;

    color: var(--text-dark);

    font-size: clamp(28px, 3.5vw, 36px);
}

.section-heading p {
    max-width: 650px;

    margin-inline: auto;

    color: var(--text-muted);

    font-size: clamp(15px, 1.4vw, 16px);
    line-height: 1.6;
}


/* ========================================
   EXPLORE CARDS
======================================== */

.explore-cards {
    width: min(94%, 1000px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 2vw, 24px);
}

.explore-card {
    min-height: 185px;
    padding: clamp(26px, 3vw, 34px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.explore-card:hover {
    transform: translateY(-3px);
    background-color: #ffffff;
    border-color: #93c5fd;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.explore-card:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.28);
    outline-offset: 3px;
}

.explore-card h3 {
    margin-bottom: 12px;
    color: var(--text-dark);
    font-size: clamp(20px, 2vw, 23px);
}

.explore-card p {
    max-width: 520px;
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.65;
}


/* ========================================
   GLOBAL FOOTER
======================================== */
.site-footer { background: #0f172a; color: #fff; }
.footer-container {
    width: min(94%, 1320px);
    margin-inline: auto;
    padding-block: clamp(35px, 4vw, 45px);
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(150px, 1fr));
    gap: clamp(24px, 4vw, 50px);
}
.footer-brand { max-width: 430px; }
.footer-brand-link {
    display: inline-block;
    margin-bottom: 12px;
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .5px;
    text-decoration: none;
}
.footer-brand p { color: #94a3b8; font-size: 14px; line-height: 1.65; }
.footer-column h2 { margin-bottom: 14px; color: #fff; font-size: 15px; }
.footer-column ul { list-style: none; }
.footer-column li + li { margin-top: 10px; }
.footer-column a { color: #cbd5e1; font-size: 14px; text-decoration: none; }
.footer-column a:hover, .footer-brand-link:hover { color: #93c5fd; }
.footer-bottom {
    width: min(94%, 1320px);
    margin-inline: auto;
    padding-block: 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 24px;
    border-top: 1px solid #1e293b;
}
.footer-bottom p { color: #94a3b8; font-size: 12px; line-height: 1.5; }

/* ========================================
   CALCULATOR HUB
======================================== */

.calculator-hub-header {
    width: min(90%, 760px);

    margin-inline: auto;

    padding-block:
        clamp(45px, 5vw, 65px)
        clamp(25px, 3vw, 35px);

    text-align: center;
}

.calculator-hub-header h1 {
    margin-bottom: 15px;

    color: var(--brand-navy);

    font-size: clamp(32px, 4vw, 44px);
    line-height: 1.15;
}

.calculator-hub-header > p:last-child {
    max-width: 620px;

    margin-inline: auto;

    color: var(--text-muted);

    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.6;
}

.calculator-hub {
    width: min(94%, 1100px);

    margin-inline: auto;

    padding-block:
        clamp(15px, 2vw, 20px)
        clamp(55px, 6vw, 80px);

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(280px, 1fr));

    gap: clamp(18px, 2vw, 22px);
}


/* ========================================
   CALCULATOR CARDS
======================================== */

.calculator-card {
    min-height: 190px;

    padding: clamp(22px, 2.5vw, 26px);

    background-color: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 12px;

    text-decoration: none;
}

.calculator-card-active {
    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.calculator-card-active:hover {
    transform: translateY(-3px);

    border-color: #bfdbfe;

    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.calculator-card-top {
    margin-bottom: 16px;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;

    gap: 15px;
}

.calculator-card h2 {
    color: var(--text-dark);

    font-size: clamp(18px, 2vw, 21px);
}

.calculator-card p {
    max-width: 450px;

    color: var(--text-muted);

    font-size: 14px;
    line-height: 1.6;
}


/* ========================================
   CALCULATOR CARD LINK
======================================== */

.calculator-card-link {
    display: inline-block;

    margin-top: 22px;

    color: var(--action-blue);

    font-size: 14px;
    font-weight: 700;
}

/* ========================================
   RESPONSIVE - STRUCTURAL CHANGES ONLY
======================================== */

@media (max-width: 1023px) {
    .hero { grid-template-columns: 1fr; }
    .site-nav { position: relative; padding-block: 12px; }
    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
        margin-left: auto;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        cursor: pointer;
    }
    .mobile-menu-toggle span {
        width: 22px;
        height: 2px;
        display: block;
        border-radius: 999px;
        background: #334155;
        transition: transform .2s ease, opacity .2s ease;
    }
    .site-nav.mobile-menu-open .mobile-menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .site-nav.mobile-menu-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
    .site-nav.mobile-menu-open .mobile-menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .nav-menu {
        position: absolute;
        z-index: 1001;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        display: none;
        padding: 10px 0 14px;
        background: #fff;
        border: 1px solid #e5e7eb;
        box-shadow: 0 12px 28px rgba(15,23,42,.08);
    }
    .site-nav.mobile-menu-open .nav-menu { display: block; }
    .nav-item > a, .nav-parent { min-height: 48px; padding: 12px 16px; }
    .nav-item > a { display: flex; align-items: center; }
    .nav-parent { justify-content: space-between; }
    .nav-parent > a { flex: 1; }
    .nav-toggle { width: 44px; height: 44px; flex: 0 0 44px; }
    .nav-dropdown {
        position: static;
        width: 100%;
        padding: 16px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: #f8fafc;
    }
    .nav-mega-grid { gap: 20px; }
    .explore-cards { width: min(92%, 680px); grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .nav-mega-grid { grid-template-columns: 1fr; }
    .brand-tagline { letter-spacing: .6px; }
    .footer-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-brand { grid-column: 1 / -1; }
}

/* ========================================
   EPINOZIA GLOBAL LAYOUT STANDARD
======================================== */

/* Shared alignment */

.site-nav,
.hero,
.page-header,
.section-heading,
.footer-container,
.footer-bottom {
    width: min(92%, var(--site-max-width));
    margin-inline: auto;
}

.explore-cards,
.calculator-hub {
    width: min(92%, var(--site-max-width));
    margin-inline: auto;
}

/* Navigation */

.site-nav {
    min-height: var(--nav-height-desktop);
}

/* Footer */

.footer-container {
    padding-block: var(--footer-padding-desktop);
}

/* Reading content utility */

.reading-container {
    width: min(92%, var(--reading-max-width));
    margin-inline: auto;
}

/* ========================================
   ADVERTISING LAYOUT
======================================== */

/* Main content with optional side advertising */

.calculator-hub-layout {
    width: calc(100% - 32px);
    max-width: 1600px;
    margin-inline: auto;

    display: grid;
    grid-template-columns:
        var(--ad-sidebar-width)
        minmax(0, 1200px)
        var(--ad-sidebar-width);

    justify-content: center;
    align-items: start;
    gap: 24px;
}

/* Side advertising */

.hub-side-ad {
    min-width: 0;
    min-height: var(--ad-sidebar-height);

    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding-top: 10px;

    color: #94a3b8;
    font-size: 10px;
    letter-spacing: 0.5px;
}

/* Optional in-content advertising slot */

.content-ad {
    width: 100%;
    max-width: 728px;
    margin: 32px auto;
    text-align: center;
}

/* ========================================
   LARGE SCREENS WITHOUT SIDE ADS
   1024px - 1599px
======================================== */

@media (max-width: 1599px) {

    .calculator-hub-layout {
        width: min(92%, var(--site-max-width));
        grid-template-columns: minmax(0, 1fr);
    }

    .hub-side-ad {
        display: none;
    }

}

/* ========================================
   MEDIUM SCREENS / TABLETS
   600px - 1023px
======================================== */

@media (min-width: 600px) and (max-width: 1023px) {

    .site-nav {
        min-height: var(--nav-height-tablet);
    }

    .footer-container {
        padding-block: var(--footer-padding-tablet);
    }

    .reading-container {
        width: min(92%, 720px);
    }

    .content-ad {
        max-width: 100%;
    }

}

/* ========================================
   SMALL SCREENS / PHONES
   BELOW 600px
======================================== */

@media (max-width: 599px) {

    .site-nav,
    .hero,
    .page-header,
    .section-heading,
    .explore-cards,
    .calculator-hub,
    .footer-container,
    .footer-bottom,
    .reading-container,
    .calculator-hub-layout {
        width: calc(100% - 32px);
        margin-inline: auto;
    }

    .site-nav {
        min-height: var(--nav-height-mobile);
    }

    .footer-container {
        padding-block: var(--footer-padding-mobile);
    }

    .footer-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .nav-mega-grid {
        grid-template-columns: 1fr;
    }

    .brand-tagline {
        letter-spacing: 0.6px;
    }

    .chart-summary {
        grid-template-columns: 1fr;
    }

    .chart-value {
        width: 100%;
    }

    .content-ad {
        width: 100%;
        max-width: var(--ad-mobile-width);
        margin: 28px auto;
    }

}

/* PHYSICS CALCULATOR INDEX - NO AD SIDEBARS */

.calculator-hub-index {
    width: min(92%, var(--site-max-width));
    grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 599px) {
    .calculator-hub-index {
        width: calc(100% - 32px);
    }
}


.chart-assumption {
    margin: 12px 0 18px;

    color: #64748b;

    font-size: 12px;
    line-height: 1.6;
}
