/* =============================================
   LukaFlix - The Gate (v6)
   ============================================= */

:root {
    --bg:            #07060c;
    --bg-deep:       #030206;
    --surface:       #0f0e18;
    --surface-hover: #161422;
    --border:        #1c1928;
    --border-hover:  #4a2028;
    --crimson:       #8b1a1a;
    --crimson-light: #b82222;
    --crimson-dim:   #5c1212;
    --silver:        #a8a8b8;
    --light:         #d0d0de;
    --bright:        #ececf4;
    --muted:         #5a5a72;
    --focus:         #a82020;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--silver);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    line-height: 1.6;
}

/* =============================================
   Corner Ornaments
   ============================================= */
.corner {
    position: fixed;
    width: 40px;
    height: 40px;
    z-index: 10;
    pointer-events: none;
}

.corner::before,
.corner::after {
    content: '';
    position: absolute;
    background: rgba(92, 18, 18, 0.35);
}

.corner--tl { top: 24px; left: 24px; }
.corner--tl::before { top: 0; left: 0; width: 28px; height: 1px; }
.corner--tl::after  { top: 0; left: 0; width: 1px;  height: 28px; }

.corner--tr { top: 24px; right: 24px; }
.corner--tr::before { top: 0; right: 0; width: 28px; height: 1px; }
.corner--tr::after  { top: 0; right: 0; width: 1px;  height: 28px; }

.corner--bl { bottom: 24px; left: 24px; }
.corner--bl::before { bottom: 0; left: 0; width: 28px; height: 1px; }
.corner--bl::after  { bottom: 0; left: 0; width: 1px;  height: 28px; }

.corner--br { bottom: 24px; right: 24px; }
.corner--br::before { bottom: 0; right: 0; width: 28px; height: 1px; }
.corner--br::after  { bottom: 0; right: 0; width: 1px;  height: 28px; }

/* =============================================
   Background
   ============================================= */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(ellipse 45% 35% at 50% 0%, rgba(139, 26, 26, 0.07) 0%, transparent 100%),
        var(--bg);
}

.bg-arch {
    position: absolute;
    bottom: 0;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.bg-arch--left {
    left: 2%;
    width: 20%;
    height: 88%;
    background: linear-gradient(180deg, rgba(160, 160, 200, 0.07) 0%, rgba(140, 140, 180, 0.03) 50%, transparent 100%);
}

.bg-arch--center {
    left: 50%;
    transform: translateX(-50%);
    width: 24%;
    height: 98%;
    background: linear-gradient(180deg, rgba(180, 180, 220, 0.09) 0%, rgba(155, 155, 195, 0.04) 40%, transparent 100%);
}

.bg-arch--right {
    right: 2%;
    width: 20%;
    height: 88%;
    background: linear-gradient(180deg, rgba(160, 160, 200, 0.07) 0%, rgba(140, 140, 180, 0.03) 50%, transparent 100%);
}

.bg-moon {
    position: absolute;
    top: -12%;
    left: 50%;
    transform: translateX(-50%);
    width: 48%;
    height: 50%;
    background: radial-gradient(ellipse 100% 100% at 50% 0%, rgba(190, 190, 235, 0.07) 0%, transparent 50%);
}

.bg-mist {
    position: absolute;
    left: -10%;
    width: 120%;
    height: 14%;
    background: radial-gradient(ellipse 100% 100% at 50% 50%, rgba(155, 155, 195, 0.025) 0%, transparent 55%);
}

.bg-mist--1 { top: 55%; }
.bg-mist--2 { top: 75%; opacity: 0.7; }

.bg-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 55% 45% at 50% 40%, transparent 18%, var(--bg-deep) 100%);
}

/* =============================================
   Hero Section
   ============================================= */
.hero {
    text-align: center;
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem 1rem;
    position: relative;
    z-index: 1;
    width: 100%;
    animation: heroReveal 0.8s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.hero::before {
    content: '';
    position: fixed;
    top: -8%;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 55%;
    background:
        radial-gradient(ellipse 55% 50% at 50% 30%, rgba(139, 26, 26, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.title {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    font-weight: 700;
    color: var(--bright);
    letter-spacing: 0.09em;
    line-height: 1.1;
    text-shadow:
        0 0 50px rgba(139, 26, 26, 0.15),
        0 0 100px rgba(139, 26, 26, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 1.6rem auto 1rem;
    width: 10rem;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.3s both;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--crimson-dim), transparent);
}

.divider-diamond {
    width: 7px;
    height: 7px;
    background: var(--crimson);
    transform: rotate(45deg);
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(139, 26, 26, 0.5), 0 0 20px rgba(139, 26, 26, 0.2);
}

.subtitle {
    font-size: clamp(0.92rem, 2.2vw, 1.08rem);
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 0.04em;
    opacity: 0;
    animation: fadeIn 0.6s ease-out 0.4s both;
    position: relative;
    z-index: 1;
}

/* =============================================
   Ornament (inside hero)
   ============================================= */
.ornament {
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 0.5s both;
    position: relative;
    z-index: 1;
}

.ornament-svg {
    width: min(380px, 80vw);
    height: auto;
    filter: drop-shadow(0 0 16px rgba(139, 26, 26, 0.22));
}

/* =============================================
   Portal (Cards Container)
   ============================================= */
.portal {
    position: relative;
    width: 100%;
    max-width: 74rem;
    margin: 0 auto;
    padding: 1.5rem 3rem 2rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(9, 8, 15, 0.7);
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    animation: portalReveal 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.3s both;
}

.portal-accent {
    position: absolute;
    top: -1px;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 26, 26, 0.35), transparent);
}

/* =============================================
   Cards Grid
   ============================================= */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.25rem;
}

/* =============================================
   Card
   ============================================= */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 2.25rem 2.5rem;
    background: linear-gradient(175deg, rgba(16, 15, 24, 0.9) 0%, rgba(11, 10, 18, 0.95) 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    min-height: 0;
    opacity: 0;
    transform: translateY(24px);
    transition:
        transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
        border-color 0.6s ease,
        box-shadow 0.6s ease,
        background 0.6s ease;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.card.revealed {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.8s cubic-bezier(0.23, 1, 0.32, 1),
        border-color 0.6s ease,
        box-shadow 0.6s ease,
        background 0.6s ease;
}

/* Card top accent line */
.card-accent {
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 26, 26, 0.3), transparent);
    z-index: 1;
    transition: all 0.6s ease;
}

/* Hover glow */
.card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 14px;
    background: radial-gradient(ellipse 80% 40% at 50% -5%, rgba(139, 26, 26, 0.14) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
    z-index: 0;
}

.card:hover {
    transform: translateY(-14px);
    border-color: var(--border-hover);
    background: linear-gradient(175deg, rgba(22, 20, 34, 0.95) 0%, rgba(14, 12, 22, 1) 100%);
    box-shadow:
        0 28px 70px rgba(139, 26, 26, 0.2),
        0 12px 32px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(139, 26, 26, 0.08);
}

.card:hover .card-accent {
    background: linear-gradient(90deg, transparent, rgba(139, 26, 26, 0.5), transparent);
}

.card:hover::after {
    opacity: 1;
}

.card:active {
    transform: translateY(-5px);
    transition-duration: 0.15s;
}

.card:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 4px;
}

/* =============================================
   Card Content
   ============================================= */
.card-icon {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.4rem;
    color: var(--muted);
    border-radius: 50%;
    background: rgba(139, 26, 26, 0.06);
    border: 1px solid rgba(139, 26, 26, 0.1);
    transition:
        color 0.5s cubic-bezier(0.23, 1, 0.32, 1),
        border-color 0.5s ease,
        transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover .card-icon {
    color: var(--crimson-light);
    border-color: rgba(139, 26, 26, 0.3);
    transform: scale(1.12);
    box-shadow: 0 0 36px rgba(139, 26, 26, 0.28);
}

.card-icon svg {
    width: 30px;
    height: 30px;
}

.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    width: 100%;
}

.card-title {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 0.5rem;
    letter-spacing: 0.035em;
    transition: color 0.4s ease;
}

.card:hover .card-title {
    color: var(--bright);
}

/* Separator between title and description */
.card-separator {
    width: 32px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--crimson-dim), transparent);
    margin-bottom: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.4s ease, width 0.4s ease;
}

.card:hover .card-separator {
    opacity: 1;
    width: 48px;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: auto;
    padding-bottom: 0.8rem;
    max-width: 22ch;
}

/* =============================================
   Card Button
   ============================================= */
.card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 2.2rem;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--light);
    background: linear-gradient(155deg, #4e1010 0%, #7a1818 40%, #8b1a1a 70%, #6a1414 100%);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 3px 12px rgba(139, 26, 26, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.3);
    transition:
        background 0.45s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.45s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
        color 0.4s ease;
}

.card-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, transparent 20%, rgba(255, 255, 255, 0.08) 50%, transparent 80%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover .card-btn {
    background: linear-gradient(155deg, #7a1818 0%, #a82020 40%, #b82222 70%, #8b1a1a 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 6px 28px rgba(139, 26, 26, 0.55),
        0 0 48px rgba(139, 26, 26, 0.2);
    transform: translateY(-2px);
    color: var(--bright);
}

.card:hover .card-btn::before {
    opacity: 1;
}

.card:active .card-btn {
    transform: translateY(0);
    transition-duration: 0.1s;
}

/* =============================================
   Footer
   ============================================= */
.footer {
    margin-top: auto;
    padding: 3rem 1.5rem 2rem;
}

/* =============================================
   Animations
   ============================================= */
@keyframes heroReveal {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes portalReveal {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .card { opacity: 1; transform: none; }
    .card:hover { transform: none; }
    .portal { opacity: 1; transform: none; }
}

/* =============================================
   Responsive - Tablet (<=900px)
   ============================================= */
@media (max-width: 900px) {
    .hero {
    min-height: 40vh;
        padding: 3rem 1.5rem 1.5rem;
    }

    .portal {
        max-width: 48rem;
        padding: 2rem;
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .cards .card:last-child {
        grid-column: 1 / -1;
        max-width: 22rem;
        justify-self: center;
    }

    .ornament-svg {
        width: min(320px, 70vw);
    }
}

/* =============================================
   Responsive - Mobile (<=600px)
   ============================================= */
@media (max-width: 600px) {
    .hero {
        min-height: auto;
        padding: 3rem 1.25rem 1rem;
    }

    .hero::before {
        width: 100%;
        height: 40%;
    }

    .ornament {
    margin-top: 1rem;
    }

    .ornament-svg {
        width: min(280px, 85vw);
    }

    .portal {
        border-radius: 14px;
        padding: 1.25rem;
        margin: 0 0.75rem;
    }

    .cards {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .card {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.5rem;
        border-radius: 12px;
    }

    .card-accent {
        top: 0;
        left: 0;
        right: 0;
        background: linear-gradient(90deg, transparent 5%, rgba(139, 26, 26, 0.25) 50%, transparent 95%);
    }

    .card-icon {
        margin-bottom: 0;
        flex-shrink: 0;
        width: 50px;
        height: 50px;
    }

    .card-icon svg {
        width: 24px;
        height: 24px;
    }

    .card-content {
        align-items: flex-start;
        flex: 1;
        min-width: 0;
    }

    .card-title {
        font-size: 1.2rem;
        margin-bottom: 0.4rem;
    }

    .card-separator {
        margin-bottom: 0.5rem;
    }

    .card-desc {
        max-width: none;
        padding-bottom: 0.8rem;
        font-size: 0.85rem;
    }

    .card-btn {
        width: 100%;
        padding: 0.65rem 1.5rem;
    }

    .corner { display: none; }
}

