:root {
    --black: #050505;
    --panel: #111111;
    --panel-2: #1a1a1a;
    --line: #2a2a2a;
    --grey: #8a8a8a;
    --white: #f2f2f2;
    --radius: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a var(--black);
}

body {
    background: var(--black);
    color: var(--white);
    font-family: 'Sora', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

.mono {
    font-family: 'IBM Plex Mono', monospace;
}

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 28px;
}

/* nav */
nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

nav .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 18px;
}

.brand .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff, #3a3a3a);
    animation: breathe 3.2s ease-in-out infinite;
}

.navlinks {
    display: flex;
    gap: 32px;
    font-size: 14px;
    color: var(--grey);
}

.navlinks a {
    transition: color 0.2s ease;
}

.navlinks a:hover {
    color: var(--white);
}

.navcta {
    padding: 10px 20px;
    border-radius: 100px;
    background: linear-gradient(135deg, #fff, #c9c9c9);
    color: #000;
    font-weight: 600;
    font-size: 13px;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-user-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.nav-user-btn:focus {
    outline: none;
}

.nav-user-btn:hover {
    color: #c9c9c9;
}

.nav-user-btn::after {
    content: "▼";
    font-size: 10px;
    opacity: 0.5;
}

.dropdown-content {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: var(--panel);
    min-width: 160px;
    border-radius: 12px;
    overflow: hidden;
    z-index: 100;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.25s ease;
}

.dropdown-content a {
    color: var(--grey);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 13px;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-content a:hover {
    background: var(--panel-2);
    color: var(--white);
}

.nav-dropdown.open .dropdown-content {
    max-height: 150px;
    opacity: 1;
}

/* hero */
header.hero {
    padding: 120px 0 100px;
    position: relative;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--grey);
    padding: 7px 14px;
    border-radius: 100px;
    background: var(--panel);
    margin-bottom: 28px;
}

.kicker::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e5e5e5;
}

h1 {
    font-size: clamp(44px, 8vw, 92px);
    line-height: 0.98;
    font-weight: 800;
    letter-spacing: -0.03em;
    max-width: 820px;
}

h1 .fade {
    background: linear-gradient(90deg, #fff 0%, #4a4a4a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sub {
    margin-top: 26px;
    max-width: 520px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--grey);
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 26px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #fff, #c4c4c4);
    color: #000;
}

.btn-ghost {
    background: var(--panel);
    color: var(--white);
    border: 1px solid var(--line);
}

.btn-ghost:hover {
    background: var(--panel-2);
}

/* ghost signature mark */
.ghost-stage {
    position: absolute;
    right: -100px;
    top: -65px;
    width: 560px;
    height: 535px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: -1;
    overflow: hidden;
}

.ghost-img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 520px;
    height: 520px;
    object-fit: contain;
    animation: breathe 5s ease-in-out infinite;
    transition: opacity 1.2s ease;
    scale: 1.5;
    filter: grayscale(1) brightness(0.7);
}

.ghost-fade {
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

.ghost-fade-top {
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, var(--black) 0%, transparent 100%);
}

.ghost-fade-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--black) 0%, transparent 100%);
}

.ghost-fade-left {
    top: 0;
    bottom: 0;
    left: 0;
    width: 180px;
    background: linear-gradient(to right, var(--black) 0%, transparent 100%);
}

.ghost-fade-right {
    top: 0;
    bottom: 0;
    right: 0;
    width: 120px;
    background: linear-gradient(to left, var(--black) 0%, transparent 100%);
}

@keyframes breathe {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
}

@media (max-width:900px) {
    .ghost-stage {
        display: none;
    }
}

/* stats */
.stats {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 36px 0;
}

.stats .wrap {
    display: flex;
    gap: 56px;
    flex-wrap: wrap;
}

.stat b {
    display: block;
    font-size: 30px;
    font-weight: 700;
}

.stat span {
    font-size: 13px;
    color: var(--grey);
}

/* sections */
section {
    padding: 110px 0;
}

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

.section-head .eyebrow {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--grey);
    margin-bottom: 14px;
    display: block;
}

.section-head h2 {
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-head p {
    margin-top: 14px;
    color: var(--grey);
    font-size: 15px;
    line-height: 1.6;
}

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

@media (max-width:800px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--panel);
    border-radius: var(--radius);
    padding: 30px;
    transition: background 0.25s ease, transform 0.25s ease;
}

.card:hover {
    background: var(--panel-2);
}

.card .icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e8e8e8, #5a5a5a);
    margin-bottom: 20px;
}

.card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card p {
    font-size: 14px;
    color: var(--grey);
    line-height: 1.55;
}

/* module list */
.modules {
    background: var(--panel);
    border-radius: 28px;
    padding: 12px;
}

.mod-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-radius: 18px;
    transition: background 0.2s ease;
}

.mod-row:hover {
    background: var(--panel-2);
}

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

.mod-idx {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: #5a5a5a;
}

.mod-name {
    font-weight: 600;
    font-size: 15px;
}

.mod-tag {
    font-size: 12px;
    color: var(--grey);
}

.mod-status {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: #050505;
    background: linear-gradient(135deg, #fff, #bcbcbc);
    padding: 6px 12px;
    border-radius: 100px;
    text-transform: uppercase;
}

/* cta */
.cta {
    border-radius: 32px;
    background: linear-gradient(135deg, #181818, #050505 70%);
    padding: 72px 56px;
    text-align: center;
}

.cta h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.cta p {
    color: var(--grey);
    max-width: 440px;
    margin: 0 auto 34px;
    font-size: 15px;
}

footer {
    border-top: 1px solid var(--line);
    padding: 40px 0;
    margin-top: auto;
}

footer .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

footer .fine {
    font-size: 13px;
    color: #5a5a5a;
}

footer .flinks {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: var(--grey);
}

footer .flinks a:hover {
    color: var(--white);
}

::selection {
    background: #fff;
    color: #000;
}

:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

::-webkit-scrollbar {
    width: 12px;
}

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

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 12px;
    border: 3px solid var(--black);
}

::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* Form Styles for Auth / Dashboard */
.form-container {
    max-width: 400px;
    margin: 100px auto;
    background: var(--panel);
    padding: 40px;
    border-radius: var(--radius);
}

.form-container h2 {
    margin-bottom: 24px;
    font-size: 28px;
    font-weight: 700;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--grey);
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--black);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--white);
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    transition: border-color 0.2s ease, outline 0.2s ease;
}

.input-group input:focus {
    border-color: #5a5a5a;
    outline: none;
}

.form-container .btn {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

.form-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--grey);
}

.form-footer a {
    color: var(--white);
    text-decoration: underline;
}

/* Dashboard Styles */
.dashboard-layout {
    display: flex;
    gap: 40px;
    margin-top: 60px;
    margin-bottom: 60px;
    min-height: 60vh;
}

.sidebar {
    width: 240px;
    flex-shrink: 0;
}

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

.sidebar-nav a {
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--grey);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    background: var(--panel);
    color: var(--white);
}

.dashboard-content {
    flex-grow: 1;
    background: var(--panel);
    border-radius: var(--radius);
    padding: 40px;
}

.dashboard-content h2 {
    font-size: 24px;
    margin-bottom: 32px;
}

.product-card {
    background: var(--panel-2);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.product-card p {
    color: var(--grey);
    font-size: 13px;
}

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
}
.alert-error {
    background: rgba(255, 74, 74, 0.1);
    color: #ff4a4a;
    border: 1px solid rgba(255, 74, 74, 0.2);
}
.alert-success {
    background: rgba(74, 255, 128, 0.1);
    color: #4aff80;
    border: 1px solid rgba(74, 255, 128, 0.2);
}

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    position: relative;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox .checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: var(--black);
    border: 1px solid var(--line);
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-checkbox:hover input ~ .checkmark {
    border-color: #5a5a5a;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--white);
    border-color: var(--white);
}

.custom-checkbox .checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--black);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark::after {
    display: block;
}
