/* ================================================
   KASKÁDIA — Přečerpávací vodní zahrada
   Awwwards-style premium website
   ================================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --c-bg:        #0a0f0d;
    --c-bg-light:  #111916;
    --c-surface:   #1a2420;
    --c-primary:   #2ecc71;
    --c-primary-d: #1a9c54;
    --c-accent:    #3498db;
    --c-water:     #2980b9;
    --c-gold:      #d4a843;
    --c-text:      #e8ebe9;
    --c-text-dim:  #8a9b91;
    --c-white:     #ffffff;

    --f-heading: 'Playfair Display', Georgia, serif;
    --f-body:    'Inter', -apple-system, sans-serif;

    --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);

    --nav-h:     72px;
}

html {
    font-size: 16px;
    scroll-behavior: auto; /* Lenis handles this */
}

body {
    font-family: var(--f-body);
    background: var(--c-bg);
    color: var(--c-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

.section-title {
    font-family: var(--f-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    color: var(--c-white);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--c-text-dim);
    max-width: 600px;
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal--delay-1 { transition-delay: 0.15s; }
.reveal--delay-2 { transition-delay: 0.3s; }

/* ---------- NAV ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.5rem, 4vw, 4rem);
    z-index: 1000;
    background: rgba(10, 15, 13, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.4s var(--ease-out);
}

.nav--hidden { transform: translateY(-100%); }

.nav__logo {
    font-family: var(--f-heading);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--c-white);
}

.nav__links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav__links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-text-dim);
    transition: color 0.3s;
    letter-spacing: 0.02em;
}
.nav__links a:hover { color: var(--c-white); }

.nav__cta {
    padding: 0.5rem 1.25rem !important;
    border: 1px solid var(--c-primary);
    border-radius: 100px;
    color: var(--c-primary) !important;
    transition: background 0.3s, color 0.3s !important;
}
.nav__cta:hover {
    background: var(--c-primary);
    color: var(--c-bg) !important;
}

.nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    padding: 4px 0;
}
.nav__burger span {
    display: block;
    height: 2px;
    background: var(--c-white);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.nav__burger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger--open span:nth-child(2) { opacity: 0; }
.nav__burger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    filter: brightness(0.35) saturate(1.2);
}

.hero__gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 30% 40%, rgba(46, 204, 113, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 70% 60%, rgba(41, 128, 185, 0.12) 0%, transparent 60%),
        linear-gradient(180deg, rgba(10,12,10,0.5) 0%, rgba(10,12,10,0.25) 50%, rgba(10,12,10,0.6) 100%);
    animation: heroGradient 12s ease-in-out infinite alternate;
}

@keyframes heroGradient {
    0%   { opacity: 1; }
    100% { opacity: 0.7; }
}

.hero__particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
}

.hero__headline {
    font-family: var(--f-heading);
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--c-white);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: var(--c-text-dim);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 3rem;
}

.hero__scroll-cta {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--c-text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: float 3s ease-in-out infinite;
    transition: opacity 0.6s;
}

.hero__scroll-cta svg {
    width: 20px;
    height: 20px;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(10px); }
}

/* ---------- CYCLE (Daily Cycle Section) ---------- */
.cycle {
    position: relative;
    padding: 4rem 0 0;
}

.cycle__header {
    text-align: center;
    padding: 0 2rem 2rem;
}

.cycle__sticky {
    position: sticky;
    top: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4.5rem clamp(1rem, 4vw, 4rem) 0.5rem;
    gap: 0.75rem;
}

.cycle__visual {
    width: 100%;
    max-width: 560px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--c-bg-light);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.6s var(--ease-out);
}

.cycle__svg {
    width: 100%;
    height: auto;
    transition: all 1s var(--ease-out);
}

/* SVG phase transitions */
.cycle__sky       { transition: fill 1.5s var(--ease-out); }
.cycle__sun       { transition: all 1.5s var(--ease-out); }
.cycle__moon      { transition: all 1.5s var(--ease-out); }
.cycle__mountain  { transition: fill 1.5s var(--ease-out); }
.cycle__ground    { transition: fill 1.5s var(--ease-out); }
.cycle__lights    { transition: opacity 1.5s var(--ease-out); }

/* Phase 0: Day (charge) */
.cycle__svg[data-phase="0"] .cycle__sky       { fill: #87CEEB; }
.cycle__svg[data-phase="0"] .cycle__sun       { opacity: 1; cy: 80; }
.cycle__svg[data-phase="0"] .cycle__moon      { opacity: 0; }
.cycle__svg[data-phase="0"] .cycle__mountain  { fill: #4a7c59; }
.cycle__svg[data-phase="0"] .cycle__ground    { fill: #3d6b4e; }

/* Phase 1: Afternoon (stored) */
.cycle__svg[data-phase="1"] .cycle__sky       { fill: #e8a735; }
.cycle__svg[data-phase="1"] .cycle__sun       { opacity: 0.7; cy: 160; cx: 600; }
.cycle__svg[data-phase="1"] .cycle__moon      { opacity: 0; }
.cycle__svg[data-phase="1"] .cycle__mountain  { fill: #3d6b4e; }
.cycle__svg[data-phase="1"] .cycle__ground    { fill: #2d5a3e; }
.cycle__svg[data-phase="1"] .cycle__pond-upper { fill: #1abc9c; }

/* Phase 2: Night (discharge) */
.cycle__svg[data-phase="2"] .cycle__sky       { fill: #1a1a3e; }
.cycle__svg[data-phase="2"] .cycle__sun       { opacity: 0; }
.cycle__svg[data-phase="2"] .cycle__moon      { opacity: 1; }
.cycle__svg[data-phase="2"] .cycle__mountain  { fill: #1e3a2b; }
.cycle__svg[data-phase="2"] .cycle__ground    { fill: #152e22; }
.cycle__svg[data-phase="2"] .cycle__lights    { opacity: 1; }

.cycle__phases {
    display: flex;
    gap: 1rem;
    max-width: 560px;
    width: 100%;
}

.cycle__phase {
    flex: 1;
    padding: 1rem 1rem 0.75rem;
    border-radius: 12px;
    background: var(--c-surface);
    border: 1px solid rgba(255,255,255,0.06);
    opacity: 0.4;
    transform: scale(0.97);
    transition: all 0.5s var(--ease-out);
    cursor: pointer;
}

.cycle__phase--active {
    opacity: 1;
    transform: scale(1);
    border-color: var(--c-primary);
    background: rgba(46, 204, 113, 0.08);
}

.cycle__phase-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.4rem;
}

.cycle__phase-title {
    font-family: var(--f-heading);
    font-size: 1rem;
    color: var(--c-white);
    margin-bottom: 0.15rem;
}

.cycle__phase-time {
    font-size: 0.75rem;
    color: var(--c-primary);
    font-weight: 500;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.4rem;
}

.cycle__phase-desc {
    font-size: 0.82rem;
    color: var(--c-text-dim);
    line-height: 1.45;
}

.cycle__progress {
    width: 100%;
    max-width: 900px;
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
}

.cycle__progress-bar {
    height: 100%;
    width: 33.33%;
    background: var(--c-primary);
    border-radius: 3px;
    transition: width 0.6s var(--ease-out);
}

/* ---------- EXPERTS GRID ---------- */
.experts {
    padding: 8rem 0;
}

.experts__header {
    text-align: center;
    padding: 0 2rem 4rem;
}

.experts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 3rem);
}

/* Asymmetric layout */
.experts__grid .expert-card:nth-child(1) { grid-column: 1 / 2; grid-row: 1 / 2; }
.experts__grid .expert-card:nth-child(2) { grid-column: 2 / 4; grid-row: 1 / 2; }
.experts__grid .expert-card:nth-child(3) { grid-column: 1 / 3; grid-row: 2 / 3; }
.experts__grid .expert-card:nth-child(4) { grid-column: 3 / 4; grid-row: 2 / 3; }
.experts__grid .expert-card:nth-child(5) { grid-column: 1 / 4; grid-row: 3 / 4; max-height: 350px; }

.expert-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 320px;
    cursor: pointer;
    background: var(--c-surface);
    border: 1px solid rgba(255,255,255,0.06);
}

.expert-card__image {
    position: absolute;
    inset: 0;
    transition: transform 0.6s var(--ease-out), filter 0.6s var(--ease-out);
}

.expert-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background:
        radial-gradient(circle at 30% 40%, rgba(46, 204, 113, 0.1) 0%, transparent 50%),
        var(--c-surface);
}

.expert-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    background: linear-gradient(0deg, rgba(10, 15, 13, 0.95) 0%, rgba(10, 15, 13, 0.4) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
}

.expert-card__title {
    font-family: var(--f-heading);
    font-size: 1.5rem;
    color: var(--c-white);
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    transition: transform 0.5s var(--ease-out);
}

.expert-card__short {
    font-size: 0.95rem;
    color: var(--c-text-dim);
    margin-bottom: 0.75rem;
    transform: translateY(20px);
    transition: transform 0.5s var(--ease-out) 0.05s;
}

.expert-card__more {
    font-size: 0.85rem;
    color: var(--c-primary);
    font-weight: 500;
    transform: translateY(20px);
    transition: transform 0.5s var(--ease-out) 0.1s;
}

/* Hover */
.expert-card:hover .expert-card__image {
    transform: scale(1.05);
    filter: brightness(0.5);
}

.expert-card:hover .expert-card__overlay {
    opacity: 1;
}

.expert-card:hover .expert-card__title,
.expert-card:hover .expert-card__short,
.expert-card:hover .expert-card__more {
    transform: translateY(0);
}

/* ---------- MODAL ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
}

.modal--open {
    pointer-events: auto;
    opacity: 1;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.modal__content {
    position: relative;
    background: var(--c-bg-light);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 3rem;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(30px) scale(0.96);
    transition: transform 0.5s var(--ease-out);
}

.modal--open .modal__content {
    transform: translateY(0) scale(1);
}

.modal__close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--c-text-dim);
    transition: color 0.3s;
    line-height: 1;
}
.modal__close:hover { color: var(--c-white); }

.modal__role {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--c-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal__title {
    font-family: var(--f-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--c-white);
    margin-bottom: 1.5rem;
}

.modal__text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--c-text);
}

.modal__text em {
    color: var(--c-primary);
    font-style: normal;
    font-weight: 500;
}

/* ---------- CTA ---------- */
.cta {
    padding: 8rem 0;
    background:
        radial-gradient(ellipse at 50% 100%, rgba(46, 204, 113, 0.06) 0%, transparent 60%),
        var(--c-bg);
}

.cta__content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

.cta__headline {
    font-family: var(--f-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--c-white);
    margin-bottom: 1rem;
}

.cta__subtext {
    font-size: 1.1rem;
    color: var(--c-text-dim);
    margin-bottom: 3rem;
}

.cta__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.cta__label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--c-text);
    letter-spacing: 0.02em;
    margin-top: 0.5rem;
}

.cta__form-status {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    display: none;
}
.cta__form-status--success {
    display: block;
    background: rgba(46, 204, 113, 0.12);
    color: var(--c-primary);
    border: 1px solid rgba(46, 204, 113, 0.25);
}
.cta__form-status--error {
    display: block;
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.25);
}

.cta__form-row {
    display: flex;
    gap: 1rem;
}

.cta__input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: var(--c-surface);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--c-text);
    font-family: var(--f-body);
    font-size: 0.95rem;
    transition: border-color 0.3s;
    outline: none;
}

.cta__input::placeholder { color: var(--c-text-dim); }
.cta__input:focus { border-color: var(--c-primary); }

.cta__textarea {
    resize: vertical;
    min-height: 100px;
}

select.cta__input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238a9b91' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

select.cta__input option {
    background: var(--c-surface);
    color: var(--c-text);
}

.cta__submit {
    padding: 1rem 2rem;
    background: var(--c-primary);
    color: var(--c-bg);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    letter-spacing: 0.02em;
    transition: background 0.3s, transform 0.2s;
}

.cta__submit:hover {
    background: var(--c-primary-d);
    transform: translateY(-1px);
}

.cta__submit:active {
    transform: translateY(0);
}

/* ---------- FOOTER ---------- */
.footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 2rem 0;
}

.footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--c-text-dim);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .nav__links { display: none; }
    .nav__burger { display: flex; }

    /* Mobile nav overlay */
    .nav__links--open {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 0;
        top: var(--nav-h);
        background: var(--c-bg);
        padding: 2rem;
        gap: 1.5rem;
        align-items: center;
        justify-content: center;
        z-index: 999;
    }

    .cycle__phases {
        flex-direction: column;
    }

    .experts__grid {
        grid-template-columns: 1fr;
    }

    .experts__grid .expert-card:nth-child(1),
    .experts__grid .expert-card:nth-child(2),
    .experts__grid .expert-card:nth-child(3),
    .experts__grid .expert-card:nth-child(4),
    .experts__grid .expert-card:nth-child(5) {
        grid-column: 1;
        grid-row: auto;
        max-height: none;
    }

    /* On mobile, show overlay text always */
    .expert-card__overlay {
        opacity: 1;
    }

    .expert-card__title,
    .expert-card__short,
    .expert-card__more {
        transform: translateY(0);
    }

    .cta__form-row {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .hero__headline {
        font-size: 2.2rem;
    }

    .cycle__phase {
        padding: 1rem;
    }

    .modal__content {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
}
