/* --- Mar y Selva — CSS Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
}
body {
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* --- Custom Scrollbar --- */
/* Modern browsers */
* { scrollbar-width: thin; scrollbar-color: var(--color-sage) var(--color-bg, #FAFAF7); }
/* WebKit (Chrome, Safari, Edge) */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg, #FAFAF7); }
::-webkit-scrollbar-thumb { background-color: var(--color-sage); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--color-sage-dark); }

img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; font-weight: normal; }
p { overflow-wrap: break-word; }
img { height: auto; }

/* Remove default focus styles, add custom ones */
:focus-visible { outline: 2px solid var(--color-sage); outline-offset: 3px; }

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-sm, 1rem);
    z-index: 9999;
    padding: var(--space-xs, 0.5rem) var(--space-sm, 1rem);
    background-color: var(--color-sage, #5B7B6A);
    color: var(--color-white, #fff);
    font-size: var(--text-small, 0.875rem);
    border-radius: 0 0 var(--border-radius-lg, 4px) var(--border-radius-lg, 4px);
    transition: top var(--duration-fast, 0.2s);
}
.skip-link:focus { top: 0; }

/* 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;
}
