/* Palo Family — brand body + headings (Guía Gráfica) */
@font-face {
    font-family: "Palo";
    src: url("../fonts/PALO/palo-regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Palo";
    src: url("../fonts/PALO/palo-medium.otf") format("opentype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Palo";
    src: url("../fonts/PALO/palo-semibold.otf") format("opentype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Palo";
    src: url("../fonts/PALO/palo-bold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Palo";
    src: url("../fonts/PALO/palo-black.otf") format("opentype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Black Diamond — display / hero headlines */
@font-face {
    font-family: "Black Diamond";
    src: url("../fonts/BlackDiamond.otf") format("opentype");
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Official DR tourism palette (Guía Gráfica) */
    --c-ultramar: #003764;
    --c-larimar: #0099a8;
    --c-cotorra: #00ae42;
    --c-rosa: #af0061;
    --c-ambar: #ff671d;
    --c-mango: #ffb71b;
    --c-primary: #003764;
    --c-primary-dark: #002648;
    --c-primary-soft: #1a5278;
    --c-accent: #0099a8;
    --c-accent-light: #33b8c4;
    --c-green: #00ae42;
    --c-green-dark: #008a34;
    --c-sand: #f0e6d2;
    --c-sand-light: #f7f1e6;
    --c-secondary: #001a2e;
    --c-surface: #f5f8fb;
    --c-surface-light: #f5f8fb;
    --c-surface-elevated: #ffffff;
    --c-ink: #003764;
    --c-muted: #4a6175;
    --c-line: rgba(0, 55, 100, 0.12);
    --c-white: #ffffff;
    --c-black: #000000;
    --c-magenta: #af0061;
    --c-orange: #ff671d;
    --c-yellow: #ffb71b;
    /* Guía: Palo Regular body, Palo Bold headings; Black Diamond for hero display */
    --f-sans: "Palo", Arial, Helvetica, sans-serif;
    --f-display: "Palo", Arial, Helvetica, sans-serif;
    --f-black: "Black Diamond", "Palo", Arial, Helvetica, sans-serif;
    --text-scale: 1;
    --scroll-offset: 110px;
    --container: min(1180px, calc(100% - clamp(2rem, 5vw, 4rem)));
    /* Equal top/bottom section rhythm (matched to Things to Do) */
    --section-space: clamp(3.5rem, 7vw, 5.5rem);
    --section-space-sm: clamp(3.5rem, 7vw, 5.5rem);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --radius-sm: 0.25rem;
    --shadow-soft: 0 20px 50px rgba(0, 55, 100, 0.1);
}

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

html {
    scroll-behavior: smooth;
    font-size: calc(16px * var(--text-scale));
}

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

body {
    margin: 0;
    font-family: var(--f-sans);
    color: var(--c-ink);
    background: var(--c-surface);
    position: relative;
    line-height: 1.7;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
}

* {
    scroll-margin-top: var(--scroll-offset);
}

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

a,
button {
    cursor: pointer;
    transition: color 0.25s var(--ease-out), background-color 0.25s var(--ease-out),
        border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out), opacity 0.25s var(--ease-out),
        box-shadow 0.25s var(--ease-out);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--c-accent);
    outline-offset: 3px;
}

.container {
    width: var(--container);
    margin-inline: auto;
}

.section-pad {
    padding-block: var(--section-space);
}

.section-pad--sm {
    padding-block: var(--section-space-sm);
}

.font-display {
    font-family: var(--f-black);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.08;
}

.eyebrow {
    display: inline-block;
    margin: 0 0 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: none;
    color: var(--c-accent);
}

.section-heading {
    margin: 0;
    font-family: var(--f-black);
    font-weight: 400;
    font-size: clamp(2.25rem, 5vw, 3.65rem);
    letter-spacing: -0.02em;
    line-height: 1.12;
    color: var(--c-primary);
    text-wrap: balance;
}

.section-heading--light {
    color: var(--c-white);
}

.lead {
    margin: 0;
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    line-height: 1.75;
    color: var(--c-muted);
    max-width: 36rem;
}

.hairline {
    border: 0;
    border-top: 1px solid var(--c-line);
    margin: 0;
}

.btn {
    --btn-bg: var(--c-primary);
    --btn-fg: var(--c-white);
    --btn-border: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    min-height: 3.15rem;
    padding: 0.9rem 1.75rem;
    border: 1px solid var(--btn-border);
    border-radius: 9999px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--f-sans);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    text-transform: none;
    line-height: 1.2;
}

.btn__arrow {
    display: inline-flex;
    transition: transform 0.3s var(--ease-out);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 55, 100, 0.22);
}

.btn:hover .btn__arrow {
    transform: translateX(4px);
}

.btn:active {
    transform: translateY(0);
}

.btn--accent {
    --btn-bg: var(--c-accent);
}

.btn--accent:hover {
    box-shadow: 0 14px 32px rgba(0, 153, 168, 0.28);
}

.btn--ghost {
    --btn-bg: transparent;
    --btn-fg: var(--c-white);
    --btn-border: rgba(255, 255, 255, 0.45);
}

.btn--ghost:hover {
    --btn-bg: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.btn--light {
    --btn-bg: var(--c-white);
    --btn-fg: var(--c-primary);
}

.btn--light:hover {
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.btn--outline {
    --btn-bg: transparent;
    --btn-fg: var(--c-primary);
    --btn-border: rgba(0, 55, 100, 0.28);
}

.btn--outline:hover {
    --btn-bg: var(--c-primary);
    --btn-fg: var(--c-white);
}

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

.skip-link:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    width: auto;
    height: auto;
    padding: 0.75rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--c-accent);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
}

body.a11y-high-contrast {
    /* Avoid filter on body — it breaks position:fixed (a11y sidebar). */
    --c-primary: #000000;
    --c-primary-dark: #000000;
    --c-primary-soft: #222222;
    --c-accent: #7a4f1d;
    --c-accent-light: #9a6b2e;
    --c-ink: #000000;
    --c-muted: #222222;
    --c-surface: #ffffff;
    --c-surface-light: #ffffff;
    --c-surface-elevated: #ffffff;
    --c-line: rgba(0, 0, 0, 0.35);
    --c-white: #ffffff;
}

body.a11y-high-contrast .a11y-toolbar__panel,
body.a11y-high-contrast .a11y-toolbar__tile,
body.a11y-high-contrast .a11y-toolbar__toggle {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

body.a11y-high-contrast .a11y-toolbar__header {
    background: #000000 !important;
    border-bottom-color: #000000 !important;
}

body.a11y-high-contrast .a11y-toolbar__header-title {
    background: transparent !important;
    color: #ffffff !important;
}

body.a11y-high-contrast .a11y-toolbar__close {
    color: #ffffff !important;
}

body.a11y-high-contrast .a11y-toolbar__grid {
    background: #ffffff !important;
}

body.a11y-high-contrast .a11y-toolbar__tile-icon {
    background: #f0f0f0 !important;
    color: #000000 !important;
    border: 1px solid #000000;
}

body.a11y-high-contrast .a11y-toolbar__tile.is-active {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25) !important;
}

body.a11y-high-contrast .a11y-toolbar__tile.is-active .a11y-toolbar__tile-icon {
    background: #ffffff !important;
    color: #000000 !important;
}

body.a11y-high-contrast .a11y-toolbar__tile.is-active .a11y-toolbar__tile-label {
    color: #ffffff !important;
}

body.a11y-high-contrast .a11y-toolbar__backdrop.is-open {
    background: rgba(0, 0, 0, 0.55) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.a11y-dyslexia {
    font-family: "Comic Sans MS", "OpenDyslexic", var(--f-sans);
    letter-spacing: 0.05em;
    word-spacing: 0.1em;
}

body.a11y-highlight-links a {
    text-decoration: underline !important;
    text-underline-offset: 3px;
    outline: 2px dashed var(--c-accent);
    outline-offset: 2px;
}

body.a11y-pause-animations *:not(.a11y-toolbar__panel):not(.a11y-toolbar__backdrop),
body.a11y-pause-animations *:not(.a11y-toolbar__panel):not(.a11y-toolbar__backdrop)::before,
body.a11y-pause-animations *:not(.a11y-toolbar__panel):not(.a11y-toolbar__backdrop)::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

.reveal,
.reveal-view {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
    will-change: opacity, transform;
}

.reveal.is-visible,
.reveal-view.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-view {
        opacity: 1;
        transform: none;
        transition: none;
        will-change: auto;
    }
}

.btn-scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 40;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--c-primary);
    color: white;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 55, 100, 0.3);
}

.btn-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-scroll-top:hover {
    background: var(--c-accent);
    transform: translateY(-2px);
}

.sqbtn {
    background: var(--c-primary);
    padding: 12px 6px;
    text-align: center;
    font-weight: 500;
    color: #fff;
    font-size: 14px;
    border: none;
    cursor: pointer;
    position: fixed;
    top: calc(50% - 60px);
    right: 0;
    z-index: 21;
    writing-mode: vertical-rl;
    border-radius: 10px 0 0 10px;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.25);
}

.sqbtn:hover {
    background: var(--c-accent);
}

.footer-bg {
    background: var(--c-primary-dark);
}

body.theme-dark {
    background: var(--c-secondary);
    color: #f5f5f4;
}

body.theme-light {
    background: var(--c-surface);
    color: var(--c-ink);
}

/* ——— Brand pattern decorations (assets/images/pattern) ——— */
.dr-deco {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.dr-deco--edge-left {
    left: 0;
    top: 0;
    bottom: 0;
    width: min(32vw, 20rem);
    background-position: left center;
    background-size: auto 105%;
    opacity: 0.9;
}

.dr-deco--edge-right {
    right: 0;
    top: 0;
    bottom: 0;
    width: min(32vw, 20rem);
    background-position: right center;
    background-size: auto 105%;
    opacity: 0.9;
}

.dr-deco--wash {
    inset: 0;
    opacity: 0.14;
    background-size: cover;
}

.dr-deco--wash-strong {
    inset: 0;
    opacity: 0.22;
    background-size: cover;
}

.dr-deco--corner {
    width: min(48vw, 26rem);
    aspect-ratio: 1;
    opacity: 0.22;
    background-size: cover;
}

.dr-deco--corner-br {
    right: -4%;
    bottom: -6%;
}

.dr-deco--corner-tr {
    right: -4%;
    top: -6%;
}

.dr-deco--corner-bl {
    left: -4%;
    bottom: -6%;
}

.dr-deco--corner-tl {
    left: -4%;
    top: -6%;
}

.dr-deco--band {
    left: 0;
    right: 0;
    height: min(28vh, 14rem);
    opacity: 0.18;
    background-size: cover;
    background-position: center;
}

.dr-deco--band-top {
    top: 0;
}

.dr-deco--band-bottom {
    bottom: 0;
}

.dr-deco--p01 { background-image: url("../images/pattern/pattern-01.png"); }
.dr-deco--p02 { background-image: url("../images/pattern/pattern-02.png"); }
.dr-deco--p03 { background-image: url("../images/pattern/pattern-03.png"); }
.dr-deco--p04 { background-image: url("../images/pattern/pattern-04.png"); }
.dr-deco--p05 { background-image: url("../images/pattern/pattern-05.png"); }
.dr-deco--p06 { background-image: url("../images/pattern/pattern-06.png"); }
.dr-deco--p07 { background-image: url("../images/pattern/pattern-07.png"); }
.dr-deco--p08 { background-image: url("../images/pattern/pattern-08.png"); }

@media (max-width: 767px) {
    .dr-deco--edge-left,
    .dr-deco--edge-right {
        width: min(42vw, 9.5rem);
        opacity: 0.55;
    }

    .dr-deco--corner {
        width: min(70vw, 16rem);
        opacity: 0.16;
    }

    .dr-deco--wash {
        opacity: 0.1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dr-deco {
        transition: none;
    }
}

/* Image copyright strip — parent must be position: relative */
.aa-image-credit {
    position: absolute;
    right: clamp(0.75rem, 2vw, 1.15rem);
    bottom: clamp(0.75rem, 2vw, 1.15rem);
    z-index: 10;
    width: fit-content;
    max-width: calc(100% - 1.5rem);
    margin: 0;
    padding: 0.35rem 0.65rem;
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.35;
    text-align: right;
    white-space: nowrap;
}
