/* ========================================
   nonri.net - Victorian Ornate Stylesheet
   ======================================== */

/* --- Color Palette (Victorian Pastel) ---
   Blush pink:     #F0DCD8
   Parlor green:   #C8D8C0
   Cream white:    #FAF8F0
   Ornament gold:  #B89838
   Victorian plum: #6A4858
   Watercolor blue:#B0C8D8
   Rose accent:    #C87880
--- */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.8;
    color: #6A4858;
    background-color: #F0DCD8;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
}

h2 {
    font-size: clamp(28px, 3.5vw, 52px);
    line-height: 1.2;
    margin-bottom: 24px;
    color: #6A4858;
}

p {
    margin-bottom: 16px;
    color: #6A4858;
}

a {
    color: #6A4858;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #C87880;
    text-decoration: underline;
    text-decoration-color: #C87880;
}

/* --- Victorian Labels --- */
.victorian-label {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #B89838;
    margin-bottom: 12px;
}

/* ========================================
   Parlor Entrance (Hero)
   ======================================== */
.parlor-entrance {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #F0DCD8;
    overflow: hidden;
}

/* --- Corner Floral Decorations --- */
.corner-floral {
    position: absolute;
    width: 120px;
    height: 120px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.corner-floral svg {
    width: 100%;
    height: 100%;
}

.corner-floral.top-left {
    top: 20px;
    left: 20px;
    transform: scale(0);
    transform-origin: top left;
}

.corner-floral.top-right {
    top: 20px;
    right: 20px;
    transform: scale(0);
    transform-origin: top right;
}

.corner-floral.bottom-left {
    bottom: 20px;
    left: 20px;
    transform: scale(0);
    transform-origin: bottom left;
}

.corner-floral.bottom-right {
    bottom: 20px;
    right: 20px;
    transform: scale(0);
    transform-origin: bottom right;
}

.corner-floral.bloomed {
    opacity: 1;
    transform: scale(1);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.corner-floral:hover svg {
    transform: rotate(5deg);
    transition: transform 0.3s ease;
}

/* --- Cartouche --- */
.cartouche-container {
    position: relative;
    width: clamp(320px, 60vw, 600px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cartouche-svg {
    width: 100%;
    height: auto;
}

.cartouche-path,
.cartouche-inner,
.cartouche-scroll-top,
.cartouche-scroll-bottom,
.cartouche-flourish-l,
.cartouche-flourish-r {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

.cartouche-svg.drawn .cartouche-path,
.cartouche-svg.drawn .cartouche-inner,
.cartouche-svg.drawn .cartouche-scroll-top,
.cartouche-svg.drawn .cartouche-scroll-bottom,
.cartouche-svg.drawn .cartouche-flourish-l,
.cartouche-svg.drawn .cartouche-flourish-r {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1.2s ease-in-out;
}

.cartouche-svg.drawn .cartouche-inner {
    transition-delay: 0.3s;
}

.cartouche-svg.drawn .cartouche-scroll-top,
.cartouche-svg.drawn .cartouche-scroll-bottom {
    transition-delay: 0.6s;
}

.cartouche-svg.drawn .cartouche-flourish-l,
.cartouche-svg.drawn .cartouche-flourish-r {
    transition-delay: 0.8s;
}

.site-title {
    position: absolute;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: clamp(32px, 5vw, 64px);
    color: #6A4858;
    opacity: 0;
    transition: opacity 0.6s ease;
    text-align: center;
    letter-spacing: 0.02em;
}

.site-title.visible {
    opacity: 1;
}

/* --- Ornamental Rules --- */
.ornamental-rule {
    width: clamp(200px, 40vw, 400px);
    margin-top: 30px;
    text-align: center;
}

.ornamental-rule svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.hero-rule .rule-line-left,
.hero-rule .rule-line-right {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}

.hero-rule.drawn .rule-line-left,
.hero-rule.drawn .rule-line-right {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.8s ease-in-out;
}

.ornamental-rule:hover svg {
    transform: scaleX(1.05);
    transition: transform 0.3s ease;
}

/* ========================================
   Gallery Rooms
   ======================================== */
.gallery-room {
    max-width: 740px;
    margin: 0 auto;
    padding: 48px 24px;
    margin-top: 80px;
    margin-bottom: 80px;
    text-align: center;
}

.section-border {
    margin-bottom: 32px;
    overflow: visible;
}

.ornate-border {
    width: 100%;
    height: auto;
    overflow: visible;
}

.ornate-border path,
.ornate-border line,
.ornate-border circle {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1s ease-in-out;
}

.section-border.drawn .ornate-border path,
.section-border.drawn .ornate-border line,
.section-border.drawn .ornate-border circle {
    stroke-dashoffset: 0;
}

.section-border:hover .ornate-border path,
.section-border:hover .ornate-border line,
.section-border:hover .ornate-border circle {
    opacity: 1;
    stroke-width: 2;
    transition: opacity 0.3s ease, stroke-width 0.3s ease;
}

.room-content {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.room-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Watercolor Accent Panels
   ======================================== */
.watercolor-panel {
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.watercolor-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.watercolor-panel.bloomed::before {
    opacity: 1;
}

.watercolor-blue {
    border-top: 1px solid #B0C8D8;
    border-bottom: 1px solid #B0C8D8;
}

.watercolor-blue::before {
    background:
        radial-gradient(ellipse at 30% 40%, rgba(176, 200, 216, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(176, 200, 216, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 30%, rgba(200, 216, 192, 0.1) 0%, transparent 70%),
        radial-gradient(ellipse at 40% 70%, rgba(240, 220, 216, 0.12) 0%, transparent 55%);
}

.watercolor-green {
    border-top: 1px solid #C8D8C0;
    border-bottom: 1px solid #C8D8C0;
}

.watercolor-green::before {
    background:
        radial-gradient(ellipse at 40% 50%, rgba(200, 216, 192, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 60% 30%, rgba(200, 216, 192, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 70%, rgba(176, 200, 216, 0.1) 0%, transparent 65%),
        radial-gradient(ellipse at 70% 50%, rgba(240, 220, 216, 0.1) 0%, transparent 55%);
}

.watercolor-rose::before {
    background:
        radial-gradient(ellipse at 50% 40%, rgba(200, 120, 128, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 30% 60%, rgba(240, 220, 216, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 30%, rgba(200, 120, 128, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 70%, rgba(200, 216, 192, 0.1) 0%, transparent 65%);
}

.watercolor-content {
    max-width: 740px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.watercolor-panel.bloomed .watercolor-content {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.watercolor-content p:not(.victorian-label) {
    font-size: clamp(18px, 2vw, 22px);
    font-style: italic;
    line-height: 1.7;
    color: #6A4858;
}

/* ========================================
   Visiting Cards
   ======================================== */
.visiting-cards {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.card-flip {
    width: 200px;
    height: 120px;
    perspective: 600px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.34, 1.02, 0.68, 1);
}

.card-flip.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-flip.wobble .card-inner {
    animation: cardWobble 0.6s ease;
}

@keyframes cardWobble {
    0% { transform: rotateY(0deg); }
    25% { transform: rotateY(-2deg); }
    50% { transform: rotateY(2deg); }
    75% { transform: rotateY(-1deg); }
    100% { transform: rotateY(0deg); }
}

.card-front,
.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FAF8F0;
    border-radius: 4px;
}

.card-back {
    transform: rotateY(180deg);
}

.card-border-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.card-text {
    position: relative;
    z-index: 1;
    padding: 16px;
    text-align: center;
}

.card-name {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: clamp(18px, 2vw, 24px);
    color: #6A4858;
    margin-bottom: 4px;
}

.card-title {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #B89838;
}

.card-back .card-text p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 0;
    color: #6A4858;
}

.card-flip:hover .card-inner {
    transform: rotateY(-3deg);
    transition: transform 0.2s ease;
}

.card-flip.flipped:hover .card-inner {
    transform: rotateY(177deg);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    text-align: center;
    padding: 60px 24px 40px;
    background-color: #F0DCD8;
}

.footer-rule {
    margin: 0 auto 24px;
}

.footer-text {
    font-weight: 300;
    font-size: 14px;
    color: #6A4858;
    opacity: 0.7;
}

.footer-floral {
    margin-top: 24px;
}

.footer-floral svg {
    width: 80px;
    height: 40px;
}

/* ========================================
   Scroll Animation Base States
   ======================================== */

/* All animated SVG elements start hidden for scroll reveal */
.border-scrollwork path,
.border-scrollwork circle,
.border-acanthus path,
.border-beaded line,
.border-beaded circle,
.border-gothic path,
.border-gothic circle {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .corner-floral {
        width: 80px;
        height: 80px;
    }

    .gallery-room {
        margin-top: 48px;
        margin-bottom: 48px;
        padding: 32px 20px;
    }

    .watercolor-panel {
        padding: 48px 20px;
    }

    .visiting-cards {
        gap: 20px;
    }

    .card-flip {
        width: 170px;
        height: 102px;
    }

    .ornamental-rule {
        width: clamp(160px, 50vw, 300px);
    }
}

@media (max-width: 480px) {
    .corner-floral {
        width: 60px;
        height: 60px;
    }

    .visiting-cards {
        flex-direction: column;
        align-items: center;
    }

    .card-flip {
        width: 200px;
        height: 120px;
    }
}
