/* ---------------------------------------------------------------------- */
/* ELA3 — Design system                                                   */
/* ---------------------------------------------------------------------- */

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

:root {
    --bg: #07070a;
    --bg-elevated: #0e0e13;
    --surface: #131318;
    --surface-border: rgba(255, 255, 255, 0.08);
    --text: #f4f4f6;
    --text-muted: #9a9aa5;
    --text-faint: #6b6b76;
    --accent: #7c5cff;
    --accent-soft: #a98bff;
    --accent-mediflow: #3ea0ff;
    --accent-cyclya: #ff6f9c;
    --radius-s: 10px;
    --radius-m: 18px;
    --radius-l: 28px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: inherit;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

p {
    margin: 0;
}

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

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 28px;
}

.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-soft);
    margin-bottom: 14px;
}

/* ---------------------------------------------------------------------- */
/* Reveal-on-scroll animation                                             */
/* ---------------------------------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------------------------------------------------------------- */
/* Buttons & links                                                        */
/* ---------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.35s var(--ease), background-color 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn--primary {
    background: var(--text);
    color: #0a0a0c;
}

.btn--primary:hover {
    box-shadow: 0 12px 30px rgba(124, 92, 255, 0.35);
}

.btn--ghost {
    background: transparent;
    border-color: var(--surface-border);
    color: var(--text);
}

.btn--ghost:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.btn--large {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn--small {
    padding: 9px 18px;
    font-size: 0.85rem;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text);
    padding-bottom: 2px;
    border-bottom: 1px solid var(--surface-border);
    transition: gap 0.3s var(--ease), border-color 0.3s var(--ease);
}

.link-arrow:hover {
    gap: 10px;
    border-color: var(--text);
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    transition: color 0.3s var(--ease);
}

.back-link:hover {
    color: var(--text);
}

.google-play-badge {
    display: inline-flex;
    flex-shrink: 0;
    align-self: center;
}

.google-play-badge img {
    display: block;
    width: 180px;
    height: auto;
}

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px 0;
    transition: padding 0.4s var(--ease), background-color 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.site-header.is-scrolled {
    padding: 12px 0;
    background: rgba(7, 7, 10, 0.72);
    backdrop-filter: blur(16px) saturate(150%);
    box-shadow: 0 1px 0 var(--surface-border);
}

.site-header__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
}

.brand__mark {
    display: block;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 1;
}

.main-nav__link {
    position: relative;
    font-size: 0.92rem;
    color: var(--text-muted);
    transition: color 0.3s var(--ease);
}

.main-nav__link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width 0.3s var(--ease);
}

.main-nav__link:hover,
.main-nav__link.is-active {
    color: var(--text);
}

.main-nav__link:hover::after,
.main-nav__link.is-active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-faint);
}

.lang-switch__link {
    transition: color 0.3s var(--ease);
}

.lang-switch__link.is-active {
    color: var(--text);
    font-weight: 700;
}

.lang-switch__link:hover {
    color: var(--text);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--surface-border);
    border-radius: 10px;
}

.menu-toggle span {
    display: block;
    width: 16px;
    height: 1.5px;
    margin: 0 auto;
    background: var(--text);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.hero {
    position: relative;
    padding: 110px 0 140px;
    text-align: center;
    overflow: hidden;
}

.hero__aurora {
    position: absolute;
    inset: -20% -10% auto -10%;
    height: 720px;
    z-index: -1;
    filter: blur(70px);
    opacity: 0.55;
}

.hero__blob {
    position: absolute;
    border-radius: 50%;
    animation: drift 18s ease-in-out infinite;
}

.hero__blob--1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: 8%;
    background: radial-gradient(circle, var(--accent), transparent 70%);
}

.hero__blob--2 {
    width: 380px;
    height: 380px;
    top: -60px;
    right: 6%;
    background: radial-gradient(circle, var(--accent-mediflow), transparent 70%);
    animation-delay: -6s;
}

.hero__blob--3 {
    width: 320px;
    height: 320px;
    bottom: -140px;
    left: 42%;
    background: radial-gradient(circle, var(--accent-cyclya), transparent 70%);
    animation-delay: -11s;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, 20px) scale(1.08); }
    66% { transform: translate(-25px, 10px) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
    .hero__blob {
        animation: none;
    }
}

.hero__content {
    position: relative;
}

.hero__title {
    font-size: clamp(2.6rem, 6vw, 4.6rem);
    line-height: 1.04;
    margin: 0 auto 24px;
    max-width: 16ch;
    background: linear-gradient(180deg, #ffffff 30%, rgba(255,255,255,0.72));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 52ch;
    margin: 0 auto 40px;
}

.hero__actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.product-hero--cyclya .hero__actions {
    align-items: center;
    flex-wrap: wrap;
}

.hero__scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 36px;
    transform: translateX(-50%);
    width: 24px;
    height: 38px;
    border: 1.5px solid var(--surface-border);
    border-radius: 14px;
}

.hero__scroll-cue span {
    display: block;
    width: 4px;
    height: 8px;
    margin: 6px auto 0;
    border-radius: 4px;
    background: var(--text-muted);
    animation: scroll-cue 1.8s ease-in-out infinite;
}

@keyframes scroll-cue {
    0% { transform: translateY(0); opacity: 1; }
    70% { transform: translateY(12px); opacity: 0; }
    100% { opacity: 0; }
}

/* ---------------------------------------------------------------------- */
/* Stats                                                                   */
/* ---------------------------------------------------------------------- */

.stats {
    border-top: 1px solid var(--surface-border);
    border-bottom: 1px solid var(--surface-border);
    padding: 56px 0;
}

.stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.stat__value {
    display: block;
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent-soft), var(--accent-mediflow));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat__label {
    display: block;
    margin-top: 8px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ---------------------------------------------------------------------- */
/* Section headings                                                        */
/* ---------------------------------------------------------------------- */

.section-head {
    max-width: 640px;
    margin-bottom: 56px;
}

.section-head--center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-head h2 {
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    margin-bottom: 14px;
}

.section-head__subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.products, .philosophy, .features, .highlight, .final-cta {
    padding: 120px 0;
}

/* ---------------------------------------------------------------------- */
/* Product cards (home)                                                    */
/* ---------------------------------------------------------------------- */

.product-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-l);
    padding: 56px;
    margin-bottom: 32px;
    transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.18);
}

.product-card--cyclya .product-card__body {
    order: 1;
}

.tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    margin-bottom: 18px;
}

.product-card__body h3 {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    margin-bottom: 14px;
}

.product-card__body p {
    color: var(--text-muted);
    font-size: 1.02rem;
    margin-bottom: 28px;
}

.product-card__actions {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.product-card__visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------------------------------------------------------------------- */
/* CSS "mockups" — abstract illustrations, no external images needed      */
/* ---------------------------------------------------------------------- */

.mock {
    position: relative;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-m);
    background: var(--bg-elevated);
    border: 1px solid var(--surface-border);
    padding: 20px;
    overflow: hidden;
}

.mock--large {
    max-width: 480px;
}

.mock__theme-preview {
    position: relative;
    width: 94%;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.mock__window {
    --mock-panel: #efebe3;
    --mock-canvas: #fbf9f5;
    --mock-detail: #ddd7c9;
    --mock-dot: #d9d3c6;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: var(--mock-canvas);
}

.mock__window--dark {
    --mock-panel: #252a35;
    --mock-canvas: #151922;
    --mock-detail: #414958;
    --mock-dot: #586173;
    position: absolute;
    inset: 0;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.mock__window-body {
    display: flex;
}

.mock__window-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--mock-panel);
}

.mock__window-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mock-dot);
}

.mock__window-sidebar {
    width: 52px;
    flex-shrink: 0;
    background: var(--mock-panel);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
}

.mock__window-logo {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--accent-mediflow);
}

.mock__window-nav-item {
    width: 22px;
    height: 4px;
    border-radius: 2px;
    background: var(--mock-detail);
}

.mock__window-main {
    flex: 1;
    min-width: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--mock-canvas);
}

.mock__window-stats {
    display: flex;
    gap: 8px;
}

.mock__window-stats span {
    flex: 1;
    height: 30px;
    border-radius: 8px;
    background: var(--mock-panel);
}

.mock__window-rows {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 4px;
}

.mock__window-rows span {
    display: block;
    height: 12px;
    border-radius: 5px;
    background: var(--mock-panel);
}

.mock__window-rows span:last-child {
    width: 70%;
}

.mock--mediflow {
    background: linear-gradient(160deg, rgba(62, 160, 255, 0.16), var(--bg-elevated) 60%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mock__donut {
    position: relative;
    width: 64%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(
        var(--accent-cyclya) 0deg 55deg,
        #b8a4ff 55deg 230deg,
        rgba(255, 255, 255, 0.16) 230deg 285deg,
        rgba(255, 111, 156, 0.4) 285deg 360deg
    );
}

.mock__donut-hole {
    position: absolute;
    inset: 20%;
    border-radius: 50%;
    background: var(--bg-elevated);
    box-shadow: inset 0 0 0 1px var(--surface-border);
}

.mock__donut-marker {
    position: absolute;
    top: 26%;
    left: 83%;
    width: 11px;
    height: 11px;
    margin: -5.5px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
    animation: pulse-marker 2.4s ease-in-out infinite;
}

@keyframes pulse-marker {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

@media (prefers-reduced-motion: reduce) {
    .mock__donut-marker {
        animation: none;
    }
}

.mock__donut-label {
    position: absolute;
    inset: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2px;
}

.mock__donut-label strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.mock__donut-label span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.mock--cyclya {
    background: linear-gradient(160deg, rgba(255, 111, 156, 0.14), var(--bg-elevated) 60%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------------------------------------------------------------------- */
/* Philosophy                                                              */
/* ---------------------------------------------------------------------- */

.philosophy__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.philosophy-item__index {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-faint);
    margin-bottom: 18px;
}

.philosophy-item h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.philosophy-item p {
    color: var(--text-muted);
}

/* ---------------------------------------------------------------------- */
/* Product page hero                                                       */
/* ---------------------------------------------------------------------- */

.product-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
    max-width: var(--container);
    margin: 0 auto;
    padding: 64px 28px 80px;
}

.product-hero > .container {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.product-hero .back-link {
    display: block;
    width: fit-content;
    margin-bottom: 20px;
}

.product-hero .eyebrow {
    display: block;
}

.product-hero__visual {
    display: flex;
    justify-content: center;
    min-width: 0;
}

.product-hero--cyclya {
    direction: rtl;
}

.product-hero--cyclya > * {
    direction: ltr;
}

.product-hero__title {
    font-size: clamp(2.2rem, 4.6vw, 3.4rem);
    margin-bottom: 20px;
}

.product-hero__subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 48ch;
    margin-bottom: 36px;
}

/* ---------------------------------------------------------------------- */
/* Features grid                                                           */
/* ---------------------------------------------------------------------- */

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

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

.feature-card {
    padding: 32px;
    border-radius: var(--radius-m);
    background: var(--surface);
    border: 1px solid var(--surface-border);
    transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.18);
}

.feature-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(124, 92, 255, 0.12);
    color: var(--accent-soft);
    margin-bottom: 20px;
}

.feature-card__icon svg {
    width: 22px;
    height: 22px;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ---------------------------------------------------------------------- */
/* Highlight band                                                          */
/* ---------------------------------------------------------------------- */

.highlight {
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(124, 92, 255, 0.1), transparent 70%);
}

.highlight--cyclya {
    background: radial-gradient(ellipse at center, rgba(255, 111, 156, 0.1), transparent 70%);
}

.highlight__inner h2 {
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    margin: 16px 0 18px;
}

.highlight__inner p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 56ch;
    margin: 0 auto;
}

/* ---------------------------------------------------------------------- */
/* Final CTA + footer                                                      */
/* ---------------------------------------------------------------------- */

.final-cta__inner {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.final-cta__inner h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    margin-bottom: 16px;
}

.final-cta__inner p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

.site-footer {
    border-top: 1px solid var(--surface-border);
    padding: 72px 0 32px;
}

.site-footer__inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 28px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
}

.site-footer__brand p {
    margin-top: 16px;
    color: var(--text-muted);
    max-width: 32ch;
}

.site-footer__col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-footer__col h3 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    margin-bottom: 6px;
}

.site-footer__col a {
    color: var(--text-muted);
    font-size: 0.92rem;
    transition: color 0.3s var(--ease);
}

.site-footer__col a:hover {
    color: var(--text);
}

.site-footer__bottom {
    max-width: var(--container);
    margin: 56px auto 0;
    padding: 24px 28px 0;
    border-top: 1px solid var(--surface-border);
    color: var(--text-faint);
    font-size: 0.82rem;
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */

@media (max-width: 960px) {
    .product-card,
    .product-hero {
        grid-template-columns: 1fr;
    }

    .product-card--cyclya .product-card__body {
        order: 0;
    }

    .product-hero--cyclya {
        direction: ltr;
    }

    .product-hero__visual {
        order: -1;
    }

    .philosophy__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 760px) {
    .main-nav,
    .header-cta {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .site-header.is-menu-open .main-nav {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin-top: 12px;
        padding: 24px 28px;
        background: rgba(7, 7, 10, 0.96);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--surface-border);
    }

    .hero {
        padding: 90px 0 100px;
    }

    .features__grid,
    .features__grid--4 {
        grid-template-columns: 1fr;
    }
}
