/* Notes & Work Tracker — Public / Landing design system */
:root {
    --pub-bg: #070b14;
    --pub-bg-elevated: #0f1629;
    --pub-surface: rgba(255, 255, 255, 0.04);
    --pub-surface-hover: rgba(255, 255, 255, 0.07);
    --pub-border: rgba(255, 255, 255, 0.08);
    --pub-text: #f0f4fc;
    --pub-text-muted: #94a3b8;
    --pub-accent: #6366f1;
    --pub-accent-2: #22d3ee;
    --pub-accent-glow: rgba(99, 102, 241, 0.45);
    --pub-success: #34d399;
    --pub-radius: 16px;
    --pub-radius-lg: 24px;
    --pub-font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    --pub-nav-h: 72px;
    --pub-max: 1180px;
    --pub-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.public-site {
    margin: 0;
    font-family: var(--pub-font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--pub-text);
    background: var(--pub-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body.public-site::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.35), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(34, 211, 238, 0.12), transparent),
        radial-gradient(ellipse 50% 30% at 0% 80%, rgba(139, 92, 246, 0.15), transparent);
}

.public-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* —— Navigation —— */
.pub-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--pub-nav-h);
    z-index: 1000;
    transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

.pub-nav.is-scrolled {
    background: rgba(7, 11, 20, 0.85);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 var(--pub-border);
}

.pub-nav-inner {
    max-width: var(--pub-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.pub-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--pub-text);
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.pub-brand img { height: 36px; width: auto; }

.pub-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--pub-accent), var(--pub-accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
}

.pub-nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pub-nav-links a {
    color: var(--pub-text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    transition: color 0.2s, background 0.2s;
}

.pub-nav-links a:hover { color: var(--pub-text); background: var(--pub-surface); }

.pub-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.pub-btn:active { transform: scale(0.98); }

.pub-btn-ghost {
    background: transparent;
    color: var(--pub-text);
    border: 1px solid var(--pub-border);
}

.pub-btn-ghost:hover {
    background: var(--pub-surface);
    color: var(--pub-text);
}

.pub-btn-primary {
    background: linear-gradient(135deg, var(--pub-accent), #818cf8);
    color: #fff;
    box-shadow: 0 8px 32px var(--pub-accent-glow);
}

.pub-btn-primary:hover {
    color: #fff;
    box-shadow: 0 12px 40px var(--pub-accent-glow);
}

.pub-btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
}

.pub-nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: flex-end;
}

.pub-menu-toggle {
    display: none;
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    color: var(--pub-text);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.25rem;
}

@media (max-width: 991px) {
    .pub-menu-toggle { display: flex; align-items: center; justify-content: center; }
    .pub-nav-menu {
        position: fixed;
        top: var(--pub-nav-h);
        left: 0;
        right: 0;
        background: rgba(7, 11, 20, 0.98);
        backdrop-filter: blur(20px);
        padding: 1.5rem;
        border-bottom: 1px solid var(--pub-border);
        flex-direction: column;
        align-items: stretch;
        display: none;
    }
    .pub-nav-menu.is-open { display: flex; }
    .pub-nav-links { flex-direction: column; }
    .pub-nav-links a { padding: 0.75rem 1rem; }
    .pub-nav-actions { flex-direction: column; width: 100%; }
    .pub-nav-actions .pub-btn { width: 100%; }
}

/* —— Main content areas —— */
.public-main {
    flex: 1;
    padding-top: var(--pub-nav-h);
}

.public-main--auth {
    padding-top: 0;
    min-height: 100vh;
    display: flex;
}

.public-container {
    max-width: var(--pub-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* —— Hero —— */
.pub-hero {
    padding: 4rem 0 6rem;
    text-align: center;
}

.pub-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem 0.35rem 0.5rem;
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pub-accent-2);
    margin-bottom: 1.5rem;
}

.pub-hero-badge span.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pub-success);
    box-shadow: 0 0 12px var(--pub-success);
}

.pub-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 1.25rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.pub-hero h1 .gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--pub-accent-2) 50%, var(--pub-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pub-hero-lead {
    font-size: 1.1875rem;
    color: var(--pub-text-muted);
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.pub-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3.5rem;
}

.pub-hero-visual {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
    border-radius: var(--pub-radius-lg);
    border: 1px solid var(--pub-border);
    background: var(--pub-bg-elevated);
    box-shadow: var(--pub-shadow);
    overflow: hidden;
}

.pub-hero-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(7, 11, 20, 0.9));
    pointer-events: none;
    z-index: 1;
}

.pub-dashboard-preview {
    padding: 1.25rem;
    min-height: 320px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    text-align: left;
}

.pub-preview-sidebar {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    padding: 1rem;
}

.pub-preview-sidebar div {
    height: 8px;
    background: var(--pub-border);
    border-radius: 4px;
    margin-bottom: 0.65rem;
}

.pub-preview-sidebar div:nth-child(1) { width: 70%; background: var(--pub-accent); opacity: 0.6; }

.pub-preview-main { display: flex; flex-direction: column; gap: 0.75rem; }

.pub-preview-stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.pub-preview-stat {
    background: var(--pub-surface);
    border-radius: 10px;
    padding: 0.85rem;
    border: 1px solid var(--pub-border);
}

.pub-preview-stat strong {
    display: block;
    font-size: 1.25rem;
    color: var(--pub-text);
}

.pub-preview-stat small { color: var(--pub-text-muted); font-size: 0.7rem; }

.pub-preview-list {
    flex: 1;
    background: var(--pub-surface);
    border-radius: 12px;
    border: 1px solid var(--pub-border);
    padding: 1rem;
}

@media (max-width: 768px) {
    .pub-dashboard-preview { grid-template-columns: 1fr; min-height: 240px; }
    .pub-preview-sidebar { display: none; }
    .pub-preview-stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* —— Sections —— */
.pub-section {
    padding: 5rem 0;
    border-top: 1px solid var(--pub-border);
}

.pub-section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.pub-section-label {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--pub-accent-2);
    margin-bottom: 0.75rem;
}

.pub-section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
}

.pub-section-header p {
    color: var(--pub-text-muted);
    margin: 0;
    font-size: 1.0625rem;
}

/* Feature grid */
.pub-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 991px) { .pub-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .pub-features { grid-template-columns: 1fr; } }

.pub-feature-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius);
    padding: 1.75rem;
    transition: border-color 0.25s, transform 0.25s, background 0.25s;
}

.pub-feature-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    background: var(--pub-surface-hover);
    transform: translateY(-4px);
}

.pub-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(34, 211, 238, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
}

.pub-feature-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.pub-feature-card p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--pub-text-muted);
    line-height: 1.65;
}

/* Modes */
.pub-modes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 768px) { .pub-modes { grid-template-columns: 1fr; } }

.pub-mode-card {
    position: relative;
    border-radius: var(--pub-radius-lg);
    padding: 2rem;
    border: 1px solid var(--pub-border);
    overflow: hidden;
}

.pub-mode-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.pub-mode-card--student::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.pub-mode-card--employee::before { background: linear-gradient(90deg, #22d3ee, #06b6d4); }
.pub-mode-card--personal::before { background: linear-gradient(90deg, #a78bfa, #c084fc); }

.pub-mode-card h3 { font-size: 1.35rem; font-weight: 800; margin: 0 0 0.75rem; }
.pub-mode-card p { color: var(--pub-text-muted); margin: 0 0 1rem; font-size: 0.9375rem; }
.pub-mode-card ul {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--pub-text-muted);
    font-size: 0.875rem;
}

.pub-mode-card li { margin-bottom: 0.35rem; }

/* Steps */
.pub-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    counter-reset: step;
}

@media (max-width: 991px) { .pub-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .pub-steps { grid-template-columns: 1fr; } }

.pub-step {
    text-align: center;
    counter-increment: step;
}

.pub-step-num {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--pub-surface);
    border: 2px solid var(--pub-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--pub-accent-2);
}

.pub-step-num::before { content: counter(step); }

.pub-step h4 { margin: 0 0 0.5rem; font-size: 1rem; }
.pub-step p { margin: 0; font-size: 0.875rem; color: var(--pub-text-muted); }

/* Trust / privacy band */
.pub-trust-band {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(34, 211, 238, 0.08));
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius-lg);
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) { .pub-trust-band { grid-template-columns: 1fr; } }

.pub-trust-band h3 { font-size: 1.5rem; font-weight: 800; margin: 0 0 1rem; }
.pub-trust-list { list-style: none; padding: 0; margin: 0; }
.pub-trust-list li {
    padding: 0.5rem 0 0.5rem 1.75rem;
    position: relative;
    color: var(--pub-text-muted);
    font-size: 0.9375rem;
}

.pub-trust-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--pub-success);
    font-weight: 700;
}

/* FAQ */
.pub-faq { max-width: 720px; margin: 0 auto; }

.pub-faq-item {
    border-bottom: 1px solid var(--pub-border);
}

.pub-faq-q {
    width: 100%;
    background: none;
    border: none;
    color: var(--pub-text);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    padding: 1.25rem 2rem 1.25rem 0;
    cursor: pointer;
    position: relative;
}

.pub-faq-q::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    color: var(--pub-text-muted);
    transition: transform 0.25s;
}

.pub-faq-item.is-open .pub-faq-q::after { transform: translateY(-50%) rotate(45deg); }

.pub-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.pub-faq-item.is-open .pub-faq-a { max-height: 200px; }

.pub-faq-a-inner {
    padding: 0 0 1.25rem;
    color: var(--pub-text-muted);
    font-size: 0.9375rem;
    line-height: 1.65;
}

/* CTA block */
.pub-cta-block {
    text-align: center;
    padding: 4rem 2rem;
    border-radius: var(--pub-radius-lg);
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.2), rgba(15, 22, 41, 0.95));
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.pub-cta-block h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; margin: 0 0 1rem; }
.pub-cta-block p { color: var(--pub-text-muted); margin: 0 0 1.75rem; max-width: 480px; margin-left: auto; margin-right: auto; }

/* —— Footer —— */
.pub-footer {
    border-top: 1px solid var(--pub-border);
    padding: 4rem 0 2rem;
    margin-top: auto;
    background: rgba(0, 0, 0, 0.25);
}

.pub-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 991px) { .pub-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 576px) { .pub-footer-grid { grid-template-columns: 1fr; } }

.pub-footer-brand p {
    color: var(--pub-text-muted);
    font-size: 0.9375rem;
    margin: 1rem 0 0;
    max-width: 280px;
}

.pub-footer-col h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pub-text-muted);
    margin: 0 0 1rem;
}

.pub-footer-col ul { list-style: none; padding: 0; margin: 0; }
.pub-footer-col a {
    color: var(--pub-text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    display: block;
    padding: 0.35rem 0;
    transition: color 0.2s;
}

.pub-footer-col a:hover { color: var(--pub-accent-2); }

.pub-footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--pub-border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--pub-text-muted);
}

/* —— Auth layout —— */
.pub-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

@media (max-width: 991px) {
    .pub-auth { grid-template-columns: 1fr; }
    .pub-auth-aside { display: none; }
}

.pub-auth-aside {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(160deg, #0f1629 0%, #070b14 50%, rgba(99, 102, 241, 0.15) 100%);
    border-right: 1px solid var(--pub-border);
}

.pub-auth-aside h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 2rem 0 1rem;
}

.pub-auth-aside p { color: var(--pub-text-muted); font-size: 1.0625rem; line-height: 1.7; }

.pub-auth-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 3rem;
    background: var(--pub-bg);
}

.pub-auth-main-inner { max-width: 420px; width: 100%; margin: 0 auto; }

.pub-auth-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.pub-auth-top a { color: var(--pub-text-muted); text-decoration: none; font-size: 0.875rem; }
.pub-auth-top a:hover { color: var(--pub-text); }

.pub-auth-card h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.pub-auth-sub { color: var(--pub-text-muted); font-size: 0.9375rem; margin: 0 0 2rem; }

/* Form controls (public) */
.pub-field { margin-bottom: 1.25rem; }

.pub-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pub-text-muted);
    margin-bottom: 0.4rem;
}

.pub-input,
.pub-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--pub-text);
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Native dropdown list uses OS light popup — force readable option colors */
.pub-select {
    color-scheme: light dark;
    cursor: pointer;
}

.pub-select option {
    color: #0f172a;
    background-color: #ffffff;
}

.pub-select option:checked {
    color: #ffffff;
    background-color: var(--pub-accent);
}

.pub-input:focus,
.pub-select:focus {
    outline: none;
    border-color: var(--pub-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.pub-input::placeholder { color: #64748b; }

.pub-alert {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.pub-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.pub-alert-success {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: #6ee7b7;
}

.pub-alert-info {
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
    color: #a5f3fc;
}

.pub-auth-footer-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    color: var(--pub-text-muted);
}

.pub-auth-footer-link a { color: var(--pub-accent-2); font-weight: 600; text-decoration: none; }
.pub-auth-footer-link a:hover { text-decoration: underline; }

/* Content pages (about, terms) */
.pub-page-hero {
    padding: 3rem 0 2rem;
    text-align: center;
    border-bottom: 1px solid var(--pub-border);
}

.pub-page-hero h1 { font-size: 2.25rem; font-weight: 800; margin: 0 0 0.5rem; }
.pub-page-hero p { color: var(--pub-text-muted); margin: 0; }

.pub-prose {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
    color: var(--pub-text-muted);
    line-height: 1.75;
}

.pub-prose h2 { color: var(--pub-text); font-size: 1.35rem; margin: 2rem 0 1rem; }
.pub-prose p { margin: 0 0 1rem; }

.pub-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    max-width: 640px;
    margin: 2rem auto 0;
}

@media (max-width: 576px) { .pub-contact-grid { grid-template-columns: 1fr; } }

.pub-contact-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius);
    padding: 1.5rem;
}

.pub-contact-card strong { display: block; color: var(--pub-text); margin-bottom: 0.35rem; }

/* Reveal animation */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}
