/* ==========================================================================
   ProfileBoost design system
   Palette drawn from the BAMAS logo: deep indigo -> violet -> soft lilac
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --ink:        #1A1533;
    --ink-soft:   #5B5470;
    --paper:      #FBFAFF;
    --paper-dim:  #F3F0FC;
    --line:       #E7E1F5;

    --indigo:     #3B1FA8;
    --violet:     #6D28D9;
    --violet-2:   #8B5CF6;
    --lilac:      #C9A6FF;

    --grad: linear-gradient(135deg, var(--indigo) 0%, var(--violet) 45%, var(--violet-2) 75%, var(--lilac) 100%);

    --good:  #1D8A5B;
    --warn:  #B4551F;
    --bad:   #C0344B;

    --radius: 14px;
    --shadow: 0 10px 30px -12px rgba(59, 31, 168, 0.22);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

h1, h2, h3, h4 {
    font-family: 'Sora', 'Inter', sans-serif;
    color: var(--ink);
    line-height: 1.2;
    margin: 0 0 0.5em;
    font-weight: 700;
}

h1 { font-size: 2.6rem; letter-spacing: -0.01em; }
h2 { font-size: 1.9rem; letter-spacing: -0.01em; }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1em; color: var(--ink-soft); max-width: 62ch; }

a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--violet); }
.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
}
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; border-radius: 8px; }
.btn-danger { background: #fff; color: var(--bad); border-color: #f0c8d0; }

/* ---------------- Nav ---------------- */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.nav-brand img { height: 28px; width: auto; display: block; flex-shrink: 0; }
.nav-brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}
.nav-brand .brand-name {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    white-space: nowrap;
}
.nav-brand .brand-sub {
    font-size: 0.65rem;
    color: var(--ink-soft);
    font-weight: 500;
    display: none;
}
.nav-links { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-links a.nav-text-link { display: none; color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; }
.nav-links a.nav-text-link:hover { color: var(--violet); text-decoration: none; }
@media (min-width: 640px) {
    .nav { padding: 18px 0; gap: 22px; }
    .nav-brand { gap: 10px; }
    .nav-brand img { height: 34px; }
    .nav-brand .brand-name { font-size: 1.15rem; }
    .nav-brand .brand-sub { display: block; }
    .nav-links { gap: 22px; }
    .nav-links a.nav-text-link { display: inline; }
}

/* ---------------- App shell (logged-in area) ---------------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 230px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sidebar .nav-brand { padding: 6px 10px 18px; }
.sidebar a.side-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--ink-soft);
    font-weight: 500;
    font-size: 0.93rem;
}
.sidebar a.side-link:hover { background: var(--paper-dim); text-decoration: none; }
.sidebar a.side-link.active { background: var(--paper-dim); color: var(--violet); font-weight: 600; }
.sidebar .plan-pill-wrap { margin-top: auto; padding: 10px; }
.main-content { flex: 1; padding: 32px; max-width: 980px; }

/* ---------------- Cards ---------------- */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}
.card + .card { margin-top: 16px; }

/* ---------------- Pills / badges ---------------- */
.pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}
.pill-free { background: var(--paper-dim); color: var(--ink-soft); }
.pill-premium { background: var(--grad); color: #fff; }
.pill-good { background: #E7F6EE; color: var(--good); }
.pill-warn { background: #FBEEE3; color: var(--warn); }
.pill-bad  { background: #FBE7EB; color: var(--bad); }

/* ---------------- Forms ---------------- */
label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=number],
select, textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--ink);
    background: #fff;
    margin-bottom: 16px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.12);
}
textarea { resize: vertical; min-height: 90px; }
.form-narrow { max-width: 420px; }
.form-hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: -10px; margin-bottom: 16px; }

/* ---------------- Alerts ---------------- */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 18px;
}
.alert-error   { background: #FBE7EB; color: var(--bad); }
.alert-success { background: #E7F6EE; color: var(--good); }
.alert-info    { background: var(--paper-dim); color: var(--ink); }

/* ---------------- Landing hero ---------------- */
.hero {
    padding: 72px 0 56px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}
.hero-visual {
    background: var(--grad);
    border-radius: 22px;
    padding: 28px;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}
.hero-visual img { width: 90px; height: auto; filter: drop-shadow(0 8px 20px rgba(0,0,0,0.25)); }
@media (min-width: 640px) {
    .hero-visual { padding: 40px; min-height: 320px; }
    .hero-visual img { width: 140px; }
}
.hero-eyebrow { color: var(--violet); font-weight: 600; margin-bottom: 10px; }
.hero p.lead { font-size: 1.15rem; }
.hero-ctas { display: flex; gap: 12px; margin-top: 26px; }

/* ---------------- Feature rows ---------------- */
.features { padding: 56px 0; }
.feature-row {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
}
.feature-row:last-child { border-bottom: 1px solid var(--line); }
.feature-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: var(--paper-dim);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}
.feature-row h3 { margin-bottom: 4px; }
.feature-row p { margin-bottom: 0; }

/* ---------------- Pricing ---------------- */
.pricing { padding: 56px 0 80px; }
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}
.plan-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.plan-card.featured {
    background: var(--grad);
    color: #fff;
    border: none;
    box-shadow: var(--shadow);
}
.plan-card.featured h3, .plan-card.featured .price { color: #fff; }
.plan-card.featured p, .plan-card.featured li { color: rgba(255,255,255,0.88); }
.price { font-family: 'Sora', sans-serif; font-size: 2.1rem; font-weight: 700; margin: 8px 0 18px; }
.price span { font-size: 1rem; font-weight: 500; opacity: 0.75; }
.plan-card ul { list-style: none; padding: 0; margin: 0 0 22px; }
.plan-card li { padding: 6px 0; }
.plan-card li::before { content: "✓ "; font-weight: 700; }

/* ---------------- Footer ---------------- */
/* ---------------- Site footer (mobile-first: stacked by default) ---------------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 36px 0 24px;
    color: var(--ink-soft);
    font-size: 0.85rem;
}
.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
.site-footer .footer-brand { max-width: 320px; }
.site-footer .footer-brand .nav-brand { margin-bottom: 10px; }
.site-footer .footer-col h4 {
    font-family: 'Sora', sans-serif;
    font-size: 0.8rem;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}
.site-footer .footer-col a {
    display: block;
    color: var(--ink-soft);
    padding: 5px 0;
    font-size: 0.88rem;
}
.site-footer .footer-col a:hover { color: var(--violet); text-decoration: none; }
.site-footer .footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}
@media (min-width: 640px) {
    .site-footer .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
    .site-footer .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ---------------- Legal / prose pages (mobile-first) ---------------- */
.prose-page { padding: 32px 0 56px; }
.prose-page .updated-note { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 28px; }
.prose-page h2 { font-size: 1.3rem; margin-top: 32px; }
.prose-page h3 { font-size: 1.05rem; margin-top: 20px; }
.prose-page p, .prose-page li { color: var(--ink-soft); font-size: 0.96rem; max-width: 72ch; }
.prose-page ul, .prose-page ol { padding-left: 20px; margin-bottom: 1em; }
.prose-page li { margin-bottom: 6px; }
.prose-page .placeholder { background: #FBEEE3; color: var(--warn); padding: 1px 6px; border-radius: 5px; font-weight: 600; }
@media (min-width: 640px) {
    .prose-page { padding: 48px 0 72px; }
}

/* ---------------- Dashboard bits ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 8px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat-card .stat-num { font-family: 'Sora', sans-serif; font-size: 1.8rem; font-weight: 700; }
.stat-card .stat-label { color: var(--ink-soft); font-size: 0.85rem; }

.generated-box {
    background: var(--paper-dim);
    border: 1px dashed var(--lilac);
    border-radius: 12px;
    padding: 18px;
    margin-top: 8px;
    position: relative;
}
.generated-box p { color: var(--ink); margin: 0; white-space: pre-wrap; }
.copy-btn { margin-top: 10px; }

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
}
.checklist-item:first-child { border-top: none; }
.checklist-item input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.checklist-item .ci-title { font-weight: 600; margin-bottom: 2px; }
.checklist-item .ci-desc { font-size: 0.88rem; color: var(--ink-soft); margin: 0; }

table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
}
table.data-table th { color: var(--ink-soft); font-weight: 600; font-size: 0.8rem; }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
    .hero { grid-template-columns: 1fr; padding-top: 40px; }
    .pricing-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }
    .app-shell { flex-direction: column; }
    .sidebar { width: 100%; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
    .sidebar .plan-pill-wrap { display: none; }
    .main-content { padding: 20px; }
    h1 { font-size: 2rem; }
}

:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
