/* Palette, type and motif reasons live in DESIGN.md */
:root {
    --bg: #080808; /* pure neutral black: no tint */
    --surface: #131315;
    --surface-hover: #18181b;
    --border: #242428;
    --border-strong: #3a3a40;
    --border-input: #6b6b74; /* 3.5:1 on --surface, so input edges stay visible */
    --text: #ededef;
    --muted: #9d9da6;
    --accent: #e0b14f;
    --on-accent: #0b0b0c; /* black on gold, owner pick */
    --radius: 10px;
    --nav-height: 4.5rem;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --mono: 'IBM Plex Mono', ui-monospace, monospace;
    color-scheme: dark;
}

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

html {
    overflow-x: clip;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, textarea {
    font: inherit;
    color: inherit;
}

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

::selection {
    background: rgba(224, 177, 79, 0.35);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* anchor jumps land below the sticky navbar */
[id] {
    scroll-margin-top: calc(var(--nav-height) + 1rem);
}

/* Shared section layout */
section {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: clamp(3.5rem, 9vw, 7rem) 1.5rem;
}

.sectionHead {
    margin-bottom: 2.5rem;
}

.sectionTitle {
    font-size: clamp(2rem, 4.8vw, 3rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

/* identity motif: metadata written as a code comment */
.comment {
    font-family: var(--mono);
    font-size: 0.875rem;
    color: var(--muted);
}

.comment::before {
    content: '// ';
    color: var(--accent);
}

.sectionHead .comment {
    margin-top: 0.75rem;
}

/* Shared card surface */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: background-color 200ms ease, border-color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .card:hover {
        background: var(--surface-hover);
        border-color: var(--border-strong);
    }
}

/* Scroll reveal: App.js adds .reveal to <html> and .shown to each element as it enters view */
.reveal .home :is(.sectionHead, .card, .row, .contactForm):not(.shown) {
    opacity: 0;
}

.reveal .shown {
    animation: reveal 600ms var(--ease-out) var(--delay, 0ms) both;
}

@keyframes reveal {
    from { opacity: 0; translate: 0 16px; }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.6rem 1.25rem;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, filter 180ms ease, transform 120ms var(--ease-out);
}

.btn:active {
    transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        background: var(--surface-hover);
        border-color: var(--muted);
    }
}

.btnPrimary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
}

@media (hover: hover) and (pointer: fine) {
    .btnPrimary:hover {
        background: var(--accent);
        border-color: var(--accent);
        filter: brightness(1.08);
    }
}

.btn:disabled {
    cursor: progress;
    filter: saturate(0.4);
}

/* icon PNGs are black glyphs; flip them to white on dark buttons */
.btnIcon {
    width: 1.1rem;
    height: 1.1rem;
    object-fit: contain;
    filter: invert(1);
}

@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation: none !important;
        transition-property: background-color, border-color, color, opacity !important;
    }
}
