/* Mirtea — variables, tipografías, base y piezas comunes */

@font-face {
    font-family: 'Epilogue';
    font-style: normal;
    font-weight: 200 700;
    font-display: swap;
    src: url('../fonts/epilogue-var.woff2') format('woff2');
}

@font-face {
    font-family: 'Lora';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/lora-var.woff2') format('woff2');
}

@font-face {
    font-family: 'Lora';
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/lora-var-it.woff2') format('woff2');
}

/* métricas medidas con render: el reserva ocupa lo mismo que la web */
@font-face {
    font-family: 'Epilogue Fallback';
    src: local('Arial');
    size-adjust: 111.6%;
    ascent-override: 92%;
    descent-override: 26%;
    line-gap-override: 0%;
}

@font-face {
    font-family: 'Lora Fallback';
    src: local('Georgia');
    size-adjust: 105.2%;
    ascent-override: 98%;
    descent-override: 26%;
    line-gap-override: 0%;
}

:root {
    --color-bg: #F5F6F8;
    --color-surface: #ECEEF2;
    --color-card: #FFFFFF;
    --color-line: #D6D9E1;
    --color-text-2: #5D6370;
    --color-text: #22252D;
    --color-accent: oklch(54.2% 0.106 28.5);
    --color-accent-deep: oklch(48% 0.097 28.8);
    --color-accent-soft: oklch(54.2% 0.106 28.5 / 0.14);
    --color-mauve: oklch(57% 0.061 334.4);
    --color-mauve-deep: oklch(49.3% 0.07 334);
    --color-mauve-soft: oklch(57% 0.061 334.4 / 0.16);
    --color-ok: #2F6B5E;
    --color-shade: rgba(34, 37, 45, 0.16);
    --space-xs: 8px;
    --space-s: 16px;
    --space-m: 24px;
    --space-l: 40px;
    --space-xl: 72px;
    --space-xxl: 120px;
    --space-gutter: 20px;
    --space-offset: 14px;
    --font-head: 'Epilogue', 'Epilogue Fallback', 'Segoe UI', sans-serif;
    --font-text: 'Lora', 'Lora Fallback', Georgia, serif;
    --radius-btn: 6px;
    --radius-card: 18px;
    --shadow-soft: 0 18px 40px -22px rgba(34, 37, 45, 0.28), 0 2px 6px rgba(34, 37, 45, 0.05);
    --hd-h: 64px;
}

@media (min-width: 900px) {
    :root {
        --space-gutter: 40px;
        --hd-h: 129px;
    }
}

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

html {
    scroll-padding-top: calc(var(--hd-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-text);
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
}

html.cc-up body {
    padding-bottom: var(--cc-h, 0px);
}

html.menu-live,
html.bp-lock {
    overflow: hidden;
}

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

/* el atributo hidden gana siempre a cualquier display de clase */
html [hidden] {
    display: none;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 var(--space-s);
    font-family: var(--font-head);
    font-weight: 300;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

h2 {
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

h3 {
    font-weight: 400;
    font-size: 1.3rem;
}

p,
ul,
ol,
dl,
table,
figure {
    margin: 0 0 var(--space-s);
}

a {
    color: var(--color-accent-deep);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
    color: var(--color-text);
}

:focus-visible {
    outline: 2px solid var(--color-mauve-deep);
    outline-offset: 3px;
}

address {
    font-style: normal;
}

strong,
b {
    font-weight: 600;
}

small {
    font-size: 0.86rem;
}

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

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

/* etiquetas espaciadas */
.lbl {
    display: block;
    margin: 0 0 var(--space-s);
    font-family: var(--font-head);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-mauve-deep);
}

/* subrayado-marcador grueso bajo una o dos palabras */
.mk {
    padding-bottom: 0.02em;
    background: linear-gradient(var(--color-accent), var(--color-accent)) no-repeat 0 94% / 100% 0.14em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 14px 24px;
    border: 0;
    border-radius: var(--radius-btn);
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: #FFFFFF;
    background: var(--color-accent);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
    color: #FFFFFF;
    background: var(--color-accent-deep);
}

.btn[disabled],
.btn[aria-disabled='true'] {
    cursor: progress;
    background: var(--color-text-2);
}

.btn-ln {
    border: 1.5px solid var(--color-text);
    color: var(--color-text);
    background: transparent;
}

.btn-ln:hover,
.btn-ln:focus-visible {
    color: #FFFFFF;
    background: var(--color-text);
}

.arw {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--color-text);
    text-decoration: none;
}

.arw svg {
    width: 22px;
    height: 12px;
    transition: transform 0.2s ease;
}

.arw:hover svg,
.arw:focus-visible svg {
    transform: translateX(4px);
}

.arw span {
    border-bottom: 1px solid var(--color-accent);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid var(--color-line);
    border-radius: 999px;
    font-family: var(--font-head);
    font-size: 0.84rem;
    letter-spacing: 0.02em;
    color: var(--color-text);
    background: var(--color-card);
}

a.chip {
    min-height: 44px;
    text-decoration: none;
}

/* nota con borde de acento */
.nt {
    padding: var(--space-m) var(--space-m) var(--space-m) 22px;
    border-left: 4px solid var(--color-accent);
    border-radius: 0 var(--radius-card) var(--radius-card) 0;
    background: var(--color-card);
}

.nt p:last-child,
.nt ul:last-child {
    margin-bottom: 0;
}

.price {
    font-family: var(--font-head);
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.iva {
    font-size: 0.82rem;
    color: var(--color-text-2);
}

/* tablas genéricas */
.tw {
    min-width: 0;
    margin: 0 0 var(--space-m);
    overflow-x: auto;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-card);
    background: var(--color-card);
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) transparent;
}

.tbl {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.tbl caption {
    padding: 18px 20px 10px;
    font-family: var(--font-head);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-align: left;
    text-transform: uppercase;
    color: var(--color-mauve-deep);
}

.tbl th,
.tbl td {
    padding: 12px 20px;
    border-top: 1px solid var(--color-line);
    text-align: left;
    vertical-align: top;
    overflow-wrap: break-word;
}

/* correos largos en tablas de datos */
.dt td {
    overflow-wrap: anywhere;
}

.tbl thead th {
    font-family: var(--font-head);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-2);
    background: var(--color-surface);
}

.tbl tbody th[scope='row'] {
    font-family: var(--font-head);
    font-weight: 500;
}

/* formularios */
.fld {
    display: grid;
    align-content: start;
    gap: 6px;
    margin-bottom: 18px;
}

.fld label,
.fld .fld-l {
    font-family: var(--font-head);
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.fld input,
.fld select,
.fld textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1.5px solid var(--color-line);
    border-radius: var(--radius-btn);
    font-family: var(--font-text);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-card);
}

.fld textarea {
    min-height: 120px;
    resize: vertical;
}

.fld input:focus,
.fld select:focus,
.fld textarea:focus {
    border-color: var(--color-mauve-deep);
    outline: none;
}

.fld.bad input,
.fld.bad select,
.fld.bad textarea {
    border-color: var(--color-accent-deep);
}

.fld-h {
    font-size: 0.84rem;
    color: var(--color-text-2);
}

.fld-e {
    font-family: var(--font-head);
    font-size: 0.84rem;
    color: var(--color-accent-deep);
}

.chk {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 0.95rem;
    line-height: 1.5;
    text-transform: none;
}

.chk input {
    width: 20px;
    height: 20px;
    min-height: 0;
    margin: 2px 0 0;
    accent-color: var(--color-accent);
}

/* trampa para robots */
.hp {
    position: absolute;
    left: -5000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-btn);
    font-family: var(--font-head);
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-accent-soft);
}

.alert-ok {
    background: rgba(47, 107, 94, 0.12);
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .arw svg {
        transition: none;
    }
}
