/* ===========================================================================
   ICW 2027 · teaser inmersivo
   Paleta oficial (docs/IDENTIDAD.md) + un tono nuevo aprobado: --void
   =========================================================================== */
:root {
    --void: #04171D;            /* teal casi negro · fondo único de la página */
    --teal: #0890A8;
    --teal-light: #1FC1DC;
    --teal-deep: #0A5F73;
    --teal-darkest: #063846;
    --sun: #F8DDA4;
    --sun-warm: #FFD274;
    --white: #FFFFFF;
    --text: rgba(255, 255, 255, 0.92);
    --text-soft: rgba(255, 255, 255, 0.68);
    --text-dim: rgba(255, 255, 255, 0.42);
    --line: rgba(255, 255, 255, 0.16);

    --font-display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
    --font-script: 'Pinyon Script', cursive;
    --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

    --gutter: clamp(1.25rem, 5vw, 4rem);
    --max-width: 1280px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--void);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--sun); color: var(--void); }

.skip-link {
    position: absolute; left: -999px; top: 0;
    background: var(--sun); color: var(--void); padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ----------------------------------------------------------------- canvas */
#mosaic {
    position: fixed; inset: 0;
    width: 100vw; height: 100vh;
    z-index: 0;
    pointer-events: none;
}
/* halo suave cream arriba a la derecha (el sol del cartel) */
.glow {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse at 82% 10%, rgba(248, 221, 164, 0.10) 0%, transparent 45%),
        radial-gradient(ellipse at 10% 90%, rgba(8, 144, 168, 0.14) 0%, transparent 50%);
}

main { position: relative; z-index: 1; }

/* -------------------------------------------------------------------- nav */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.1rem var(--gutter);
    transition: background .4s var(--ease), padding .4s var(--ease);
}
.nav.scrolled {
    background: linear-gradient(to bottom, rgba(4, 23, 29, 0.92), rgba(4, 23, 29, 0.55) 80%, transparent);
    padding-top: .75rem; padding-bottom: .75rem;
}
.nav-brand {
    display: inline-flex; align-items: center; gap: .7rem;
    text-decoration: none; color: var(--white);
    font-family: var(--font-display); letter-spacing: .26em; font-size: .85rem; text-transform: uppercase;
}
.nav-brand img { height: 34px; width: auto; }
.nav-brand .year { color: var(--sun); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-link {
    text-decoration: none; color: var(--text-soft);
    font-family: var(--font-display); font-size: .72rem; letter-spacing: .24em; text-transform: uppercase;
    transition: color .25s;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--white); }
@media (max-width: 767px) { .nav-links .nav-link { display: none; } .nav-links { gap: .9rem; } }

/* selector de idioma (nav + footer) */
.lang-switch { display: flex; align-items: center; gap: .1rem; font-family: var(--font-display); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; }
.lang-switch a { color: var(--text-dim); text-decoration: none; padding: .4rem .45rem; border-radius: 6px; transition: color .3s var(--ease); }
.lang-switch a:hover, .lang-switch a:focus-visible { color: var(--white); }
.lang-switch a[aria-current] { color: var(--sun); }
.lang-switch--footer { gap: .6rem; margin-top: .4rem; text-transform: none; letter-spacing: .08em; font-family: var(--font-body); font-size: .78rem; }
.lang-switch--footer a { padding: .2rem 0; }

/* ----------------------------------------------------------------- botones */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    padding: .95rem 1.8rem; border-radius: 999px;
    font-family: var(--font-display); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
    text-decoration: none; cursor: pointer; border: 1px solid transparent;
    transition: transform .35s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); }
.btn-primary { background: var(--sun); color: var(--void); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--sun-warm); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--white); }
.btn-sm { padding: .7rem 1.3rem; font-size: .68rem; }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ----------------------------------------------------------------- escenas */
.scene {
    position: relative;
    min-height: 100vh; min-height: 100svh;
    display: grid; align-items: center;
    padding: 6rem var(--gutter) 5rem;
}
.scene-inner { width: 100%; max-width: var(--max-width); margin: 0 auto; }
.scene-text { max-width: 36rem; }
.scene--right .scene-text { margin-left: auto; }
.scene--center { text-align: center; }
.scene--center .scene-text { margin: 0 auto; max-width: 44rem; }

.kicker {
    display: inline-flex; align-items: center; gap: .7rem;
    margin: 0 0 1.2rem;
    font-family: var(--font-display); font-size: clamp(.68rem, .9vw, .8rem);
    letter-spacing: .32em; text-transform: uppercase; color: var(--sun);
}
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 0 rgba(248, 221, 164, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(248, 221, 164, .55); } 70% { box-shadow: 0 0 0 12px rgba(248, 221, 164, 0); } 100% { box-shadow: 0 0 0 0 rgba(248, 221, 164, 0); } }

h1, h2 {
    margin: 0;
    font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
    line-height: .94; letter-spacing: .005em; color: var(--white);
}
h1 { font-size: clamp(3.6rem, 12.5vw, 10rem); }
h1 span { display: block; }
h2 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); }
h2 .soft { color: var(--text-dim); }
.script {
    display: block; margin: .6rem 0 0;
    font-family: var(--font-script); font-size: clamp(2.1rem, 5.2vw, 3.9rem);
    line-height: 1; color: var(--sun); text-transform: none; letter-spacing: 0;
}
.lede {
    margin: 1.6rem 0 0; max-width: 32rem;
    font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.5; color: var(--text-soft);
}
.lede strong { color: var(--white); font-weight: 500; }
.scene-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }
.scene--center .scene-cta { justify-content: center; }
.hint { margin-top: 1.4rem; font-size: .9rem; color: var(--text-dim); }
.hint a { color: var(--sun); text-decoration: none; }
.hint a:hover { text-decoration: underline; }

.orgs {
    display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin-top: 1.8rem;
    font-family: var(--font-display); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--text-dim);
}
.orgs span { white-space: nowrap; }

/* logos institucionales (Ayuntamiento + Visit Ibiza City) */
.inst { margin-top: 1.6rem; }
.inst-label {
    display: block; margin-bottom: .8rem;
    font-family: var(--font-display); font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--text-dim);
}
.inst-logos { display: flex; flex-wrap: wrap; align-items: stretch; gap: .8rem; }
.inst-logo {
    display: flex; align-items: center; justify-content: center;
    height: 64px; padding: .55rem 1rem; border-radius: 12px;
    background: #FFFFFF; box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
    transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.inst-logo:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, .34); }
.inst-logo img { display: block; height: 100%; width: auto; max-width: 180px; object-fit: contain; }
@media (max-width: 640px) { .inst-logo { height: 56px; padding: .5rem .85rem; } }

.scroll-hint {
    position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: .6rem;
    font-family: var(--font-display); font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--text-dim);
}
.scroll-hint .chevron { width: 1px; height: 38px; background: linear-gradient(to bottom, var(--sun), transparent); animation: drop 1.8s var(--ease) infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .12s; } .reveal.d2 { transition-delay: .24s; } .reveal.d3 { transition-delay: .36s; } .reveal.d4 { transition-delay: .48s; }

@media (max-width: 767px) {
    .scene { align-items: end; padding: 5.5rem 0 4rem; }
    .scene--right .scene-text { margin-left: 0; }
    .scene--hero { padding-bottom: 5rem; }
    h1 { font-size: clamp(3.2rem, 17vw, 5.4rem); }
    /* velo bajo el texto para que las partículas no lo pisen */
    .scene-text {
        padding: 3.5rem var(--gutter) 0;
        background: linear-gradient(to bottom, transparent 0%, rgba(4, 23, 29, 0.82) 22%, rgba(4, 23, 29, 0.9) 100%);
    }
    .lede { font-size: 1.05rem; }
}

/* ----------------------------------------------------------------- footer */
.footer {
    position: relative; z-index: 1;
    padding: 3rem var(--gutter) 2rem;
    border-top: 1px solid var(--line);
    background: linear-gradient(to bottom, rgba(4, 23, 29, 0.86), rgba(4, 23, 29, 0.97));
    backdrop-filter: blur(6px);
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
.footer h3 { margin: 0 0 .5rem; font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; letter-spacing: .06em; text-transform: uppercase; }
.footer p { margin: 0; color: var(--text-soft); max-width: 36ch; }
.footer h4 { margin: 0 0 .8rem; font-family: var(--font-display); font-weight: 400; font-size: .7rem; letter-spacing: .26em; text-transform: uppercase; color: var(--sun); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer li a { text-decoration: none; color: var(--text-soft); }
.footer li a:hover { color: var(--white); }
.footer-bottom {
    max-width: var(--max-width); margin: 2.5rem auto 0; padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 1.5rem;
    font-size: .8rem; color: var(--text-dim);
}
.footer-bottom .legal { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--white); }
.footer-logo { height: 54px; width: auto; margin-bottom: 1rem; }
@media (max-width: 767px) { .footer-inner { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------- dialog */
dialog.form {
    border: 0; padding: 0; background: transparent; color: var(--text);
    max-width: min(34rem, calc(100vw - 2rem)); width: 100%;
}
dialog.form::backdrop { background: rgba(4, 23, 29, 0.78); backdrop-filter: blur(10px); }
.form-inner {
    background: rgba(4, 23, 29, 0.96);
    border: 1px solid var(--line); border-radius: 24px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
}
.form-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.form-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.form-close {
    background: transparent; border: 1px solid var(--line); color: var(--white);
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; flex: none;
}
.form-close:hover { border-color: var(--white); }
.field { display: grid; gap: .35rem; margin-bottom: 1.1rem; }
.field label { font-family: var(--font-display); font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--sun); }
.field input, .field select, .field textarea {
    width: 100%; background: transparent; color: var(--white); border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3); padding: .6rem 0;
    font: inherit; font-size: 1.05rem; border-radius: 0; outline: none;
    transition: border-color .25s;
}
.field select option { color: var(--void); }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--sun); }
.field textarea { resize: vertical; min-height: 5.5rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .86rem; color: var(--text-soft); margin: .4rem 0 1.4rem; }
.check input { margin-top: .25rem; accent-color: var(--sun); }
.check a { color: var(--sun); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-status { margin-top: 1rem; font-size: .95rem; min-height: 1.4em; }
.form-status.ok { color: var(--sun); }
.form-status.err { color: #FFB1A1; }
.form-done { text-align: center; padding: 1rem 0; }
.form-done h2 { margin-bottom: .6rem; }

/* ------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .kicker .dot, .scroll-hint .chevron { animation: none; }
    .btn, .btn .arrow { transition: none; }
}
