/* Core variables and reset */
:root {
    --primary-color: #012A36;
    --secondary-color: #2ecc71;
    --accent-color: rgba(223, 223, 223, 0.77);
    --dark-color: #1e1d1d;
    --light-color: #ecf0f1;
    --text-color: #333;
    --white: #fffdf7;
    /* Defaults for demo animations (can be overridden per-element) */
    --cat-color: var(--accent-color);
    --cat-glow: rgba(243, 156, 18, 0.7);
    --flash-color: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f6f14d;
    padding-top: 70px; /* space for fixed top bar */
}

/* Layout helpers */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 4rem 4rem;
}

.dark-container {
    color: var(--white);
    background-color: var(--dark-color);
}

.section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    gap: 1rem;
    padding: 0 1rem;
}

header {
    padding: 1rem 0;
    text-align: center;
    position: relative;
}

/* Ensure hero content sits above the decorative background */
header > * {
    position: relative;
    z-index: 1;
}

.flex {
    display: flex;
}

.row {
    flex-direction: row;
}

.column {
    flex-direction: column;
}


.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.problem-title, .solution-title {
    /* Headline above the demo: keep with black/grey/white modern aesthetic */
    text-align: center;
    color: var(--dark-color);
    font-weight: 800;
    letter-spacing: 0.2px;
    line-height: 1.2;
    text-transform: none; /* respect case as written */
    margin: 0 1rem 0.35rem 1rem; /* tight to the timer */
    font-size: clamp(1.25rem, 2.8vw + 0.5rem, 2.25rem);
}

.solution-title {
    font-size: clamp(1.25rem, 2.8vw + 0.5rem, 2rem) !important;
}

/* Optional subtle underline accent that matches the theme */
.problem-title::after {
    content: "";
    display: block;
    width: 105px;
    max-width: 28vw;
    height: 3px;
    margin: 1px auto 0 auto;
    background: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.65) 60%, rgba(0, 0, 0, 0.15) 100%);
    border-radius: 55px;
    opacity: 0.85;
}

@media (max-width: 640px) {
    .problem-title {
        font-weight: 800;
        margin-bottom: 0.25rem;
    }
}

/* CTA button */
.cta-button {
    display: inline-block;
    background-color: #222121;
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.cta-button:hover {
    background-color: #000000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Hero demo (phone mock) */
.hero-demo {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* left explainer, phone, right explainer */
    gap: 2rem 2rem;
    align-items: center;
    justify-items: center;
    margin: 1rem 0 2rem;
}

.phone-frame {
    width: 320px;
    max-width: 90vw;
    height: 640px;
    border-radius: 28px;
    background: #111;
    padding: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    position: relative;
}

.phone-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 18px;
    background: #000;
    border-radius: 10px;
    opacity: .5;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #0e0e0e;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #f5f5f5;
}

.demo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-title {
    font-weight: 700;
    letter-spacing: .3px;
}

.demo-energy {
    opacity: .9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.energy-icon {
    font-size: 14px;
}

.energy-bar {
    position: relative;
    width: 100px;
    height: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    overflow: hidden;
}

.energy-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ffffff, #d7d7d7);
    transition: width 300ms ease;
}

/* Views */
.view {
    display: none;
    padding: 16px;
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: 72px;
}

.view.active {
    display: block;
}

/* Illustration: rotating square and orbiting habit dots */
.animated-shapes {
    position: relative;
    height: 130px;
    width: 100%;
    display: grid;
    place-items: center;
    margin: 8px 0 12px;
    pointer-events: none;
}


.habit-dot {
    --radius: 86px;
    --angle: 0deg;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
    transform-origin: center;
    will-change: transform;
    /* JS-driven orbit: animation disabled */
}


.habit-dot.accomplished {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 10px var(--cat-glow, rgba(243, 156, 18, 0.7));
}

.habit-dot-explainer {
    position: relative;
    border: 1px solid var(--dark-color);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--dark-color);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    margin-top: 95px;

    /* Orbital animation (CSS-only) */
    /* animated offsets composing the motion */
    --ox: 0px; /* orbit x */
    --oy: 0px; /* orbit y */
    --jx: 0px; /* jitter x */
    --jy: 0px; /* jitter y */
    will-change: transform;
    transform: translate(calc(var(--ox) + var(--jx)), calc(var(--oy) + var(--jy)));
    animation: orbit-wobble var(--habit-orbit-duration, 7.5s) linear infinite,
    orbit-jitter var(--habit-jitter-duration, 2500ms) ease-in-out infinite alternate;
}

/* Habit dot speed is controlled by a CSS custom property that smoothly transitions */
@property --orbit-speed {
    syntax: '<number>';
    inherits: false;
    initial-value: 0.05;
}

/* Custom properties for CSS-only orbit composition */
@property --ox {
    syntax: '<length>';
    inherits: false;
    initial-value: 0px;
}

@property --oy {
    syntax: '<length>';
    inherits: false;
    initial-value: 0px;
}

@property --jx {
    syntax: '<length>';
    inherits: false;
    initial-value: 0px;
}

@property --jy {
    syntax: '<length>';
    inherits: false;
    initial-value: 0px;
}

@media (prefers-reduced-motion: reduce) {
    .habit-dot-explainer {
        animation: none !important;
        transform: none !important;
    }
}

#view-habits {
    overflow: hidden;
}

#arrow-1 {
    /*position: absolute;*/
    /*margin-top: -200px;*/
    /*margin-left: 100px;*/
    height: 120px;
    width: 120px;
    rotate: 120deg;
    transform: scale(-2, 2);
    padding: 2rem;
    border-radius: 1rem;
}

#arrow-2 {
    height: 120px;
    width: 120px;
    rotate: 230deg;
    transform: scale(2, 2);
    padding: 2rem;
    border-radius: 1rem;
}

/* Transition the speed over 3s when it changes (also fade accomplished visuals) */
.habit-dot {
    transition: --orbit-speed 3s linear, background 450ms ease, box-shadow 450ms ease;
}

/* Habit list (within phone) */
.habit-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
}

.habit-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 12px;
    color: #eee;
    position: relative; /* for flash overlay */
    overflow: hidden; /* clip flash overlay */
}

.phone-screen .habit-card {
    background: #0d0d0d;
}

.habit-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    margin-right: 12px;
    flex: 0 0 36px;
}

.habit-info {
    flex: 1 1 auto;
    min-width: 0;
}

.habit-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
}

.habit-meta {
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

/* Category badge (replaces goal) */
.habit-category {
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
    text-transform: capitalize;
}

.category {
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    border: 1px solid #333;
}

.category.default {
    color: #dfdfdf;
    border-color: #858585;
    background: #000000;
}

.category.productivity {
    color: #4da3ff;
    border-color: #1a3555;
    background: #0a1018;
}

.category.health {
    color: #8fd14f;
    border-color: #2e4f1f;
    background: #0f1a0a;
}

.category.sport {
    color: #f3a61e;
    border-color: #5a3a1a;
    background: #1a1208;
}

.goal {
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    border: 1px solid #333;
}

.goal.build {
    color: #8fd14f;
    border-color: #2e4f1f;
    background: #0f1a0a;
}

.goal.quit {
    color: #ff6b6b;
    border-color: #5a1f1f;
    background: #1a0a0a;
}

.habit-accomplish {
    margin-left: 12px;
    background: #1f1f1f;
    color: var(--white);
    border: 1px solid #333;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: transform .05s ease, background .2s;
}

.habit-accomplish:hover {
    background: #262626;
}

.habit-accomplish:active {
    transform: scale(0.98);
}

/* Slow attention blink for accomplish button */
@keyframes slow-blink {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
    50% {
        opacity: 0.3;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
}

.habit-accomplish.attention-blink {
    animation: pulse-btn 2.2s ease-in-out infinite;
    /*animation: slow-blink 2.2s ease-in-out infinite;*/
}

@media (prefers-reduced-motion: reduce) {
    .habit-accomplish.attention-blink {
        animation: none;
    }
}


.habit-card.done .habit-title {
    text-decoration: line-through;
    color: #bfe3bf;
}

/* Demo helper */
.demo-help {
    text-align: center;
    color: var(--dark-color);
    grid-column: 1 / -1; /* span full width under the demo */

}

.help-line {
    font-size: 1.3rem;
    font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.demo-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
}

/* Side explainers */
.demo-explain {
    max-width: 320px;
    color: var(--dark-color);
    text-align: left;
}

.demo-explain .explain-steps {
    display: grid;
    gap: 0.6rem;
    padding-left: 1.2rem;
    font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.25rem;
}

.demo-explain.left {
    margin-top: -50px;
    justify-self: end;
}

.demo-explain.right {
    justify-self: start;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 350ms ease-out, transform 350ms ease-out, visibility 0s linear 350ms;
}

.demo-explain.right.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
    .demo-explain.right {
        transition: none;
        transform: none;
    }
}

/* Simple arrows pointing at the phone */
.arrow {
    width: 72px;
    height: 2px;
    background: #2b2b2b;
    position: relative;
    opacity: 0.6;
    margin: 1rem 0;
}

.arrow-right {
    margin-left: auto;
}

.arrow-left {
    margin-right: auto;
}

.arrow-right::after {
    content: "";
    position: absolute;
    right: -6px;
    top: -5px;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid #2b2b2b;
}

.arrow-left::before {
    content: "";
    position: absolute;
    left: -6px;
    top: -5px;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid #2b2b2b;
}

/* Responsive: stack the grid on small screens */
@media (max-width: 900px) {
    .hero-demo {
        grid-template-columns: 1fr;
    }

    .demo-explain {
        max-width: 520px;
    }

    .demo-explain.left, .demo-explain.right {
        justify-self: center;
        text-align: center;
    }

    .arrow {
        display: none;
    }
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: #b3b3b3;
    max-width: 700px;
    margin: 0 auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--dark-color);
    border-radius: 10px;
    color: var(--white);
    padding: 2rem;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.feature-card h3 {
    margin-bottom: 1rem;
}

.feature-card p {
    font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* How it works */
.how-it-works {
    padding: 4rem 0;
    background-color: #f5f7fa;
}

.steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}


/* Download section */
.download {
    background: var(--primary-color);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.download h2 {
    margin-bottom: 1.5rem;
}

.download p {
    max-width: 700px;
    margin: 0 auto 2rem;
}

.app-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.badge-link:hover {
    transform: scale(1.05);
}

.badge-img {
    height: 60px;
}


.footer {
    padding-top: 4rem;
}

.copyright {
    font-size: 0.9rem;
    color: #aaa;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title h2 {
        font-size: 2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .top-bar {
        height: auto;
        padding: 1rem 0;
    }

    .top-bar-content {
        justify-content: space-around;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }
}

/* Habit accomplish icon sizing */
.habit-accomplish i {
    font-size: 18px;
    line-height: 1;
}

/* Green border glow animation when marking done */
@keyframes done-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 111, 46, 0.0);
    }
    40% {
        box-shadow: 0 0 0 4px rgba(46, 111, 46, 0.35);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 111, 46, 0.0);
    }
}

.habit-card.done {
    border-color: #9c9c9c;
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, .15);
    animation: done-glow 600ms ease;
}

.habit-card.done .habit-accomplish {
    background: var(--white);
    border-color: var(--white);
}

.habit-card.done .habit-accomplish i {
    color: #393939;
}

/* Fade-in color flash overlay when clicking the habit card */
.habit-card.flash::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--flash-color, rgba(255, 255, 255, 0.08));
    animation: habit-flash-in 650ms ease;
    pointer-events: none;
}

@keyframes habit-flash-in {
    0% {
        opacity: 0;
    }
    30% {
        opacity: 0.9;
    }
    100% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .habit-card.flash::after {
        animation-duration: 0ms;
        opacity: 0.15;
        transition: opacity 300ms ease;
    }
}

.demo-points {
    opacity: .95;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.points-icon {
    font-size: 14px;
}

.demo-timer {
    text-align: center;
    margin-bottom: 0.5rem;
    color: #2b2b2b;
    font-weight: 700;
}

/* Inactive habit visuals */
.habit-card.inactive {
    opacity: 0.6;
}

.habit-card.inactive .habit-accomplish {
    background: #161616;
    border-color: #333;
}

.habit-card.inactive .habit-title {
    text-decoration: none;
    color: #ddd;
}

.habit-dot.inactive {
    opacity: 0.2;
    filter: grayscale(100%);
    transition: opacity 300ms ease, filter 300ms ease;
}

/* Demo bottom navigation (inside phone screen) */
.demo-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 4px;
    padding: 6px 4px;
    background: #0b0b0b;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-bottom-nav .nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: none;
    color: #a0a0a0;
    padding: 2px 0;
    cursor: pointer;
}

.demo-bottom-nav .nav-item .icon {
    font-size: 18px;
    line-height: 1;
}

.demo-bottom-nav .nav-item .label {
    font-size: 10px;
    letter-spacing: 0.2px;
    opacity: 0.85;
}

.demo-bottom-nav .nav-item.active,
.demo-bottom-nav .nav-item:hover {
    color: var(--white);
}

/* Slight emphasis to the middle (Ohm) icon */
.demo-bottom-nav .nav-item:nth-child(3) .icon {
    font-size: 20px;
    color: var(--accent-color);
}


/* Top bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    color: #000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: 70px;
}

.top-bar-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    /*color: var(--white);*/
    cursor: default;
    transition: color 0.3s ease;
}

.core-square {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25px;
    height: 25px;
    margin: -12px 0 0 -12px;
    background: rgba(255, 255, 255, 1);
    border-radius: 4px;

    opacity: .1;
    box-shadow: 0 0 10px 5px rgba(255, 255, 255, 0.35);
    transform: scale(1);
    transition: opacity 1s ease-in-out;
    animation: rotation 15s linear infinite;
}

.arrow-and-core {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.dark-square {
    position: relative;
    top: 90px;
    left: unset;
    margin: unset;
    background-color: var(--dark-color) !important;
    box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.2);

}

/* Add Habit button (floating, inside phone screen) */
.add-habit-button {
    position: sticky; /* stays near bottom of scrollable view */
    bottom: 12px;
    margin-top: 12px;
    margin-left: auto;
    margin-right: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    color: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    animation: pulse-btn 3s infinite;
    transition: transform 120ms ease, box-shadow 200ms ease, background 200ms ease, color 200ms ease;
}

.phone-screen .add-habit-button {
    background: #141414;
    color: #f5f5f5;
}

.add-habit-button .icon {
    font-size: 14px;
}

.add-habit-button .label {
    font-size: 12px;
}

.add-habit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
}

.add-habit-button:active {
    transform: translateY(0);
}


.pulse-on-click {
    /* Allow pulsing without overriding ongoing animations (rotation/pulse) */
    animation-name: pulse-square, rotation;
    animation-duration: 3s, 15s;
    animation-timing-function: ease, linear;
    animation-iteration-count: 1, infinite;
    animation-fill-mode: none, none;
}

@keyframes pulse-square {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}


/* Huge wave pulse emanating from the core when a habit is clicked */
.core-square::before,
.core-square::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25px;
    height: 25px;
    margin: -12px 0 0 -12px; /* center on the core */
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transform: scale(1);
    will-change: transform, opacity, filter;
    background: radial-gradient(closest-side,
    rgba(255, 255, 255, 0.65) 0%,
    rgba(255, 255, 255, 0.35) 35%,
    rgba(255, 255, 255, 0.15) 60%,
    rgba(255, 255, 255, 0.00) 70%);
}

.core-square.pulse-on-click::before, .core-square.pulse-dark-on-click::before {
    animation: core-wave 1400ms ease-out forwards;
}

.core-square.pulse-on-click::after, .core-square.pulse-dark-on-click::after {
    animation: core-wave 1800ms ease-out 120ms forwards;
}


.pulse {
    animation: pulse-dark 5s infinite;
}

/** Waitlist section **/
.waitlist {
    position: relative;
    background: var(--dark-color); /* matches .dark-container */
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    overflow: hidden;
}

/* subtle ambient glow to keep it lively but in-brand */
.waitlist::before,
.waitlist::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.08;
    pointer-events: none;
}

.waitlist::before {
    top: -140px;
    left: -120px;
    background: radial-gradient(closest-side, #ffffff 10%, transparent 65%);
}

.waitlist::after {
    bottom: -160px;
    right: -140px;
    background: radial-gradient(closest-side, #8a8a8a 10%, transparent 65%);
}

.waitlist .container {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.waitlist h2 {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.waitlist p {
    color: #cfcfcf;
    max-width: 680px;
    margin: 0 auto 1.75rem;
}

/* Form */
.waitlist-form {
    display: flex;
    justify-content: center;
}

.waitlist-input-group {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    background: linear-gradient(180deg, #111111 0%, #0b0b0b 100%);
    border: 1px solid #2a2a2a;
    border-radius: 999px;
    padding: 8px;
    width: min(720px, 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
    transition: box-shadow 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.waitlist-input-group:focus-within {
    border-color: #555555;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36), 0 0 0 3px rgba(255, 255, 255, 0.06);
}

/* Subtle hover elevation */
.waitlist-input-group:hover {
    border-color: #3a3a3a;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
}

/* Optional states that can be toggled via JS if needed */
.waitlist-input-group.invalid {
    border-color: #b94141;
    box-shadow: 0 0 0 2px rgba(185, 65, 65, 0.25), 0 10px 24px rgba(0, 0, 0, 0.28);
}

.waitlist-input-group.success {
    border-color: #4c7f4c;
    box-shadow: 0 0 0 2px rgba(76, 127, 76, 0.25), 0 10px 24px rgba(0, 0, 0, 0.28);
}

/* Progressive enhancement: highlight invalid when browser validation fails */
.waitlist-input-group:has(input:invalid:not(:placeholder-shown)) {
    border-color: #7a3b3b;
}

.waitlist-input-group input[type="email"] {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: none;
    color: var(--white);
    padding: 10px 16px;
    height: 44px; /* accessible touch target */
    line-height: 24px;
    outline: none;
    font-size: 1.05rem;
    border-radius: 999px;
    caret-color: var(--white);
}

.waitlist-input-group input::placeholder {
    color: #9a9a9a;
}

.waitlist .cta-button {
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    padding: 0 1.4rem;
    margin: 0;
    min-height: 44px;
    border-radius: 999px;
    font-weight: 700;
}

.waitlist .cta-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.35);
}

.waitlist .cta-button:hover {
    background: #000000;
}

/* Accessibility helper */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Full-screen moon animation overlay */
.moon-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none; /* animation should not block interactions afterward */
    visibility: hidden;
}

.moon-overlay.show {
    visibility: visible;
}

/* Orbit pivot centered on the viewport */
.moon-orbit {
    position: fixed;
    top: 90vh;
    left: 50vw;
    width: 0;
    height: 0;
    transform: translate(-50%, -50%);
}

.moon {
    position: absolute;
    /* Use a consistent size that reads well on all screens */
    --moon-size: 18vmin;
    /* Radius large enough to start fully off-screen left and exit off-screen right */
    --orbit-radius: calc(50vw + var(--moon-size));
    width: var(--moon-size);
    height: var(--moon-size);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #e9e9e9 45%, #d8d8d8 70%, #c7c7c7 100%);
    box-shadow: 0 0 120px 40px rgba(255, 255, 255, 0.25), 0 0 240px 120px rgba(255, 255, 255, 0.12) inset;
    /* place the moon on the right side of the pivot; parent rotation will orbit it */
    transform: translate(-60vmin, 60vmin);
    opacity: 0.98;
}

/* When shown, rotate the orbit container to make a full circular path */
.moon-overlay.show .moon-orbit {
    animation: moon-rotate 4s linear forwards;
}

@keyframes moon-rotate {
    from {
        transform: translate(-80%, -80%) rotate(0deg);
    }
    to {
        transform: translate(-80%, -80%) rotate(360deg);
    }
}


/* Hero section day-night background cycle to match the moon movement */
.night-cycle {
    animation: hero-night 4s ease-in-out forwards;
}

@keyframes hero-night {
    0% {
        background-color: #ffffff;
    }
    35% {
        background-color: #000000;
    }
    65% {
        background-color: #000000;
    }
    100% {
        background-color: #ffffff;
    }
}


/* In-app timer styling (inside phone screen) */
.phone-screen .demo-timer.in-app {
    text-align: center;
    margin: 4px 16px 8px;
    color: #cfcfcf;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.2px;
    opacity: 0.95;
}

/* Waitlist privacy microcopy styling */
.waitlist-privacy {
    color: #a8a8a8;
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.waitlist-privacy a {
    color: #cfcfcf;
    text-decoration: underline;
}
