/* ==========================================================================
   OSMYKA — Core Stylesheet & Component Assembly
   Modular architecture: tokens -> base -> components -> sections -> responsive
   ========================================================================== */

/* 1. Design Tokens & Theme Palettes */
@import "./tokens.css";

/* 2. Base Reset & Layout Primitives */
@import "./base.css";

/* 3. Reusable UI Components */
@import "./components/buttons.css";
@import "./components/cards.css";
@import "./components/badges.css";
@import "./components/forms.css";
@import "./components/nav.css";
@import "./components/mockups.css";
@import "./components/tables.css";
@import "./components/footer.css";

/* ==========================================================================
   4. LANDING PAGE & SECTION LAYOUTS
   ========================================================================== */

/* ---------------------------------------------------------------- Hero --- */
.hero {
    position: relative;
    padding: 150px 0 90px;
    overflow: hidden;
    isolation: isolate;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.85;
}

[data-theme="light"] .hero-canvas {
    opacity: 0.75;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--hero-fade);
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    z-index: -3;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    pointer-events: none;
    will-change: transform;
}

[data-theme="light"] .hero-glow {
    opacity: 0.7;
}

.hero-glow-a {
    width: 480px;
    height: 480px;
    top: -140px;
    left: -120px;
    background: var(--hero-glow-a);
    animation: drift 18s ease-in-out infinite alternate;
}

.hero-glow-b {
    width: 520px;
    height: 520px;
    bottom: -180px;
    right: -140px;
    background: var(--hero-glow-b);
    animation: drift 22s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(60px, 40px, 0) scale(1.12); }
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 56px;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.3rem, 5.2vw, 3.6rem);
    line-height: 1.08;
    margin-bottom: 20px;
}

.grad {
    background: linear-gradient(100deg, var(--cyan), #7dd3fc 40%, var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

[data-theme="light"] .grad {
    background: linear-gradient(100deg, #0284c7 0%, #0369a1 42%, #4f46e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    font-size: clamp(1rem, 1.35vw, 1.12rem);
    color: var(--muted);
    max-width: 56ch;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 34px;
}

.hero-facts li {
    display: flex;
    flex-direction: column;
}

.hero-facts strong {
    font-family: var(--mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: -0.02em;
}

.hero-facts span {
    font-size: 12.5px;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

/* ------------------------------------------------------------ Sections --- */
.section {
    padding: 92px 0;
    position: relative;
}

.section-alt {
    background: var(--bg-alt);
    border-block: 1px solid var(--line);
}

.section-head {
    max-width: 720px;
    margin-bottom: 46px;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 12px;
    font-weight: 600;
}

.section-title {
    font-size: clamp(1.65rem, 3.2vw, 2.35rem);
    margin-bottom: 14px;
}

.section-sub {
    color: var(--muted);
    font-size: 1.02rem;
}

/* -------------------------------------------------------- Contact Grid --- */
.section-contact {
    padding-bottom: 100px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 52px;
    align-items: start;
}

.contact-list {
    margin-top: 30px;
    display: grid;
    gap: 14px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 15px;
}

.contact-list svg {
    color: var(--cyan);
    flex: none;
}

.contact-list a:hover {
    color: var(--cyan);
}

/* ------------------------------------------------------- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

.grid .reveal:nth-child(2) { transition-delay: 0.09s; }
.grid .reveal:nth-child(3) { transition-delay: 0.18s; }
.grid .reveal:nth-child(4) { transition-delay: 0.27s; }

/* ---------------------------------------------------- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(56, 225, 255, 0.35);
    border-radius: 99px;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(2, 132, 199, 0.35);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

::selection {
    background: rgba(56, 225, 255, 0.3);
    color: #fff;
}

[data-theme="light"] ::selection {
    background: rgba(2, 132, 199, 0.25);
    color: #0f172a;
}

/* --------------------------------------------------- Mobile Bottom Bar --- */
.bottom-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 105;
    background: var(--bottom-bar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.75), 0 -1px 0 rgba(56, 225, 255, 0.12);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

[data-theme="light"] .bottom-bar {
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.08), 0 -1px 0 rgba(2, 132, 199, 0.12);
}

.bottom-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 520px;
    margin-inline: auto;
    gap: 3px;
}

.bottom-bar-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    min-width: 48px;
    height: 50px;
    padding: 3px 4px;
    border-radius: 12px;
    color: var(--dim);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    transition: color 0.22s var(--ease),
                transform 0.18s var(--ease),
                background-color 0.22s var(--ease);
}

.bottom-bar-link:active {
    transform: scale(0.92);
}

.bottom-bar-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: inherit;
    transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}

.bottom-bar-icon svg {
    display: block;
    width: 21px;
    height: 21px;
    transition: transform 0.25s var(--ease), stroke 0.25s var(--ease);
}

.bottom-bar-label {
    line-height: 1;
    white-space: nowrap;
    font-family: var(--font);
    font-size: 10px;
    transition: color 0.22s;
}

.bottom-bar-link.active {
    color: var(--cyan);
}

.bottom-bar-link.active .bottom-bar-icon {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px rgba(56, 225, 255, 0.75));
}

[data-theme="light"] .bottom-bar-link.active .bottom-bar-icon {
    filter: drop-shadow(0 1px 6px rgba(2, 132, 199, 0.5));
}

.bottom-bar-link.active .bottom-bar-label {
    color: var(--text-strong);
    font-weight: 700;
}

.bottom-bar-link.active::after {
    content: '';
    position: absolute;
    top: 2px;
    width: 14px;
    height: 2.5px;
    border-radius: 99px;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
}

.bottom-bar-cta {
    color: var(--muted);
}

.bottom-bar-cta .bottom-bar-icon {
    color: var(--cyan);
}

.bottom-bar-cta.active {
    background: rgba(56, 225, 255, 0.08);
    border: 1px solid rgba(56, 225, 255, 0.22);
}

[data-theme="light"] .bottom-bar-cta.active {
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.22);
}

/* ==========================================================================
   5. LEGAL PAGES (TERMS & PRIVACY)
   ========================================================================== */

.legal-page-body {
    background: var(--bg);
}

.legal-main {
    padding: 120px 0 80px;
    min-height: calc(100vh - 200px);
}

.legal-container {
    max-width: 900px;
    margin-inline: auto;
}

.legal-card {
    padding: 46px 44px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
}

.legal-card:hover {
    transform: none; /* keep stable for reading */
}

.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
    animation: fadeInLegal 0.35s var(--ease) both;
}

@keyframes fadeInLegal {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.legal-header {
    border-bottom: 1px solid var(--line);
    padding-bottom: 24px;
    margin-bottom: 28px;
}

.legal-title {
    font-size: clamp(2.1rem, 4.5vw, 2.9rem);
    margin-bottom: 10px;
    line-height: 1.15;
}

.legal-meta {
    font-size: 13.5px;
    color: var(--dim);
    font-family: var(--mono);
}

.legal-info-box {
    background: rgba(56, 225, 255, 0.05);
    border: 1px solid rgba(56, 225, 255, 0.22);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 32px;
}

[data-theme="light"] .legal-info-box {
    background: rgba(2, 132, 199, 0.06);
    border-color: rgba(2, 132, 199, 0.22);
}

.legal-info-box h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 10px;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.legal-info-box p {
    font-size: 14px;
    color: var(--text-strong);
    margin-bottom: 6px;
    line-height: 1.6;
}

.legal-info-box p:last-child {
    margin-bottom: 0;
}

.legal-info-box a {
    color: var(--cyan);
    text-decoration: underline;
}

.legal-body {
    line-height: 1.75;
}

.legal-body h2 {
    font-size: 1.35rem;
    color: var(--text-strong);
    margin-top: 38px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.legal-body p {
    font-size: 15.2px;
    color: var(--muted);
    margin-bottom: 16px;
}

.legal-body ul,
.legal-body ol {
    margin-bottom: 22px;
    padding-left: 22px;
}

.legal-body li {
    font-size: 14.8px;
    color: var(--muted);
    margin-bottom: 9px;
    list-style-type: disc;
    line-height: 1.65;
}

.legal-body strong {
    color: var(--text-strong);
}

.legal-body a {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.legal-body a:hover {
    color: var(--text-strong);
}

/* ==========================================================================
   6. RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1040px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-visual {
        max-width: 540px;
        margin-inline: auto;
    }
    .device {
        transform: none;
    }
    .device:hover {
        transform: translateY(-4px);
    }
    .float-card {
        left: auto;
        right: 12px;
        bottom: -82px;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

@media (max-width: 860px) {
    .bottom-bar {
        display: block;
    }
}

@media (max-width: 720px) {
    .section {
        padding: 60px 0;
    }
    .hero {
        padding: 116px 0 56px;
    }
    .float-card {
        position: static;
        margin-top: 14px;
        animation: none;
    }
    .contact-form {
        padding: 22px 18px;
    }
    .contact-form input,
    .contact-form textarea {
        font-size: 16px; /* prevent iOS auto-zoom */
    }
    .legal-main {
        padding-top: 96px;
    }
    .legal-card {
        padding: 26px 20px;
        border-radius: var(--radius);
    }
    .legal-body h2 {
        font-size: 1.2rem;
        margin-top: 28px;
    }
    .legal-body p,
    .legal-body li {
        font-size: 14px;
    }
    .legal-info-box {
        padding: 16px 18px;
    }
    .legal-top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .legal-back-btn {
        justify-content: center;
    }
    .legal-lang-switch {
        width: 100%;
        display: flex;
    }
    .lang-tab-btn {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.1rem;
    }
    .hero-actions .btn {
        width: 100%;
    }
    .hero-facts {
        gap: 12px 20px;
    }
    .card {
        padding: 22px 20px;
    }
    .radio-row {
        flex-direction: column;
    }
    .radio span {
        display: block;
        text-align: center;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
