:root {
    /* Main Palette */
    --color-primary: #8b2c26;
    --color-primary-rgb: 139, 44, 38;
    --color-primary-light: #a33b3b;
    --color-secondary: #c5a36b;
    --color-secondary-rgb: 197, 163, 107;
    --color-secondary-dark: #8b5a2b;
    --color-accent: #d4af37;
    --color-celadon: #a8b8a5;

    /* Backgrounds */
    --color-bg-body: #f2ede4;
    --color-bg-paper: #fefbf4;
    --color-bg-sand: #f4ece1;
    --color-bg-card: #fbf5eb;
    --color-bg-menu: #f4efe8;

    /* Text & Ink */
    --color-ink: #1a1a1a;
    --color-ink-rgb: 26, 26, 26;
    --color-white: #ffffff;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif;
    background-color: var(--color-bg-body);
    color: var(--color-ink);
    margin: 0;
    display: flex;
    justify-content: center;
}

/* Container is only for mobile */
.main-container {
    width: 100%;
    max-width: 30rem;
    background-color: var(--color-bg-paper);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 3.75rem rgba(0, 0, 0, 0.1);
    overflow-x: hidden;
}

/* Scrollbar styling */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Traditional vertical layout helper */
.vertical-rl {
    writing-mode: vertical-rl;
}

.transition-slow {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Scroll Snap for gallery */
.snap-x {
    scroll-snap-type: x mandatory;
}

.snap-center {
    scroll-snap-align: center;
}

/* Fluid Typography for Hero Title */
.hero-title {
    font-size: clamp(1.5rem, 10vw, 3rem);
    white-space: nowrap;
}

.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(var(--color-secondary-rgb), 0.2);
}

.text-ink {
    color: var(--color-ink);
}

.text-vermilion {
    color: var(--color-primary);
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

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

.animate-reveal {
    animation: reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.stagger-1 {
    animation-delay: 0.1s;
}

.btn-press:active {
    transform: scale(0.98);
}

/* Classical Frame Card */
.classical-card {
    position: relative;
    background-color: var(--color-bg-paper);
    border: 1px solid var(--color-secondary);
    padding: 1.5rem;
    box-shadow: inset 0 0 10px rgba(var(--color-secondary-rgb), 0.1);
}

.classical-card::before,
.classical-card::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid var(--color-secondary);
    border-radius: 50%;
    background: var(--color-bg-paper);
    z-index: 2;
}

/* Four corners ornaments */
.classical-card::before {
    top: -5px;
    left: -5px;
}

.classical-card::after {
    top: -5px;
    right: -5px;
}

.classical-card-corners {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.classical-card-corners::before,
.classical-card-corners::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid var(--color-secondary);
    border-radius: 50%;
    background: var(--color-bg-paper);
    z-index: 2;
}

.classical-card-corners::before {
    bottom: -5px;
    left: -5px;
}

.classical-card-corners::after {
    bottom: -5px;
    right: -5px;
}

/* Inner frame lines */
.classical-inner-frame {
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(197, 163, 107, 0.2);
    pointer-events: none;
}

.classical-title-frame {
    display: inline-block;
    padding: 0.25rem 1.5rem;
    border: 1px solid var(--color-secondary);
    border-radius: 4px;
    margin-bottom: 1rem;
    position: relative;
}

.classical-title-frame::before,
.classical-title-frame::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border: 1px solid var(--color-secondary);
    border-radius: 1px;
    background: var(--color-paper);
}

.classical-title-frame::before { left: -3px; }
.classical-title-frame::after { right: -3px; }
