/**
 * base.css
 * CSS reset, global element styles, utility classes, button system
 */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: var(--lh-relaxed);
    color: var(--clr-text-dark);
    background-color: var(--clr-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
    color: var(--clr-navy);
}

p {
    max-width: 70ch;
}

strong {
    font-weight: 600;
}

address {
    font-style: normal;
}

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar          { width: 5px; }
::-webkit-scrollbar-track    { background: var(--clr-warm); }
::-webkit-scrollbar-thumb    { background: var(--clr-gold); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--clr-gold-light); }

/* ── Focus visible ───────────────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--clr-gold);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ── Selection ───────────────────────────────────────────────────────────── */
::selection {
    background: var(--clr-gold);
    color: var(--clr-navy);
}

/* ══════════════════════════════════════════════════════
   LAYOUT CONTAINERS
═══════════════════════════════════════════════════════ */

/* Scrollable content stacks above the fixed footer underlayer */
#main {
    position: relative;
    z-index: 1;
}

.container {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-gutter);
}

.container--wide {
    max-width: var(--container-wide);
    margin-inline: auto;
    padding-inline: var(--container-gutter);
}

.container--narrow {
    max-width: var(--container-narrow);
    margin-inline: auto;
    padding-inline: var(--container-gutter);
}

/* ══════════════════════════════════════════════════════
   SECTION UTILITY
═══════════════════════════════════════════════════════ */

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

.section--warm  { background-color: var(--clr-warm); }
.section--navy  { background-color: var(--clr-navy); }
.section--white { background-color: var(--clr-white); }

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

.section__header--left {
    text-align: left;
}

/* ══════════════════════════════════════════════════════
   TYPOGRAPHY UTILITIES
═══════════════════════════════════════════════════════ */

/* Section label / eyebrow */
.label-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
    color: var(--clr-gold);
    margin-bottom: var(--space-4);
}

.label-tag--light { color: var(--clr-gold-light); }
.label-tag--navy  { color: var(--clr-navy); }

/* Gold rule dividers */
.gold-rule {
    display: block;
    width: 56px;
    height: 2px;
    background: var(--clr-gold);
    margin-inline: auto;
    margin-bottom: var(--space-6);
}

.gold-rule--left {
    margin-inline: 0;
}

.gold-rule--wide {
    width: 80px;
}

/* Heading styles */
.h-display {
    font-family: var(--font-display);
    font-size: var(--text-hero);
    font-weight: 400;
    line-height: var(--lh-tight);
}

.h-1 {
    font-size: clamp(38px, 4vw, 58px);
    line-height: var(--lh-snug);
}

.h-2 {
    font-size: clamp(32px, 3vw, 48px);
    line-height: var(--lh-snug);
}

.h-3 {
    font-size: clamp(24px, 2.5vw, 36px);
    line-height: var(--lh-normal);
}

.h-4 {
    font-size: var(--text-lg);
    line-height: var(--lh-normal);
}

/* Italic accent (gold coloured) */
em.accent {
    font-style: italic;
    color: var(--clr-gold);
}

/* Lead paragraph */
.lead {
    font-size: var(--text-md);
    line-height: var(--lh-loose);
    color: var(--clr-text-mid);
}

/* Small caps label */
.caps {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════
   BUTTON SYSTEM
═══════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: var(--ls-label);
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 17px 40px;
    position: relative;
    overflow: hidden;
    transition:
        background-color var(--duration-base) var(--ease-out),
        border-color     var(--duration-base) var(--ease-out),
        color            var(--duration-base) var(--ease-out),
        transform        var(--duration-fast) var(--ease-out),
        box-shadow       var(--duration-base) var(--ease-out);
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.btn:focus-visible {
    outline-offset: 4px;
}

.btn:active {
    transform: translateY(1px);
}

/* Shimmer effect layer */
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(-110%) skewX(-15deg);
    transition: transform 0.5s var(--ease-out);
    pointer-events: none;
}

.btn:hover::before {
    transform: translateX(110%) skewX(-15deg);
}

/* ── Variants ────────────────────────────────────────── */

/* Gold (primary) */
.btn--gold {
    background: var(--clr-gold);
    color: var(--clr-navy);
    border-color: var(--clr-gold);
}

.btn--gold:hover {
    background: var(--clr-gold-light);
    border-color: var(--clr-gold-light);
    box-shadow: var(--shadow-gold);
    color: var(--clr-navy);
}

/* Navy (secondary) */
.btn--navy {
    background: var(--clr-navy);
    color: var(--clr-white);
    border-color: var(--clr-navy);
}

.btn--navy:hover {
    background: var(--clr-navy-2);
    border-color: var(--clr-navy-2);
    box-shadow: var(--shadow-md);
}

/* Outline white (for dark backgrounds) */
.btn--outline-white {
    background: transparent;
    color: var(--clr-white);
    border-color: rgba(255, 255, 255, 0.45);
}

.btn--outline-white:hover {
    border-color: var(--clr-gold);
    color: var(--clr-gold);
}

/* Outline navy */
.btn--outline-navy {
    background: transparent;
    color: var(--clr-navy);
    border-color: var(--clr-navy);
}

.btn--outline-navy:hover {
    background: var(--clr-navy);
    color: var(--clr-white);
}

/* Ghost gold */
.btn--ghost-gold {
    background: transparent;
    color: var(--clr-gold);
    border-color: var(--clr-gold);
}

.btn--ghost-gold:hover {
    background: var(--clr-gold);
    color: var(--clr-navy);
}

/* ── Sizes ───────────────────────────────────────────── */

.btn--sm {
    padding: 12px 28px;
    font-size: 10px;
}

.btn--lg {
    padding: 20px 52px;
    font-size: 12px;
}

.btn--block {
    width: 100%;
}

/* ══════════════════════════════════════════════════════
   CARD BASE
═══════════════════════════════════════════════════════ */

.card {
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    transition:
        transform    var(--duration-base) var(--ease-out),
        box-shadow   var(--duration-base) var(--ease-out);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

/* ══════════════════════════════════════════════════════
   DIVIDERS
═══════════════════════════════════════════════════════ */

.section-divider {
    width: 100%;
    height: 1px;
    background: var(--clr-border);
    margin-block: var(--space-16);
}

/* ══════════════════════════════════════════════════════
   BACK TO TOP BUTTON
═══════════════════════════════════════════════════════ */

.back-to-top {
    position: fixed;
    bottom: 36px;
    right: 36px;
    width: 48px;
    height: 48px;
    background: var(--clr-navy);
    color: var(--clr-gold);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-sticky);
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity   var(--duration-base) var(--ease-out),
        transform var(--duration-base) var(--ease-out),
        background var(--duration-fast) var(--ease-out);
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.back-to-top:hover {
    background: var(--clr-gold);
    color: var(--clr-navy);
}

/* ══════════════════════════════════════════════════════
   SCREEN READER 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;
}
