/* ===== CUSTOM PROPERTIES ===== */
:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --amber: #c8913a;
    --amber-glow: #e8a848;
    --text: #e8e0d4;
    --text-muted: #8a8078;
    --font-heading: Georgia, 'Times New Roman', serif;
    --font-body: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.section-dark {
    background: var(--surface);
}

/* ===== FADE-IN ANIMATION ===== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('img/cofe.png') center center / cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.5) 0%,
        rgba(10, 10, 10, 0.65) 50%,
        rgba(10, 10, 10, 0.95) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 7vw, 5rem);
    letter-spacing: 0.12em;
    color: var(--text);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.hero-author {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--amber);
    font-style: italic;
    margin-bottom: 2rem;
}

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--amber);
    color: var(--amber);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-radius: 999px;
}

.pulse {
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 145, 58, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(200, 145, 58, 0); }
}

/* ===== SCROLL CHEVRON ===== */
.scroll-chevron {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    animation: bob 2s ease-in-out infinite;
    z-index: 1;
}

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

/* ===== THE QUESTION ===== */
#question {
    text-align: center;
}

.hook-line {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.the-question {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: var(--amber);
    font-style: italic;
    border: none;
    margin: 2.5rem 0;
    padding: 0;
    line-height: 1.6;
}

/* ===== TERMINAL / MIDAS LOG ===== */
.terminal {
    background: #0c0c0c;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    max-width: 700px;
    margin: 0 auto;
}

.terminal-header {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-body {
    padding: 1.5rem;
    min-height: 260px;
}

.midas-text {
    font-family: var(--font-mono);
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    color: var(--amber);
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.cursor {
    font-family: var(--font-mono);
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    color: var(--amber);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===== CATALOG ===== */
#catalog {
    text-align: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--text);
    margin-bottom: 3rem;
    letter-spacing: 0.04em;
}

.catalog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.catalog-entry {
    background: var(--surface);
    border: 1px solid #222;
    border-radius: 8px;
    padding: 2rem 1.5rem;
    transition: border-color 0.3s ease;
}

.catalog-entry:hover {
    border-color: var(--amber);
}

.entry-number {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--amber);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.entry-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.entry-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
}

.catalog-footer {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== GENRE ===== */
.genre-container {
    text-align: center;
}

.genre-line {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3vw, 2rem);
    color: var(--text);
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
}

.genre-line:nth-child(2) {
    color: var(--amber);
}

.genre-subline {
    font-size: 1rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 1.5rem;
}

/* ===== CTA / BOOK COVER ===== */
.cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    text-align: center;
}

@media (min-width: 768px) {
    .cta-container {
        flex-direction: row;
        text-align: left;
        gap: 4rem;
    }
}

.book-wrapper {
    flex-shrink: 0;
}

.book {
    width: 220px;
    perspective: 800px;
}

.book-cover {
    width: 100%;
    border-radius: 4px;
    box-shadow:
        6px 6px 20px rgba(0, 0, 0, 0.6),
        -2px 0 8px rgba(0, 0, 0, 0.3);
    transform: rotateY(-6deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.book:hover .book-cover {
    transform: rotateY(0deg);
    box-shadow:
        2px 6px 24px rgba(200, 145, 58, 0.15),
        0 0 40px rgba(200, 145, 58, 0.05);
}

.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--text);
    margin-bottom: 0.75rem;
    letter-spacing: 0.04em;
}

.cta-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.genre-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 768px) {
    .genre-tags {
        justify-content: flex-start;
    }
}

.tag {
    font-size: 0.85rem;
    color: var(--amber);
    letter-spacing: 0.05em;
}

.tag-dot {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== FOOTER ===== */
.footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid #1a1a1a;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .section {
        padding: 4rem 0;
    }

    .terminal-body {
        padding: 1rem;
    }

    .book {
        width: 180px;
    }
}
