/* =========================================
   UK DIVE TRAINING
   SHARED STYLESHEET (loaded on every page)
   Page-specific styles live in:
   home.css, courses.css, about.css, contact.css
   ========================================= */

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

:root {
    --navy: #061b2c;
    --navy-light: #0b2c43;
    --blue: #066a87;          /* darkened for contrast on light backgrounds */
    --turquoise: #32d5cf;
    --white: #ffffff;
    --muted: #a9bdc9;
    --background: #f1f6f8;
    --text-muted: #4f6573;    /* body text grey, passes 4.5:1 on white and pale backgrounds */
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    color: var(--navy);
    background: white;
    line-height: 1.7;
}

h1, h2, h3, .brand {
    font-family: 'Outfit', sans-serif;
    line-height: 1.15;
}

h1 {
    font-size: clamp(42px, 6vw, 76px);
}

h2 {
    font-size: clamp(32px, 4vw, 48px);
}

h3 {
    font-size: 25px;
}

p {
    color: var(--text-muted);
}

a {
    text-decoration: none;
}

h2 span {
    color: var(--turquoise);
}

/* ===== ACCESSIBILITY HELPERS ===== */

/* Skip link: hidden until focused with the keyboard */
.skip-link {
    position: absolute;
    left: 10px;
    top: -80px;
    background: var(--turquoise);
    color: var(--navy);
    padding: 12px 18px;
    border-radius: 5px;
    font-weight: 700;
    z-index: 100;
}

.skip-link:focus {
    top: 10px;
    outline: 3px solid var(--navy);
    outline-offset: 2px;
}

/* Text for screen readers only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Visible keyboard focus. Default suits light backgrounds */
:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}

/* Dark backgrounds need a light focus ring */
.header :focus-visible,
.footer :focus-visible,
.hero :focus-visible,
.page-hero :focus-visible,
.about-hero :focus-visible,
.feature-section :focus-visible,
.experience-section :focus-visible,
.return-section :focus-visible {
    outline-color: var(--turquoise);
}

/* Turquoise background */
.closing-cta :focus-visible {
    outline-color: var(--navy);
}

/* The skip-link target shouldn't show an outline when focused */
main:focus {
    outline: none;
}

/* ===== HEADER & NAVIGATION ===== */

.header {
    background: var(--navy);
    color: white;
    min-height: 82px;
    padding: 0 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    color: white;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}


/* Site logo: place your image at assets/logo.png (PNG, SVG, WebP or JPG).
   The image keeps its proportions and fits within the header/footer. */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-name {
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.15;
    white-space: pre;
}

.brand-logo {
    display: block;
    width: auto;
    height: 48px;
    max-width: min(180px, 32vw);
    object-fit: contain;
}

.footer .brand-logo {
    height: 48px;
    max-width: min(180px, 45vw);
}

.brand span {
    color: var(--turquoise);
}

.brand-icon {
    margin-right: 8px;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 28px;
}

.navigation a {
    color: #d9e7ee;
    font-size: 14px;
}

.navigation a:hover,
.navigation a.active,
.navigation a[aria-current="page"] {
    color: var(--turquoise);
}

.navigation .nav-cta {
    background: var(--turquoise);
    color: var(--navy);
    padding: 12px 19px;
    border-radius: 5px;
    font-weight: 700;
}

/* Keep the call-to-action readable on hover (was turquoise on turquoise) */
.navigation .nav-cta:hover {
    color: var(--navy);
}

.menu-toggle {
    display: none;
    color: white;
    background: none;
    border: 0;
    font-size: 25px;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
}

/* ===== SHARED COMPONENTS ===== */

.eyebrow {
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
}

/* Eyebrows on dark backgrounds */
.hero .eyebrow,
.page-hero .eyebrow,
.about-hero .eyebrow,
.feature-copy .eyebrow,
.experience-copy .eyebrow,
.return-copy .eyebrow {
    color: var(--turquoise);
}

.button {
    display: inline-block;
    padding: 14px 23px;
    border: 0;
    border-radius: 5px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.primary {
    background: var(--turquoise);
    color: var(--navy);
}

.dark-button {
    background: var(--navy);
    color: white;
}

.section {
    padding: 90px 8%;
}

.text-link {
    display: inline-block;
    color: var(--blue);
    font-weight: 700;
    margin-top: 12px;
}

.text-link:hover {
    text-decoration: underline;
}

/* Used on home and courses */
.return-section {
    min-height: 410px;
    background:
    linear-gradient(90deg, #061b2ceF, #061b2c66),
    url("https://images.unsplash.com/photo-1530053969600-caed2596d242?w=1600")
    center/cover;
    display: flex;
    align-items: center;
    padding: 70px 9%;
}

.return-copy {
    max-width: 600px;
}

.return-copy h2 {
    color: white;
}

.return-copy p {
    color: #d8e7ed;
}

/* Used on home, courses and about */
.closing-cta {
    text-align: center;
    padding: 80px 20px;
    background: var(--turquoise);
}

.closing-cta h2 {
    color: var(--navy);
}

.closing-cta p {
    color: #174456;
}

/* Used on courses and contact */
.page-hero {
    text-align: center;
    padding: 100px 20px;
    background: var(--navy);
    color: white;
}

.page-hero h1 {
    color: white;
    margin: 20px 0;
}

.page-hero h1 span {
    color: var(--turquoise);
}

.page-hero p {
    color: var(--muted);
    max-width: 650px;
    margin: auto;
}

/* Used on courses and about */
.course-number {
    color: var(--blue);
    font-size: 13px;
    letter-spacing: 1.5px;
    font-weight: 800;
}

/* ===== FOOTER ===== */

.footer {
    text-align: center;
    background: var(--navy);
    color: white;
    padding: 45px 20px;
}

.footer p,
.footer small {
    color: var(--muted);
}

.footer div,
.footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 20px 0;
}

.footer div a,
.footer .footer-links a {
    color: white;
}

.footer small {
    font-size: 13px;
}

/* Training agency logos in footer */
.footer .footer-agencies {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 30px auto 20px;
}

.footer .footer-agencies a {
    display: block;
}

.footer .footer-agencies img {
    display: block;
    width: 100%;
    height: auto;
}

/* ===== RESPONSIVE ===== */

@media(max-width: 800px) {
    .brand-logo {
        height: 40px;
        max-width: min(130px, 28vw);
    }

    .brand-name {
        font-size: 17px;
        letter-spacing: .6px;
    }

    .header .brand {
        gap: 7px;
    }

    .menu-toggle {
        display: block;
    }

    .navigation {
        display: none;
        position: absolute;
        top: 82px;
        left: 0;
        right: 0;
        padding: 25px;
        background: var(--navy);
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .navigation.open {
        display: flex;
    }

    .section {
        padding: 60px 7%;
    }
}

@media (max-width: 480px) {
    .footer .footer-agencies {
        max-width: 85%;
        margin: 24px auto 16px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 12px 20px;
    }
}

/* Respect users who have asked for less motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }

    .button:hover {
        transform: none;
    }
}
