/* ============================================================
   saram.ai -- Victorian-Ornate AI Parlor
   Colors: #E8E0D0, #2A2018, #6A5A4A, #B89A50, #B87A6A, #F5EFE0
   Fonts: Work Sans (display), Lato (body)
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: #6A5A4A;
    background-color: #E8E0D0;
    overflow-x: hidden;
}

/* ---- Scrollbar styling ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #E8E0D0;
}
::-webkit-scrollbar-thumb {
    background: #B89A50;
    border-radius: 4px;
}

/* ============================================================
   WATER-BUBBLE SPHERES
   ============================================================ */

.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(184,154,80,0.15), transparent);
    animation: bubbleFloat 18s ease-in-out infinite;
}

.bubble-1 {
    width: 180px;
    height: 180px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    animation-duration: 20s;
}

.bubble-2 {
    width: 120px;
    height: 120px;
    top: 30%;
    right: 10%;
    animation-delay: -3s;
    animation-duration: 16s;
}

.bubble-3 {
    width: 200px;
    height: 200px;
    top: 55%;
    left: 15%;
    animation-delay: -7s;
    animation-duration: 22s;
}

.bubble-4 {
    width: 90px;
    height: 90px;
    top: 70%;
    right: 20%;
    animation-delay: -10s;
    animation-duration: 14s;
}

.bubble-5 {
    width: 150px;
    height: 150px;
    top: 85%;
    left: 40%;
    animation-delay: -5s;
    animation-duration: 19s;
}

.bubble-6 {
    width: 70px;
    height: 70px;
    top: 15%;
    right: 30%;
    animation-delay: -12s;
    animation-duration: 17s;
}

.bubble-7 {
    width: 110px;
    height: 110px;
    top: 45%;
    left: 60%;
    animation-delay: -8s;
    animation-duration: 21s;
}

.bubble-8 {
    width: 60px;
    height: 60px;
    top: 65%;
    left: 80%;
    animation-delay: -2s;
    animation-duration: 15s;
}

@keyframes bubbleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(15px, -25px) scale(1.05);
        opacity: 0.6;
    }
    50% {
        transform: translate(-10px, -40px) scale(0.95);
        opacity: 0.5;
    }
    75% {
        transform: translate(20px, -15px) scale(1.02);
        opacity: 0.55;
    }
}

/* ============================================================
   PERSPECTIVE STAGE -- Layered Depth
   ============================================================ */

.perspective-stage {
    perspective: 1000px;
    position: relative;
    z-index: 1;
}

.depth-layer {
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

/* ============================================================
   SCROLLWORK FRAME (Background Layer)
   ============================================================ */

.layer-back {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.scrollwork-frame {
    position: relative;
    width: 100%;
    height: 100%;
}

.corner-ornament {
    position: absolute;
    width: 120px;
    height: 120px;
    border-color: #B89A50;
    border-style: solid;
    opacity: 0.25;
}

.corner-ornament.top-left {
    top: 20px;
    left: 20px;
    border-width: 2px 0 0 2px;
    border-radius: 20px 0 0 0;
}

.corner-ornament.top-right {
    top: 20px;
    right: 20px;
    border-width: 2px 2px 0 0;
    border-radius: 0 20px 0 0;
}

.corner-ornament.bottom-left {
    bottom: 20px;
    left: 20px;
    border-width: 0 0 2px 2px;
    border-radius: 0 0 0 20px;
}

.corner-ornament.bottom-right {
    bottom: 20px;
    right: 20px;
    border-width: 0 2px 2px 0;
    border-radius: 0 0 20px 0;
}

.corner-ornament::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-color: #B87A6A;
    border-style: solid;
    opacity: 0.5;
}

.corner-ornament.top-left::before {
    top: 10px;
    left: 10px;
    border-width: 1px 0 0 1px;
    border-radius: 12px 0 0 0;
}

.corner-ornament.top-right::before {
    top: 10px;
    right: 10px;
    border-width: 1px 1px 0 0;
    border-radius: 0 12px 0 0;
}

.corner-ornament.bottom-left::before {
    bottom: 10px;
    left: 10px;
    border-width: 0 0 1px 1px;
    border-radius: 0 0 0 12px;
}

.corner-ornament.bottom-right::before {
    bottom: 10px;
    right: 10px;
    border-width: 0 1px 1px 0;
    border-radius: 0 0 12px 0;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.layer-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transform: translateZ(0px);
    padding: 2rem;
}

.ornate-border-top,
.ornate-border-bottom {
    position: absolute;
    left: 5%;
    right: 5%;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        #B89A50 15%,
        #B87A6A 50%,
        #B89A50 85%,
        transparent 100%
    );
    opacity: 0;
    animation: borderGrow 1.5s ease-out 0.3s forwards;
}

.ornate-border-top {
    top: 60px;
}

.ornate-border-bottom {
    bottom: 60px;
}

.ornate-border-top::before,
.ornate-border-bottom::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #B89A50;
    border-radius: 50%;
    top: -5px;
}

.ornate-border-top::after,
.ornate-border-bottom::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(184,122,106,0.4),
        transparent
    );
    top: 8px;
}

@keyframes borderGrow {
    from {
        opacity: 0;
        left: 50%;
        right: 50%;
    }
    to {
        opacity: 1;
        left: 5%;
        right: 5%;
    }
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-crest {
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.crest-icon {
    opacity: 0.8;
}

.hero-title {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: #2A2018;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-transform: lowercase;
}

.hero-subtitle {
    font-family: 'Lato', sans-serif;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: #6A5A4A;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.scrollwork-divider {
    opacity: 0;
    animation: fadeIn 1.2s ease-out 1s forwards;
}

.scrollwork-divider svg {
    max-width: 100%;
    height: auto;
}

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

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

/* ============================================================
   ABOUT SECTION
   ============================================================ */

.layer-mid {
    transform: translateZ(10px);
    padding: 4rem 2rem;
    display: flex;
    justify-content: center;
}

.card-panel {
    background: #F5EFE0;
    max-width: 800px;
    width: 100%;
    padding: 3rem 3.5rem;
    position: relative;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(42,32,24,0.08);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.card-panel:hover {
    transform: translateZ(20px) translateY(-4px);
    box-shadow: 0 16px 60px rgba(42,32,24,0.12);
}

.panel-scrollwork {
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        #B89A50 20%,
        #B87A6A 50%,
        #B89A50 80%,
        transparent 100%
    );
    border-radius: 4px 4px 0 0;
}

.panel-scrollwork::before {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(184,154,80,0.3), transparent);
}

.panel-title {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: #2A2018;
    margin-bottom: 1.5rem;
    text-align: center;
}

.panel-text {
    color: #6A5A4A;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.panel-text:last-child {
    margin-bottom: 0;
}

/* ============================================================
   FEATURES SECTION
   ============================================================ */

.layer-features {
    transform: translateZ(20px);
    padding: 5rem 2rem;
}

.section-title {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #2A2018;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, #B89A50, #B87A6A);
    margin: 0.8rem auto 0;
    border-radius: 1px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    background: #F5EFE0;
    padding: 2.5rem 2rem;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(42,32,24,0.06);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.feature-card:hover {
    transform: translateZ(20px) translateY(-6px);
    box-shadow: 0 12px 48px rgba(42,32,24,0.12);
}

.card-ornament {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #B89A50, #B87A6A, #B89A50);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.6s ease;
}

.feature-card:hover .card-ornament {
    transform: scaleX(1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    border-right: 1px solid rgba(184,154,80,0.2);
    border-top: 1px solid rgba(184,154,80,0.2);
    border-radius: 0 4px 0 0;
    transition: width 0.4s ease, height 0.4s ease;
}

.feature-card:hover::before {
    width: 80px;
    height: 80px;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 60px;
    border-left: 1px solid rgba(184,122,106,0.2);
    border-bottom: 1px solid rgba(184,122,106,0.2);
    border-radius: 0 0 0 4px;
    transition: width 0.4s ease, height 0.4s ease;
}

.feature-card:hover::after {
    width: 80px;
    height: 80px;
}

.feature-icon {
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    display: block;
}

.feature-title {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: #2A2018;
    margin-bottom: 0.8rem;
}

.feature-text {
    color: #6A5A4A;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================================
   SHOWCASE SECTION
   ============================================================ */

.layer-showcase {
    transform: translateZ(30px);
    padding: 5rem 2rem;
}

.showcase-panel {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    padding: 3rem;
}

.showcase-ornate-frame {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.frame-line {
    position: absolute;
    background: #B89A50;
    opacity: 0.15;
}

.frame-line.top {
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
}

.frame-line.bottom {
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
}

.frame-line.left {
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
}

.frame-line.right {
    right: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
}

.showcase-title {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #2A2018;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.showcase-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #B87A6A, #B89A50);
    margin: 0.8rem auto 0;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.showcase-item {
    background: #F5EFE0;
    padding: 2.5rem 2rem;
    border-radius: 4px;
    border-left: 3px solid #B89A50;
    position: relative;
    transition: transform 0.5s ease, box-shadow 0.5s ease, border-color 0.4s ease;
    box-shadow: 0 4px 20px rgba(42,32,24,0.05);
}

.showcase-item:hover {
    transform: translateZ(20px) translateY(-4px);
    box-shadow: 0 12px 40px rgba(42,32,24,0.1);
    border-color: #B87A6A;
}

.item-number {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    color: #B89A50;
    opacity: 0.3;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    line-height: 1;
}

.item-title {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: #2A2018;
    margin-bottom: 0.8rem;
}

.item-text {
    color: #6A5A4A;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================================
   CTA SECTION
   ============================================================ */

.layer-cta {
    transform: translateZ(40px);
    padding: 5rem 2rem;
}

.cta-panel {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 2rem;
}

.cta-scrollwork-top,
.cta-scrollwork-bottom {
    display: flex;
    justify-content: center;
    opacity: 0.6;
}

.cta-scrollwork-top svg,
.cta-scrollwork-bottom svg {
    max-width: 100%;
    height: auto;
}

.cta-title {
    font-family: 'Work Sans', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #2A2018;
    margin: 1.5rem 0 1rem;
}

.cta-text {
    color: #6A5A4A;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.cta-button-wrap {
    margin-bottom: 1.5rem;
}

.cta-button {
    display: inline-block;
    font-family: 'Work Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #F5EFE0;
    background: #2A2018;
    border: 2px solid #B89A50;
    padding: 0.9rem 2.5rem;
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: color 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(184,154,80,0.2), transparent);
    transition: left 0.6s ease;
}

.cta-button:hover {
    background: #B89A50;
    border-color: #B89A50;
    color: #2A2018;
}

.cta-button:hover::before {
    left: 100%;
}

/* ============================================================
   FOOTER
   ============================================================ */

.layer-footer {
    transform: translateZ(0px);
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.footer-scrollwork {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.footer-scrollwork svg {
    max-width: 100%;
    height: auto;
}

.footer-text {
    font-family: 'Lato', sans-serif;
    color: #6A5A4A;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.footer-subtext {
    font-family: 'Lato', sans-serif;
    color: #B89A50;
    font-size: 0.8rem;
    font-style: italic;
    letter-spacing: 0.05em;
}

/* ============================================================
   SCROLLWORK LOAD ANIMATION
   ============================================================ */

.corner-ornament {
    opacity: 0;
    animation: cornerReveal 1s ease-out forwards;
}

.corner-ornament.top-left { animation-delay: 0.2s; }
.corner-ornament.top-right { animation-delay: 0.4s; }
.corner-ornament.bottom-left { animation-delay: 0.6s; }
.corner-ornament.bottom-right { animation-delay: 0.8s; }

@keyframes cornerReveal {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 0.25;
        transform: scale(1);
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .card-panel {
        padding: 2rem 1.5rem;
    }

    .features-grid,
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .corner-ornament {
        width: 60px;
        height: 60px;
    }

    .showcase-panel {
        padding: 2rem 1rem;
    }

    .layer-features,
    .layer-showcase,
    .layer-cta {
        padding: 3rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        letter-spacing: 0.02em;
    }

    .hero-subtitle {
        letter-spacing: 0.08em;
        font-size: 0.85rem;
    }

    .corner-ornament {
        display: none;
    }
}
