/* ============================================================
   CODEWORD HACKATHON — HOW TO APPLY
   Premium external stylesheet
   ------------------------------------------------------------
   Theme: CodeWord purple + orange
   Fully responsive
   Existing HTML text and links are preserved
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ============================================================
   THEME
   ============================================================ */

:root {
    --cw-primary: #4F46D8;
    --cw-primary-dark: #3932B8;
    --cw-primary-light: #756FF0;

    --cw-orange: #F6A623;
    --cw-orange-dark: #D98C08;
    --cw-orange-light: #FFF3E2;

    --cw-dark: #172033;
    --cw-dark-2: #202A3D;
    --cw-text: #344054;
    --cw-text-medium: #475467;
    --cw-text-soft: #667085;
    --cw-muted: #7A8496;

    --cw-bg: #F5F7FB;
    --cw-surface: #FFFFFF;
    --cw-surface-soft: #F9FAFD;

    --cw-border: #DDE3EE;
    --cw-border-light: #E8ECF3;

    --cw-shadow-sm: 0 8px 24px rgba(23, 32, 51, .06);
    --cw-shadow-md: 0 15px 35px rgba(23, 32, 51, .09);
    --cw-shadow-lg: 0 22px 55px rgba(23, 32, 51, .13);

    --cw-radius: 18px;
    --cw-max: 1160px;
}

/* ============================================================
   RESET
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;

    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    color: var(--cw-text);

    background:
        linear-gradient(
            180deg,
            #F8F9FC 0%,
            #F5F7FB 48%,
            #FFFFFF 100%
        );

    line-height: 1.75;
    font-size: 15px;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    color: var(--cw-primary);
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(246, 166, 35, .55);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection {
    background: var(--cw-primary);
    color: #FFFFFF;
}

/* ============================================================
   GLOBAL WRAPPER
   ============================================================ */

.wrap {
    width: min(100%, var(--cw-max));
    margin-inline: auto;
    padding-inline: 24px;
}

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

header.hero {
    position: relative;
    overflow: hidden;

    padding: 78px 0 68px;

    color: #FFFFFF;

    background:
        radial-gradient(
            circle at 12% 20%,
            rgba(117, 111, 240, .28) 0,
            rgba(117, 111, 240, .09) 28%,
            transparent 52%
        ),
        radial-gradient(
            circle at 92% 85%,
            rgba(246, 166, 35, .17) 0,
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #171A43 0%,
            #3932B8 52%,
            #4F46D8 100%
        );

    border-bottom: 1px solid rgba(79, 70, 216, .25);
}

header.hero::before {
    content: "";
    position: absolute;

    width: 390px;
    height: 390px;

    top: -250px;
    right: -160px;

    border-radius: 50%;

    background: rgba(255,255,255,.055);
    pointer-events: none;
}

header.hero::after {
    content: "";
    position: absolute;

    width: 220px;
    height: 220px;

    bottom: -150px;
    left: -100px;

    border-radius: 50%;

    background: rgba(246,166,35,.08);
    pointer-events: none;
}

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

.eyebrow-cmd {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 21px;
    padding: 7px 13px;

    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;

    background: rgba(255,255,255,.09);

    color: #FFFFFF;

    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;

    letter-spacing: .3px;
}

.eyebrow-cmd .cursor {
    display: inline-block;

    width: 7px;
    height: 15px;

    border-radius: 2px;

    background: var(--cw-orange);

    animation: cwBlink 1.1s steps(1) infinite;
}

@keyframes cwBlink {
    50% {
        opacity: 0;
    }
}

header.hero h1 {
    max-width: 800px;
    margin: 0;

    color: #FFFFFF;

    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.08;
    font-weight: 800;

    letter-spacing: -1.5px;
}

header.hero p.lead {
    max-width: 770px;

    margin: 20px 0 0;

    color: rgba(255,255,255,.90);

    font-size: 16px;
    line-height: 1.85;
}

.hero-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, auto));

    gap: 18px 42px;

    margin-top: 36px;
}

.hero-meta div {
    min-width: 120px;
}

.hero-meta div strong {
    display: block;

    color: #FFD071;

    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
}

.hero-meta div span {
    display: block;

    margin-top: 4px;

    color: rgba(255,255,255,.74);

    font-size: 12px;
    line-height: 1.5;
    font-weight: 500;
}

/* ============================================================
   SECTION SHELL
   ============================================================ */

section {
    position: relative;
    padding: 70px 0;
}

section.alt {
    background:
        linear-gradient(
            180deg,
            #F8F9FD 0%,
            #F2F4FA 100%
        );

    border-top: 1px solid var(--cw-border-light);
    border-bottom: 1px solid var(--cw-border-light);
}

.section-head {
    max-width: 760px;
    margin-bottom: 38px;
}

.section-head h2 {
    margin: 0;

    color: var(--cw-dark);

    font-size: clamp(27px, 3vw, 38px);
    line-height: 1.25;
    font-weight: 800;

    letter-spacing: -.6px;
}

.section-head h2::after {
    content: "";

    display: block;

    width: 48px;
    height: 3px;

    margin-top: 12px;

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            var(--cw-orange),
            var(--cw-primary)
        );
}

.section-head p {
    margin: 13px 0 0;

    color: var(--cw-text-medium);

    font-size: 15px;
    line-height: 1.85;
}

/* ============================================================
   FLOWCHART
   ============================================================ */

.flow-panel {
    position: relative;

    padding: 28px 22px 23px;

    overflow-x: auto;

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

    background:
        radial-gradient(
            circle at 50% 0,
            rgba(79,70,216,.06),
            transparent 42%
        ),
        #FFFFFF;

    box-shadow: var(--cw-shadow-md);

    scrollbar-width: thin;
    scrollbar-color: var(--cw-primary-light) #EEF0F5;
}

.flow-panel::-webkit-scrollbar {
    height: 8px;
}

.flow-panel::-webkit-scrollbar-track {
    background: #EEF0F5;
    border-radius: 999px;
}

.flow-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(
        90deg,
        var(--cw-primary),
        var(--cw-orange)
    );
    border-radius: 999px;
}

.flow-panel svg {
    display: block;

    width: 100%;
    min-width: 760px;
    height: auto;

    margin: 0 auto;
}

/* SVG classes are now controlled entirely by the external CSS. */
.flow-panel svg .node {
    fill: #FFFFFF;
    stroke: #D9DFF0;
    stroke-width: 1.5;
}

.flow-panel svg .node-branch {
    fill: #FFFCF7;
    stroke: var(--cw-orange);
    stroke-width: 1.6;
}

.flow-panel svg .lbl {
    fill: var(--cw-dark);
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.flow-panel svg .lbl-sm {
    fill: var(--cw-text-soft);
    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
}

.flow-panel svg .edge {
    stroke: var(--cw-primary);
    stroke-width: 2.2;
    fill: none;
    marker-end: url(#arrow);
}

.flow-panel svg .edge-amber {
    stroke: var(--cw-orange);
    stroke-width: 2.2;
    fill: none;
    marker-end: url(#arrow);
}

.flow-caption {
    max-width: 850px;

    margin: 14px auto 0;

    text-align: center;

    color: var(--cw-text-soft);

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

/* ============================================================
   STEPS
   ============================================================ */

.steps {
    display: flex;
    flex-direction: column;

    max-width: 980px;
}

.step {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);

    gap: 24px;

    padding: 30px 0;

    border-top: 1px solid var(--cw-border);
}

.step:first-child {
    border-top: 0;
    padding-top: 0;
}

.step:last-child {
    padding-bottom: 0;
}

.step-tag {
    padding-top: 5px;

    color: var(--cw-primary);

    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;

    font-size: 11px;
    line-height: 1.4;
    font-weight: 800;

    letter-spacing: .7px;
    text-transform: uppercase;
}

.step h3 {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 0;

    color: var(--cw-dark);

    font-size: 20px;
    line-height: 1.45;
    font-weight: 750;
}

.step h3 .ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    border-radius: 11px;

    background: linear-gradient(
        135deg,
        #F0EFFF,
        #FFF7E8
    );

    font-size: 19px;
    line-height: 1;

    box-shadow: inset 0 0 0 1px #E5E2F8;
}

.step p {
    max-width: 760px;

    margin: 11px 0 0;

    color: var(--cw-text-medium);

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

.step .sub-branch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 17px;

    margin-top: 18px;
}

.branch-card {
    padding: 19px 20px;

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

    background: #FFFFFF;

    box-shadow: 0 7px 20px rgba(23,32,51,.045);

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

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

    border-color: rgba(79,70,216,.28);

    box-shadow: var(--cw-shadow-sm);
}

.branch-card h4 {
    margin: 0 0 7px;

    color: var(--cw-dark);

    font-size: 15px;
    line-height: 1.5;
    font-weight: 750;
}

.branch-card h4::before {
    content: "";

    display: inline-block;

    width: 7px;
    height: 7px;

    margin: 0 8px 2px 0;

    border-radius: 50%;

    background: var(--cw-orange);
}

.branch-card p {
    max-width: none;

    margin: 0;

    color: var(--cw-text-medium);

    font-size: 13px;
    line-height: 1.75;
}

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

.cta-box {
    position: relative;
    overflow: hidden;

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

    gap: 30px;

    padding: 35px 36px;

    border: 1px solid rgba(79,70,216,.20);
    border-radius: var(--cw-radius);

    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(117,111,240,.16),
            transparent 34%
        ),
        radial-gradient(
            circle at 90% 80%,
            rgba(246,166,35,.13),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #F0EFFF,
            #FBFAFF
        );

    box-shadow: var(--cw-shadow-md);
}

.cta-box::before {
    content: "";

    position: absolute;

    width: 5px;
    height: 55px;

    left: 0;
    top: 50%;

    transform: translateY(-50%);

    border-radius: 0 8px 8px 0;

    background:
        linear-gradient(
            180deg,
            var(--cw-primary),
            var(--cw-orange)
        );
}

.cta-box h3 {
    position: relative;
    z-index: 1;

    margin: 0;

    color: var(--cw-dark);

    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.3;
    font-weight: 800;
}

.cta-actions {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 11px;

    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 11px 19px;

    border-radius: 10px;

    font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;

    font-size: 12.5px;
    line-height: 1.4;
    font-weight: 700;

    text-decoration: none;

    transition:
        transform .25s ease,
        background .25s ease,
        border-color .25s ease,
        color .25s ease,
        box-shadow .25s ease;
}

.btn-primary {
    border: 1px solid var(--cw-primary);

    background:
        linear-gradient(
            135deg,
            var(--cw-primary),
            var(--cw-primary-light)
        );

    color: #FFFFFF;

    box-shadow:
        0 8px 20px rgba(79,70,216,.18);
}

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

    color: #FFFFFF;

    

    box-shadow:
        0 12px 27px rgba(79,70,216,.24);
}

.btn-ghost {
    border: 1px solid var(--cw-border);

    background: #FFFFFF;

    color: var(--cw-dark);
}

.btn-ghost:hover {
    transform: translateY(-3px);

    border-color: rgba(79,70,216,.35);

    color: white;

    box-shadow: 0 9px 22px rgba(23,32,51,.08);
}

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

#footer {
    width: 100%;
}

/* ============================================================
   RESPONSIVE — 1000px
   ============================================================ */

@media (max-width: 1000px) {

    .wrap {
        padding-inline: 22px;
    }

    header.hero {
        padding: 66px 0 58px;
    }

    .hero-meta {
        gap: 18px 30px;
    }

    section {
        padding: 60px 0;
    }

    .step {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 20px;
    }

    .cta-box {
        padding: 31px 30px;
    }
}

/* ============================================================
   RESPONSIVE — 760px
   ============================================================ */

@media (max-width: 760px) {

    body {
        font-size: 14px;
    }

    .wrap {
        padding-inline: 18px;
    }

    header.hero {
        padding: 52px 0 48px;
    }

    .eyebrow-cmd {
        font-size: 11px;
    }

    header.hero h1 {
        font-size: clamp(32px, 8vw, 48px);
        letter-spacing: -1px;
    }

    header.hero p.lead {
        font-size: 14px;
        line-height: 1.8;
    }

    .hero-meta {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        margin-top: 28px;
    }

    .hero-meta div strong {
        font-size: 23px;
    }

    .hero-meta div span {
        font-size: 10.5px;
    }

    section {
        padding: 50px 0;
    }

    .section-head {
        margin-bottom: 28px;
    }

    .section-head h2 {
        font-size: 28px;
    }

    .section-head p {
        font-size: 13.5px;
    }

    .flow-panel {
        padding: 20px 15px 18px;
        border-radius: 15px;
    }

    .flow-panel svg {
        min-width: 720px;
    }

    .step {
        grid-template-columns: 1fr;
        gap: 9px;
        padding: 25px 0;
    }

    .step:first-child {
        padding-top: 0;
    }

    .step-tag {
        padding-top: 0;
    }

    .step h3 {
        font-size: 18px;
    }

    .step p {
        font-size: 13.5px;
    }

    .step .sub-branch {
        grid-template-columns: 1fr;
    }

    .cta-box {
        flex-direction: column;
        align-items: flex-start;

        padding: 28px 24px;
    }

    .cta-actions {
        width: 100%;
    }
}

/* ============================================================
   RESPONSIVE — 520px
   ============================================================ */

@media (max-width: 520px) {

    .wrap {
        padding-inline: 14px;
    }

    header.hero {
        padding: 43px 0 42px;
    }

    .eyebrow-cmd {
        padding: 6px 10px;
        font-size: 10px;
    }

    .eyebrow-cmd .cursor {
        width: 5px;
        height: 13px;
    }

    header.hero h1 {
        font-size: 30px;
        line-height: 1.14;
    }

    header.hero p.lead {
        margin-top: 15px;
        font-size: 13px;
        line-height: 1.78;
    }

    .hero-meta {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 25px;
    }

    .hero-meta div {
        display: grid;
        grid-template-columns: 45px 1fr;
        align-items: center;
        column-gap: 8px;
    }

    .hero-meta div strong {
        font-size: 22px;
    }

    .hero-meta div span {
        font-size: 11px;
    }

    section {
        padding: 43px 0;
    }

    .section-head {
        margin-bottom: 23px;
    }

    .section-head h2 {
        font-size: 24px;
    }

    .section-head p {
        font-size: 12.5px;
        line-height: 1.8;
    }

    .flow-panel {
        padding: 16px 10px;
    }

    .flow-panel svg {
        min-width: 690px;
    }

    .flow-caption {
        font-size: 10.5px;
    }

    .step {
        padding: 22px 0;
    }

    .step h3 {
        gap: 8px;
        font-size: 16px;
    }

    .step h3 .ico {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 17px;
    }

    .step p {
        font-size: 12.5px;
        line-height: 1.8;
    }

    .branch-card {
        padding: 16px;
    }

    .branch-card h4 {
        font-size: 14px;
    }

    .branch-card p {
        font-size: 12px;
    }

    .cta-box {
        padding: 24px 20px;
        border-radius: 15px;
    }

    .cta-box h3 {
        font-size: 22px;
    }

    .cta-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 9px;
    }

    .btn {
        width: 100%;
        min-height: 43px;
        font-size: 12px;
    }
}

/* ============================================================
   RESPONSIVE — 360px
   ============================================================ */

@media (max-width: 360px) {

    header.hero h1 {
        font-size: 27px;
    }

    header.hero p.lead {
        font-size: 12px;
    }

    .section-head h2 {
        font-size: 21px;
    }

    .step h3 {
        font-size: 15px;
    }

    .step p {
        font-size: 11.5px;
    }

    .flow-panel svg {
        min-width: 650px;
    }

    .cta-box h3 {
        font-size: 20px;
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ============================================================
   END
   ============================================================ */
