/**
 * CSS Reset
 * 270 Park Avenue Website
 *
 * Modern, comprehensive reset for consistent cross-browser rendering
 * Based on Josh Comeau's CSS Reset with additional refinements
 */

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

/* Remove default margin and padding */
* {
    margin: 0;
    padding: 0;
}

/* Prevent font size inflation */
html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    -moz-tab-size: 4;
    tab-size: 4;
    scroll-behavior: smooth;
}

/* Remove default list styles */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    min-height: 100dvh;
    line-height: var(--leading-relaxed, 1.625);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Set shorter line heights on headings and interactive elements */
h1,
h2,
h3,
h4,
h5,
h6,
button,
input,
label {
    line-height: var(--leading-tight, 1.15);
}

/* Balance text wrapping on headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

/* Avoid orphans on paragraphs */
p {
    text-wrap: pretty;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
}

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* Natural flow and target content */
img,
picture {
    height: auto;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* Text areas without rows attribute default sizing */
textarea:not([rows]) {
    min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
    scroll-margin-block: 5ex;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

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

/* Remove default button styles */
button {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

/* Make sure buttons are accessible */
button:focus-visible {
    outline: 2px solid var(--color-accent-primary, currentColor);
    outline-offset: 2px;
}

/* Remove list styles */
ul,
ol {
    list-style: none;
}

/* Table defaults */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Form elements */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

legend {
    padding: 0;
}

/* Address styles */
address {
    font-style: normal;
}

/* Blockquote reset */
blockquote,
q {
    quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
    content: '';
    content: none;
}

/* Hidden attribute support */
[hidden] {
    display: none !important;
}

/* Visually hidden but accessible */
.sr-only,
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link styles */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-3) var(--space-6);
    background: var(--color-bg-inverse, #0A2822);
    color: var(--color-text-inverse, #F8F6F0);
    font-weight: var(--font-bold, 700);
    text-decoration: none;
    z-index: var(--z-maximum, 9999);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    transition: top var(--duration-fast) var(--ease-default);
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--color-accent-primary);
    outline-offset: 2px;
}

/* Focus visible for keyboard navigation */
:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--color-accent-primary, #B08D57);
    outline-offset: 2px;
}

/* Print styles */
@media print {

    *,
    *::before,
    *::after {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
