/* ======================================================
   WhatHappensIf.net
   Main Stylesheet
   ====================================================== */


/* ---------- Brand variables ---------- */

:root {

    --navy: #082f49;
    --teal-dark: #064e5a;
    --teal: #087f8c;

    --yellow: #fbbf24;

    --text: #102a43;
    --muted: #5c7083;

    --background: #ffffff;
    --soft-background: #f5f8fa;

    --border: #dbe5ea;

    --max-width: 1200px;

    --radius: 12px;

}


/* ---------- Reset ---------- */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--background);
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}


/* ---------- Accessibility ---------- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


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

.site-header {
    background: linear-gradient(
        110deg,
        var(--teal-dark),
        var(--navy)
    );

    color: #ffffff;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;

    min-height: 86px;

    padding: 12px 24px;

    display: flex;
    align-items: center;
    gap: 32px;
}


/* ---------- Logo ---------- */

.site-logo {
    display: flex;
    flex-direction: column;

    text-decoration: none;

    flex-shrink: 0;
}

.logo-main {
    font-size: 31px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}

.logo-main span,
.footer-logo span {
    color: var(--yellow);
}

.logo-tagline {
    margin-top: 5px;
    font-size: 14px;
    opacity: 0.92;
}


/* ---------- Navigation ---------- */

.main-nav {
    margin-left: auto;

    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: var(--yellow);
}


/* ---------- Search ---------- */

.header-search {
    display: flex;

    width: 290px;

    background: #ffffff;
    border-radius: 999px;
    overflow: hidden;
}

.header-search input {
    width: 100%;
    min-width: 0;

    border: 0;
    outline: 0;

    padding: 11px 15px;

    font-size: 14px;
}

.header-search button {
    border: 0;

    padding: 0 17px;

    background: var(--yellow);
    color: var(--navy);

    font-weight: 700;
    cursor: pointer;
}


/* ---------- Mobile menu button ---------- */

.menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    padding: 8px;

    border: 0;
    background: transparent;

    cursor: pointer;
}

.menu-toggle span {
    display: block;

    height: 2px;

    margin: 6px 0;

    background: #ffffff;
}


/* ======================================================
   MAIN CONTENT
   ====================================================== */

#main-content {
    min-height: 60vh;
}


/* ---------- Reusable container ---------- */

.container {
    width: min(
        calc(100% - 48px),
        var(--max-width)
    );

    margin-inline: auto;
}


/* ======================================================
   FOOTER
   ====================================================== */

.site-footer {
    margin-top: 70px;

    background: linear-gradient(
        110deg,
        var(--teal-dark),
        var(--navy)
    );

    color: #ffffff;
}

.footer-inner {
    max-width: var(--max-width);

    margin: 0 auto;
    padding: 38px 24px 24px;
}

.footer-logo {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.footer-brand p {
    margin: 5px 0 20px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-nav a {
    color: #ffffff;
    text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
    color: var(--yellow);
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 20px;

    border-top: 1px solid rgba(255,255,255,0.18);

    font-size: 14px;
    opacity: 0.85;
}
/* ======================================================
   HOMEPAGE
   ====================================================== */


/* ---------- Hero ---------- */

.home-hero {
    position: relative;
    overflow: hidden;

    background:
        linear-gradient(
            115deg,
            #073f4c 0%,
            #075b65 48%,
            #082f49 100%
        );

    color: #ffffff;
}

.hero-inner {
    min-height: 540px;

    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    align-items: center;
    gap: 60px;

    padding-top: 70px;
    padding-bottom: 70px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-eyebrow,
.section-kicker {
    margin: 0 0 12px;

    color: #c88900;

    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

.home-hero .hero-eyebrow {
    color: var(--yellow);
}

.hero-content h1 {
    max-width: 700px;

    margin: 0;

    font-size: clamp(50px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -3px;
}

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

.hero-intro {
    max-width: 650px;

    margin: 24px 0 0;

    font-size: 21px;
    line-height: 1.6;

    color: rgba(255,255,255,0.92);
}


/* ---------- Hero search ---------- */

.hero-search {
    max-width: 680px;

    margin-top: 32px;

    display: flex;

    padding: 6px;

    background: #ffffff;

    border-radius: 10px;

    box-shadow:
        0 16px 35px rgba(0,0,0,0.18);
}

.hero-search input {
    flex: 1;
    min-width: 0;

    padding: 15px 17px;

    border: 0;
    outline: 0;

    font-size: 16px;
    color: var(--text);
}

.hero-search button {
    min-width: 110px;

    padding: 0 22px;

    border: 0;
    border-radius: 7px;

    background: var(--yellow);
    color: var(--navy);

    font-weight: 800;
    font-size: 15px;

    cursor: pointer;
}

.hero-search button:hover,
.hero-search button:focus-visible {
    filter: brightness(0.96);
}

.hero-example {
    margin: 14px 0 0;

    font-size: 14px;

    color: rgba(255,255,255,0.72);
}


/* ---------- Hero graphic ---------- */

.hero-visual {
    position: relative;

    min-height: 360px;

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

.hero-question-mark {
    position: relative;
    z-index: 3;

    width: 230px;
    height: 230px;

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

    border-radius: 50%;

    background: var(--yellow);

    color: var(--navy);

    font-size: 165px;
    font-weight: 900;
    line-height: 1;

    box-shadow:
        0 25px 60px rgba(0,0,0,0.22);
}

.question-orbit {
    position: absolute;

    border: 1px solid rgba(255,255,255,0.17);
    border-radius: 50%;
}

.orbit-one {
    width: 330px;
    height: 330px;
}

.orbit-two {
    width: 430px;
    height: 430px;
}

.floating-question {
    position: absolute;

    color: rgba(255,255,255,0.18);

    font-weight: 900;
}

.fq-one {
    top: 25px;
    right: 20px;
    font-size: 75px;
}

.fq-two {
    bottom: 15px;
    left: 20px;
    font-size: 52px;
}

.fq-three {
    top: 90px;
    left: 0;
    font-size: 34px;
}


/* ======================================================
   HOME SECTIONS
   ====================================================== */

.home-section {
    padding: 88px 0;
}

.section-heading {
    max-width: 720px;

    margin: 0 auto 42px;

    text-align: center;
}

.section-heading-left {
    margin-left: 0;
    text-align: left;
}

.section-heading h2,
.how-heading h2,
.home-cta h2 {
    margin: 0;

    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -1.5px;

    color: var(--navy);
}

.section-heading > p:last-child,
.how-heading > p:last-child {
    margin: 16px 0 0;

    color: var(--muted);

    font-size: 18px;
}


/* ======================================================
   CATEGORY CARDS
   ====================================================== */

.category-section {
    background: #ffffff;
}

.category-grid {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 20px;
}

.category-card {
    position: relative;

    min-height: 245px;

    padding: 27px;

    display: flex;
    flex-direction: column;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: #ffffff;

    text-decoration: none;

    box-shadow:
        0 8px 24px rgba(16,42,67,0.06);

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

.category-card:hover,
.category-card:focus-visible {
    transform: translateY(-4px);

    box-shadow:
        0 16px 34px rgba(16,42,67,0.12);
}

.category-card:nth-child(1),
.category-card:nth-child(2),
.category-card:nth-child(3) {
    grid-column: span 2;
}

.category-card:nth-child(4) {
    grid-column: 2 / span 2;
}

.category-card:nth-child(5) {
    grid-column: 4 / span 2;
}

.category-icon {
    width: 52px;
    height: 52px;

    margin-bottom: 22px;

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

    border-radius: 12px;

    font-size: 28px;
    font-weight: 800;
}

.category-big .category-icon {
    background: #e7f3f5;
    color: #087f8c;
}

.category-cars .category-icon {
    background: #fff4d4;
    color: #9b6800;
}

.category-home .category-icon {
    background: #edf5e9;
    color: #4d7443;
}

.category-travel .category-icon {
    background: #e9effa;
    color: #3d6297;
}

.category-work .category-icon {
    background: #f3eafa;
    color: #76528f;
}

.category-card h3 {
    margin: 0;

    color: var(--navy);

    font-size: 21px;
}

.category-card p {
    margin: 10px 0 20px;

    color: var(--muted);

    line-height: 1.6;
}

.category-link {
    margin-top: auto;

    color: var(--teal);

    font-weight: 700;
}


/* ======================================================
   QUESTION CARDS
   ====================================================== */

.explore-section {
    background: var(--soft-background);
}

.question-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 22px;
}

.question-card {
    overflow: hidden;

    display: flex;
    flex-direction: column;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    background: #ffffff;

    box-shadow:
        0 8px 22px rgba(16,42,67,0.05);
}

.question-card-top {
    min-height: 105px;

    padding: 20px;

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

    color: #ffffff;
}

.question-card-top span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.question-card-top strong {
    font-size: 54px;
    line-height: 1;

    opacity: 0.75;
}

.question-space {
    background: #164e63;
}

.question-car {
    background: #916a12;
}

.question-home {
    background: #55754b;
}

.question-travel {
    background: #486b9a;
}

.question-card-body {
    flex: 1;

    padding: 25px;

    display: flex;
    flex-direction: column;
}

.question-card h3 {
    margin: 0;

    font-size: 21px;
    line-height: 1.35;
}

.question-card h3 a {
    color: var(--navy);
    text-decoration: none;
}

.question-card h3 a:hover,
.question-card h3 a:focus-visible {
    color: var(--teal);
}

.question-card p {
    margin: 14px 0 22px;

    color: var(--muted);

    font-size: 15px;
}

.read-question {
    margin-top: auto;

    color: var(--teal);

    text-decoration: none;

    font-weight: 700;
}


/* ======================================================
   HOW IT WORKS
   ====================================================== */

.how-section {
    background: #ffffff;
}

.how-inner {
    display: grid;

    grid-template-columns:
        0.8fr 1.2fr;

    gap: 70px;

    align-items: start;
}

.how-heading {
    max-width: 460px;
}

.how-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;
}

.how-item {
    padding: 28px 24px;

    border-top: 3px solid var(--yellow);

    background: var(--soft-background);

    border-radius: 0 0 var(--radius) var(--radius);
}

.how-number {
    color: var(--teal);

    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
}

.how-item h3 {
    margin: 12px 0 8px;

    color: var(--navy);

    font-size: 20px;
}

.how-item p {
    margin: 0;

    color: var(--muted);

    font-size: 15px;
}


/* ======================================================
   HOME CTA
   ====================================================== */

.home-cta {
    padding: 65px 0;

    background: #eaf3f4;
}

.home-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 40px;
}

.home-cta h2 {
    font-size: clamp(29px, 4vw, 40px);
}

.home-cta p:not(.section-kicker) {
    margin: 10px 0 0;

    color: var(--muted);
}

.cta-button {
    flex-shrink: 0;

    padding: 14px 22px;

    border-radius: 8px;

    background: var(--navy);
    color: #ffffff;

    text-decoration: none;
    font-weight: 700;
}

.cta-button:hover,
.cta-button:focus-visible {
    background: var(--teal-dark);
}


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

@media (max-width: 900px) {

    .header-inner {
        flex-wrap: wrap;
        gap: 14px;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .main-nav {
        display: none;

        order: 4;
        width: 100%;

        flex-direction: column;
        align-items: stretch;

        gap: 0;
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        padding: 13px 0;

        border-top:
            1px solid rgba(255,255,255,0.15);
    }

    .header-search {
        order: 5;
        width: 100%;
    }

}


@media (max-width: 560px) {

    .header-inner {
        padding-inline: 18px;
    }

    .logo-main {
        font-size: 25px;
    }

    .logo-tagline {
        font-size: 12px;
    }

    .container {
        width: min(
            calc(100% - 32px),
            var(--max-width)
        );
    }

}
/* ======================================================
   HOMEPAGE RESPONSIVE
   ====================================================== */

@media (max-width: 1000px) {

    .hero-inner {
        grid-template-columns: 1fr 0.55fr;
        gap: 30px;
    }

    .hero-question-mark {
        width: 180px;
        height: 180px;

        font-size: 125px;
    }

    .orbit-one {
        width: 260px;
        height: 260px;
    }

    .orbit-two {
        width: 330px;
        height: 330px;
    }

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

    .how-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

}


@media (max-width: 760px) {

    .home-section {
        padding: 65px 0;
    }

    .hero-inner {
        min-height: auto;

        grid-template-columns: 1fr;

        padding-top: 60px;
        padding-bottom: 60px;
    }

    .hero-content h1 {
        letter-spacing: -2px;
    }

    .hero-visual {
        display: none;
    }

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

    .category-card:nth-child(1),
    .category-card:nth-child(2),
    .category-card:nth-child(3),
    .category-card:nth-child(4),
    .category-card:nth-child(5) {
        grid-column: auto;
    }

    .category-card:last-child {
        grid-column: 1 / -1;
    }

    .how-grid {
        grid-template-columns: 1fr;
    }

    .home-cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }

}


@media (max-width: 520px) {

    .hero-inner {
        padding-top: 48px;
        padding-bottom: 50px;
    }

    .hero-content h1 {
        font-size: 48px;
    }

    .hero-intro {
        font-size: 18px;
    }

    .hero-search {
        display: block;

        padding: 5px;
    }

    .hero-search input {
        width: 100%;

        padding: 14px;
    }

    .hero-search button {
        width: 100%;

        padding: 13px 18px;
    }

    .section-heading {
        text-align: left;
    }

    .category-grid,
    .question-grid {
        grid-template-columns: 1fr;
    }

    .category-card:last-child {
        grid-column: auto;
    }

    .category-card {
        min-height: auto;
    }

}
/* ======================================================
   HOMEPAGE DESKTOP REFINEMENTS
   ====================================================== */

@media (min-width: 901px) {

    .home-page .header-inner {
        min-height: 96px;
    }

    .home-page .logo-main {
        font-size: 34px;
    }

    .home-page .logo-tagline {
        font-size: 14px;
    }

    .home-page .main-nav {
        gap: 32px;
    }

    .home-page .main-nav a {
        font-size: 15px;
    }

    .home-page .header-search {
        width: 310px;
    }

    .home-page .hero-inner {
        min-height: 580px;
    }

    .home-page .category-card {
        min-height: 265px;
        padding: 30px;
    }

    .home-page .question-card-body {
        padding: 28px;
    }

}


/* Homepage CTA already provides footer spacing */

.home-page .site-footer {
    margin-top: 0;
}