/* ============================================
   addrenvoy.com — Midnight Temple Garden
   Colors: #12162a #0a0e1a #ff8c42 #6b7394 #9d4edd #e8eaf0 #1a2040 #ffb347 #00e5ff
   Fonts: Cormorant Garamond, Nunito Sans, IBM Plex Mono, Inter
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background: #0a0e1a;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    color: #e8eaf0;
    background: #0a0e1a;
    overflow-x: hidden;
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* --- Candle Navigation --- */
#candle-nav {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

#candle {
    position: relative;
    width: 40px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#candle-body {
    width: 12px;
    height: 40px;
    background: linear-gradient(to bottom, #ffb347, #ff8c42);
    border-radius: 2px 2px 4px 4px;
    position: absolute;
    bottom: 0;
}

#candle-flame {
    position: absolute;
    bottom: 40px;
    width: 20px;
    height: 30px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.flame-outer {
    position: absolute;
    width: 16px;
    height: 28px;
    background: radial-gradient(ellipse at 50% 90%, #ffb347 0%, #ff8c42 40%, transparent 70%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flameOuter 3s ease-in-out infinite;
    filter: blur(1px);
}

.flame-inner {
    position: absolute;
    width: 8px;
    height: 18px;
    background: radial-gradient(ellipse at 50% 90%, #e8eaf0 0%, #ffb347 60%, transparent 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    z-index: 1;
    animation: flameInner 2s ease-in-out infinite;
}

#candle-glow {
    position: absolute;
    bottom: 30px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255, 179, 71, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: candleGlow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes flameOuter {
    0%, 100% { transform: scaleY(1) scaleX(1) rotate(0deg); }
    25% { transform: scaleY(1.08) scaleX(0.92) rotate(-2deg); }
    50% { transform: scaleY(0.95) scaleX(1.05) rotate(1deg); }
    75% { transform: scaleY(1.05) scaleX(0.96) rotate(-1deg); }
}

@keyframes flameInner {
    0%, 100% { transform: scaleY(1) rotate(0deg); }
    33% { transform: scaleY(1.1) rotate(-3deg); }
    66% { transform: scaleY(0.9) rotate(2deg); }
}

@keyframes candleGlow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* --- Chamber Dots --- */
#chamber-dots {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.chamber-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(0, 229, 255, 0.12);
    background: rgba(18, 22, 42, 0.6);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.chamber-dot:hover,
.chamber-dot.active {
    border-color: rgba(0, 229, 255, 0.4);
    background: rgba(0, 229, 255, 0.08);
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.1);
}

.dot-kanji {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    font-weight: 300;
    color: #6b7394;
    transition: color 0.5s ease;
}

.chamber-dot:hover .dot-kanji,
.chamber-dot.active .dot-kanji {
    color: #00e5ff;
}

/* --- Chambers (Sections) --- */
.chamber {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 80px 48px;
}

.chamber-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    width: 100%;
}

/* --- Fog Layers --- */
.fog-layer {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 0;
}

.fog-layer-1 {
    background: radial-gradient(ellipse at 30% 50%, rgba(0, 229, 255, 0.03) 0%, transparent 60%);
    animation: fogDrift1 25s ease-in-out infinite;
}

.fog-layer-2 {
    background: radial-gradient(ellipse at 70% 30%, rgba(157, 78, 221, 0.05) 0%, transparent 55%);
    animation: fogDrift2 30s ease-in-out infinite;
}

.fog-layer-3 {
    background: radial-gradient(ellipse at 20% 60%, rgba(0, 229, 255, 0.04) 0%, transparent 50%);
    animation: fogDrift3 28s ease-in-out infinite;
}

.fog-layer-4 {
    background: radial-gradient(ellipse at 80% 40%, rgba(157, 78, 221, 0.03) 0%, transparent 60%);
    animation: fogDrift4 35s ease-in-out infinite;
}

.fog-layer-5 {
    background: radial-gradient(ellipse at 50% 70%, rgba(0, 229, 255, 0.05) 0%, transparent 55%);
    animation: fogDrift1 32s ease-in-out infinite reverse;
}

.fog-layer-6 {
    background: radial-gradient(ellipse at 40% 20%, rgba(157, 78, 221, 0.04) 0%, transparent 50%);
    animation: fogDrift2 22s ease-in-out infinite reverse;
}

.fog-layer-7 {
    background: radial-gradient(ellipse at 60% 50%, rgba(0, 229, 255, 0.03) 0%, transparent 65%);
    animation: fogDrift3 27s ease-in-out infinite;
}

.fog-layer-8 {
    background: radial-gradient(ellipse at 30% 80%, rgba(157, 78, 221, 0.05) 0%, transparent 50%);
    animation: fogDrift4 40s ease-in-out infinite;
}

.fog-layer-9 {
    background: radial-gradient(ellipse at 70% 60%, rgba(0, 229, 255, 0.04) 0%, transparent 55%);
    animation: fogDrift1 35s ease-in-out infinite;
}

.fog-layer-10 {
    background: radial-gradient(ellipse at 20% 30%, rgba(157, 78, 221, 0.03) 0%, transparent 60%);
    animation: fogDrift2 28s ease-in-out infinite reverse;
}

@keyframes fogDrift1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, -3%) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes fogDrift2 {
    0% { transform: translate(0, 0) scale(1.05); }
    50% { transform: translate(-4%, 5%) scale(0.95); }
    100% { transform: translate(0, 0) scale(1.05); }
}

@keyframes fogDrift3 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(3%, 4%) scale(1.08); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes fogDrift4 {
    0% { transform: translate(0, 0) scale(0.98); }
    50% { transform: translate(-6%, -2%) scale(1.05); }
    100% { transform: translate(0, 0) scale(0.98); }
}

/* --- Kanji Watermarks --- */
.kanji-watermark {
    position: absolute;
    font-family: 'Cormorant Garamond', serif;
    font-size: 320px;
    font-weight: 300;
    color: rgba(0, 229, 255, 0.025);
    right: 5%;
    bottom: 10%;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    line-height: 1;
    transition: color 1s ease;
}

/* --- Hero (Chamber 1) --- */
.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 64px;
    letter-spacing: 0.08em;
    line-height: 1.2;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.hero-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: heroWordReveal 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-word:nth-child(2) {
    animation-delay: 0.3s;
    color: #00e5ff;
}

@keyframes heroWordReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 20px;
    color: #6b7394;
    max-width: 520px;
    margin-bottom: 32px;
    letter-spacing: 0.02em;
}

.hero-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, #00e5ff, transparent);
    margin-bottom: 24px;
    animation: lineGrow 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transform-origin: left;
    transform: scaleX(0);
}

@keyframes lineGrow {
    to { transform: scaleX(1); }
}

.hero-tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 13px;
    color: #6b7394;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 64px;
}

.scroll-cue {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #6b7394;
    transition: color 0.4s ease;
    cursor: pointer;
}

.scroll-cue:hover {
    color: #00e5ff;
}

.scroll-cue-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.scroll-cue-arrow {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* --- Section Titles --- */
.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 36px;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    color: #e8eaf0;
}

.section-intro {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: #6b7394;
    max-width: 560px;
    margin-bottom: 48px;
    line-height: 1.8;
}

/* --- Shoji Card Grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}

.shoji-card {
    position: relative;
    background: rgba(18, 22, 42, 0.4);
    border: 1px solid rgba(0, 229, 255, 0.12);
    border-radius: 4px;
    padding: 40px 32px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.shoji-card::before {
    content: attr(data-kanji);
    position: absolute;
    top: -10px;
    right: 10px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 140px;
    font-weight: 300;
    color: rgba(0, 229, 255, 0.03);
    pointer-events: none;
    line-height: 1;
    transition: color 0.8s ease;
}

.shoji-card:hover::before {
    color: rgba(0, 229, 255, 0.06);
}

.card-glow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.shoji-card:hover .card-glow {
    opacity: 1.5;
}

.shoji-card:hover {
    border-color: rgba(0, 229, 255, 0.25);
    transform: translateY(-4px);
}

.card-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 28px;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    color: #e8eaf0;
}

.card-body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: #6b7394;
    line-height: 1.8;
    margin-bottom: 24px;
}

.card-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0, 229, 255, 0.4);
}

/* --- Path Steps (Chamber 3) --- */
.path-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.path-stone {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    position: relative;
    padding: 32px 0;
}

.stone-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    font-weight: 300;
    color: rgba(0, 229, 255, 0.3);
    min-width: 60px;
    text-align: center;
    line-height: 1;
    padding-top: 4px;
}

.stone-content {
    flex: 1;
}

.stone-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 24px;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
    color: #e8eaf0;
}

.stone-body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: #6b7394;
    line-height: 1.8;
    max-width: 480px;
}

.stone-line {
    position: absolute;
    left: 30px;
    bottom: 0;
    width: 1px;
    height: 0;
    background: linear-gradient(to bottom, rgba(0, 229, 255, 0.2), transparent);
}

.path-stone.revealed .stone-line {
    height: 100%;
    transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Offerings (Chamber 4) --- */
.offerings-grid {
    align-items: stretch;
}

.offering-card {
    display: flex;
    flex-direction: column;
}

.offering-card.featured {
    border-color: rgba(0, 229, 255, 0.3);
    background: rgba(18, 22, 42, 0.6);
    transform: scale(1.03);
}

.offering-card.featured .card-glow {
    background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.1) 0%, transparent 70%);
}

.offering-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 24px;
}

.price-amount {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: 48px;
    color: #ffb347;
    line-height: 1;
}

.price-period {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 13px;
    color: #6b7394;
}

.offering-features {
    flex: 1;
    margin-bottom: 32px;
}

.offering-features li {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 14px;
    color: #6b7394;
    padding: 8px 0;
    border-bottom: 1px solid rgba(107, 115, 148, 0.1);
    position: relative;
    padding-left: 16px;
}

.offering-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(0, 229, 255, 0.4);
}

.offering-cta {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00e5ff;
    padding: 12px 0;
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
}

/* --- Interactive Text (Underline Draw) --- */
.interactive-text {
    position: relative;
    display: inline-block;
}

.interactive-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #00e5ff;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-text:hover::after {
    width: 100%;
}

/* --- Garden Form (Chamber 5) --- */
.garden-form {
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-field {
    position: relative;
}

.form-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6b7394;
    display: block;
    margin-bottom: 8px;
}

.form-input {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #e8eaf0;
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    padding: 8px 0;
}

.form-input::placeholder {
    color: rgba(107, 115, 148, 0.4);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.input-line {
    width: 100%;
    height: 1px;
    background: rgba(107, 115, 148, 0.2);
    position: relative;
}

.input-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #00e5ff;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-field:focus-within .input-line::after {
    width: 100%;
}

.form-submit {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #00e5ff;
    background: transparent;
    border: 1px solid rgba(0, 229, 255, 0.2);
    padding: 16px 32px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    align-self: flex-start;
}

.form-submit:hover {
    border-color: rgba(0, 229, 255, 0.5);
    background: rgba(0, 229, 255, 0.05);
    transform: translateX(4px);
}

.submit-icon {
    transition: transform 0.4s ease;
}

.form-submit:hover .submit-icon {
    transform: translateX(4px);
}

/* --- Footer --- */
.garden-footer {
    margin-top: 80px;
    padding-top: 32px;
    border-top: 1px solid rgba(107, 115, 148, 0.1);
}

.footer-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 12px;
    color: rgba(107, 115, 148, 0.5);
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 12px;
    color: #6b7394;
    letter-spacing: 0.04em;
}

/* --- Reveal Animations --- */
.reveal-element {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.reveal-element:nth-child(2) { transition-delay: 0.1s; }
.reveal-element:nth-child(3) { transition-delay: 0.2s; }
.reveal-element:nth-child(4) { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero-title {
        font-size: 48px;
    }

    .kanji-watermark {
        font-size: 200px;
    }

    #candle-nav {
        right: 16px;
    }

    .chamber {
        padding: 60px 24px;
    }

    .offering-card.featured {
        transform: scale(1);
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 36px;
    }

    .section-title {
        font-size: 28px;
    }

    .card-heading {
        font-size: 22px;
    }

    .kanji-watermark {
        font-size: 140px;
    }

    #candle-nav {
        right: 8px;
        gap: 12px;
    }

    #candle {
        transform: scale(0.7);
    }

    .chamber-dot {
        width: 24px;
        height: 24px;
    }

    .dot-kanji {
        font-size: 10px;
    }

    .path-stone {
        flex-direction: column;
        gap: 16px;
    }

    .stone-number {
        min-width: auto;
        text-align: left;
    }

    .stone-line {
        display: none;
    }
}
