/* RainBeats — base styles */
:root {
    --bg: #0f1419;
    --surface: #1a2332;
    --text: #e6edf3;
    --muted: #8b9cb3;
    --accent: #58a6ff;
    --accent-soft: rgba(88, 166, 255, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
}

.logo:hover {
    color: var(--accent);
}

.site-header nav {
    display: flex;
    gap: 1.5rem;
}

.site-header nav a {
    color: var(--muted);
    text-decoration: none;
}

.site-header nav a:hover {
    color: var(--accent);
}

.content {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--muted);
    font-size: 1.1rem;
}

.sections-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.card {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}

.card h2 {
    font-size: 1.1rem;
    margin-top: 0;
}

.card h2 a {
    color: var(--accent);
    text-decoration: none;
}

.card h2 a:hover {
    text-decoration: underline;
}

.placeholder-note {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.tool-list {
    list-style: none;
    padding-left: 0;
}

.tool-list li {
    margin-bottom: 0.75rem;
}

.tool-list a {
    color: var(--accent);
    text-decoration: none;
}

.tool-list a:hover {
    text-decoration: underline;
}

/* Piano */
.piano {
    display: flex;
    position: relative;
    margin: 1.5rem 0;
    height: 180px;
    max-width: 100%;
}

.key {
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.key.white {
    width: 48px;
    min-width: 40px;
    height: 100%;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 0 0 6px 6px;
    flex-shrink: 0;
}

.key.white:hover,
.key.white:focus {
    background: #e0e0e0;
}

.key.white.pressed {
    background: #d0d0d0;
}

.key.black {
    position: absolute;
    width: 28px;
    height: 60%;
    background: #222;
    color: #eee;
    border-radius: 0 0 4px 4px;
    z-index: 1;
    font-size: 0.75rem;
}

.key.black:hover,
.key.black:focus {
    background: #333;
}

.key.black.pressed {
    background: #444;
}

.key.black[data-note="C#4"] { left: 34px; }
.key.black[data-note="D#4"] { left: 82px; }
.key.black[data-note="F#4"] { left: 178px; }
.key.black[data-note="G#4"] { left: 226px; }
.key.black[data-note="A#4"] { left: 274px; }

/* Calculator */
.app-section .app-desc {
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.calculator {
    max-width: 280px;
    margin: 1.5rem 0;
    background: var(--surface);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.08);
}

.calc-display {
    font-family: ui-monospace, monospace;
    font-size: 1.75rem;
    text-align: right;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: var(--bg);
    border-radius: 8px;
    min-height: 2.5rem;
    word-break: break-all;
}

.calc-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.calc-btn {
    border: none;
    border-radius: 8px;
    padding: 0.9rem;
    font-size: 1.1rem;
    font-family: inherit;
    cursor: pointer;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    transition: background 0.15s;
}

.calc-btn:hover {
    background: rgba(255,255,255,0.12);
}

.calc-btn:active {
    background: rgba(255,255,255,0.18);
}

.calc-btn.calc-op {
    color: var(--accent);
}

.calc-btn.calc-eq {
    background: var(--accent);
    color: var(--bg);
}

.calc-btn.calc-eq:hover {
    background: #6eb3ff;
}

.calc-btn.calc-zero {
    grid-column: span 2;
}

.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.site-footer a {
    color: var(--accent);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}
