/* GradiForge — 3D dome page. Palette follows the existing site's style.css. */

:root {
    --bg:           #0d0f1a;
    --surface:      #1b1f33;
    --surface-2:    #232a44;
    --border:       #2f3760;
    --text:         #e2e8f0;
    --text-dim:     #a2abc4;
    --text-muted:   #6f7793;
    --blue:         #3b82f6;
    --blue-light:   #60a5fa;
    --purple:       #8b5cf6;
    --purple-light: #a78bfa;

    --pad:      22px;
    --gap:      9px;
    --radius:   8px;
    --radius-lg: 14px;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--purple-light); text-decoration: none; }
a:hover { color: #c4b5fd; }

.gf-root { position: fixed; inset: 0; }
dome-stage { position: absolute; inset: 0; display: block; }

.gf-scrim { position: absolute; left: 0; right: 0; pointer-events: none; }
.gf-scrim-top    { top: 0;    height: 150px; background: linear-gradient(to bottom, rgba(10,12,26,.62), rgba(10,12,26,0)); }
.gf-scrim-bottom { bottom: 0; height: 170px; background: linear-gradient(to top,    rgba(10,12,26,.62), rgba(10,12,26,0)); }

.gf-ui {
    position: absolute; inset: 0;
    pointer-events: none;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.gf-mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; }
.gf-dim  { color: var(--text-dim); }

/* — bars — */
.gf-bar {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; padding: 29px 34px;
}
.gf-bar-bottom { align-items: flex-end; }
.gf-hints { margin: 0; line-height: 1.7; }

.gf-brand { display: flex; align-items: center; gap: 10px; pointer-events: auto; }
.gf-brand img { display: block; }
.gf-brand-text { display: flex; flex-direction: column; gap: 4px; }

.gf-actions { display: flex; gap: 6px; pointer-events: auto; }

/* — buttons — */
.gf-btn {
    font: inherit; font-size: 11px; letter-spacing: .09em;
    font-family: var(--mono);
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 7px 11px;
    cursor: pointer;
}
.gf-btn-primary   { color: var(--purple-light); border-color: var(--purple); }
.gf-btn-primary:hover  { background: rgba(139,92,246,.14); }
.gf-btn-primary:active { background: rgba(139,92,246,.24); }
.gf-btn-secondary { border-color: var(--border); }
.gf-btn-secondary:hover { background: rgba(226,232,240,.07); }
.gf-btn-ghost     { color: var(--purple-light); padding-inline: 6px; }
.gf-btn-ghost:hover { background: rgba(139,92,246,.12); }
.gf-btn:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.gf-icon { width: 32px; height: 32px; padding: 0; }

/* — stage area — */
.gf-stage-area { position: relative; }

.gf-dots {
    position: absolute; left: 34px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 10px;
    pointer-events: auto;
}
.gf-dot {
    width: 16px; height: 16px; padding: 0;
    border: 0; background: none; cursor: pointer;
    display: grid; place-items: center;
}
.gf-dot i {
    width: 7px; height: 7px; border-radius: 50%;
    border: 1px solid var(--text-muted);
}
.gf-dot.is-on i {
    width: 15px; height: 15px;
    border-color: var(--purple);
    background: rgba(139,92,246,.4);
}
.gf-dot:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; border-radius: 50%; }

.gf-crosshair { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 18px; height: 18px; }
.gf-crosshair i { position: absolute; background: var(--purple-light); opacity: .85; }
.gf-crosshair i:nth-child(1) { left: 8px; top: 0;    width: 2px; height: 6px; }
.gf-crosshair i:nth-child(2) { left: 8px; bottom: 0; width: 2px; height: 6px; }
.gf-crosshair i:nth-child(3) { top: 8px; left: 0;    width: 6px; height: 2px; }
.gf-crosshair i:nth-child(4) { top: 8px; right: 0;   width: 6px; height: 2px; }

.gf-prompt {
    position: absolute; left: 50%; top: calc(50% + 22px); transform: translateX(-50%);
    color: #c4b5fd; background: rgba(13,15,26,.72);
    border: 1px solid rgba(139,92,246,.45); border-radius: 5px;
    padding: 4px 9px; white-space: nowrap;
}

/* — cards — */
.gf-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 12px;
    display: flex; flex-direction: column; gap: 7px;
}
.gf-title { font-size: 19px; font-weight: 500; margin: 0; line-height: 1.2; }
.gf-body  { font-size: 13.5px; line-height: 1.55; color: var(--text-dim); margin: 0; }
.gf-kicker { color: var(--purple-light); text-transform: uppercase; }
.gf-tag {
    font-size: 11px; padding: 3px 10px; border-radius: 6px;
    background: rgba(139,92,246,.22); color: #ddd6fe;
}

.gf-bay {
    position: absolute; right: 34px; bottom: 34px; width: 330px;
    pointer-events: auto;
    animation: gfRise .28s ease both;
}
.gf-bay-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gf-bay .gf-btn { align-self: flex-start; margin-top: 6px; }
.gf-bay.is-empty { background: transparent; border: 1px dashed var(--border); }

.gf-forge-cta {
    position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%);
    pointer-events: auto; animation: gfFade .3s ease both;
}
.gf-forge-cta .gf-btn { font-size: 12px; letter-spacing: .12em; }

/* — palette — */
.gf-palette { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: auto; }
.gf-palette-row { display: flex; gap: 6px; }
.gf-slot {
    width: 46px; height: 46px;
    display: grid; place-items: center; gap: 1px;
    font-family: var(--mono); font-size: 9.5px; line-height: 1.15;
    color: var(--purple-light);
    background: rgba(27,31,51,.6);
    border: 1px solid var(--border); border-radius: var(--radius);
    cursor: pointer;
}
.gf-slot:hover { background: rgba(139,92,246,.16); }
.gf-slot b { font-weight: 600; }

/* — modals — */
.gf-modal {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    background: rgba(8,10,22,.5);
    pointer-events: auto;
    animation: gfFade .22s ease both;
    padding: 18px;
}
.gf-letter { width: min(520px, 100%); gap: 10px; }
.gf-letter-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gf-letter-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.gf-error { color: #fca5a5; }
.gf-sent  { width: min(420px, 100%); text-align: center; align-items: center; padding: 26px 18px; }
.gf-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.gf-field { display: grid; gap: 4px; font-size: 12px; color: var(--text-dim); }
.gf-input {
    width: 100%; min-height: 38px; padding: 8px 10px;
    font: inherit; font-size: 14px;
    color: var(--text); caret-color: var(--purple);
    background: var(--surface-2);
    border: 1px solid var(--border); border-radius: var(--radius);
}
.gf-input:hover { border-color: #46507f; }
.gf-input:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; border-color: var(--purple); }
textarea.gf-input { resize: vertical; }

.gf-window { width: min(920px, 100%); height: min(600px, 88vh); gap: 9px; }
.gf-window-bar { display: flex; align-items: center; gap: 10px; }
.gf-lights { display: flex; gap: 5px; }
.gf-lights i { width: 9px; height: 9px; border-radius: 50%; background: var(--text-muted); }
.gf-url {
    flex: 1; padding: 5px 9px; color: var(--text-dim);
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gf-window-body {
    flex: 1; position: relative; overflow: hidden;
    background: #10141f;
    border: 1px solid var(--border); border-radius: var(--radius);
}
.gf-window-body iframe { width: 100%; height: 100%; border: 0; display: block; }
.gf-frame-note {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 6px;
    text-align: center; pointer-events: none;
    background: linear-gradient(to top, rgba(16,20,31,.92), transparent);
    color: var(--text-dim);
}
.gf-stub { display: grid; gap: 8px; place-content: center; text-align: center; height: 100%; padding: 26px; }

/* — sheet / fallback list — */
.gf-sheet {
    position: absolute; inset: 0; background: rgba(8,10,22,.75);
    display: grid; align-items: end; pointer-events: auto;
    animation: gfFade .22s ease both;
}
.gf-sheet-card { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 82vh; overflow: auto; gap: 10px; }
.gf-sheet-list { display: grid; gap: 9px; }
.gf-sheet-item { display: grid; gap: 5px; padding: 12px; background: var(--surface-2); border-radius: var(--radius); }
.gf-sheet-item .gf-tag { justify-self: start; }

.gf-fallback { position: absolute; inset: 0; overflow: auto; background: var(--bg); padding: 44px 34px; pointer-events: auto; }
.gf-fallback-inner { max-width: 760px; margin: 0 auto; display: grid; gap: 20px; }

/* — splash / flash — */
.gf-splash {
    position: absolute; inset: 0; background: var(--bg);
    display: grid; place-content: center; justify-items: center; gap: 12px;
    pointer-events: auto;
}
[hidden] { display: none !important; }
.gf-splash-bar { width: 120px; height: 2px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.gf-splash-bar i { display: block; width: 44px; height: 2px; background: var(--purple); animation: gfPulse 1.1s ease-in-out infinite; }

.gf-flash {
    position: absolute; inset: 0; background: rgba(255,255,255,.93);
    display: grid; place-items: center; pointer-events: auto;
    animation: gfFade .18s ease both;
}
.gf-flash span { color: #2a2f4a; letter-spacing: .16em; }

.gf-noscript { padding: 40px; color: var(--text); }

@keyframes gfFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gfRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes gfPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

@media (max-width: 760px) {
    .gf-bar { padding: 18px 16px; }
    .gf-dots { left: 16px; }
    .gf-bay { right: 16px; bottom: 16px; left: 16px; width: auto; }
    .gf-palette { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .gf-bay, .gf-modal, .gf-sheet, .gf-flash, .gf-forge-cta { animation: none; }
}
