/*
 * Main Stylesheet — Maxvidel Theme
 *
 * Base/global layout styles that apply across the entire site.
 * Extends the CSS reset and custom properties already defined in style.css.
 * Contains: container, accessibility helpers, typography scale, section
 * patterns, skip link, screen-reader-text, and base button styles.
 *
 * Load order: style.css → main.css → components.css → responsive.css → animations.css
 *
 * All values reference CSS custom properties defined in style.css.
 * Never hardcode colours, sizes, or font families in this file.
 *
 * @package Maxvidel
 * @since 1.0.0
 */

/* ========================================
   ACCESSIBILITY — Skip link & screen reader
   ======================================== */

.skip-link {
    position: absolute;
    top: -9999px;
    left: var(--space-2);
    background-color: var(--color-forest-green);
    color: var(--color-white);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 600;
    text-decoration: none;
    z-index: 99999;
    transition: top 0s;
}

.skip-link:focus {
    top: var(--space-2);
}

/* Visually hidden but accessible to screen readers */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   LAYOUT — Container
   ======================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-right: auto;
    margin-left: auto;
    padding-right: var(--space-3);
    padding-left: var(--space-3);
}

.container--narrow {
    width: 100%;
    max-width: var(--container-narrow);
    margin-right: auto;
    margin-left: auto;
    padding-right: var(--space-3);
    padding-left: var(--space-3);
}

/* ========================================
   TYPOGRAPHY — Base scale
   ======================================== */

h1 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-dark);
    margin-bottom: var(--space-3);
    overflow-wrap: break-word;
    word-break: break-word;
}

h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-dark);
    margin-bottom: var(--space-2);
    overflow-wrap: break-word;
    word-break: break-word;
}

h3 {
    font-family: var(--font-heading);
    font-size: var(--text-h3);
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--color-dark);
    margin-bottom: var(--space-2);
}

h4 {
    font-family: var(--font-heading);
    font-size: var(--text-h4);
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--color-dark);
    margin-bottom: var(--space-1);
}

h5 {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-dark);
    margin-bottom: var(--space-1);
}

h6 {
    font-family: var(--font-body);
    font-size: var(--text-small);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-dark);
    margin-bottom: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   IMAGES — Defaults
   ======================================== */

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

img {
    display: block;
}

/* ========================================
   SECTION — Base pattern
   ======================================== */

.section {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
}

.section--alt {
    background-color: var(--color-off-white);
}

.section--dark {
    background-color: var(--color-dark-green);
    color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
    color: var(--color-white);
}

.section--green {
    background-color: var(--color-forest-green);
    color: var(--color-white);
}

.section--green h1,
.section--green h2,
.section--green h3,
.section--green h4,
.section--green h5,
.section--green h6 {
    color: var(--color-white);
}

.section__header {
    margin-bottom: var(--space-8);
    text-align: center;
}

.section__title {
    margin-bottom: var(--space-2);
}

.section__subtitle {
    font-family: var(--font-body);
    font-size: var(--text-h4);
    font-weight: 400;
    color: var(--color-gray);
    max-width: 600px;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 0;
    line-height: var(--leading-normal);
}

.section--dark .section__subtitle,
.section--green .section__subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.section__content {
    /* No default styles — each section overrides as needed. */
}

/* ========================================
   BUTTONS — Base styles
   (Detailed declarations live in style.css)
   ======================================== */

.btn-primary,
.btn-secondary,
.btn-accent,
.btn-outline {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition:
        background-color var(--transition-normal),
        color var(--transition-normal),
        border-color var(--transition-normal);
}

/* ========================================
   LINKS — Base styles
   ======================================== */

a {
    color: var(--color-forest-green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover,
a:focus {
    color: var(--color-emerald-green);
}

/* ========================================
   LISTS — Reset for navigation
   ======================================== */

.nav__menu,
.nav__mobile-menu,
.footer__nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }

.text-gold    { color: var(--color-gold); }
.text-green   { color: var(--color-forest-green); }
.text-white   { color: var(--color-white); }
.text-gray    { color: var(--color-gray); }
.text-small   { font-size: var(--text-small); }

.font-heading { font-family: var(--font-heading); }
.font-body    { font-family: var(--font-body); }
.font-700     { font-weight: 700; }
.font-600     { font-weight: 600; }
.font-400     { font-weight: 400; }

/* Section label — "OUR APPROACH", "SERVICES" overline */
.label--section {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-small);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: var(--space-2);
}

.no-results {
    color: var(--color-gray);
    font-style: italic;
}

/* ========================================
   FOCUS — Visible focus ring
   ======================================== */

:focus-visible {
    outline: 3px solid var(--color-gold);
    outline-offset: 2px;
}
