/* Self-hosted fonts — no third-party requests. Licenses in fonts/OFL-*.txt. */
@font-face {
    font-family: "Inter";
    src: url("fonts/InterVariable.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lora";
    src: url("fonts/Lora-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #161616;
    --surface: #1e1e1e;
    --text: #f2f2f2;
    --muted: #a0a0a0;
    --accent: #f6ad65;
    --accent-hover: #f39540;
    --accent-active: #e07a1e;
    --on-accent: #161616;
    --border: #2e2e2e;
}

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

body {
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

main {
    width: 100%;
    max-width: 640px;
}

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

h1 {
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: -0.025em;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

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

section {
    margin-bottom: 2rem;
}

h2 {
    font-family: "Lora", Georgia, "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: -0.025em;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

p {
    margin-bottom: 0.75rem;
}

a {
    color: var(--accent);
}

code {
    font-family: ui-monospace, "SF Mono", Menlo, Monaco, "Courier New", monospace;
    background: var(--surface);
    padding: 0.15em 0.4em;
    font-size: 0.9em;
}

pre {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 0.75rem;
}

pre code {
    background: none;
    padding: 0;
}

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

.controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.controls input {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    min-width: 220px;
}

.controls input::placeholder {
    color: var(--muted);
}

.controls input:focus {
    outline: none;
    border-color: var(--accent);
}

button {
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, background 0.15s ease, opacity 0.2s ease;
}

button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

button:active {
    background: var(--accent-active);
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.result {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.result img {
    max-width: 100%;
    max-height: 360px;
    border: 1px solid var(--border);
}

.result a {
    color: var(--accent);
    word-break: break-all;
    font-size: 0.85rem;
}

footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

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

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