* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-cream);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
}

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

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

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

button {
    cursor: pointer;
}

h1,
h2,
h3 {
    margin-top: 0;
    font-family: var(--font-heading);
    line-height: 1.2;
}

p {
    margin-top: 0;
}

/* Accessibility helper */
.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;
}

/* ===================================
   PHASE 3.8 — CUSTOMER UI POLISH
=================================== */

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

::selection {
    background: var(--color-gold-soft);
    color: var(--color-brown);
}


/* ===================================
   PHASE 6.7 — CUSTOMER UX POLISH
=================================== */

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1000;
    transform: translateY(-180%);
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--color-brown);
    color: var(--color-white);
    font-weight: 700;
    box-shadow: var(--shadow-soft);
    transition: transform 160ms ease;
}

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

button:disabled,
.button[aria-disabled="true"] {
    cursor: not-allowed;
}

input,
textarea,
select {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    color: var(--color-text);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-text-muted);
    opacity: 0.8;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-gold-dark);
    outline: 3px solid var(--color-gold-soft);
    outline-offset: 1px;
}

body.nav-open {
    overflow: hidden;
}

.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 50;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-brown);
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
}

.back-to-top:hover {
    transform: translateY(-2px);
}

.back-to-top:focus-visible {
    outline-offset: 2px;
}

[aria-busy="true"] {
    cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
