/* ============================================
   VALUATOR.DEV - Precision Instrument
   ============================================ */

:root {
    --bg-deep: #0c0a08;
    --surface: #1a1714;
    --gold: #c9a84c;
    --text-primary: #f0e6d0;
    --text-secondary: #b8b0a0;
    --text-tertiary: #807868;
    --val-up: #5a9a6a;
    --val-down: #a05050;
    --gold-bright: #e8c840;
    --shadow: #060504;
}

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

html {
    background: var(--bg-deep);
}

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text-secondary);
    background: var(--bg-deep);
    overflow-x: hidden;
    line-height: 1.7;
}

/* === Decimal Mark === */
#decimal-mark {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold);
    z-index: 50;
    opacity: 0.6;
}

/* === Sections === */
.section-full {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
}

.section-narrow {
    max-width: 700px;
    margin: 0 auto;
}

/* === Hero === */
#hero {
    text-align: center;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.hero-title .letter {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-title .letter.visible {
    opacity: 1;
}

.hero-dev {
    font-family: 'DM Mono', monospace;
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    color: var(--gold);
    display: block;
    margin-bottom: 3rem;
}

.balance-container {
    opacity: 0;
    transition: opacity 1.5s ease 0.5s;
}

.balance-container.visible {
    opacity: 1;
}

.balance-svg {
    width: 400px;
    max-width: 90vw;
    height: 120px;
}

#balance-beam {
    transform-origin: 200px 40px;
    animation: balanceTilt 3s ease-out 2s forwards;
}

@keyframes balanceTilt {
    0% { transform: rotate(-2deg); }
    33% { transform: rotate(2deg); }
    66% { transform: rotate(-0.5deg); }
    100% { transform: rotate(0deg); }
}

/* === Gold Rules === */
.gold-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 0;
    position: relative;
}

.gold-rule::before,
.gold-rule::after {
    content: '';
    flex: 1;
    max-width: 30%;
    height: 1px;
    background: var(--gold);
    opacity: 0.5;
}

.diamond {
    width: 8px;
    height: 8px;
    border: 1px solid var(--gold);
    transform: rotate(45deg);
    flex-shrink: 0;
}

.gold-rule-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 0;
    width: 100%;
}

.gold-rule-inline::before,
.gold-rule-inline::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gold);
    opacity: 0.3;
}

/* === Bento Panels === */
.bento-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 960px;
    width: 100%;
}

.bento-panel {
    background: var(--surface);
    border: 1px solid var(--gold);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.bento-panel.visible {
    opacity: 1;
}

.panel-header {
    height: 28px;
    background: rgba(201,168,76,0.08);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(201,168,76,0.15);
}

.panel-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
}

.panel-body {
    padding: 1.5rem;
}

.panel-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.panel-text {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.9rem, 1vw, 1rem);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* === Precision Marks === */
.precision-marks {
    height: 12px;
    margin-bottom: 1rem;
    background: repeating-linear-gradient(
        90deg,
        rgba(201,168,76,0.15) 0px,
        rgba(201,168,76,0.15) 1px,
        transparent 1px,
        transparent 10px
    );
}

/* === Mini Balance === */
.mini-balance {
    width: 80px;
    height: 40px;
    margin-bottom: 1rem;
}

/* === Value Indicator === */
.value-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.val-number {
    font-family: 'DM Mono', monospace;
    font-size: 1.5rem;
    color: var(--gold);
}

.val-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.arrow-up {
    border-bottom: 6px solid var(--val-up);
}

.arrow-down {
    border-top: 6px solid var(--val-down);
}

/* === Demonstration Panel === */
.demo-panel {
    background: var(--surface);
    border: 1px solid var(--gold);
    max-width: 800px;
    width: 100%;
    overflow: hidden;
}

.demo-beam {
    width: 100%;
    height: 10px;
    margin-bottom: 1rem;
}

.demo-columns {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    padding: 0 1rem 1rem;
}

.demo-divider {
    width: 1px;
    background: var(--gold);
    opacity: 0.3;
}

.demo-heading {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
}

.metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(201,168,76,0.08);
}

.metric-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.metric-val {
    font-family: 'DM Mono', monospace;
    font-size: 0.9rem;
    color: var(--gold);
    min-width: 50px;
    text-align: right;
}

.metric-total {
    font-size: 1.1rem;
    color: var(--gold-bright);
    font-weight: 400;
}

/* === Craft Quotes === */
.craft-item {
    text-align: center;
    padding: 2rem 0;
}

.sunburst-ornament {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.sunburst-ornament svg {
    width: 40px;
    height: 20px;
}

.craft-quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    color: var(--text-primary);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.craft-quote.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* === Seal === */
#seal {
    text-align: center;
}

.seal-frame {
    border: 1px solid var(--gold);
    padding: 4rem 3rem;
    position: relative;
    opacity: 0;
    transition: opacity 1s ease;
}

.seal-frame.visible {
    opacity: 1;
}

/* Deco corner ornaments */
.seal-frame::before,
.seal-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid var(--gold);
    opacity: 0.4;
}

.seal-frame::before {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
}

.seal-frame::after {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
}

.seal-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.seal-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-bottom: 2rem;
}

.seal-balance {
    width: 200px;
    height: 60px;
}

/* === Responsive === */
@media (max-width: 768px) {
    .bento-row {
        grid-template-columns: 1fr;
    }

    .demo-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .demo-divider {
        width: 100%;
        height: 1px;
    }

    .section-full {
        padding: 4rem 1.5rem;
    }

    #decimal-mark {
        width: 16px;
        height: 16px;
        bottom: 1rem;
        right: 1rem;
    }
}
