/* ═══════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════ */
:root {
    --color-bg-start: #f5f7ff;
    --color-bg-end: #ecf6ff;
    --color-surface: rgba(255, 255, 255, 0.62);
    --color-surface-strong: rgba(255, 255, 255, 0.78);
    --color-border: rgba(255, 255, 255, 0.4);
    --color-border-solid: #e2e8f0;
    --color-text: #1f2a37;
    --color-muted: #5b6b7d;
    --color-primary: #4263eb;
    --color-primary-hover: #3b5bdb;
    --color-accent-warm: rgb(11 23 245 / 0.58);
    --color-accent-warm-soft: rgba(245, 158, 11, 0.18);
    --color-danger: #e74c3c;
    --color-success-bg: #ecfdf5;
    --color-success-text: #065f46;
    --color-danger-bg: #fef2f2;
    --color-danger-text: #991b1b;
    --color-info-bg: #eff6ff;
    --color-info-text: #1e40af;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-pill: 999px;
    --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-glass: 0 10px 30px rgba(15, 23, 42, 0.12);
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --container-width: 1100px;
}

/* ═══════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: "Inter", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    color: var(--color-text);
    line-height: 1.5;
    background: linear-gradient(160deg, var(--color-bg-start) 0%, var(--color-bg-end) 100%);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* ═══════════════════════════════════════════════
   LAYOUT — Header & Navigation
   ═══════════════════════════════════════════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--space-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0));
}

.navbar {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f172a;
    text-decoration: none;
    transition: color 0.3s ease, letter-spacing 0.3s ease, transform 0.3s ease;
}

.brand::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.06), 0 0 22px rgba(249, 115, 22, 0.22);
}

.brand::after {
    content: "";
    position: absolute;
    left: 1.1rem;
    bottom: -0.35rem;
    width: 42%;
    height: 1px;
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.9), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.brand:hover {
    color: #0f172a;
    letter-spacing: 0.12em;
    transform: translateY(-1px);
}

.brand:hover::after {
    transform: scaleX(1);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-links a {
    color: var(--color-muted);
    font-weight: 500;
    padding: 0.42rem 0.72rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.nav-links a:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.nav-toggle {
    display: none;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 1.2rem;
    cursor: pointer;
}

/* ═══════════════════════════════════════════════
   LAYOUT — Page Content
   ═══════════════════════════════════════════════ */
.page-content {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg) var(--space-2xl);
}

/* ═══════════════════════════════════════════════
   SHARED — Buttons
   ═══════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--color-muted);
    border: 1px solid var(--color-border-solid);
}

.btn-outline:hover {
    color: var(--color-text);
    border-color: var(--color-text);
}

/* ═══════════════════════════════════════════════
   SHARED — Flash Messages
   ═══════════════════════════════════════════════ */
.flash {
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
}

.flash-success {
    background: var(--color-success-bg);
    color: var(--color-success-text);
}

.flash-danger {
    background: var(--color-danger-bg);
    color: var(--color-danger-text);
}

.flash-info {
    background: var(--color-info-bg);
    color: var(--color-info-text);
}

/* ═══════════════════════════════════════════════
   LANDING — Hero Section
   ═══════════════════════════════════════════════ */
.hero {
    padding: var(--space-xl) 0;
}

.eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-md);
}

.hero-content h1 {
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(4rem, 10vw, 9.5rem);
    font-weight: 100;
    line-height: 0.82;
    letter-spacing: 0.08em;
    color: rgb(14 16 12 / 0.32);
    max-width: 1100px;
    text-shadow: 0 0 1px rgb(255 0 128 / 0.64), 0 30px 100px rgb(10 248 30 / 0.14);
}

.hero-content h2 {
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(0.75rem, 1.1vw, 1.1rem);
    font-weight: 100;
    line-height: 1.6;
    letter-spacing: 0.48em;
    text-transform: uppercase;
    color: rgba(8, 10, 8, 0.52);
    max-width: 680px;
    transform: scaleY(1.32);
    transform-origin: left center;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.18), 0 18px 55px rgba(0, 0, 0, 0.08);
}

.hero-text {
    max-width: 700px;
    color: var(--color-muted);
    margin-bottom: var(--space-lg);
}

.hero-section {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    padding: 4.75rem clamp(1rem, 5vw, 4rem) 4rem;
    border-radius: 32px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 620px;
}

.hero-3d-panel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

#landingThreeCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ═══════════════════════════════════════════════
   LANDING — Feature Cards
   ═══════════════════════════════════════════════ */
.feature-grid {
    margin-top: var(--space-xl);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-soft);
}

.feature-card h2 {
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
}

.feature-card p {
    color: var(--color-muted);
}

/* ═══════════════════════════════════════════════
   AUTH — Login / Register / Change Password
   ═══════════════════════════════════════════════ */
.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: var(--space-xl);
}

.auth-card {
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-glass);
    color: var(--color-text);
}

.auth-card h1 {
    margin-bottom: var(--space-lg);
    font-size: 1.6rem;
    text-align: center;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: var(--color-text);
}

.form-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-border-solid);
    border-radius: 6px;
    background: #fff;
    color: var(--color-text);
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(66, 99, 235, 0.12);
}

.form-error {
    color: var(--color-danger);
    font-size: 0.82rem;
    display: block;
    margin-top: 0.2rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.auth-alt {
    text-align: center;
    margin-top: var(--space-md);
    font-size: 0.88rem;
    color: var(--color-muted);
}

.auth-alt a {
    color: var(--color-primary);
    font-weight: 500;
}

.auth-alt a:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════
   DASHBOARD — Banner
   ═══════════════════════════════════════════════ */
.dashboard-banner {
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-2xl) var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-soft);
}

.dashboard-banner-content h1 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.dashboard-banner-sub {
    color: var(--color-muted);
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════
   DASHBOARD — Projects
   ═══════════════════════════════════════════════ */
.dashboard-projects {
    margin-bottom: var(--space-xl);
}

.dashboard-projects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.dashboard-projects-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-lg);
}

.project-card {
    position: relative;
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glass);
}

.project-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.project-card p {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.project-card-empty {
    border-style: dashed;
    text-align: center;
    cursor: pointer;
}

.project-card-icon {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.project-card-enter {
    position: absolute;
    bottom: var(--space-lg);
    right: var(--space-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.project-card-enter:hover {
    background: #15803d;
}

.dashboard-actions {
    margin-top: var(--space-lg);
}

/* ═══════════════════════════════════════════════
   ADMIN — Searchable Dropdown
   ═══════════════════════════════════════════════ */
.search-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--color-border-solid);
    border-radius: 6px;
    box-shadow: var(--shadow-soft);
    z-index: 100;
}

.search-dropdown-item {
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    font-size: 0.93rem;
}

.search-dropdown-item:hover {
    background: var(--color-info-bg);
    color: var(--color-primary);
}

/* ═══════════════════════════════════════════════
   ADMIN — File Upload Button
   ═══════════════════════════════════════════════ */
.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    border: 1px solid var(--color-border-solid);
    border-radius: 6px;
    background: #fff;
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-upload:hover {
    background: var(--color-info-bg);
    border-color: var(--color-primary);
}

.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.file-name-display {
    display: inline-block;
    margin-left: 0.75rem;
    font-size: 0.88rem;
    color: var(--color-muted);
}

.file-current {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.82rem;
    color: var(--color-muted);
}

/* ═══════════════════════════════════════════════
   SERVICES — Main Card Container
   ═══════════════════════════════════════════════ */
.services-container {
    margin-top: var(--space-xl);
}

.services-card {
    background: var(--color-surface-strong);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-soft);
}

.services-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.services-col-right {
    color: var(--color-muted);
}

.timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--color-primary), rgb(255 0 128 / 0.4), var(--color-primary));
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    position: relative;
    transition: transform 0.2s ease;
}

.timeline-item:hover {
    transform: translateX(4px);
}

.timeline-number {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    z-index: 1;
    box-shadow: 0 0 12px rgb(66 99 235 / 0.15);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.timeline-item:hover .timeline-number {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 0 20px rgb(66 99 235 / 0.35);
}

.timeline-item p {
    margin: 0;
    padding-top: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text);
    transition: color 0.2s ease;
}

.timeline-item:hover p {
    color: var(--color-primary);
}

.services-card h1 {
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(4rem, 1vw, 9.5rem);
    font-weight: 100;
    line-height: 0.82;
    letter-spacing: 0.08em;
    color: rgb(14 16 12 / 0.32);
    max-width: 400px;
    text-shadow: 0 0 1px rgb(14 16 12), 0 30px 100px rgb(10 248 30 / 0.14);
}

/* ═══════════════════════════════════════════════
   WHERE SECTION — Scroll Animations
   ═══════════════════════════════════════════════ */
.where-section {
    overflow: hidden;
}

.where-heading h1 {
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.where-text p {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.where-section.in-view .where-heading h1 {
    transform: translateX(0);
    opacity: 1;
}

.where-section.in-view .where-text p {
    opacity: 1;
    transform: translateY(0);
}

.where-section.in-view .where-text p:nth-child(1) {
    transition-delay: 0.7s;
}

.where-section.in-view .where-text p:nth-child(2) {
    transition-delay: 0.9s;
}

.where-section.in-view .where-text p:nth-child(3) {
    transition-delay: 1.1s;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 900px) {
    .feature-grid,
    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .navbar {
        flex-wrap: wrap;
        border-radius: var(--radius-md);
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: var(--space-xs);
    }

    .feature-grid,
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Subtle pulsing button */
.btn-pulse {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background: #77b255;
    border: 1px solid #77b255;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    transition: background 0.3s, color 0.3s;
    animation: gentle-pulse 3s ease-in-out infinite;
}

.btn-pulse:hover {
    background: #6a9f4b;
}

@keyframes gentle-pulse {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.03); }
}