/* layer2.wiki - Graffiti meets pastoral-romantic */
/* Color Palette:
   #1a1a1a - Obsidian (primary black)
   #c8a84e - Tarnished Gold (primary gold)
   #f2e8d0 - Aged Linen (warm parchment)
   #2d2a1f - Earth Shadow (deep olive)
   #a67c2e - Autumn Resin (burnished amber)
   #3a3a3a - Concrete Dust (soft charcoal)
   #f5ecd5 - Spring Butter (cream highlight)
   #b8736a - Dried Petal (faded rose)
*/

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    background: #1a1a1a;
    color: #f2e8d0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   GRAIN OVERLAY
   ============================================ */
.grain::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    opacity: 0.06;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 2;
}

.grain--light::before {
    opacity: 0.12;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.section--dark {
    background-color: #1a1a1a;
    color: #f2e8d0;
    min-height: 100vh;
}

.section--light {
    background-color: #f2e8d0;
    color: #1a1a1a;
    min-height: 90vh;
}

.section--earth {
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2a1f 100%);
    color: #f2e8d0;
    min-height: 90vh;
}

.section--gold {
    background-color: #c8a84e;
    color: #1a1a1a;
    min-height: 80vh;
}

/* ============================================
   SECTION BORDERS & DRIPS
   ============================================ */
.section__border {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #c8a84e;
    z-index: 3;
}

.drip {
    position: absolute;
    top: 4px;
    width: 2px;
    height: 40px;
    background: #c8a84e;
    border-radius: 0 0 1px 1px;
}

.drip--tall {
    height: 60px;
}

.drip--short {
    height: 20px;
}

/* ============================================
   SECTION CONTENT
   ============================================ */
.section__content {
    position: relative;
    z-index: 1;
    max-width: 780px;
    width: 100%;
    padding: clamp(3rem, 8vh, 6rem) clamp(1.5rem, 6vw, 4rem);
}

.section__content--hero {
    max-width: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.section__content--index {
    max-width: 860px;
}

.section__content--closing {
    text-align: center;
    max-width: 780px;
}

/* ============================================
   HERO TYPOGRAPHY
   ============================================ */
.hero-title {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(3.5rem, 11vw, 9rem);
    letter-spacing: 0.04em;
    text-transform: lowercase;
    color: #c8a84e;
    text-shadow: 0 0 8px rgba(200, 168, 78, 0.3), 0 0 20px rgba(200, 168, 78, 0.1);
    filter: url(#roughen);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-title.is-visible {
    opacity: 1;
    transform: scale(1);
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 300;
    font-style: italic;
    color: #f2e8d0;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.hero-subtitle.is-visible {
    opacity: 0.7;
    transform: translateY(0);
}

/* ============================================
   SECTION HEADINGS
   ============================================ */
.section-heading {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #c8a84e;
    text-transform: lowercase;
    letter-spacing: 0.04em;
    margin-bottom: 2.5rem;
    text-shadow: 0 0 6px rgba(200, 168, 78, 0.2);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.section-heading.is-visible {
    opacity: 1;
    transform: scale(1);
}

.section-heading--dark {
    color: #1a1a1a;
    text-shadow: none;
}

/* ============================================
   BODY TEXT
   ============================================ */
.body-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.05rem, 1.4vw, 1.3rem);
    font-weight: 400;
    line-height: 1.85;
    letter-spacing: 0.01em;
    color: #1a1a1a;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.body-text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.body-text--light {
    color: #f2e8d0;
}

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

.gold-term {
    color: #c8a84e;
    font-weight: 700;
}

.gold-emphasis {
    color: #a67c2e;
    font-weight: 600;
    font-style: italic;
}

.body-text strong {
    font-weight: 600;
}

/* ============================================
   WATERMARKS
   ============================================ */
.watermark {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

.watermark--numeral {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(15rem, 40vw, 35rem);
    color: #c8a84e;
    opacity: 0.06;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.watermark--hanzi {
    font-family: serif;
    font-size: clamp(10rem, 25vw, 22rem);
    color: #c8a84e;
    opacity: 0.03;
    top: 10%;
    right: 5%;
    line-height: 1;
}

/* ============================================
   PROTOCOL LIST
   ============================================ */
.protocol-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.protocol-list.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.protocol-entry {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #3a3a3a;
    transition: border-color 0.3s ease;
}

.protocol-entry:hover {
    border-bottom-color: #a67c2e;
}

.flower-bullet {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-top: 2px;
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

.protocol-entry:hover .flower-bullet {
    opacity: 0.5;
}

.protocol-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.protocol-name {
    font-family: 'Permanent Marker', cursive;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: #c8a84e;
    letter-spacing: 0.02em;
}

.protocol-desc {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    font-weight: 300;
    font-style: italic;
    color: #f2e8d0;
    opacity: 0.75;
    line-height: 1.5;
}

/* ============================================
   CLOSING TEXT
   ============================================ */
.closing-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    font-weight: 400;
    line-height: 1.85;
    color: #1a1a1a;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.closing-text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.closing-text--final {
    font-size: clamp(1.3rem, 2vw, 1.8rem);
    font-weight: 600;
    margin-bottom: 0;
    letter-spacing: 0.01em;
}

/* ============================================
   SEAL STAMP FOOTER
   ============================================ */
.seal-footer {
    position: absolute;
    bottom: clamp(1.5rem, 4vh, 3rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.seal-stamp {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #b8736a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease;
}

.seal-stamp:hover {
    border-color: #1a1a1a;
}

.seal-text {
    font-family: 'Permanent Marker', cursive;
    font-size: 0.7rem;
    color: #b8736a;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.seal-stamp:hover .seal-text {
    color: #1a1a1a;
}

/* ============================================
   TECHNICAL LABELS (used in protocol metadata)
   ============================================ */
.tech-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #3a3a3a;
}
