/* ============================================================
   Verdehora — core.css
   Tokens, fuentes, reset, base, utilidades, botones, formularios
   ============================================================ */

/* ------------------------------------------------------------
   Tokens
   ------------------------------------------------------------ */

:root {
    --lav: #b7a8e0;
    --silver: #c9ccd6;
    --violet: #6a4fa3;
    --violet-deep: #533b85;
    --ink: #2a2340;
    --ink-soft: #4a4360;
    --paper: #f6f4fb;
    --white: #ffffff;
    --line: #ddd9ea;
    --grad-lead: linear-gradient(148deg, #b7a8e0 0%, #c9ccd6 54%, #a08cd0 100%);
    --grad-btn: linear-gradient(120deg, #6a4fa3 0%, #533b85 100%);
    --font-display: 'Cormorant Garamond', georgia, serif;
    --font-body: 'Nunito Sans', 'Segoe UI', sans-serif;
    --shadow-card: 0 4px 24px rgba(42, 35, 64, 0.09);
    --shadow-lift: 0 12px 32px rgba(42, 35, 64, 0.14);
    --radius: 0.75rem;
    --gap-section: clamp(4rem, 9vw, 7rem);
}

/* ------------------------------------------------------------
   Fuentes autoalojadas
   ------------------------------------------------------------ */

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url('../fonts/cormorant-garamond-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/nunito-sans-latin.woff2') format('woff2');
}

/* ------------------------------------------------------------
   Reset
   ------------------------------------------------------------ */

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

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

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.6;
}

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

ul,
ol {
    list-style-position: inside;
}

/* ------------------------------------------------------------
   Tipografia base
   ------------------------------------------------------------ */

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    color: var(--ink);
}

h1 {
    font-size: clamp(2.375rem, 5.5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.875rem, 3.8vw, 2.5rem);
}

h3 {
    font-size: clamp(1.375rem, 2.4vw, 1.625rem);
}

p {
    max-width: 42rem;
}

a {
    color: var(--violet);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--violet-deep);
}

/* ------------------------------------------------------------
   Accesibilidad
   ------------------------------------------------------------ */

.jump-to-main {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    background: var(--ink);
    color: var(--white);
    border-radius: 0 0 var(--radius) var(--radius);
    text-decoration: none;
}

.jump-to-main:focus {
    top: 0;
    color: var(--white);
}

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

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

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ------------------------------------------------------------
   Layout
   ------------------------------------------------------------ */

.wrap {
    max-width: 73.75rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

main {
    display: block;
}

/* ------------------------------------------------------------
   Botones
   ------------------------------------------------------------ */

.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    background: var(--grad-btn);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.btn--ghost {
    background: none;
    color: var(--violet);
    border: 1px solid var(--violet);
}

.btn--ghost:hover {
    color: var(--violet-deep);
    border-color: var(--violet-deep);
}

/* ------------------------------------------------------------
   Formularios
   ------------------------------------------------------------ */

.field {
    margin-bottom: 1.5rem;
}

.field__label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.9375rem;
}

.field__input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--white);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.field__input:focus {
    border-color: var(--violet);
    outline: 2px solid var(--violet);
    outline-offset: 0;
}

.field__hint {
    display: none;
    margin-top: 0.375rem;
    color: #8a2e4d;
    font-size: 0.875rem;
}

.field--error .field__hint {
    display: block;
}

.field--error .field__input {
    border-color: #8a2e4d;
}

.consent {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    color: var(--ink-soft);
}

.consent input {
    margin-top: 0.3rem;
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--violet);
    flex-shrink: 0;
}

/* ------------------------------------------------------------
   Animacion de aparicion (visible por defecto, .js activa)
   ------------------------------------------------------------ */

.js .appear {
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.js .appear.appear--in {
    opacity: 1;
    transform: none;
}
