/* ============================================================
   Software4All — Main Stylesheet
   White background, dark text. Clean, professional.
   ============================================================ */

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-bg:        #ffffff;
    --color-text:      #1a1a2e;
    --color-text-muted:#555577;
    --color-primary:   #1e3a5f;
    --color-accent:    #2d7dd2;
    --color-accent-lt: #e8f1fb;
    --color-border:    #e2e8f0;
    --color-success:   #16a34a;
    --color-warning:   #d97706;
    --color-error:     #dc2626;
    --font-sans:       'Inter', system-ui, -apple-system, sans-serif;
    --radius:          8px;
    --shadow:          0 2px 12px rgba(0,0,0,0.08);
    --max-width:       1140px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ─── Layout ─────────────────────────────────────────────────── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 64px;
}
.logo img { display: block; }
.nav-desktop { display: flex; gap: 1.5rem; margin-left: auto; }
.nav-desktop .nav-link { color: var(--color-text); font-weight: 500; font-size: 0.95rem; }
.nav-desktop .nav-link:hover { color: var(--color-accent); text-decoration: none; }
.nav-auth { display: flex; gap: 0.75rem; align-items: center; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--color-text); transition: 0.2s; }
.nav-mobile { display: none; flex-direction: column; padding: 1rem 1.5rem; border-top: 1px solid var(--color-border); background: var(--color-bg); }
.nav-mobile a { padding: 0.6rem 0; color: var(--color-text); font-weight: 500; border-bottom: 1px solid var(--color-border); }
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile hr { border: none; border-top: 1px solid var(--color-border); margin: 0.5rem 0; }
.nav-mobile.open { display: flex; }

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.6rem 1.4rem; border-radius: var(--radius);
    font-weight: 600; font-size: 0.95rem; cursor: pointer;
    border: 2px solid transparent; transition: 0.2s; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary  { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: var(--color-accent); border-color: var(--color-accent); }
.btn-outline  { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-ghost    { background: transparent; color: var(--color-text-muted); border-color: transparent; }
.btn-ghost:hover { color: var(--color-text); }
.btn-sm  { padding: 0.4rem 1rem; font-size: 0.875rem; }
.btn-lg  { padding: 0.85rem 2rem; font-size: 1.05rem; }
.btn-danger { background: var(--color-error); color: #fff; border-color: var(--color-error); }

/* ─── Hero ───────────────────────────────────────────────────── */
.hero { padding: 5rem 0 4rem; text-align: center; background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.2; margin-bottom: 1.25rem; }
.hero h1 .highlight { color: var(--color-accent); }
.hero-sub { font-size: 1.15rem; color: var(--color-text-muted); max-width: 640px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.hero-note { font-size: 0.875rem; color: var(--color-text-muted); }

/* ─── Video Placeholder ──────────────────────────────────────── */
.video-section { padding: 2rem 0 3rem; }
.video-placeholder {
    max-width: 720px; margin: 0 auto;
    background: var(--color-primary); color: #fff;
    border-radius: 12px; padding: 4rem 2rem;
    text-align: center; font-size: 1.1rem; font-weight: 600;
    cursor: pointer;
}

/* ─── How It Works ───────────────────────────────────────────── */
.how-it-works { padding: 4rem 0; }
.how-it-works h2, .pricing h2, .why-s4a h2, .cta-section h2 {
    font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 0.75rem;
}
.section-intro { text-align: center; color: var(--color-text-muted); max-width: 600px; margin: 0 auto 2.5rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; margin-top: 2rem; }
.step { text-align: center; padding: 1.5rem; border: 1px solid var(--color-border); border-radius: var(--radius); }
.step-number { width: 48px; height: 48px; background: var(--color-primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700; margin: 0 auto 1rem; }
.step h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.9rem; color: var(--color-text-muted); }

/* ─── Pricing ─────────────────────────────────────────────────── */
.pricing { padding: 4rem 0; background: #f8faff; }
.pricing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; max-width: 800px; margin: 0 auto; }
.pricing-card { background: #fff; border: 1px solid var(--color-border); border-radius: 12px; padding: 2rem; position: relative; }
.pricing-card.featured { border-color: var(--color-accent); box-shadow: 0 4px 24px rgba(45,125,210,0.15); }
.pricing-card .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--color-accent); color: #fff; padding: 0.25rem 1rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.pricing-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.pricing-card .price { font-size: 2.5rem; font-weight: 800; color: var(--color-primary); margin: 0.5rem 0; }
.pricing-card ul { list-style: none; margin: 1rem 0 1.5rem; }
.pricing-card ul li { padding: 0.35rem 0; font-size: 0.9rem; color: var(--color-text-muted); }
.pricing-card ul li::before { content: '✓ '; color: var(--color-success); font-weight: 700; }
.pricing-card .btn { width: 100%; }
.pricing-note { text-align: center; color: var(--color-text-muted); font-size: 0.875rem; margin-top: 1.5rem; }

/* ─── Features Grid ──────────────────────────────────────────── */
.why-s4a { padding: 4rem 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; margin-top: 2rem; }
.feature { padding: 1.5rem; border-left: 4px solid var(--color-accent); }
.feature h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.feature p { font-size: 0.9rem; color: var(--color-text-muted); }

/* ─── CTA Section ────────────────────────────────────────────── */
.cta-section { padding: 4rem 0; text-align: center; background: var(--color-primary); color: #fff; }
.cta-section h2 { color: #fff; }
.cta-section p { color: rgba(255,255,255,0.8); margin: 0.75rem 0 1.5rem; }

/* ─── Dashboard ──────────────────────────────────────────────── */
.dashboard-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; padding: 2rem 0; min-height: calc(100vh - 64px); }
.sidebar { background: #f8faff; border-right: 1px solid var(--color-border); padding: 1.5rem; border-radius: var(--radius); }
.sidebar h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); margin-bottom: 0.75rem; }
.sidebar a { display: block; padding: 0.5rem 0.75rem; border-radius: 6px; color: var(--color-text); font-size: 0.9rem; margin-bottom: 0.25rem; }
.sidebar a:hover, .sidebar a.active { background: var(--color-accent-lt); color: var(--color-accent); text-decoration: none; }
.main-content { padding: 0 0.5rem; }

/* ─── Project Cards ──────────────────────────────────────────── */
.project-card { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; background: #fff; }
.project-card h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.project-card .status-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.status-awaiting_spec_payment  { background: #fef3c7; color: #92400e; }
.status-spec_in_progress       { background: #dbeafe; color: #1e40af; }
.status-spec_awaiting_admin_approval { background: #fde8d8; color: #9a3412; }
.status-awaiting_build_payment { background: #fef3c7; color: #92400e; }
.status-build_in_progress      { background: #dbeafe; color: #1e40af; }
.status-build_awaiting_admin_approval { background: #fde8d8; color: #9a3412; }
.status-delivered              { background: #dcfce7; color: #166534; }
.status-programme_flagged      { background: #fef2f2; color: #991b1b; }
.status-cancelled              { background: #f1f5f9; color: #64748b; }

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 0.6rem 0.85rem;
    border: 1px solid var(--color-border); border-radius: var(--radius);
    font-size: 0.95rem; font-family: inherit; background: #fff; color: var(--color-text);
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--color-accent); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-error { color: var(--color-error); font-size: 0.85rem; margin-top: 0.25rem; }
.form-card { max-width: 480px; margin: 3rem auto; background: #fff; border: 1px solid var(--color-border); border-radius: 12px; padding: 2rem; box-shadow: var(--shadow); }
.form-card h1 { font-size: 1.5rem; margin-bottom: 1.5rem; }

/* ─── Alerts ─────────────────────────────────────────────────── */
.alert { padding: 0.85rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: var(--color-accent-lt); color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* ─── Success Box ────────────────────────────────────────────── */
.success-box { max-width: 560px; margin: 4rem auto; text-align: center; padding: 2.5rem; border: 1px solid var(--color-border); border-radius: 12px; }
.success-box h1 { color: var(--color-success); margin-bottom: 1rem; }

/* ─── Admin ──────────────────────────────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th { background: var(--color-primary); color: #fff; padding: 0.75rem 1rem; text-align: left; }
.admin-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--color-border); }
.admin-table tr:hover td { background: var(--color-accent-lt); }

/* ─── Document Viewer ────────────────────────────────────────── */
.document-viewer { background: #f8faff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; font-size: 0.9rem; white-space: pre-wrap; font-family: 'Courier New', monospace; max-height: 500px; overflow-y: auto; }

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer { background: var(--color-primary); color: rgba(255,255,255,0.8); padding: 3rem 0 1rem; margin-top: 4rem; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 3rem; margin-bottom: 2rem; }
.footer-brand .logo-footer { color: #fff; font-size: 1.2rem; font-weight: 700; }
.footer-brand p { font-size: 0.875rem; margin-top: 0.5rem; }
.footer-links { display: flex; gap: 3rem; }
.footer-col h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.footer-col a { display: block; color: rgba(255,255,255,0.7); font-size: 0.875rem; margin-bottom: 0.35rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 1rem; text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.5); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-desktop, .nav-auth { display: none; }
    .hamburger { display: flex; margin-left: auto; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .sidebar { border-right: none; border-bottom: 1px solid var(--color-border); }
    .footer-inner { grid-template-columns: 1fr; }
    .footer-links { flex-direction: column; gap: 1.5rem; }
    .pricing-cards { grid-template-columns: 1fr; }
}
