/* ===================================================
   AMETHYST NIGHT • dark fantasy v odtieňoch fialovej
   =================================================== */

/* Paleta & tokeny */
:root {
    --bg: #0b0a12;
    /* hlboká nočná fialová */
    --bg-2: #0f0c19;
    --ink: #eceaf4;
    /* svetlý text */
    --muted: #b6b2c6;
    /* sekundárny text */

    --amethyst: #8e5bff;
    /* hlavný akcent – ametrínová fialová */
    --orchid: #b884ff;
    /* svetlejší prechody */
    --violet: #6a32ff;
    /* tmavší prechody */
    --amber: #f1c663;
    /* teplé zlaté akcenty */

    --paper: rgba(24, 18, 40, .58);
    /* „sklo“ na kartách */
    --paper-strong: rgba(24, 18, 40, .82);

    --border: rgba(255, 255, 255, .10);
    --radius: 18px;
    --shadow: 0 28px 70px rgba(0, 0, 0, .55);
    --ring: 0 0 0 3px rgba(142, 91, 255, .28);
}

/* Reset & base */
*,
*::before,
*::after {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    line-height: 1.75;

    /* Amethyst background: aurora + hviezdy + jemná vignette */
    background:
        radial-gradient(1200px 700px at 10% -10%, rgba(142, 91, 255, .18), transparent 60%),
        radial-gradient(900px 600px at 110% 0%, rgba(106, 50, 255, .20), transparent 65%),
        radial-gradient(800px 800px at 50% 120%, rgba(184, 132, 255, .14), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
    background-attachment: fixed;
}

/* hviezdny prach + vignette */
body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    background:
        radial-gradient(1px 1px at 15% 25%, rgba(255, 255, 255, .12) 50%, transparent 51%),
        radial-gradient(1px 1px at 65% 70%, rgba(255, 255, 255, .10) 50%, transparent 51%),
        radial-gradient(1px 1px at 85% 20%, rgba(255, 255, 255, .08) 50%, transparent 51%);
    background-size: 700px 700px, 900px 900px, 1100px 1100px;
    mix-blend-mode: screen;
}

body::after {
    box-shadow: inset 0 0 160px rgba(0, 0, 0, .55);
    /* vignette */
}

img {
    display: block;
    max-width: 100%;
    height: auto
}

a {
    color: var(--amethyst);
    text-decoration: none;
    text-underline-offset: 4px
}

a:hover {
    text-decoration: underline
}

a:focus-visible,
button:focus-visible {
    outline: none;
    box-shadow: var(--ring);
    border-radius: 10px
}

/* Typografia – mierne „fantasy“ nálada cez gradient textu */
h1,
h2,
h3 {
    line-height: 1.22;
    margin: 0 0 .55rem;
    letter-spacing: .3px
}

.lead {
    color: var(--muted)
}

h1,
h2 {
    background: linear-gradient(90deg, #fff 0%, #eee 30%, var(--orchid) 60%, var(--amber) 95%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Layout */
main {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px
}

/* Topbar – sklenený s amethyst linkou */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    background: linear-gradient(to bottom, rgba(13, 10, 22, .72), rgba(13, 10, 22, .44));
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(142, 91, 255, .22);
}

.brand {
    font-weight: 800;
    letter-spacing: .4px;
    color: #f6f4ff
}

.nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.nav a {
    color: #f6f4ff;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: transform .12s ease, border-color .2s ease, background .2s ease;
}

.nav a:hover {
    background: rgba(142, 91, 255, .12);
    border-color: rgba(142, 91, 255, .28);
    transform: translateY(-1px);
}

/* Cards – glasmorphism, fialové odlesky */
.card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin: 20px 0;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

/* Gridy */
.hero {
    display: grid;
    gap: 24px;
    align-items: center;
    grid-template-columns: 1.15fr .85fr
}

.two-col {
    display: grid;
    gap: 24px;
    grid-template-columns: 1.25fr .95fr
}

.grid-2 {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr))
}

.cards {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr))
}

/* Media bloky */
.framed {
    display: grid;
    gap: 10px
}

.framed img,
.hero__media img {
    border-radius: 16px;
    width: 100%;
    height: auto;
    object-fit: cover;
    border: 1px solid rgba(142, 91, 255, .22);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}

.framed figcaption,
.hero__media figcaption {
    color: var(--muted);
    text-align: center;
    font-size: .9rem
}

/* Tlačidlá – amethyst -> amber prechod */
.btn {
    display: inline-block;
    font-weight: 800;
    letter-spacing: .2px;
    padding: 12px 18px;
    border-radius: 12px;
    color: #0d0a16;
    background: linear-gradient(90deg, var(--amethyst), var(--amber));
    border: 0;
    box-shadow: 0 12px 28px rgba(142, 91, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .10);
    transition: transform .12s ease, filter .2s ease, box-shadow .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 16px 40px rgba(184, 132, 255, .28)
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid rgba(184, 132, 255, .45);
    box-shadow: inset 0 0 0 1px rgba(241, 198, 99, .22);
}

.btn--ghost:hover {
    background: linear-gradient(90deg, rgba(142, 91, 255, .12), rgba(241, 198, 99, .12));
}

/* Boxy ríš – jemná aurora */
.realm {
    border: 1px solid rgba(184, 132, 255, .28);
    border-radius: 16px;
    padding: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .03) 0%, rgba(255, 255, 255, .02) 100%),
        radial-gradient(220px 90px at 20% -10%, rgba(184, 132, 255, .16), transparent 60%);
    transition: transform .15s ease, box-shadow .25s ease, border-color .2s ease;
}

.realm h3 {
    margin: .2rem 0 .35rem;
    color: #f6f4ff;
    letter-spacing: .6px
}

.realm:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 44px rgba(142, 91, 255, .25);
    border-color: rgba(241, 198, 99, .38);
}

/* Karty postáv – fialový svit */
.char {
    border: 1px solid rgba(184, 132, 255, .26);
    border-radius: 18px;
    padding: 12px;
    text-align: center;
    background: rgba(255, 255, 255, .02);
    transition: transform .15s ease, box-shadow .25s ease, border-color .2s ease, background .2s ease;
}

.char:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 18px 54px rgba(142, 91, 255, .28);
    border-color: rgba(142, 91, 255, .36);
    background: rgba(255, 255, 255, .04);
}

.char img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 10px
}

.char h3 {
    color: #f6f4ff;
    margin: .25rem 0 .35rem
}

.hidden {
    display: none
}

/* Instagram – obyčajný odkaz, nie button */
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amethyst);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(184, 132, 255, .6);
    text-underline-offset: 3px;
    transition: color .2s ease, text-decoration-color .2s ease, transform .1s ease;
}

.social-link:hover {
    color: var(--orchid);
    text-decoration-color: var(--amber);
    transform: translateY(-1px);
}

/* Centrum / QR */
.center {
    text-align: center
}

.qr {
    width: 170px;
    margin: 12px auto;
    display: block;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45))
}

/* Pätička */
.footer {
    max-width: 1100px;
    margin: 24px auto 40px;
    padding: 0 16px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid rgba(142, 91, 255, .18);
}

/* Responzívne */
@media (max-width:900px) {

    .hero,
    .two-col {
        grid-template-columns: 1fr
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important
    }
}

/* ===== Realm: full-photo toggle ===== */
.realm {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* vrstva s fotkou (zapína sa triedou .is-photo) */
.realm::after {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .22s ease, transform .22s ease, filter .22s ease;
    z-index: 0;
    /* pod textom, kým sa neprepne */
    filter: saturate(1) contrast(1.05);
}

/* tmavší gradient pre čitateľnosť nadpisu pri fotke */
.realm::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .0) 20%, rgba(0, 0, 0, .35) 75%);
    opacity: 0;
    transition: opacity .22s ease;
    z-index: 1;
}

/* keď je zapnutý foto mód */
.realm.is-photo {
    border-color: rgba(184, 132, 255, .40);
    box-shadow: 0 14px 50px rgba(142, 91, 255, .18);
}

.realm.is-photo::after {
    opacity: 1;
    transform: scale(1);
}

.realm.is-photo::before {
    opacity: 1;
}

/* počas foto módu skry text a tlačidlo, nech ostane len nadpis */
.realm.is-photo p,
.realm.is-photo a {
    opacity: 0;
    visibility: hidden;
    height: 0;
    margin: 0;
}

/* nadpis prilepíme dolu-left ako titulok */
.realm h3 {
    position: relative;
    z-index: 2;
    margin-top: .1rem;
}

.realm.is-photo h3 {
    position: absolute;
    left: 12px;
    bottom: 12px;
    right: 12px;
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
    letter-spacing: .6px;
}

/* kurzor a hint */
.realm:not(.is-photo) {
    cursor: pointer
}

.realm.is-photo {
    cursor: zoom-out
}

/* ===== Realm: full-photo toggle (pseudo-element verzia) ===== */
.realm {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* fotka a závoj – neblokujú kliky na odkaz */
.realm::after,
.realm::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .22s ease, transform .22s ease, filter .22s ease;
    pointer-events: none;
    z-index: 0;
}

.realm::after {
    background-image: var(--realm-img, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: saturate(1.05) contrast(1.05);
}

.realm::before {
    background: linear-gradient(180deg, rgba(0, 0, 0, .0) 18%, rgba(0, 0, 0, .38) 78%);
}

/* zapnutý foto mód */
.realm.is-photo {
    border-color: rgba(184, 132, 255, .40);
    box-shadow: 0 14px 50px rgba(142, 91, 255, .18);
}

.realm.is-photo::after,
.realm.is-photo::before {
    opacity: 1;
    transform: scale(1);
}

/* nech link ostane nad vrstvami */
.realm a {
    position: relative;
    z-index: 3;
}

/* počas foto módu skry text a tlačidlo (ak chceš, zmaž tento blok, ak majú ostať viditeľné) */
.realm.is-photo p,
.realm.is-photo a {
    opacity: 0;
    visibility: hidden;
    height: 0;
    margin: 0;
}

/* nadpis ako titulok pri fotke */
.realm h3 {
    position: relative;
    z-index: 2;
}

.realm.is-photo h3 {
    position: absolute;
    left: 12px;
    bottom: 12px;
    right: 12px;
    margin: 0;
    color: #fff;
    letter-spacing: .6px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
}

/* kurzorové náznaky */
.realm:not(.is-photo) {
    cursor: pointer;
}

.realm.is-photo {
    cursor: zoom-out;
}

/* --- veľkosť obrázkov v sekciách --- */
.fade-container.fade--wide {
    aspect-ratio: 21/9;
}

/* filmový banner (nižší) */
.fade-container.fade--banner {
    aspect-ratio: 2/1;
}

/* alternatíva – trochu vyšší banner */
.fade-container.fade--tall {
    aspect-ratio: 4/5;
}

/* vysoký portrétový pomer */
.fade-container.fade--square {
    aspect-ratio: 1/1;
}

/* --- veľkosť obrázkov v sekciách --- */
.fade-container.fade--wide {
    aspect-ratio: 21/9;
}

/* filmový banner (nižší) */
.fade-container.fade--banner {
    aspect-ratio: 2/1;
}

/* alternatíva – trochu vyšší banner */
.fade-container.fade--tall {
    aspect-ratio: 4/5;
}

/* vysoký portrétový pomer */
.fade-container.fade--square {
    aspect-ratio: 1/1;
}

/* štvorec */

/* --- Lightbox pre zväčšenie hlavného obrázka --- */
.zoomable {
    cursor: zoom-in;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(2px);
    z-index: 1000;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    border: 1px solid rgba(142, 91, 255, .35);
}

/* ===== ASTROLÓGIA – klikateľná karta s pozadím ===== */
.astro-hero {
    padding: 0;
    overflow: hidden;
}

.astro-link {
    display: grid;
    place-items: center;
    min-height: 260px;
    text-decoration: none;
    color: #fff;
    border-radius: var(--radius);
    position: relative;
    isolation: isolate;
    background-image: var(--astro-bg);
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(142, 91, 255, .22);
    box-shadow: var(--shadow);
    transition: transform .15s ease;
}

.astro-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .20), rgba(0, 0, 0, .55));
    z-index: -1;
}

.astro-link h2 {
    margin: 0;
    padding: 20px 28px;
    border-radius: 14px;
    background: rgba(13, 10, 22, .45);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(6px);
    text-align: center;
}

.astro-link:hover {
    transform: translateY(-2px);
}

/* ===== „Osobné škatule“ pre Dni/Mesiace/Roky ===== */
.info-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.info-box {
    border: 1px solid rgba(184, 132, 255, .26);
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, .02);
    transition: transform .15s ease, box-shadow .25s ease, border-color .2s ease, background .2s ease;
    cursor: pointer;
    position: relative;
}

.info-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 54px rgba(142, 91, 255, .28);
    border-color: rgba(142, 91, 255, .36);
    background: rgba(255, 255, 255, .04);
}

.info-box h3 {
    margin: .2rem 0 .35rem;
    color: #f6f4ff;
}

.info-box .btn {
    margin-top: 8px;
}

.hidden {
    display: none;
}

/* Astrológia: nech je názov viditeľný (prepíše globálny gradient pre h2) */
.astro-hero .astro-link h2 {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    color: #fff !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
}

.astro-hero .astro-link h2 {
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(13, 10, 22, .45);
    border: 1px solid rgba(255, 255, 255, .12);
}

/* GRID */
.days-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: stretch;
}

/* KARTA DŇA – amethyst glass */
.tile-day {
    position: relative;
    height: 220px;
    /* mierne vyššie, vyvážené s typografiou */
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;

    /* „sklo“ + jemný fialový nádych */
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .02)),
        radial-gradient(240px 110px at 20% -10%, rgba(184, 132, 255, .14), transparent 65%);
    border: 1px solid rgba(184, 132, 255, .24);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
    backdrop-filter: saturate(1.05) blur(6px);

    transition:
        transform .22s ease,
        box-shadow .28s ease,
        border-color .22s ease,
        background-color .22s ease;
}

.tile-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .45);
    border-color: rgba(241, 198, 99, .38);
    /* zlatý nádych na hover */
}

/* NADPIS – v strede pred klikom, po otvorení dolu vľavo */
.tile-day h3 {
    position: absolute;
    margin: 0;
    z-index: 2;
    color: #fff;
    font-weight: 800;
    letter-spacing: .3px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .55);
    font-size: 1.06rem;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;

    transition:
        top .28s ease, left .28s ease, transform .28s ease,
        text-align .28s ease, opacity .28s ease;
}

/* FOTO vrstva (skrytá, kým nie je otvorené) */
.tile-day::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--img, none) center/cover no-repeat;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .35s ease, transform .35s ease, filter .35s ease;
    filter: saturate(1.06) contrast(1.05);
}

/* ZÁVOJ pre čitateľnosť titulku pri fotke */
.tile-day::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, .10) 15%, rgba(0, 0, 0, .55) 95%);
    opacity: 0;
    transition: opacity .35s ease;
}

/* OTVORENÝ STAV */
.tile-day.is-open::after {
    opacity: 1;
    transform: scale(1);
}

.tile-day.is-open::before {
    opacity: 1;
}