/* Tipografías servidas desde a propia web: ningunha petición a Google. */
@font-face {
    font-family: 'Atkinson Hyperlegible Next'; font-weight: 400 700; font-display: swap;
    src: url('fonts/atkinson-hyperlegible-next-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Sorts Mill Goudy'; font-style: normal; font-weight: 400; font-display: swap;
    src: url('fonts/sorts-mill-goudy-400-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Sorts Mill Goudy'; font-style: italic; font-weight: 400; font-display: swap;
    src: url('fonts/sorts-mill-goudy-400-italic-latin.woff2') format('woff2');
}

:root {
    --plum:      #511359; /* coincide co borde superior de fondo.webp */
    --plum-deep: #2E0838;
    --plum-ink:  #2A1430;
    --plum-soft: #5E4766;
    --gold:      #E8A23A;
    --gold-text: #8A5807; /* ouro con contraste AA sobre fondo claro */
    --lilac:     #F8F3F8;
    --lilac-2:   #EFE5F0;
    --white:     #fff;

    --serif: 'Sorts Mill Goudy', Georgia, serif;
    --sans:  'Atkinson Hyperlegible Next', system-ui, sans-serif;
    --maxw:  72rem;
    --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    font-size: clamp(1.125rem, 1rem + .35vw, 1.25rem);
    line-height: 1.6;
    color: var(--plum-ink);
    background: var(--lilac);
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 4px; }

h1, h2, .serif {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.1;
    text-wrap: balance;
}
h2 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem); color: var(--plum); }
p { max-width: 62ch; text-wrap: pretty; }

.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

/* ---------- Hero ---------- */
.hero {
    background: var(--plum);
    color: var(--white);
    text-align: center;
    overflow: hidden;
}
.hero__text {
    position: relative;
    z-index: 1;
    padding-block: clamp(2.5rem, 6vw, 4.5rem) 0;
    display: grid;
    justify-items: center;
    gap: 1.5rem;
}
.hero__logo { width: clamp(9rem, 7rem + 8vw, 13rem); height: auto; margin-bottom: clamp(.5rem, 2vw, 1.5rem); }
.hero h1 {
    font-size: clamp(2.75rem, 1.5rem + 5vw, 5.5rem);
    line-height: 1.02;
    letter-spacing: -.01em;
    max-width: 16ch;
    margin-top: .5rem;
}
.hero__lede {
    font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
    color: var(--lilac-2);
}
.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem 2rem;
    margin-top: .5rem;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    min-height: 3.5rem;
    padding: .75rem 1.75rem;
    border-radius: 999px;
    background: var(--gold);
    color: var(--plum-deep);
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s, transform .2s;
}
.btn:hover { background: #F3B758; }
.btn:active { transform: scale(.97); }
.link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 3rem;
    text-underline-offset: .25em;
    text-decoration-thickness: 1px;
}
.link:hover { text-decoration-color: var(--gold); }
.icon { width: 1.4em; height: 1.4em; flex: none; }

.hero__photo {
    width: 100%;
    height: clamp(18rem, 62vw, 82svh);
    object-fit: cover;
    object-position: 40% 100%;
    margin-top: clamp(-10rem, -12vw, -2rem);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%);
            mask-image: linear-gradient(to bottom, transparent, #000 30%);
}

@media (prefers-reduced-motion: no-preference) {
    .hero__text > *, .hero__photo { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
    .hero__text > :nth-child(2) { animation-delay: .12s; }
    .hero__text > :nth-child(3) { animation-delay: .24s; }
    .hero__text > :nth-child(4) { animation-delay: .36s; }
    .hero__photo { animation-name: fade; animation-duration: 1.4s; animation-delay: .2s; }
    @keyframes rise { from { opacity: 0; transform: translateY(1rem); } }
    @keyframes fade { from { opacity: 0; } }
}

/* ---------- Valores ---------- */
.values {
    list-style: none;
    padding: clamp(2.5rem, 5vw, 4rem) 0;
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.values li { display: flex; align-items: center; gap: 1rem; }
.values .badge {
    display: grid;
    place-items: center;
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    background: var(--plum);
    color: var(--gold);
    flex: none;
}
.values .icon { width: 1.75rem; height: 1.75rem; }
.values span:last-child {
    font-family: var(--serif);
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--plum);
}

/* ---------- Seccións a dúas columnas ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section + .section { padding-top: 0; }
.split { display: grid; gap: 1.5rem 4rem; align-items: start; }
@media (min-width: 52rem) {
    .split { grid-template-columns: 5fr 7fr; }
}
.split > div > p { margin-top: 1.25rem; color: var(--plum-soft); }

.list { list-style: none; padding: 0; display: grid; }
.list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding-block: 1.25rem;
    font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
    line-height: 1.4;
    border-bottom: 1px solid var(--lilac-2);
}
.list li:first-child { padding-top: 0; }
.list .icon { color: var(--gold-text); width: 1.6rem; height: 1.6rem; margin-top: .1em; }

.bleed { background: var(--white); }

/* ---------- Quen somos ---------- */
.story {
    background: var(--plum-deep);
    color: var(--lilac);
    padding-block: clamp(4rem, 9vw, 7.5rem);
}
.story h2 { color: var(--gold); font-style: italic; font-size: 1.75rem; }
.story blockquote {
    font-family: var(--serif);
    font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.25rem);
    line-height: 1.2;
    max-width: 24ch;
    margin-top: 1.5rem;
    text-wrap: balance;
}
.story p { margin-top: 2rem; color: #D9C8DC; }

/* ---------- Contacto ---------- */
.contact-lines { display: grid; gap: .75rem; }
.contact-lines a {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    width: fit-content;
    text-decoration: none;
    color: var(--plum);
}
.contact-lines a:hover { color: var(--gold-text); }
/* Atkinson: cifras máis lexibles cás de estilo antigo da Goudy */
.contact-lines .tel { font-weight: 700; font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); line-height: 1.1; letter-spacing: -.01em; }
.contact-lines .mail { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); overflow-wrap: anywhere; }
.contact-lines .icon { color: var(--gold-text); width: 1.1em; height: 1.1em; }
.contact-lines .tel .icon { width: .6em; height: .6em; }

footer {
    background: var(--plum-deep);
    color: #BFA9C4;
    font-size: .95rem;
    padding-block: 2rem;
}
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.legal { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.legal a { text-underline-offset: .2em; }
.legal a:hover { color: var(--white); }

/* ---------- Páxinas legais ---------- */
.page-head {
    background: var(--plum);
    color: var(--white);
    padding-block: clamp(1.75rem, 4vw, 2.75rem) clamp(2.5rem, 6vw, 4rem);
}
.page-head__logo {
    display: block;
    width: fit-content;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.page-head__logo img { width: clamp(5.5rem, 4.5rem + 4vw, 7.5rem); height: auto; }
.page-head h1 { font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem); line-height: 1.05; }
.page-head p { margin-top: .75rem; color: var(--lilac-2); font-size: 1rem; }

.legal-body { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.legal-body > * { max-width: 46rem; }
.legal-body h2 {
    font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: .75rem;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p,
.legal-body ul,
.legal-body table { margin-bottom: 1rem; }
.legal-body ul { padding-left: 1.25rem; }
.legal-body li + li { margin-top: .5rem; }
.legal-body li::marker { color: var(--gold-text); }
.legal-body a { color: var(--plum); text-underline-offset: .2em; }
.legal-body a:hover { color: var(--gold-text); }

.data {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--lilac-2);
}
.data th,
.data td { text-align: left; vertical-align: top; padding: .9rem 1.25rem; }
.data tr + tr th,
.data tr + tr td { border-top: 1px solid var(--lilac-2); }
.data th { width: 36%; font-weight: 700; color: var(--plum); }
@media (max-width: 34rem) {
    .data th, .data td { display: block; width: auto; }
    .data th { padding-bottom: 0; }
    .data td { padding-top: .25rem; border-top: 0 !important; }
}

/* Datos que aínda ten que facilitar o cliente */
.pending {
    background: #FBEBCF;
    color: var(--plum-ink);
    padding: .05em .35em;
    border-radius: .3em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-decoration: none;
}
.legal a[aria-current="page"] { color: var(--white); text-decoration: none; }
