/* ============================
   tanso.club — Styles
   Dreamy Carbon Social Club Magazine
   ============================ */

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

:root {
    --sky-blue: #4a7ae8;
    --coral-red: #e8564a;
    --mint-green: #4ae87a;
    --soft-white: #f4f2f0;
    --ink-dark: #2a2a30;
    --muted-blue: #7a9ae8;
    --light-gray: #e8e4e0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.8;
    color: var(--ink-dark);
    background-color: var(--soft-white);
    overflow-x: hidden;
    position: relative;
}

/* --- Floating Bubble Field (global background) --- */
#bubble-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: bubble-drift linear infinite;
}

@keyframes bubble-drift {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: var(--bubble-opacity, 0.1);
    }
    90% {
        opacity: var(--bubble-opacity, 0.1);
    }
    100% {
        transform: translateY(calc(-100vh - 100px)) translateX(var(--drift-x, 30px));
        opacity: 0;
    }
}

/* --- Hero Section --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(74, 122, 232, 0.25) 0%,
        rgba(232, 86, 74, 0.15) 50%,
        rgba(74, 232, 122, 0.2) 100%
    );
    z-index: 0;
}

.hero-atoms {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.hero-label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(11px, 1.2vw, 14px);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sky-blue);
    margin-bottom: 16px;
    opacity: 0;
    transform: translateY(10px);
    animation: hero-fade-in 1s ease 0.6s forwards;
}

.hero-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(42px, 8vw, 100px);
    letter-spacing: 0.08em;
    color: var(--ink-dark);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: hero-fade-in 1.2s ease 0.3s forwards;
}

.hero-tagline {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(14px, 1.8vw, 20px);
    color: var(--ink-dark);
    max-width: 560px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(10px);
    animation: hero-fade-in 1s ease 0.9s forwards;
}

@keyframes hero-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: hero-fade-in 1s ease 1.4s forwards;
}

.hero-scroll-hint span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted-blue);
}

.scroll-arrow {
    width: 2px;
    height: 24px;
    background: var(--muted-blue);
    position: relative;
    animation: scroll-bounce 2s ease infinite;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--muted-blue);
    border-bottom: 2px solid var(--muted-blue);
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* --- 3D Inflated Atoms --- */
.atom {
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.atom-carbon,
.atom-blue {
    background: radial-gradient(circle at 35% 35%, #8ab4ff, var(--sky-blue) 60%, #2a5abf);
    box-shadow:
        0 8px 30px rgba(74, 122, 232, 0.35),
        inset 0 -4px 12px rgba(0, 0, 0, 0.15),
        inset 0 4px 8px rgba(255, 255, 255, 0.3);
}

.atom-oxygen,
.atom-coral {
    background: radial-gradient(circle at 35% 35%, #ffa48e, var(--coral-red) 60%, #b8382a);
    box-shadow:
        0 8px 30px rgba(232, 86, 74, 0.35),
        inset 0 -4px 12px rgba(0, 0, 0, 0.15),
        inset 0 4px 8px rgba(255, 255, 255, 0.3);
}

.atom-hydrogen,
.atom-green {
    background: radial-gradient(circle at 35% 35%, #8effa8, var(--mint-green) 60%, #2abf4a);
    box-shadow:
        0 8px 30px rgba(74, 232, 122, 0.35),
        inset 0 -4px 12px rgba(0, 0, 0, 0.15),
        inset 0 4px 8px rgba(255, 255, 255, 0.3);
}

.atom-nitrogen {
    background: radial-gradient(circle at 35% 35%, #c8b4ff, #8a6ae8 60%, #5a3abf);
    box-shadow:
        0 8px 30px rgba(138, 106, 232, 0.35),
        inset 0 -4px 12px rgba(0, 0, 0, 0.15),
        inset 0 4px 8px rgba(255, 255, 255, 0.3);
}

/* Atom sizes */
.atom-large { width: 80px; height: 80px; }
.atom-medium { width: 56px; height: 56px; }
.atom-small { width: 40px; height: 40px; }
.atom-mini { width: 24px; height: 24px; }

/* Hero atom positions */
.atom-1 {
    position: absolute;
    width: 70px;
    height: 70px;
    top: 18%;
    left: 15%;
    opacity: 0;
    transform: scale(0.3);
    animation: atom-bounce-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
}

.atom-2 {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 25%;
    right: 18%;
    opacity: 0;
    transform: scale(0.3);
    animation: atom-bounce-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

.atom-3 {
    position: absolute;
    width: 40px;
    height: 40px;
    bottom: 30%;
    left: 22%;
    opacity: 0;
    transform: scale(0.3);
    animation: atom-bounce-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
}

.atom-4 {
    position: absolute;
    width: 60px;
    height: 60px;
    bottom: 22%;
    right: 12%;
    opacity: 0;
    transform: scale(0.3);
    animation: atom-bounce-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.35s forwards;
}

.atom-5 {
    position: absolute;
    width: 45px;
    height: 45px;
    top: 12%;
    right: 38%;
    opacity: 0;
    transform: scale(0.3);
    animation: atom-bounce-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.55s forwards;
}

@keyframes atom-bounce-in {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Editorial Sections --- */
.editorial-section {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 32px;
}

/* Slide-reveal */
.slide-reveal {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.slide-reveal.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.molecule-illustration {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.bond {
    background-color: var(--ink-dark);
    opacity: 0.3;
}

.bond-h {
    width: 18px;
    height: 2px;
}

.bond-v {
    width: 2px;
    height: 18px;
}

.bond-diagonal-1 {
    width: 24px;
    height: 2px;
    transform: rotate(-35deg);
    position: absolute;
    top: -15px;
    right: -10px;
}

.bond-diagonal-2 {
    width: 24px;
    height: 2px;
    transform: rotate(35deg);
    position: absolute;
    bottom: -15px;
    right: -10px;
}

.section-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(28px, 4.5vw, 52px);
    color: var(--ink-dark);
    position: relative;
}

/* Glitch-art effect on section headers */
.glitch-text {
    position: relative;
}

.glitch-text.glitching::before,
.glitch-text.glitching::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
}

.glitch-text.glitching::before {
    color: var(--coral-red);
    animation: glitch-shift 0.3s ease forwards;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch-text.glitching::after {
    color: var(--mint-green);
    animation: glitch-shift-reverse 0.3s ease forwards;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch-shift {
    0% { transform: translate(-3px, -2px); }
    30% { transform: translate(2px, 1px); }
    60% { transform: translate(-1px, 1px); }
    100% { transform: translate(0, 0); }
}

@keyframes glitch-shift-reverse {
    0% { transform: translate(3px, 2px); }
    30% { transform: translate(-2px, -1px); }
    60% { transform: translate(1px, -1px); }
    100% { transform: translate(0, 0); }
}

/* Editorial text layouts */
.editorial-single {
    max-width: 680px;
}

.editorial-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 32px;
}

.body-text {
    margin-bottom: 20px;
    color: var(--ink-dark);
}

.col-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(18px, 2.5vw, 26px);
    margin-bottom: 14px;
    color: var(--ink-dark);
}

.formula-label {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.05em;
    color: var(--muted-blue);
    background: rgba(122, 154, 232, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
    margin-top: 4px;
}

/* --- Visual Break Sections --- */
.visual-break {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 100px 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, var(--soft-white) 0%, var(--light-gray) 50%, var(--soft-white) 100%);
    overflow: hidden;
}

.visual-break-alt {
    background: linear-gradient(
        180deg,
        var(--soft-white) 0%,
        rgba(74, 122, 232, 0.06) 30%,
        rgba(232, 86, 74, 0.04) 70%,
        var(--soft-white) 100%
    );
}

.visual-break-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-width: 700px;
    text-align: center;
}

.floating-molecule {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.large-molecule {
    width: 80px;
    height: 80px;
}

.floating-atoms-row {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: center;
}

.pull-quote {
    font-family: 'Libre Baskerville', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(18px, 2.8vw, 28px);
    line-height: 1.6;
    color: var(--ink-dark);
    max-width: 600px;
    position: relative;
    padding: 0 24px;
}

.pull-quote::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--sky-blue), var(--coral-red), var(--mint-green));
    border-radius: 2px;
}

/* --- Footer --- */
#footer {
    position: relative;
    z-index: 1;
    padding: 80px 32px 60px;
    text-align: center;
    background: var(--light-gray);
}

.footer-atoms {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 28px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(20px, 3vw, 32px);
    letter-spacing: 0.08em;
    color: var(--ink-dark);
}

.footer-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted-blue);
}

/* --- Responsive --- */
@media (max-width: 700px) {
    .editorial-two-col {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .editorial-section {
        padding: 60px 20px;
    }

    .visual-break {
        padding: 60px 20px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .floating-atoms-row {
        gap: 14px;
    }

    .atom-1 { top: 12%; left: 8%; width: 50px; height: 50px; }
    .atom-2 { top: 20%; right: 10%; width: 38px; height: 38px; }
    .atom-3 { bottom: 28%; left: 12%; width: 30px; height: 30px; }
    .atom-4 { bottom: 18%; right: 6%; width: 44px; height: 44px; }
    .atom-5 { top: 8%; right: 28%; width: 34px; height: 34px; }
}
