/* Shared brand styles. Page and component layouts have separate stylesheets. */

@font-face {
    font-family: "Nunito Sans";
    src: url("../fonts/nunito-400.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nunito Sans";
    src: url("../fonts/nunito-600.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nunito Sans";
    src: url("../fonts/nunito-700.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nunito Sans";
    src: url("../fonts/nunito-800.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Nunito Sans";
    src: url("../fonts/nunito-900.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --navy: #191c27;
    --deep: #12151e;
    --panel: #222633;
    --yellow: #ffdd6d;
    --ring: var(--navy);
    --canvas: #f5f5f3;
    --muted: #5f6572;
    --border: #dfe1e6;
    --font-family: "Nunito Sans", Arial, sans-serif;

    /* Type roles are shared with brochures through typography.css. */

    /* Spacing values are shared with brochures through spacing.css. */
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-padding-top: 8rem;
}

body {
    margin: 0;
    color: var(--navy);
    background: var(--canvas);
    font-family: var(--font-family);
    font-size: var(--type-body);
    line-height: var(--leading-body);
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* Shared single-select arrow: keep it clear of the border and selected text.
 * Attribute specificity preserves these properties when component styles load.
 * Native select behaviour, focus styles and listboxes remain intact. */
body select:not([multiple]):not([size]),
body select:not([multiple])[size="1"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23191c27' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
}

@media (forced-colors: active) {
    body select:not([multiple]):not([size]),
    body select:not([multiple])[size="1"] {
        -webkit-appearance: auto;
        -moz-appearance: auto;
        appearance: auto;
        padding-right: 12px;
        background-image: none;
    }
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-underline-offset: 0.2em;
}

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

svg {
    flex-shrink: 0;
}

h1,
h2,
h3 {
    margin-top: 0;
    font-weight: 900;
}

h1 {
    font-size: var(--type-section);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

h2,
.section-title {
    font-size: var(--type-section);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

h3 {
    font-size: var(--type-subheading);
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.feature-title {
    font-size: var(--type-feature-title);
    line-height: 1.16;
    letter-spacing: -0.03em;
}

::selection {
    color: var(--navy);
    background: var(--yellow);
}

/* Brand focus treatment. Keep a visible keyboard indicator without the gold frame. */
:focus-visible {
    outline: 2px solid var(--navy);
    outline-offset: 3px;
}

/* Text fields use a tight navy edge instead of a detached focus rectangle.
 * Specificity keeps this consistent in enquiries and all event registration forms.
 * The inset shadow adds weight without changing field dimensions or spacing. */
body :is(input:not([type="checkbox"],[type="radio"],[type="range"],[type="file"],[type="submit"],[type="button"],[type="reset"],[type="image"],[type="color"]),select,textarea):focus {
    border-color: var(--navy);
    box-shadow: inset 0 0 0 1px var(--navy);
    outline: 2px solid transparent;
    outline-offset: 2px;
}

@media (forced-colors: active) {
    :focus-visible {
        outline-color: Highlight;
    }
    body :is(input:not([type="checkbox"],[type="radio"],[type="range"],[type="file"],[type="submit"],[type="button"],[type="reset"],[type="image"],[type="color"]),select,textarea):focus {
        border-color: Highlight;
        box-shadow: none;
        outline-color: Highlight;
    }
}

[hidden] {
    display: none !important;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 16px;
    z-index: 100000;
    transform: translateY(-200%);
    padding: 12px 20px;
    color: var(--navy);
    background: var(--yellow);
    font-weight: 800;
}

.skip-link:focus {
    transform: translateY(0);
}

.shell {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--page-gutter);
}

.section-space {
    padding-block: var(--section-padding);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    min-height: 54px;
    padding: 15px 24px;
    border: 1px solid transparent;
    border-radius: 0;
    font-size: 0.9375rem;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transition: background-color 180ms, color 180ms;
}

.button--yellow {
    color: var(--deep);
    background: var(--yellow);
    border-color: var(--yellow);
}

.button--yellow:hover {
    background: #ffe99a;
    border-color: #ffe99a;
}

/* The existing fallback template, until each page gets its own layout. */
.site-main {
    max-width: 1440px;
    min-height: 55vh;
    margin-inline: auto;
    padding: var(--section-padding) clamp(24px, 5.2vw, 80px);
}

.site-main > article + article {
    margin-top: var(--space-lg);
}

.site-footer {
    padding: var(--space-md) clamp(24px, 5.2vw, 80px);
    color: var(--canvas);
    background: var(--deep);
}

.site-footer p {
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .button {
        transition: none;
    }
}
