/* ==========================================================================
   style.css — Design tokens, typography, and base layout
   Dissertation Help UK — Bootstrap 5 base theme
   ========================================================================== */

:root {
    /* Brand palette */
    --color-primary: #0B5ED7;
    --color-primary-dark: #094BAF;
    --color-navy: #0D1B2A;
    --color-navy-soft: #16293F;
    --color-light: #F8FAFC;
    --color-white: #FFFFFF;
    --color-accent: #1E88E5;
    --color-green: #28A745;

    --color-text: #1F2937;
    --color-text-muted: #5B6B7F;
    --color-border: #E4E9F0;

    /* Typography */
    --font-base: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fs-base: 1rem;
    --lh-base: 1.7;

    /* Spacing rhythm */
    --space-section: 5.5rem;
    --space-section-sm: 3.5rem;

    /* Shape */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 2px 10px rgba(13, 27, 42, 0.06);
    --shadow-md: 0 10px 30px rgba(13, 27, 42, 0.10);
    --shadow-lg: 0 20px 50px rgba(13, 27, 42, 0.14);

    --transition-base: all 0.25s ease;
}

/* --------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-base);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    color: var(--color-text);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
}

main { display: block; overflow-x: hidden; }

img { max-width: 100%; height: auto; }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-base);
}
a:hover { color: var(--color-primary-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-base);
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); }
h4 { font-size: 1.15rem; font-weight: 600; }

p { margin-bottom: 1rem; color: var(--color-text-muted); }

.required { color: #DC3545; }

/* Skip link (accessibility) */
.skip-link {
    position: absolute;
    top: -60px;
    left: 0;
    background: var(--color-navy);
    color: #fff;
    padding: 0.75rem 1.25rem;
    z-index: 2000;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* --------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------- */
.btn {
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.7rem 1.5rem;
    transition: var(--transition-base);
    letter-spacing: 0.01em;
}
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline-primary:hover {
    background-color: var(--color-primary);
    color: #fff;
}
.btn-light {
    background-color: #fff;
    color: var(--color-primary);
    border-color: #fff;
}
.btn-light:hover {
    background-color: var(--color-light);
    color: var(--color-primary-dark);
    transform: translateY(-1px);
}
.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; }

/* --------------------------------------------------------------------
   Section heading pattern (used across most components)
   -------------------------------------------------------------------- */
.section-heading { margin-bottom: 3rem; }
.section-eyebrow {
    display: inline-block;
    color: var(--color-primary);
    background: rgba(11, 94, 215, 0.08);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}
.section-heading h2 { margin-bottom: 0.75rem; }
.section-heading p { max-width: 640px; margin-left: auto; margin-right: auto; }

section { padding: var(--space-section) 0; }

/* --------------------------------------------------------------------
   Top utility bar
   -------------------------------------------------------------------- */
.topbar {
    background-color: var(--color-navy);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
}
.topbar a { color: rgba(255, 255, 255, 0.85); margin-right: 1.5rem; }
.topbar a:hover { color: #fff; }
.topbar-info i { color: var(--color-accent); margin-right: 0.35rem; }
.topbar-social a { margin-right: 0; margin-left: 1rem; font-size: 1rem; }

/* --------------------------------------------------------------------
   Header / navbar
   -------------------------------------------------------------------- */
.site-header {
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    z-index: 1030;
}
.navbar { padding: 0.9rem 0; }

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; color: var(--color-navy); font-size: 1.05rem; }
.brand-tagline { font-size: 0.72rem; color: var(--color-text-muted); font-weight: 500; }
.brand-logo {
    height: 55px;
    width: auto;
    display: block;
}

.main-nav .nav-link {
    color: var(--color-navy);
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    border-radius: var(--radius-sm);
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: var(--color-primary);
}
.main-nav .dropdown-toggle::after { vertical-align: 0.15em; }

.btn-nav-cta { white-space: nowrap; }

.navbar-toggler {
    border: none;
    font-size: 1.5rem;
    color: var(--color-navy);
    background: none;
}
.navbar-toggler:focus { box-shadow: none; }

/* --------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------- */
.site-footer {
    background-color: var(--color-navy);
    color: rgba(255, 255, 255, 0.72);
    padding-top: 4.5rem;
    padding-bottom: 2rem;
}
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
}
.footer-brand .brand-name { color: #fff; font-size: 1.1rem; }
.footer-about { font-size: 0.92rem; color: rgba(255, 255, 255, 0.6); }
.footer-heading {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1.1rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.footer-links li, .footer-contact li { margin-bottom: 0.65rem; font-size: 0.92rem; }
.footer-links a { color: rgba(255, 255, 255, 0.65); }
.footer-links a:hover { color: #fff; }
.footer-view-all { color: var(--color-accent) !important; font-weight: 600; }
.footer-contact li { display: flex; align-items: flex-start; gap: 0.5rem; color: rgba(255, 255, 255, 0.65); }
.footer-contact i { color: var(--color-accent); margin-top: 0.2rem; }
.footer-contact a { color: rgba(255, 255, 255, 0.65); }

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    margin-right: 0.5rem;
}
.footer-social a:hover { background: var(--color-primary); }

.footer-newsletter .form-control {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.footer-newsletter .form-control::placeholder { color: rgba(255, 255, 255, 0.5); }
.footer-newsletter small { display: block; margin-top: 0.5rem; color: rgba(255, 255, 255, 0.45); }

.footer-divider { border-color: rgba(255, 255, 255, 0.12); margin: 2.5rem 0 1.5rem; }
.footer-bottom { font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); }
.footer-legal a { color: rgba(255, 255, 255, 0.55); }
.footer-legal a:hover { color: #fff; }

/* --------------------------------------------------------------------
   Sticky header scrolled state (toggled by main.js)
   -------------------------------------------------------------------- */
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.site-header.is-scrolled .navbar { padding: 0.6rem 0; }

/* --------------------------------------------------------------------
   Scroll reveal (toggled by main.js via IntersectionObserver)
   -------------------------------------------------------------------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------------------
   Utility helpers
   -------------------------------------------------------------------- */
.text-primary-brand { color: var(--color-primary) !important; }
.bg-light-brand { background-color: var(--color-light) !important; }
.rounded-brand { border-radius: var(--radius-md) !important; }
.shadow-brand { box-shadow: var(--shadow-md) !important; }
