:root {
    --bg: #0E0F11;
    --bg2: #12141A;
    --surface: #16181D;
    --surface2: #1A1D24;
    --text: #E2E4EA;
    --muted: #A3A8B8;
    --border: rgba(255, 255, 255, .08);

    --green: #6FA38A;
    --gold: #B88A2E;
    --red: #B4454E;
    --blue: #3E5C8A;

    --shadow: 0 10px 28px rgba(0, 0, 0, .26);
    --radius: 18px;
    --max: 1080px;

    --btn-primary-bg: #6FA38A;
    --btn-primary-text: #0E0F11;
}

[data-theme="light"] {
    --bg: #F7F8FA;
    --bg2: #FFFFFF;
    --surface: #FFFFFF;
    --surface2: #F1F3F7;
    --text: #14161B;
    --muted: #5E6675;
    --border: rgba(10, 12, 18, .10);
    --shadow: 0 12px 34px rgba(12, 16, 26, .08);

    --btn-primary-bg: #6FA38A;
    --btn-primary-text: #F7F8FA;
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background:
        radial-gradient(1200px 700px at 20% -10%, rgba(111, 163, 138, .12), transparent 55%),
        radial-gradient(900px 600px at 100% 10%, rgba(62, 92, 138, .10), transparent 55%),
        radial-gradient(900px 700px at 85% 110%, rgba(184, 138, 46, .10), transparent 55%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.5;
}

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

a:hover {
    opacity: .86;
}

.wrap {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
}

/* Top bar */
.topline {
    height: 6px;
    background: linear-gradient(90deg, var(--red) 0 25%, var(--green) 25% 50%, var(--gold) 50% 75%, var(--blue) 75% 100%);
    opacity: .9;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(140%) blur(10px);
    background: color-mix(in oklab, var(--bg2) 80%, transparent);
    border-bottom: 1px solid var(--border);
}

.nav {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.brand img {
    width: 30px;
    height: 30px;
}

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

.navlinks a {
    font-size: 14px;
    color: var(--muted);
}

.navlinks a:hover {
    color: var(--text);
    opacity: 1;
}

/* Mega Dropdown Menu */
.navDropdown {
    position: relative;
}

.navDropdownBtn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

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

.navDropdownBtn svg {
    transition: transform 0.2s ease;
}

.navDropdown:hover .navDropdownBtn svg {
    transform: rotate(180deg);
}

.megaDropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.navDropdown:hover .megaDropdown {
    opacity: 1;
    visibility: visible;
}

.megaDropdownInner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    min-width: 480px;
}

.megaItem {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    transition: background 0.15s ease;
}

.megaItem:hover {
    background: var(--surface2);
    opacity: 1;
}

.megaIcon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.megaContent {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.megaTitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.megaDesc {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
}

.megaBadge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    width: fit-content;
}

.megaBadge.soon {
    background: color-mix(in srgb, var(--gold) 20%, transparent);
    color: var(--gold);
}

.megaFooter {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 16px 16px;
    margin-top: -1px;
}

.megaFooterLink {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--muted);
    background: var(--surface2);
    border-radius: 8px;
    transition: color 0.15s ease;
}

.megaFooterLink:hover {
    color: var(--text);
    opacity: 1;
}

.megaFooterArrow {
    opacity: 0.5;
}

/* Mobile menu updates */
.sideMenuSection {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    padding: 16px 20px 8px;
}

.sideMenuDivider {
    height: 1px;
    background: var(--border);
    margin: 8px 20px;
}

.mobileBadge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--gold) 20%, transparent);
    color: var(--gold);
    margin-left: 8px;
}

@media (max-width: 768px) {
    .navDropdown {
        display: none;
    }
}

.navright {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface) 70%, transparent);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: transform .08s ease, opacity .2s ease, background .2s ease;
    font-family: inherit;
}

.btn:hover {
    opacity: .9;
}

.btn:active {
    transform: translateY(1px);
}

.btn.primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border-color: transparent;
}

.btn.ghost {
    background: transparent;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: var(--green);
    opacity: .9;
}

.badge {
    font-size: 12px;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 999px;
}

/* Hero */
main {
    padding: 44px 0 60px;
    flex: 1;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 26px;
    align-items: start;
    padding-top: 16px;
}

h1 {
    margin: 14px 0 10px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.05em;
    font-weight: 600;
}

.typewriter::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: .85em;
    vertical-align: baseline;
    margin-left: 2px;
    background: var(--green);
    animation: blink .6s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.sub {
    margin: 0 0 18px;
    color: var(--muted);
    max-width: 62ch;
    font-size: 15px;
}

.cta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

/* Hero card */
.heroCard {
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface) 80%, transparent);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    min-height: 220px;
}

.heroCard:before {
    content: "";
    position: absolute;
    inset: -2px;
    background:
        linear-gradient(90deg, rgba(180, 69, 78, .25), transparent 25%),
        linear-gradient(180deg, rgba(111, 163, 138, .18), transparent 30%),
        linear-gradient(300deg, rgba(62, 92, 138, .16), transparent 35%),
        linear-gradient(140deg, rgba(184, 138, 46, .16), transparent 35%);
    opacity: .35;
    pointer-events: none;
    filter: blur(8px);
}

.heroCard .k {
    position: relative;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .02em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.heroCard .metric {
    position: relative;
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.bar {
    height: 9px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface2) 78%, transparent);
    overflow: hidden;
}

.bar>span {
    display: block;
    height: 100%;
    width: 68%;
    background: linear-gradient(90deg, color-mix(in oklab, var(--green) 55%, transparent), color-mix(in oklab, var(--gold) 45%, transparent));
    opacity: .85;
}

.bar.b2>span {
    width: 52%;
    background: linear-gradient(90deg, color-mix(in oklab, var(--blue) 55%, transparent), color-mix(in oklab, var(--green) 40%, transparent));
}

.bar.b3>span {
    width: 84%;
    background: linear-gradient(90deg, color-mix(in oklab, var(--gold) 55%, transparent), color-mix(in oklab, var(--red) 35%, transparent));
}

/* Sections */
section {
    padding: 46px 0;
}

.sectionTitle {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.hint {
    color: var(--muted);
    font-size: 13px;
}

.panel {
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface) 72%, transparent);
    border-radius: var(--radius);
    padding: 16px;
}

/* Utilities section */
.utilities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.uTitle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface2) 78%, transparent);
    font-weight: 600;
    color: var(--text);
}

/* Form elements */
.field {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

label {
    font-size: 12px;
    color: var(--muted);
}

input,
textarea {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface2) 82%, transparent);
    color: var(--text);
    outline: none;
    font-size: 14px;
    font-family: inherit;
    transition: border-color .2s ease, background .2s ease;
}

input:focus,
textarea:focus {
    border-color: color-mix(in oklab, var(--green) 60%, var(--border));
    background: color-mix(in oklab, var(--surface2) 92%, transparent);
}

.inline {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inline>*:first-child {
    flex: 1;
}

.result {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface2) 76%, transparent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--muted);
    word-break: break-all;
}

.result strong {
    color: var(--text);
    font-weight: 500;
}

/* Drop zone */
.drop {
    border: 1px dashed color-mix(in oklab, var(--border) 70%, var(--muted));
    border-radius: 14px;
    padding: 14px;
    background: color-mix(in oklab, var(--surface2) 65%, transparent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    transition: opacity .2s ease, border-color .2s ease;
}

.drop:hover,
.drop.dragover {
    opacity: .92;
    border-color: color-mix(in oklab, var(--green) 45%, var(--border));
}

.fileRemove {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
    line-height: 1;
}

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

.filesList {
    margin-top: 10px;
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.fileItem {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in oklab, var(--surface2) 72%, transparent);
}

.ok {
    color: color-mix(in oklab, var(--green) 75%, var(--text));
}

.err {
    color: color-mix(in oklab, var(--red) 75%, var(--text));
}

/* Upload progress bar */
.uploadProgress {
    margin-top: 12px;
}

.uploadProgressLabel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.uploadProgressRight {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cancelUploadBtn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 11px;
    padding: 2px 8px;
    cursor: pointer;
    font-family: inherit;
    transition: color .15s ease, border-color .15s ease;
}

.cancelUploadBtn:hover {
    color: var(--red);
    border-color: color-mix(in oklab, var(--red) 40%, var(--border));
}

.uploadProgressTrack {
    height: 8px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface2) 78%, transparent);
    overflow: hidden;
}

.uploadProgressBar {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--green), color-mix(in oklab, var(--green) 70%, var(--gold)));
    transition: width .2s ease;
}

/* Success alert */
.successAlert {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid color-mix(in oklab, var(--green) 30%, var(--border));
    background: color-mix(in oklab, var(--green) 8%, var(--surface2));
    color: color-mix(in oklab, var(--green) 75%, var(--text));
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeSlideIn .3s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pillars */
.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 14px;
}

.pillar {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    background: color-mix(in oklab, var(--surface) 74%, transparent);
    display: grid;
    gap: 10px;
    min-height: 170px;
    position: relative;
    overflow: hidden;
}

.pillar:after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle at 30% 30%, rgba(111, 163, 138, .18), transparent 60%);
    opacity: .9;
    pointer-events: none;
    filter: blur(1px);
}

.pillar p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.pillar ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 13px;
    display: grid;
    gap: 4px;
}

/* Micro features */
.micro {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 20px;
    margin-top: 14px;
}

.microItem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface) 70%, transparent);
    color: var(--muted);
    font-size: 13px;
}

.microDot {
    width: 9px;
    height: 9px;
    border-radius: 99px;
    background: var(--blue);
    opacity: .85;
}

.microItem:nth-child(3n) .microDot {
    background: var(--gold);
}

.microItem:nth-child(4n) .microDot {
    background: var(--green);
}

/* Footer */
footer {
    padding: 34px 0 60px;
    border-top: 1px solid var(--border);
    background: color-mix(in oklab, var(--bg2) 75%, transparent);
}

.footerGrid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.fTitle {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--text);
}

.fLink {
    display: block;
    color: var(--muted);
    font-size: 13px;
    padding: 4px 0;
}

.fLink:hover {
    color: var(--text);
    opacity: 1;
}

.footNote {
    margin-top: 18px;
    color: var(--muted);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.sr {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Hamburger button — hidden on desktop */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 8px 6px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

/* X state for close button */
.hamburger.open span:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.hamburger.open span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

/* Overlay */
.menuOverlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    transition: opacity .25s ease;
}

.menuOverlay.show {
    display: block;
    opacity: 1;
}

/* Side menu */
.sideMenu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 80vw);
    z-index: 95;
    background: var(--bg2);
    border-left: 1px solid var(--border);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform: translateX(100%);
    transition: transform .25s ease;
    overflow-y: auto;
}

.sideMenu.show {
    transform: translateX(0);
}

.sideMenuHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sideMenuHead .hamburger {
    display: flex;
}

.sideMenuLinks {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sideMenuLinks a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
}

.sideMenuLinks a:hover {
    background: color-mix(in oklab, var(--surface2) 70%, transparent);
    opacity: 1;
}

.sideMenuActions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sideMenuTheme {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* Responsive — tablet */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .navlinks {
        display: none;
    }

    .navright {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .utilities {
        grid-template-columns: 1fr;
    }

    .pillars {
        grid-template-columns: 1fr;
    }

    .micro {
        grid-template-columns: 1fr;
    }

    .footerGrid {
        grid-template-columns: 1fr 1fr;
    }

    .sectionTitle {
        flex-direction: column;
        gap: 4px;
    }
}

/* Responsive — phone */
@media (max-width: 560px) {
    h1 {
        font-size: 28px;
    }

    .footerGrid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footNote {
        flex-direction: column;
        gap: 8px;
    }
}
