/* ===========================================================================
   base.css - Reset ligero, tipografia y utilidades. Los COLORES viven en
   theme.css (tokens). Aqui solo estructura y elementos base.
   =========================================================================== */

:root {
    --font-display: "Space Grotesk", system-ui, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --container: 74rem;
    --container-narrow: 52rem;
    --space: clamp(1rem, 3vw, 2rem);
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --header-h: 50px; /* alto real del header fijo; ajustar si cambia */
}

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

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: clamp(1rem, .96rem + .25vw, 1.09rem);
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s ease, color .3s ease;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 .5em;
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { color: var(--accent); }

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

p {
  text-align: justify;
  hyphens: auto;
}
p.no {
  text-align: left;
  hyphens: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Deja hueco bajo el header fijo al saltar a un ancla (#servicios, etc.).
   Afecta tanto al scroll por JS (scrollIntoView) como al nativo por hash. */
[id] {
    scroll-margin-top: var(--header-h);
}

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

.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;
}

.parallax {
    height: 75vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

@media (max-width: 1024px) {
    .parallax {
        background-attachment: scroll;
    }
}

.parallax-piscina {
    background-image: url('../img/piscina.png');
}

.parallax-azotea {
    background-image: url('../img/azotea.png');
}

.parallax-oficina {
    background-image: url('../img/oficina.png');
}

.parallax-interior {
    background-image: url('../img/interior.png');
}

/* Transicion de vista (SPA) del contenido principal */
@media (prefers-reduced-motion: no-preference) {
    ::view-transition-old(root),
    ::view-transition-new(root) { animation-duration: .28s; }
}
