/* ============================================================
   sora.market - Complete Stylesheet
   ============================================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;700&family=Zen+Kaku+Gothic+New:wght@500&display=swap');

/* ============================================================
   CSS Custom Properties (Variables)
   ============================================================ */

:root {
    /* Colors */
    --deep-twilight: #1a1428;
    --leather-dark: #3a261c;
    --ember-clay: #b5634b;
    --fired-earth: #d4855c;
    --aurora-green: #6ac38e;
    --aurora-violet: #a277c4;
    --aged-parchment: #e8d8c4;
    --worn-cream: #f2e8d8;
    --stall-shadow: #2a1e18;

    /* Typography */
    --primary-font: 'Nunito Sans', sans-serif;
    --accent-font: 'Zen Kaku Gothic New', sans-serif;

    /* Layout */
    --content-width: min(680px, 88vw);
    --section-min-height: 85vh;
    --section-gap: clamp(2rem, 5vh, 4rem);
}

/* ============================================================
   Base Styles
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--primary-font);
    background-color: var(--deep-twilight);
    color: var(--aged-parchment);
    line-height: 1.75;
    letter-spacing: 0.015em;
    overflow-x: hidden;
    position: relative;

    /* Aurora background gradients */
    background:
        radial-gradient(ellipse at 30% 20%, rgba(106, 195, 142, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 40%, rgba(162, 119, 196, 0.06) 0%, transparent 50%),
        linear-gradient(to bottom, #1a1428 0%, #1a1428 100%);

    animation: aurora-drift 60s ease-in-out infinite alternate;
}

/* Aurora drift animation */
@keyframes aurora-drift {
    0% {
        background:
            radial-gradient(ellipse at 30% 20%, rgba(106, 195, 142, 0.08) 0%, transparent 60%),
            radial-gradient(ellipse at 70% 40%, rgba(162, 119, 196, 0.06) 0%, transparent 50%),
            linear-gradient(to bottom, #1a1428 0%, #1a1428 100%);
    }
    50% {
        background:
            radial-gradient(ellipse at 35% 25%, rgba(106, 195, 142, 0.08) 0%, transparent 60%),
            radial-gradient(ellipse at 65% 35%, rgba(162, 119, 196, 0.06) 0%, transparent 50%),
            linear-gradient(to bottom, #1a1428 0%, #1a1428 100%);
    }
    100% {
        background:
            radial-gradient(ellipse at 25% 15%, rgba(106, 195, 142, 0.08) 0%, transparent 60%),
            radial-gradient(ellipse at 75% 45%, rgba(162, 119, 196, 0.06) 0%, transparent 50%),
            linear-gradient(to bottom, #1a1428 0%, #1a1428 100%);
    }
}

/* ============================================================
   Navigation Header
   ============================================================ */

.nav-header {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 998;
    font-family: var(--accent-font);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ember-clay);
    letter-spacing: 0.12em;
    text-transform: lowercase;
    opacity: 0;
    animation: fade-in 1200ms ease-out 1200ms forwards;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================================
   Progress Bar
   ============================================================ */

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background-color: var(--aurora-green);
    width: 0%;
    z-index: 999;
    will-change: width;
}

/* ============================================================
   Aurora Bands (Background Elements)
   ============================================================ */

.aurora-band {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: screen;
}

.aurora-band-1 {
    width: 35vw;
    height: 120vh;
    background: radial-gradient(ellipse, rgba(106, 195, 142, 0.07) 0%, transparent 70%);
    top: -10vh;
    left: 5%;
    animation: aurora-sway 45s ease-in-out infinite alternate;
}

@keyframes aurora-sway {
    0% {
        transform: translateX(0) rotateZ(0deg);
    }
    50% {
        transform: translateX(8vw) rotateZ(3deg);
    }
    100% {
        transform: translateX(-8vw) rotateZ(-3deg);
    }
}

.aurora-band-2 {
    width: 50vw;
    height: 80vh;
    background: radial-gradient(ellipse, rgba(162, 119, 196, 0.05) 0%, transparent 70%);
    top: 20vh;
    right: 10%;
    animation: aurora-sway-2 55s ease-in-out infinite alternate;
    animation-delay: 15s;
}

@keyframes aurora-sway-2 {
    0% {
        transform: translateX(0) rotateZ(0deg);
    }
    50% {
        transform: translateX(-7vw) rotateZ(-2deg);
    }
    100% {
        transform: translateX(7vw) rotateZ(2deg);
    }
}

.aurora-band-3 {
    width: 20vw;
    height: 40vh;
    background: radial-gradient(ellipse, rgba(130, 170, 160, 0.06) 0%, transparent 70%);
    bottom: 30vh;
    left: 50%;
    transform: translateX(-50%);
    animation: aurora-sway-3 35s ease-in-out infinite alternate;
}

@keyframes aurora-sway-3 {
    0% {
        transform: translateX(-50%) translateY(0) rotateZ(0deg);
    }
    50% {
        transform: translateX(-50%) translateY(-4vh) rotateZ(1deg);
    }
    100% {
        transform: translateX(-50%) translateY(4vh) rotateZ(-1deg);
    }
}

/* ============================================================
   Content Wrapper
   ============================================================ */

.content-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
}

/* ============================================================
   Sections
   ============================================================ */

.section {
    position: relative;
    min-height: var(--section-min-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    background-color: rgba(58, 38, 28, 0.85);
    margin: 0 auto;
}

.section-content {
    width: var(--content-width);
    position: relative;
    z-index: 1;
}

.section-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--accent-font);
    font-size: clamp(6rem, 18vw, 14rem);
    color: var(--aurora-green);
    opacity: 0.05;
    z-index: 0;
    white-space: nowrap;
    font-weight: 500;
}

/* Hero Section */
.hero-section {
    background-color: var(--deep-twilight);
    border: none;
}

.hero-heading {
    font-family: var(--primary-font);
    font-size: clamp(2.2rem, 5.5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--worn-cream);
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(25px);
    animation: slide-up 500ms cubic-bezier(0.16, 1, 0.3, 1) 1600ms forwards;
}

.hero-tagline {
    font-family: var(--primary-font);
    font-size: clamp(1.5rem, 3.2vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--fired-earth);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(25px);
    animation: slide-up 500ms cubic-bezier(0.16, 1, 0.3, 1) 1800ms forwards;
}

.hero-description {
    font-family: var(--primary-font);
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: 300;
    line-height: 1.75;
    letter-spacing: 0.015em;
    color: var(--aged-parchment);
    opacity: 0;
    transform: translateY(25px);
    animation: slide-up 500ms cubic-bezier(0.16, 1, 0.3, 1) 1800ms forwards;
    max-width: 100%;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Headings */
.section-heading {
    font-family: var(--primary-font);
    font-size: clamp(1.5rem, 3.2vw, 2.4rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--worn-cream);
    margin-bottom: var(--section-gap);
    opacity: 0;
    transform: translateY(20px);
    animation: slide-reveal-section 400ms ease-out forwards;
}

@keyframes slide-reveal-section {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   Noren Dividers (Curtain Sections)
   ============================================================ */

.noren-divider {
    position: relative;
    width: var(--content-width);
    margin: 0 auto;
    padding: 3rem 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: auto;
}

.noren-rod {
    position: absolute;
    top: 3rem;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--ember-clay);
    z-index: 1;
}

.noren-panel {
    position: absolute;
    top: 3rem;
    width: 48%;
    height: 65px;
    background-color: var(--leather-dark);
    background-image:
        linear-gradient(172deg, transparent 0%, rgba(0,0,0,0.03) 12px, transparent 12px, transparent 40px, rgba(0,0,0,0.03) 40px, transparent 40px, transparent 68px, rgba(0,0,0,0.03) 68px, transparent 68px);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 0;
    animation: noren-sway 8s ease-in-out infinite alternate;
}

.noren-left {
    left: 0;
    transform: translateX(0);
}

.noren-right {
    right: 0;
    transform: translateX(0);
}

.noren-panel.reveal-left {
    animation: noren-part-left 600ms ease-out forwards;
}

.noren-panel.reveal-right {
    animation: noren-part-right 600ms ease-out forwards;
}

@keyframes noren-sway {
    0%, 100% {
        transform: skewY(0deg);
    }
    50% {
        transform: skewY(0.5deg);
    }
}

@keyframes noren-part-left {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-105%);
    }
}

@keyframes noren-part-right {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(105%);
    }
}

/* ============================================================
   Offerings Section
   ============================================================ */

.offering-item {
    margin-bottom: var(--section-gap);
    padding: 1.5rem;
    background-color: rgba(90, 60, 50, 0.3);
    border-top: 3px solid var(--ember-clay);
    border-radius: 2px;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.2),
        inset 0 2px 30px rgba(0,0,0,0.3),
        inset 0 -2px 20px rgba(181,99,75,0.1);
    opacity: 0;
    transform: translateY(15px);
    animation: slide-reveal-content 400ms ease-out forwards;
    transition: all 300ms ease-out;
}

.offering-item:nth-child(2) {
    animation-delay: 200ms;
}

.offering-item:nth-child(3) {
    animation-delay: 400ms;
}

.offering-item:nth-child(4) {
    animation-delay: 600ms;
}

.offering-item:nth-child(5) {
    animation-delay: 800ms;
}

.offering-item:hover {
    box-shadow:
        0 8px 24px rgba(0,0,0,0.35),
        inset 0 2px 30px rgba(0,0,0,0.3),
        inset 0 -2px 20px rgba(181,99,75,0.15);
    transform: translateY(-3px);
    border-top-color: var(--fired-earth);
}

@keyframes slide-reveal-content {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-title {
    font-family: var(--primary-font);
    font-size: clamp(1rem, 2.2vw, 1.5rem);
    font-weight: 700;
    color: var(--fired-earth);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.item-description {
    font-family: var(--primary-font);
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    font-weight: 300;
    color: var(--aged-parchment);
    line-height: 1.75;
}

/* ============================================================
   Features Section
   ============================================================ */

.feature-text {
    font-family: var(--primary-font);
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: 300;
    line-height: 1.75;
    color: var(--aged-parchment);
    margin-bottom: var(--section-gap);
    opacity: 0;
    transform: translateY(15px);
    animation: slide-reveal-content 400ms ease-out forwards;
}

.feature-highlight {
    margin-bottom: var(--section-gap);
    padding: 1.5rem;
    background-color: rgba(90, 60, 50, 0.3);
    border-left: 4px solid var(--aurora-green);
    border-radius: 2px;
    box-shadow: inset 0 2px 10px rgba(106, 195, 142, 0.03);
    opacity: 0;
    transform: translateY(15px);
    animation: slide-reveal-content 400ms ease-out forwards;
}

.feature-highlight:nth-of-type(2) {
    animation-delay: 200ms;
}

.feature-highlight:nth-of-type(3) {
    animation-delay: 400ms;
}

.highlight-title {
    font-family: var(--accent-font);
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    font-weight: 500;
    color: var(--aurora-green);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.highlight-text {
    font-family: var(--primary-font);
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    font-weight: 300;
    color: var(--aged-parchment);
    line-height: 1.75;
}

/* ============================================================
   Craftsmanship Section
   ============================================================ */

.craft-narrative {
    font-family: var(--primary-font);
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: 300;
    line-height: 1.75;
    color: var(--aged-parchment);
    margin-bottom: var(--section-gap);
    opacity: 0;
    transform: translateY(15px);
    animation: slide-reveal-content 400ms ease-out forwards;
}

.craft-detail {
    margin-bottom: var(--section-gap);
    padding: 1.5rem;
    background-color: rgba(90, 60, 50, 0.2);
    border-radius: 2px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(15px);
    animation: slide-reveal-content 400ms ease-out forwards;
}

.craft-detail:nth-of-type(2) {
    animation-delay: 200ms;
}

.craft-detail:nth-of-type(3) {
    animation-delay: 400ms;
}

.craft-detail:nth-of-type(4) {
    animation-delay: 600ms;
}

.detail-label {
    font-family: var(--accent-font);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    font-weight: 500;
    color: var(--aurora-green);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.detail-text {
    font-family: var(--primary-font);
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    font-weight: 300;
    color: var(--aged-parchment);
    line-height: 1.75;
}

/* ============================================================
   Closing Section
   ============================================================ */

.closing-section {
    text-align: center;
}

.closing-text {
    font-family: var(--primary-font);
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    font-weight: 300;
    line-height: 1.75;
    color: var(--aged-parchment);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(15px);
    animation: slide-reveal-content 400ms ease-out forwards;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.closing-text:nth-of-type(2) {
    animation-delay: 200ms;
}

.closing-text:nth-of-type(3) {
    animation-delay: 400ms;
}

.closing-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(181,99,75,0.2);
    opacity: 0;
    animation: fade-in 800ms ease-out 600ms forwards;
}

.footer-text {
    font-family: var(--accent-font);
    font-size: clamp(0.85rem, 1.4vw, 1rem);
    font-weight: 500;
    color: var(--ember-clay);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ============================================================
   Responsive Design
   ============================================================ */

@media (max-width: 640px) {
    :root {
        --content-width: 92vw;
        --section-min-height: 70vh;
    }

    .nav-header {
        font-size: 0.75rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .section-watermark {
        font-size: clamp(4rem, 12vw, 9rem);
        opacity: 0.04;
    }

    .aurora-band-1 {
        width: 30vw;
        height: 100vh;
        opacity: 0.6;
    }

    .aurora-band-2 {
        width: 40vw;
        height: 60vh;
        opacity: 0.6;
    }

    .aurora-band-3 {
        width: 15vw;
        height: 30vh;
        opacity: 0.6;
    }

    .noren-divider {
        padding: 2rem 0;
    }

    .noren-panel {
        height: 45px;
    }

    .offering-item,
    .feature-highlight,
    .craft-detail {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .item-title,
    .highlight-title {
        font-size: clamp(0.9rem, 2vw, 1.3rem);
    }

    .hero-heading {
        font-size: clamp(1.8rem, 5vw, 3.2rem);
    }

    .section-heading {
        font-size: clamp(1.2rem, 2.8vw, 2rem);
    }
}

/* ============================================================
   Scroll-Triggered Animations
   ============================================================ */

.section-content.observe {
    animation: observe-placeholder 0.1s ease-out;
}

@keyframes observe-placeholder {
    from {
        opacity: 1;
    }
    to {
        opacity: 1;
    }
}

/* ============================================================
   Entry Animation Timing
   ============================================================ */

/* Hero section entrance - starts immediately at 800ms from load */
.hero-section .section-content {
    opacity: 0;
    transform: translateY(40px);
    animation: section-entrance 700ms cubic-bezier(0.16, 1, 0.3, 1) 1200ms forwards;
}

@keyframes section-entrance {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   Utility Classes
   ============================================================ */

.watermark-sky {
    font-size: clamp(8rem, 25vw, 18rem);
    opacity: 0;
    animation: fade-in-kanji 800ms ease-in 800ms forwards;
}

@keyframes fade-in-kanji {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.04;
    }
}

.watermark-market,
.watermark-light,
.watermark-leather {
    opacity: 0;
    animation: fade-in-section-kanji 800ms ease-in forwards;
}

@keyframes fade-in-section-kanji {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.05;
    }
}

/* ============================================================
   Print Styles
   ============================================================ */

@media print {
    .nav-header,
    .progress-bar,
    .aurora-band {
        display: none;
    }
}
