/**
 * Landing page styles for DikeBot.
 *
 * Theme approach: JS in the template forces data-bs-theme="light" on <html>,
 * so all CSS variables from _variables.css resolve to their light-mode values
 * automatically. No need to duplicate or override tokens here.
 *
 * Layout approach: The template sets {% block container_class %} to empty,
 * removing Bootstrap's .container wrapper. Hero is therefore full-width by
 * default. Content sections self-constrain via max-width.
 *
 * Neumorphic rule: panels/cards are RAISED (--shadow-e1 / --shadow-e2).
 * Inset is reserved for form inputs only.
 */

/* ==========================================================================
   Body — ensure no extra margins/padding on landing
   ========================================================================== */
body.landing-page {
    background: var(--bg-s0);
}

/* The floating brand inherits from body; on the dark hero it needs light text */
body.landing-page .floating-brand {
    color: var(--color-porcelain);
    mix-blend-mode: difference;
}

/* ==========================================================================
   Hero — full-bleed, full viewport height
   ========================================================================== */
.landing-hero {
    background: var(--color-emerald);
    color: var(--color-porcelain);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    /* Top padding clears the fixed floating elements (top:0.75rem + ~2.5rem + gap) */
    padding: 5rem 1.5rem 3.5rem;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow: hidden;
}

/* ==========================================================================
   Hero ambient background — inline SVG curves with CSS-only animation.
   All transforms are GPU-composited (translate/rotate/scale/opacity).
   ========================================================================== */
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Content sits above the SVG */
.landing-hero > *:not(.hero-bg) {
    position: relative;
    z-index: 1;
}

.hero-bg__curve {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 1.5;
    stroke-linecap: round;
}

.hero-bg__curve--1 {
    animation: curveDrift1 28s ease-in-out infinite;
}
.hero-bg__curve--2 {
    stroke: rgba(248, 215, 148, 0.045);
    stroke-width: 1;
    animation: curveDrift2 34s ease-in-out infinite;
}
.hero-bg__curve--3 {
    animation: curveDrift3 24s ease-in-out infinite;
}
.hero-bg__curve--4 {
    stroke: rgba(201, 210, 197, 0.04);
    stroke-width: 1;
    animation: curveDrift4 30s ease-in-out infinite;
}
.hero-bg__curve--5 {
    stroke: rgba(248, 215, 148, 0.035);
    stroke-width: 1.2;
    animation: curveDrift2 38s ease-in-out infinite reverse;
}
.hero-bg__curve--6 {
    stroke: rgba(201, 210, 197, 0.05);
    stroke-width: 0.8;
    animation: curveDrift3 32s ease-in-out infinite;
}
.hero-bg__curve--7 {
    stroke-width: 1;
    animation: curveDrift1 36s ease-in-out infinite reverse;
}

.hero-bg__dot {
    fill: rgba(255, 255, 255, 0.1);
    animation: dotPulse 6s ease-in-out infinite;
}
.hero-bg__dot--2 {
    fill: rgba(248, 215, 148, 0.08);
    animation-delay: -2s;
    animation-duration: 8s;
}
.hero-bg__dot--3 {
    animation-delay: -4s;
    animation-duration: 7s;
}
.hero-bg__dot--4 {
    fill: rgba(201, 210, 197, 0.09);
    animation-delay: -1s;
    animation-duration: 9s;
}
.hero-bg__dot--5 {
    fill: rgba(248, 215, 148, 0.06);
    animation-delay: -5s;
    animation-duration: 7.5s;
}

@keyframes curveDrift1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.7; }
    25%      { transform: translate(30px, -15px) rotate(0.5deg); opacity: 1; }
    50%      { transform: translate(-20px, 10px) rotate(-0.3deg); opacity: 0.8; }
    75%      { transform: translate(15px, 20px) rotate(0.4deg); opacity: 1; }
}

@keyframes curveDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    33%      { transform: translate(-25px, 20px) scale(1.03); opacity: 1; }
    66%      { transform: translate(20px, -10px) scale(0.97); opacity: 0.7; }
}

@keyframes curveDrift3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(-15px, -20px) rotate(-0.6deg); }
}

@keyframes curveDrift4 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.5; }
    40%      { transform: translate(25px, 15px) scale(1.02) rotate(0.3deg); opacity: 0.9; }
    80%      { transform: translate(-10px, -8px) scale(0.98) rotate(-0.2deg); opacity: 0.6; }
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.8); }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-bg__curve,
    .hero-bg__dot {
        animation: none;
    }
}

.landing-hero__logo {
    font-size: 2.75rem;
    line-height: 0.95;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.25));
}

.landing-hero__title {
    font-weight: var(--font-weight-semibold);
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    color: var(--color-porcelain);
    max-width: 720px;
    margin: 0 auto 1rem;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.landing-hero__subtitle {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: var(--color-moss);
    max-width: 560px;
    margin: 0 auto 1rem;
    line-height: 1.6;
}

.landing-hero__extra {
    font-size: 1.35rem;
    color: var(--color-khaki);
    max-width: 620px;
    margin: 0 auto 2.5rem;
    font-weight: var(--font-weight-medium);
    min-height: 2em;
}

/* Typewriter cursor blink */
.typewriter-cursor {
    display: inline-block;
    margin-left: 1px;
    animation: cursorBlink 0.7s step-end infinite;
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .typewriter-cursor { animation: none; opacity: 1; }
}

.landing-hero__secondary {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--color-moss);
    font-weight: var(--font-weight-medium);
}

/* ==========================================================================
   CTA button — khaki on emerald hero, re-scoped on light sections
   ========================================================================== */
.landing-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--color-khaki);
    color: var(--color-noir);
    font-weight: var(--font-weight-semibold);
    padding: 0.75rem 1.75rem;
    border-radius: var(--border-radius-lg);
    border: none;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-normal);
    box-shadow:
        3px 3px 6px rgba(15, 25, 20, 0.4),
       -3px -3px 6px rgba(55, 80, 72, 0.3);
}

.landing-btn-primary:hover {
    background: #f5ca6e;
    transform: translateY(-1px);
    color: var(--color-noir);
    text-decoration: none;
    box-shadow:
        4px 4px 10px rgba(15, 25, 20, 0.45),
       -4px -4px 10px rgba(55, 80, 72, 0.35);
}

.landing-btn-primary .material-symbols-outlined {
    font-size: 1.15rem;
}

/* On light-background sections, use light neumorphic shadows */
.landing-section .landing-btn-primary {
    box-shadow: var(--shadow-e1);
}

.landing-section .landing-btn-primary:hover {
    box-shadow: var(--shadow-e2);
}

/* ==========================================================================
   Sections — self-constraining width
   ========================================================================== */
.landing-section {
    padding: 4rem 1.5rem;
    max-width: 960px;
    margin: 0 auto;
    background: var(--bg-s0);
}

.landing-section--alt {
    max-width: none;
    background: var(--bg-s1);
}

.landing-section--alt > * {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
}

.landing-section__title {
    font-weight: var(--font-weight-semibold);
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    color: var(--color-emerald);
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.landing-section__intro {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

/* ==========================================================================
   Cards — raised neumorphic
   ========================================================================== */
.landing-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.landing-cards--two {
    grid-template-columns: repeat(2, 1fr);
}

.landing-card {
    background: var(--bg-s0);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-e1);
    transition: box-shadow var(--transition-normal), transform var(--transition-fast);
}

.landing-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-e2);
}

/* Cards in alt (s1-background) sections match the surface */
.landing-section--alt .landing-card {
    background: var(--bg-s2);
}

.landing-card__emoji {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.75rem;
    display: block;
}

.landing-card__heading {
    font-weight: var(--font-weight-semibold);
    font-size: 1.1rem;
    color: var(--color-emerald);
    margin-bottom: 0.75rem;
}

.landing-card__list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    flex: 1;
}

.landing-card__list li {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-default);
    line-height: 1.45;
}

.landing-card__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-earth);
}

.landing-card__punch {
    font-size: 0.85rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-earth);
    margin: 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-default);
}

/* ==========================================================================
   Comparison — both columns raised
   ========================================================================== */
.landing-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.landing-compare__col {
    border-radius: var(--border-radius-lg);
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow-e1);
}

.landing-compare__col h3 {
    font-weight: var(--font-weight-semibold);
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.landing-compare__sub {
    font-weight: var(--font-weight-regular);
    font-size: 0.9rem;
    opacity: 0.7;
}

.landing-compare__col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.landing-compare__col ul li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

/* "Them" column */
.landing-compare__col--them {
    background: var(--bg-s2);
    color: var(--text-muted);
}

.landing-compare__col--them h3 { color: var(--text-muted); }

.landing-compare__col--them li::before {
    content: "\2715";
    position: absolute;
    left: 0;
    color: var(--color-earth);
    font-weight: 700;
    font-size: 0.8rem;
}

/* "Us" column — emerald surface */
.landing-compare__col--us {
    background: var(--color-emerald);
    color: var(--color-porcelain);
    border: 2px solid var(--color-khaki);
}

.landing-compare__col--us h3 { color: var(--color-khaki); }

.landing-compare__col--us li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--color-khaki);
    font-weight: 700;
    font-size: 0.9rem;
}

.landing-compare__punch {
    text-align: center;
    font-size: 1rem;
    color: var(--color-emerald);
    margin-top: 2rem;
    line-height: 1.7;
    font-weight: var(--font-weight-medium);
}

/* ==========================================================================
   Steps (1-2-3)
   ========================================================================== */
.landing-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.landing-step {
    text-align: center;
}

.landing-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--color-emerald);
    color: var(--color-khaki);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-e1);
}

.landing-step h3 {
    font-weight: var(--font-weight-semibold);
    font-size: 1rem;
    color: var(--color-emerald);
    margin-bottom: 0.5rem;
}

.landing-step p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   Carousel (Miten se toimii)
   ========================================================================== */
.landing-carousel {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-e2);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.landing-carousel .carousel-item img {
    max-height: 420px;
    object-fit: cover;
}

.landing-carousel .carousel-caption {
    background: rgba(0, 0, 0, 0.45);
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    bottom: 1.25rem;
}

.landing-carousel .carousel-indicators [data-bs-target] {
    background-color: var(--color-emerald);
    opacity: 0.5;
}

.landing-carousel .carousel-indicators .active {
    opacity: 1;
}

.landing-carousel .carousel-control-prev-icon,
.landing-carousel .carousel-control-next-icon {
    filter: invert(0.3) sepia(1) saturate(3) hue-rotate(100deg);
}

/* ==========================================================================
   Trust notice
   ========================================================================== */
.landing-trust {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--bg-s2);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem 1.5rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-default);
    box-shadow: var(--shadow-e1);
}

.landing-trust__emoji {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.landing-trust p {
    margin: 0 0 0.35rem;
    color: var(--color-emerald);
}

.landing-trust ul {
    list-style: disc;
    padding-left: 1.1rem;
    margin: 0;
}

.landing-trust ul li {
    margin-bottom: 0.25rem;
    line-height: 1.45;
}

/* ==========================================================================
   Waitlist card
   ========================================================================== */
.waitlist-card {
    width: 100%;
    max-width: 480px;
    margin: 2.5rem auto 0;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    background: var(--bg-s2);
    box-shadow: var(--shadow-e1);
}

.waitlist-card__heading {
    font-size: 1.15rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-emerald);
    margin-bottom: 1rem;
    text-align: center;
}

/* Inputs — inset (the only place we use inset) */
.waitlist-card .form-control {
    background: var(--bg-s1);
    border: none;
    color: var(--text-default);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-inset);
}

.waitlist-card .form-control:focus {
    border: none;
    outline: none;
    box-shadow: var(--shadow-inset), var(--shadow-focus);
}

/* ==========================================================================
   Login link
   ========================================================================== */
.landing-login-link {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

.landing-login-link a {
    color: var(--color-emerald);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
}

.landing-login-link a:hover { text-decoration: underline; }

/* ==========================================================================
   About (Meistä)
   ========================================================================== */
.landing-about {
    max-width: 640px;
    margin: 1.5rem auto 0;
    text-align: center;
}

.landing-about p {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-default);
    margin-bottom: 1.25rem;
}

.landing-about__contact {
    font-weight: var(--font-weight-semibold);
    color: var(--color-emerald);
}

.landing-about__contact a {
    color: var(--color-earth);
    text-decoration: none;
}

.landing-about__contact a:hover {
    text-decoration: underline;
}



/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .landing-cards,
    .landing-cards--two,
    .landing-compare,
    .landing-steps {
        grid-template-columns: 1fr;
    }

    .landing-hero {
        padding: 4.5rem 1.25rem 2.5rem;
    }

}
