/*
    Hoja de estilo standalone para la experiencia interactiva del globo 3D
    (/tejiendo-tu-destino/), sin dependencia del theme base
*/

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

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

:root {
    --ink:      #0a0812;
    --veil:     rgba(10,8,18,0.82);
    --gold:     #c9a96e;
    --gold-btn: rgba(201, 169, 110, 0.8);
    --gold-pale:#e8d5b0;
    --purple:   #9060c8;
    --purple-lt:#c4a0f0;
    --mist:     rgba(200,180,255,0.08);

    /* DESTINOPOLIS MAIN SITE */
    --white-color: #fff;
    --title-color: #110F0F;
    --primary-color: #1781FE;
    --white-text-color: #AAAAAA;
    --borders-color: #E8E8E8;
    --error-text: darkred;
    --highlight-orange: #ff751f;
    --light-gray: #F0F0F0;
    --badge-gray: #646a70;
    --font-poppins: "Poppins", sans-serif;
}

/* [MOBILE] html con -webkit-fill-available para iOS Safari */
html {
    height: -webkit-fill-available;
}

 body {
    width: 100%;
    height: 100vh;
    height: 100dvh;/* [MOBILE] dvh respeta barras dinámicas de iOS/Android */
    background: var(--ink);
    color: var(--gold-pale);
    font-family: 'Crimson Text', Georgia, serif;
    overflow: hidden;
    /* [MOBILE] evita que el drag del globo mueva la página */
    touch-action: none;
}

/* ── Globe ── */
#globe-wrap {
    position: fixed;
    inset: 0;
    z-index: 1;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ── Thread canvas ── */
#threads {
    position: fixed;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ── Header ── */
#header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 20;
    text-align: center;
    /* [MOBILE] env(safe-area-inset-top) = espacio para el notch en iPhone */
    padding: calc(env(safe-area-inset-top, 0px) + 18px) 20px 0;
    pointer-events: none;
}

#header h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(17px, 5vw, 34px);/* [MOBILE] mínimo más pequeño */
    font-weight: 900;
    letter-spacing: 0.1em;
    color: var(--gold);
    text-shadow: 0 0 40px rgba(201,169,110,0.4);
}

#header p {
    margin-top: 6px;
    font-family: 'Crimson Text', serif;
    font-style: italic;
    font-size: clamp(12px, 3.5vw, 16px);/* [MOBILE] escala con vw */
    color: rgba(200,180,255,0.55);
    letter-spacing: 0.12em;
}

/* ── Divider ornament ── */
#header .ornament {
    margin-top: 8px;
    font-size: 11px;
    letter-spacing: 0.5em;
    color: rgba(201,169,110,0.3);
}

/* ── Bottom panel ── */
#panel {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* [MOBILE] env(safe-area-inset-bottom) = home indicator iPhone X+ */
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
    padding-left: 12px;
    padding-right: 12px;
    gap: 12px;/* [MOBILE] gap reducido */
}

/* ── Destiny card ── */
#destiny {
    background: var(--veil);
    border: 1px solid rgba(201,169,110,0.25);
    padding: 14px 20px 16px;/* [MOBILE] padding reducido */
    text-align: center;
    width: min(94vw, 480px);/* [MOBILE] min() en lugar de min/max-width */
    /* [MOBILE] blur reducido para mejor rendimiento en móvil */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    position: relative;
}

#destiny::before,#destiny::after {
    content: '';
    position: absolute;
    left: 12px; right: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201,169,110,0.3), transparent);
}

#destiny::before { top: 8px;}
#destiny::after  { bottom: 8px;}

#destiny.visible {
    opacity: 1;
    transform: translateY(0);
}

#destiny .eyebrow {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    letter-spacing: 0.4em;
    color: rgba(201,169,110,0.5);
    text-transform: uppercase;
    margin-bottom: 8px;
}

#destiny .place-name {
    font-family: 'Cinzel', serif;
    font-size: clamp(16px, 5vw, 26px);/* [MOBILE] escala con vw */
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 0.06em;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.3;
}

#destiny .place-detail {
    font-size: clamp(10px, 2.5vw, 12px);/* [MOBILE] escala con vw */
    color: rgba(200,180,255,0.4);
    letter-spacing: 0.14em;
    margin-top: 4px;
}

#destiny .place-phrase {
    font-style: italic;
    font-size: clamp(13px, 3.5vw, 15px);/* [MOBILE] escala con vw */
    color: rgba(232,213,176,0.7);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(201,169,110,0.15);
    line-height: 1.45;
}

#destiny .port-info {
    font-size: clamp(11px, 2.5vw, 12px);/* [MOBILE] escala con vw */
    color: rgba(144,96,200,0.7);
    margin-top: 6px;
    letter-spacing: 0.06em;
}

/* ── Button ── */
#btn {
    font-family: 'Cinzel', serif;
    font-size: clamp(11px, 3vw, 13px);/* [MOBILE] escala con vw */
    letter-spacing: 0.25em;
    color: var(--gold-pale);
    background: transparent;
    border: 1px solid rgba(201,169,110,0.45);
    padding: 13px 44px;
    min-height: 44px;/* [MOBILE] mínimo 44px para área táctil accesible */
    cursor: pointer;
    transition: background 0.35s, border-color 0.35s, color 0.35s, box-shadow 0.35s;
    text-transform: uppercase;
  /* [MOBILE] evita doble-tap zoom en iOS y quita highlight azul */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

#btn:hover:not(:disabled),
#btn:active:not(:disabled) {/* [MOBILE] :active para feedback táctil */
    background: rgba(201,169,110,0.1);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 28px rgba(201,169,110,0.2);
}

#btn:disabled { opacity: 0.35; cursor: not-allowed;}

/* ── Status text ── */
#status {
    font-style: italic;
    font-size: clamp(12px, 3vw, 14px);/* [MOBILE] escala con vw */
    color: rgba(200,180,255,0.5);
    letter-spacing: 0.08em;
    min-height: 18px;
    text-align: center;
    padding: 0 16px;/* [MOBILE] padding lateral para no pegarse al borde */
}

/* ── Spinner ── */
.spin {
    display: inline-block;
    width: 14px; height: 14px;
    border: 1.5px solid rgba(201,169,110,0.25);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spinning 0.8s linear infinite;
    vertical-align: middle;
}
@keyframes spinning { to { transform: rotate(360deg);}}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .spin, .marker-dot { animation: none;}
  #destiny { transition: none;}
}

#destiny {
    transform-origin: center center;
}

#destiny.growing {
    animation: smoothExpand 0.9s cubic-bezier(.16,1,.3,1);
}

@keyframes smoothExpand {

    0% {
        transform: scale(0.92);
        opacity: 0.7;
  }

    100% {
        transform: scale(1);
        opacity: 1;
  }
}

#panel a {
    color: var(--white-text-color);
    font-family: var(--font-poppins);
    text-decoration: none;
    font-size: small;
    font-weight: 700;
}

#btn-cotizar {
    display: none;
    font-family: 'Cinzel', serif;
    font-size: clamp(9px, 3vw, 13px);/* [MOBILE] escala con vw */
    letter-spacing: 0.25em;
    color: var(--ink);
    background: var(--gold-btn);
    border: 1px solid rgba(201,169,110,0.45);
    padding: 10px 15px;
    min-height: 44px;/* [MOBILE] mínimo 44px para área táctil accesible */
    cursor: pointer;
    transition: background 0.35s, border-color 0.35s, color 0.35s, box-shadow 0.35s;
    text-transform: uppercase;
    /* [MOBILE] evita doble-tap zoom en iOS y quita highlight azul */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    margin: 16px auto 0px auto;
    font-weight: bold;
}

#btn-cotizar:hover:not(:disabled),
#btn-cotizar:active:not(:disabled) {/* [MOBILE] :active para feedback táctil */
    background: rgba(201,169,110,0.1);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 28px rgba(201,169,110,0.2);
}