/* ==================================================
   RESET — GLOBAL STYLES
================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #08110d;
    color: #f2f7f3;
    line-height: 1.6;
    min-height: 100vh;
}


/* ==================================================
   VARIABLES
================================================== */

:root {
    --background: #08110d;
    --surface: #101c16;
    --surface-light: #17271f;

    --primary: #8de6b2;
    --primary-dark: #5acb8a;

    --text: #f2f7f3;
    --text-soft: #aabbb1;

    --border: rgba(141, 230, 178, 0.15);

    --radius: 20px;
    --small-radius: 12px;

    --max-width: 1100px;
}


/* ==================================================
   BASIC ELEMENTS
================================================== */

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

section {
    width: 100%;
}


/* ==================================================
   ACCESSIBILITY
================================================== */

.visually-hidden {
    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 {
    position: sticky;
    top: 0;
    z-index: 1000;

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

    width: 100%;
    padding: 18px 24px;

    background: rgba(8, 17, 13, 0.88);
    backdrop-filter: blur(14px);

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

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--primary);
}

.main-nav {
    display: none;
    gap: 28px;
}

.main-nav a {
    color: var(--text-soft);
    transition: color 0.25s ease;
}

.main-nav a:hover {
    color: var(--primary);
}

.menu-button {
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 1.7rem;
}


/* ==================================================
   GENERAL CONTAINERS
================================================== */

.screen {
    min-height: 100vh;
    padding: 90px 20px;
}

.section-container,
.activity-container {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
}


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

.hero-screen {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: calc(100vh - 70px);

    text-align: center;

    background:
        radial-gradient(
            circle at 50% 30%,
            rgba(91, 203, 138, 0.15),
            transparent 45%
        );
}

.hero-content {
    max-width: 720px;
    margin: auto;
}

.eyebrow {
    margin-bottom: 18px;

    color: var(--primary);

    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-screen h1 {
    margin-bottom: 22px;

    font-size: clamp(2.6rem, 10vw, 5rem);
    line-height: 1.08;
    letter-spacing: -2px;
}

.hero-text {
    max-width: 600px;
    margin: 0 auto 32px;

    color: var(--text-soft);
    font-size: 1.05rem;
}

.privacy-note {
    margin-top: 20px;

    color: #71857a;
    font-size: 0.82rem;
}


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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 52px;
    padding: 13px 24px;

    border-radius: 999px;

    font-weight: 700;

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

.primary-button {
    border: none;

    background: var(--primary);
    color: #07100b;

    box-shadow:
        0 8px 30px rgba(141, 230, 178, 0.18);
}

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

    box-shadow:
        0 12px 35px rgba(141, 230, 178, 0.28);
}

.secondary-button {
    border: 1px solid var(--border);

    background: var(--surface);
    color: var(--text);
}

.secondary-button:hover {
    transform: translateY(-2px);
    background: var(--surface-light);
}


/* ==================================================
   SECTION HEADINGS
================================================== */

.section-container h2,
.activity-container h2 {
    margin-bottom: 16px;

    font-size: clamp(2rem, 7vw, 3.2rem);
    line-height: 1.15;
    letter-spacing: -1px;
}

.section-intro {
    max-width: 650px;
    margin-bottom: 40px;

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


/* ==================================================
   CHECK-IN
================================================== */

.checkin-screen,
.choice-screen,
.reflection-screen,
.progress-screen,
.about-screen {
    background: var(--background);
}

.mood-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;

    margin-bottom: 45px;
}

.mood-card,
.after-mood-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 130px;

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

    background: var(--surface);
    color: var(--text);

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

.mood-card:hover,
.after-mood-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.mood-card.selected,
.after-mood-card.selected {
    border-color: var(--primary);
    background: rgba(141, 230, 178, 0.1);
}

.mood-icon {
    margin-bottom: 8px;
    font-size: 2rem;
}


/* ==================================================
   STRESS CHECK
================================================== */

.stress-check {
    padding: 28px;

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

    background: var(--surface);
}

.stress-check h3 {
    margin-bottom: 6px;
    font-size: 1.25rem;
}

.stress-check p {
    margin-bottom: 24px;
    color: var(--text-soft);
}

.stress-value {
    margin-bottom: 18px;
    text-align: center;
}

.stress-value #stressValue {
    color: var(--primary);
    font-size: 3rem;
    font-weight: 800;
}

#stressSlider {
    width: 100%;
    accent-color: var(--primary);
}

.slider-labels {
    display: flex;
    justify-content: space-between;

    margin-top: 8px;

    color: var(--text-soft);
    font-size: 0.8rem;
}

.stress-check + .primary-button {
    margin-top: 28px;
}


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

.reset-options {
    display: grid;
    gap: 16px;
}

.reset-card {
    display: flex;
    align-items: center;

    width: 100%;
    padding: 22px;

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

    background: var(--surface);
    color: var(--text);

    text-align: left;

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

.reset-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    background: var(--surface-light);
}

.reset-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 55px;
    height: 55px;

    margin-right: 18px;

    border-radius: 16px;

    background: rgba(141, 230, 178, 0.08);

    font-size: 1.8rem;
}

.reset-card-content {
    display: flex;
    flex-direction: column;
}

.reset-card-content strong {
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.reset-card-content small {
    color: var(--text-soft);
}


/* ==================================================
   ACTIVITY SCREENS
================================================== */

.activity-screen {
    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.activity-container {
    text-align: center;
}

.activity-container > p:not(.eyebrow) {
    color: var(--text-soft);
}

.breathing-screen {
    background:
        radial-gradient(
            circle at center,
            rgba(91, 203, 138, 0.12),
            transparent 50%
        );
}


/* ==================================================
   BREATHING VISUAL
================================================== */

.breathing-visual {
    display: flex;
    align-items: center;
    justify-content: center;

    margin: 50px 0 30px;
}

.breathing-circle {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 190px;
    height: 190px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(141, 230, 178, 0.35),
            rgba(91, 203, 138, 0.08)
        );

    border: 2px solid rgba(141, 230, 178, 0.5);

    box-shadow:
        0 0 60px rgba(91, 203, 138, 0.15);

    transition:
        transform 4s ease-in-out;
}

.breathing-circle span {
    font-weight: 700;
    color: var(--primary);
}

.breathing-timer,
.break-timer {
    margin-bottom: 28px;

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

.breathing-timer span:first-child,
.break-timer span:first-child {
    color: var(--text);
    font-size: 2.4rem;
    font-weight: 800;
}


/* ==================================================
   GROUNDING
================================================== */

.grounding-progress {
    margin: 30px 0;

    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 700;
}

.grounding-card {
    padding: 40px 25px;
    margin-bottom: 28px;

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

    background: var(--surface);
}

.activity-icon {
    display: block;
    margin-bottom: 18px;

    font-size: 3rem;
}

.grounding-card h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.grounding-card p {
    color: var(--text-soft);
}


/* ==================================================
   REFLECTION
================================================== */

.reflection-message {
    display: none;

    padding: 25px;
    margin: 30px 0;

    border-radius: var(--radius);

    background: var(--surface);

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

.reflection-message.show {
    display: block;
}

.reflection-message h3 {
    margin-bottom: 8px;
}

.reflection-message p {
    color: var(--text-soft);
}

#finishButton {
    margin-top: 25px;
}


/* ==================================================
   PROGRESS
================================================== */

.progress-cards {
    display: grid;
    gap: 16px;

    margin-bottom: 35px;
}

.progress-card {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 30px 20px;

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

    background: var(--surface);
}

.progress-icon {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.progress-card strong {
    color: var(--primary);
    font-size: 2.2rem;
}

.progress-card span:last-child {
    color: var(--text-soft);
}


/* ==================================================
   SUPPORT
================================================== */

.support-screen {
    background:
        linear-gradient(
            180deg,
            var(--background),
            #0c1711
        );
}

.support-options {
    display: grid;
    gap: 18px;
}

.support-card {
    padding: 28px;

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

    background: var(--surface);
}

.support-icon {
    display: block;
    margin-bottom: 15px;

    font-size: 2rem;
}

.support-card h3 {
    margin-bottom: 10px;
}

.support-card p {
    margin-bottom: 20px;
    color: var(--text-soft);
}

.emergency-card {
    border-color: rgba(255, 150, 150, 0.2);
}

.support-disclaimer {
    margin-top: 30px;

    color: #71857a;
    font-size: 0.8rem;
}


/* ==================================================
   ABOUT
================================================== */

.about-screen p {
    color: var(--text-soft);
}

.about-features {
    display: grid;
    gap: 16px;

    margin-top: 40px;
}

.about-feature {
    padding: 25px;

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

    background: var(--surface);
}

.about-feature > span {
    display: block;
    margin-bottom: 12px;

    font-size: 1.8rem;
}

.about-feature h3 {
    margin-bottom: 8px;
}

.about-feature p {
    font-size: 0.95rem;
}


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

.site-footer {
    padding: 50px 20px;

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

    background: #050b08;

    text-align: center;
}

.footer-logo {
    margin-bottom: 8px;

    color: var(--primary);

    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 3px;
}

.footer-content > p {
    color: var(--text-soft);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;

    margin: 25px 0;
}

.footer-links a {
    color: var(--text-soft);
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    font-size: 0.8rem;
}


/* ==================================================
   FOCUS STATES
================================================== */

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
}


/* ==================================================
   TABLET / DESKTOP
================================================== */

@media (min-width: 700px) {

    .site-header {
        padding: 20px 6%;
    }

    .main-nav {
        display: flex;
    }

    .menu-button {
        display: none;
    }

    .screen {
        padding: 110px 40px;
    }

    .mood-options {
        grid-template-columns: repeat(4, 1fr);
    }

    .progress-cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .support-options {
        grid-template-columns: repeat(3, 1fr);
    }

    .about-features {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ==================================================
   LARGE DESKTOP
================================================== */

@media (min-width: 1000px) {

    .hero-screen h1 {
        font-size: 5rem;
    }

    .hero-text {
        font-size: 1.15rem;
    }
}

@media (max-width: 768px) {

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

}


/* =========================================================
   RESET — COMPETITION POLISH
   ========================================================= */


/* ---------- Smooth Experience ---------- */

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

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


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

.primary-button,
.secondary-button,
.menu-button,
.mood-card,
.reset-card,
.after-mood-card {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}


/* ---------- Button Press ---------- */

.primary-button:active,
.secondary-button:active,
.mood-card:active,
.reset-card:active,
.after-mood-card:active,
.menu-button:active {
    transform: scale(0.97);
}


/* ---------- Mood Cards ---------- */

.mood-card:hover,
.after-mood-card:hover {
    transform: translateY(-3px);
}


/* Selected mood */

.mood-card.selected,
.after-mood-card.selected {
    border-color: #8be6b2;
    box-shadow: 0 0 0 2px rgba(139, 230, 178, 0.18);
    transform: translateY(-2px);
}


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

.reset-card:hover {
    transform: translateY(-4px);
    border-color: #8be6b2;
}


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

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid #8be6b2;
    outline-offset: 4px;
}


/* ---------- Range Slider ---------- */

input[type="range"] {
    cursor: pointer;
}


/* ---------- Breathing Animation ---------- */

.breathing-circle {
    transition:
        transform 4s ease-in-out,
        box-shadow 4s ease-in-out;
}


.breathing-visual.breathing-in
.breathing-circle {
    transform: scale(1.22);
}


.breathing-visual.breathing-hold
.breathing-circle {
    transform: scale(1.22);
}


.breathing-visual.breathing-out
.breathing-circle {
    transform: scale(0.85);
}


/* ---------- Activity Icons ---------- */

.activity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: gentleFloat 3s ease-in-out infinite;
}


@keyframes gentleFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}


/* ---------- Screen Entrance ---------- */

.screen {
    animation: screenFade 0.35s ease;
}


@keyframes screenFade {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


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

@media (max-width: 768px) {

    .main-nav.open {
        display: flex;
        animation: menuAppear 0.25s ease;
    }

}


@keyframes menuAppear {

    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ---------- Better Mobile Spacing ---------- */

@media (max-width: 600px) {

    .section-container,
    .activity-container,
    .hero-content {
        width: 100%;
    }


    h1 {
        font-size: clamp(2.2rem, 10vw, 4rem);
        line-height: 1.05;
    }


    h2 {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }


    .primary-button,
    .secondary-button {
        min-height: 52px;
    }


    .mood-card,
    .after-mood-card,
    .reset-card {
        min-height: 70px;
    }

}


/* ---------- Reduced Motion Accessibility ---------- */

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

}
