/* oui.onl branding — Inter, white canvas, corail gradient (#e59550 → #d74d43). */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/fonts/inter-latin.woff2') format('woff2');
}

:root {
    --bg: #f3f3f5;
    --card: #ffffff;
    --ink: #030213;
    --body: #1a1a1a;
    --muted: #717182;
    --border: #e6e6e6;
    --accent: #dd7049;
    --accent-light: #e59550;
    --accent-deep: #d74d43;
    /* Exact oui.onl brand gradient (3 stops). */
    --grad: linear-gradient(135deg, #e59550, #dd7049, #d74d43);
    --ok: #1f8f5f;
    --error: #d74d43;
    --radius: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--body);
    background:
        radial-gradient(900px 500px at 50% -120px, rgba(229, 149, 80, .12), transparent),
        var(--bg);
}

.card {
    width: 100%;
    max-width: 1000px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 40px;
    box-shadow: 0 18px 48px rgba(3, 2, 19, .08);
}
/* The viewer holds little content — keep it tasteful rather than stretched. */
.card.narrow { max-width: 600px; }

/* Logo pinned to the top-left of the viewport, like the oui.onl navbar brand. */
.brand {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 10;
}
.brand img { height: 48px; width: auto; display: block; }

h1 {
    margin: 0 0 8px;
    font-size: clamp(2.1rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.08;
    /* Corail gradient text — matches oui.onl .gradient-text */
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--accent-deep); /* fallback for non-supporting browsers */
}
.lede { color: var(--muted); margin: 0 0 22px; }
.muted { color: var(--muted); font-weight: 400; }

label { display: block; font-weight: 600; margin: 16px 0 6px; color: var(--ink); }

textarea, input[type="text"], input[type="password"], input[type="email"], select {
    width: 100%;
    padding: 12px 14px;
    color: var(--body);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
textarea:focus, input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(221, 112, 73, .15);
}

.row { display: flex; gap: 14px; }
.row .field { flex: 1; }

/* Two-column form layout. Each column groups related fields; the submit and
   error span the full width. Collapses to one column on narrow screens. */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
    align-items: start;
}
.form-grid .col { display: flex; flex-direction: column; }
.form-grid .full { grid-column: 1 / -1; }
/* Don't let the first label in a column add extra top margin. */
.form-grid .col > label:first-child { margin-top: 0; }
.form-grid #secret { flex: 1 1 auto; min-height: 220px; }

@media (max-width: 760px) {
    .form-grid { grid-template-columns: 1fr; column-gap: 0; }
    .card { padding: 28px 22px; }
}

button {
    margin-top: 18px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: var(--grad);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(215, 77, 67, .25);
    transition: filter .15s, transform .05s;
}
button:hover { filter: brightness(1.05); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .6; cursor: progress; box-shadow: none; }

button.secondary {
    background: #fff;
    color: var(--accent-deep);
    border: 1px solid var(--border);
    box-shadow: none;
}

.link-row { display: flex; gap: 10px; }
.link-row input { font-family: ui-monospace, monospace; }
.link-row button { margin-top: 0; white-space: nowrap; }

.result { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.warn {
    color: #8a4a1e;
    background: rgba(229, 149, 80, .12);
    border: 1px solid rgba(229, 149, 80, .3);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: .88rem;
}
.warn code { background: #fff; padding: 1px 5px; border-radius: 4px; }

.error { color: var(--error); margin-top: 16px; font-weight: 600; }
.ok { color: var(--ok); margin-top: 16px; font-weight: 600; }

.footer {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: .8rem;
    color: var(--muted);
    text-align: center;
}
.footer a { color: var(--accent-deep); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.hidden { display: none; }
code { font-family: ui-monospace, monospace; }
