/* ============================================================
   roi-calculator.css — ROI Calculator page styles for MapOutcomes
   Mirrors the structure & tokens of pricing.css
   ============================================================ */

/* ---- Reset section defaults (match home.css / pricing.css) ---- */
section.roi-hero,
section.roi-section {
    border: none;
    box-shadow: none;
    border-radius: 0;
    margin-bottom: 0;
    overflow: visible;
    animation: none;
    padding: clamp(60px, 8vh, 100px) 0 clamp(48px, 6vh, 72px);
}

/* Grid overlay — light lines on dark (hero only) */
section.roi-hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 44px, rgba(255,255,255,0.02) 44px, rgba(255,255,255,0.02) 45px),
        repeating-linear-gradient(90deg, transparent, transparent 44px, rgba(255,255,255,0.02) 44px, rgba(255,255,255,0.02) 45px);
    background-size: auto;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}

/* ROI calculator section has grid overlay (white background) */

/* Section backgrounds */
section.roi-hero               { position: relative; background: linear-gradient(135deg, #0A7A8C 0%, #2D5F3F 100%); padding: 0; }
section.roi-calculator-section { position: relative; background: #ffffff; }
section.roi-cta                { position: relative; background: linear-gradient(135deg, #0A7A8C 0%, #2D5F3F 100%); overflow: hidden; }

/* Override global h2 margin */
.roi-section h2,
.roi-hero h2 {
    margin-top: 0;
}

/* ============================================================
   SHARED
   ============================================================ */

.roi-section {
    min-height: calc(100vh - 71px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    scroll-margin-top: 71px;
}

.roi-cta {
    justify-content: center;
}

.roi-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 48px);
    width: 100%;
}

/* ============================================================
   S1 — HERO
   ============================================================ */

.roi-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.roi-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 166, 97, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(10, 122, 140, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(45, 95, 63, 0.07) 0%, transparent 50%),
        linear-gradient(to bottom, rgba(5, 15, 20, 0.15) 0%, rgba(5, 15, 20, 0.00) 45%, rgba(5, 15, 20, 0.30) 100%);
    background-size: 200% 200%, 200% 200%, 200% 200%, 100% 100%;
    animation: meshDrift 30s ease-in-out infinite;
    pointer-events: none;
}

@keyframes meshDrift {
    0%   { background-position: 0% 50%, 100% 0%, 50% 100%, 0% 0%; }
    50%  { background-position: 100% 50%, 0% 100%, 100% 0%, 0% 0%; }
    100% { background-position: 0% 50%, 100% 0%, 50% 100%, 0% 0%; }
}

.roi-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: clamp(80px, 12vh, 140px) 24px clamp(60px, 8vh, 100px);
    max-width: 820px;
    width: 100%;
}

.roi-compass-bg {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    opacity: 0.07;
    pointer-events: none;
}

.roi-eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.8px;
    text-transform: uppercase;
    color: rgba(201, 166, 97, 0.95);
    margin-bottom: 16px;
}

.roi-h1 {
    font-family: var(--font-display);
    font-size: clamp(30px, 4.8vw, 58px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.5px;
    margin: 0 0 24px;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55);
    text-align: center;
}

.roi-hero-sub {
    font-family: var(--font-body);
    font-size: clamp(16px, 1.8vw, 20px);
    font-weight: 400;
    opacity: 0.82;
    line-height: 1.72;
    margin: 0 auto;
    max-width: 620px;
}

/* ============================================================
   S2 — CALCULATOR CARD
   ============================================================ */

.roi-calculator-section {
    padding-top: clamp(60px, 8vh, 100px);
    padding-bottom: clamp(48px, 6vh, 72px);
}

.roi-calculator-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #E8EBED;
    box-shadow: 0 12px 40px rgba(44, 53, 57, 0.10);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.roi-calculator-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.roi-inputs {
    padding: clamp(28px, 4vw, 48px);
    border-right: 1px solid #F0EDEA;
}

.roi-output {
    padding: clamp(28px, 4vw, 48px);
    background: #FAF8F3;
    display: flex;
    flex-direction: column;
}

.roi-panel-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: #2C3539;
    margin: 0 0 28px;
    letter-spacing: -0.2px;
}

/* ---- Input groups ---- */
.roi-input-group {
    margin-bottom: 24px;
}

.roi-input-group label {
    display: block;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: #2C3539;
    margin-bottom: 10px;
    letter-spacing: 0.1px;
}

.roi-hint {
    font-family: var(--font-body);
    font-size: 13px;
    color: #5A6C75;
    margin-top: 8px;
    line-height: 1.5;
}

.roi-hint-muted {
    color: #8A969D;
}

.roi-range-value {
    font-weight: 700;
    color: #0A7A8C;
}

/* ---- Select element ---- */
.roi-input-group select {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #E8EBED;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 15px;
    color: #2C3539;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%235A6C75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.roi-input-group select:focus {
    outline: none;
    border-color: #0A7A8C;
    box-shadow: 0 0 0 3px rgba(10, 122, 140, 0.12);
}

/* ---- Range sliders (custom styling) ---- */
.roi-input-group input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    padding: 0;
    margin: 6px 0 0;
    cursor: pointer;
    height: 22px;
}

.roi-input-group input[type="range"]:focus {
    outline: none;
}

/* WebKit track */
.roi-input-group input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: #E8EBED;
    border-radius: 3px;
}

/* WebKit thumb */
.roi-input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #0A7A8C;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(10, 122, 140, 0.40);
    cursor: pointer;
    margin-top: -7px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.roi-input-group input[type="range"]:hover::-webkit-slider-thumb,
.roi-input-group input[type="range"]:focus::-webkit-slider-thumb {
    transform: scale(1.15);
    box-shadow: 0 4px 14px rgba(10, 122, 140, 0.55);
}

/* Firefox track */
.roi-input-group input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: #E8EBED;
    border-radius: 3px;
    border: none;
}

/* Firefox thumb */
.roi-input-group input[type="range"]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #0A7A8C;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(10, 122, 140, 0.40);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.roi-input-group input[type="range"]:hover::-moz-range-thumb,
.roi-input-group input[type="range"]:focus::-moz-range-thumb {
    transform: scale(1.15);
    box-shadow: 0 4px 14px rgba(10, 122, 140, 0.55);
}

/* ============================================================
   OUTPUT PANEL
   ============================================================ */

.roi-output-headline {
    text-align: center;
    padding: 12px 0 24px;
    border-bottom: 1px solid #EFEAE0;
    margin-bottom: 24px;
}

.roi-output-label {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: #8A969D;
    margin-bottom: 10px;
}

.roi-savings {
    font-family: var(--font-display);
    font-size: clamp(40px, 5.5vw, 64px);
    font-weight: 800;
    color: #2D5F3F;
    line-height: 1.05;
    letter-spacing: -1px;
}

/* ---- Comparison block ---- */
.roi-comparison {
    background: #fff;
    border: 1px solid #EFEAE0;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 20px;
}

.roi-comparison h3 {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #0A7A8C;
    margin: 0 0 14px;
}

.roi-comparison-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 11px 0;
    border-bottom: 1px solid #F0EDEA;
    font-family: var(--font-body);
    font-size: 15px;
}

.roi-comparison-row:last-child {
    border-bottom: none;
    padding-top: 14px;
}

.roi-comparison-label {
    color: #5A6C75;
}

.roi-comparison-value {
    font-weight: 700;
    color: #2C3539;
    font-variant-numeric: tabular-nums;
}

.roi-comparison-value.roi-highlight {
    color: #2D5F3F;
    font-size: 17px;
}

/* ---- Break-even pill ---- */
.roi-break-even {
    background: rgba(10, 122, 140, 0.08);
    border: 1px solid rgba(10, 122, 140, 0.18);
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
    margin-bottom: 24px;
}

.roi-break-even-label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #0A7A8C;
    margin-bottom: 6px;
    opacity: 0.85;
}

.roi-break-even-value {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: #0A7A8C;
    letter-spacing: -0.3px;
}

/* ---- Inline CTA inside output panel ---- */
.roi-cta-row {
    margin-top: auto;
    text-align: center;
    padding-top: 8px;
}

.btn-roi-primary {
    display: inline-block;
    background: #C9A661;
    color: #fff;
    padding: 14px 34px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 16px rgba(201, 166, 97, 0.40);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-roi-primary:hover {
    background: #b8954e;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(201, 166, 97, 0.50);
    color: #fff;
    text-decoration: none;
}

.roi-disclaimer {
    text-align: center;
    font-family: var(--font-body);
    font-size: 13px;
    color: #8A969D;
    margin: 32px auto 0;
    max-width: 720px;
    line-height: 1.65;
    position: relative;
    z-index: 1;
}

/* ============================================================
   S3 — CTA  (reuse btn-hero-primary / btn-hero-ghost from pricing.css)
   ============================================================ */

.roi-cta {
    text-align: center;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.roi-cta .section-header {
    text-align: center;
    margin-bottom: clamp(32px, 2vw, 50px);
}

.roi-cta .cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* CTA button styles — duplicate from pricing.css so this page is self-contained.
   If a shared utility module is introduced later, move these to utilities/. */
.roi-cta .btn-hero-primary {
    background: #C9A661;
    color: #fff;
    padding: 16px 44px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 20px rgba(201, 166, 97, 0.45);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.roi-cta .btn-hero-primary:hover {
    background: #b8954e;
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(201, 166, 97, 0.55);
    color: #fff;
    text-decoration: none;
}

.roi-cta .btn-hero-ghost {
    background: transparent;
    color: #fff;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.60);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.2px;
    transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.roi-cta .btn-hero-ghost:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: #fff;
    transform: translateY(-3px);
    color: #fff;
    text-decoration: none;
}

/* ============================================================
   SCROLL HINTS — duplicated from pricing.css for self-containment
   ============================================================ */

.roi-hero .scroll-hint,
.roi-section .scroll-hint {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: scrollBounce 2.4s ease-in-out infinite;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.roi-hero .scroll-hint:hover,
.roi-section .scroll-hint:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.roi-section .scroll-hint--on-light {
    color: rgba(10, 122, 140, 0.6);
}
.roi-section .scroll-hint--on-light .scroll-arrow {
    border-right-color: rgba(10, 122, 140, 0.6);
    border-bottom-color: rgba(10, 122, 140, 0.6);
}
.roi-section .scroll-hint--on-light:hover {
    color: rgba(10, 122, 140, 1);
    text-decoration: none;
}
.roi-section .scroll-hint--on-light:hover .scroll-arrow {
    border-right-color: rgba(10, 122, 140, 1);
    border-bottom-color: rgba(10, 122, 140, 1);
}

.roi-hero .scroll-arrow,
.roi-section .scroll-arrow {
    display: block;
    width: 18px;
    height: 18px;
    border-right: 2px solid rgba(255, 255, 255, 0.65);
    border-bottom: 2px solid rgba(255, 255, 255, 0.65);
    transform: rotate(45deg);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.65; }
    50%       { transform: translateX(-50%) translateY(9px); opacity: 1; }
}

/* ============================================================
   SCROLL ANIMATIONS (mirror pricing.css)
   ============================================================ */

.roi-hero .fade-up,
.roi-section .fade-up {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.roi-hero .fade-up.visible,
.roi-section .fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.roi-section .fade-up:nth-child(2) { transition-delay: 0.08s; }
.roi-section .fade-up:nth-child(3) { transition-delay: 0.16s; }
.roi-section .fade-up:nth-child(4) { transition-delay: 0.24s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 860px) {
    .roi-calculator-body {
        grid-template-columns: 1fr;
    }

    .roi-inputs {
        border-right: none;
        border-bottom: 1px solid #F0EDEA;
    }
}

@media (max-width: 640px) {
    .roi-hero-content {
        padding: 60px 20px 48px;
    }

    .roi-inputs,
    .roi-output {
        padding: 24px 22px;
    }

    .roi-savings {
        font-size: 38px;
    }

    .roi-comparison {
        padding: 18px 18px;
    }

    .roi-cta .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .roi-cta .btn-hero-primary,
    .roi-cta .btn-hero-ghost {
        width: 100%;
        max-width: 320px;
        text-align: center;
    }
}
