/* ── Gigi Frame shared styles ── */

/* Light defaults */
:root {
    --bg:          #f4efe6;
    --bg-grad-top: #ede6d9;
    --surface:     #fcf8f2;
    --surface-alt: #e8e1d4;
    --text:        #1e242c;
    --muted:       #576368;
    --border:      #8b8177;
    --border-soft: #d9d3c7;
    --accent:      #3c507e;
    --accent-rgb:  60, 80, 126;
    --accent-on:   #ffffff;
}

/* Dark values (reused by media query and forced dark) */
.dark-vars {
    --bg:          #15191f;
    --bg-grad-top: #1a1f27;
    --surface:     #1e242c;
    --surface-alt: #2a3138;
    --text:        #f2eee7;
    --muted:       #d3cec4;
    --border:      #7b7e82;
    --border-soft: #404b51;
    --accent:      #b5c0db;
    --accent-rgb:  181, 192, 219;
    --accent-on:   #202c47;
}

/* System dark */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {
        --bg:          #15191f;
        --bg-grad-top: #1a1f27;
        --surface:     #1e242c;
        --surface-alt: #2a3138;
        --text:        #f2eee7;
        --muted:       #d3cec4;
        --border:      #7b7e82;
        --border-soft: #404b51;
        --accent:      #b5c0db;
        --accent-rgb:  181, 192, 219;
        --accent-on:   #202c47;
        color-scheme: dark;
    }
}

/* Forced dark */
html[data-theme="dark"] {
    --bg:          #15191f;
    --bg-grad-top: #1a1f27;
    --surface:     #1e242c;
    --surface-alt: #2a3138;
    --text:        #f2eee7;
    --muted:       #d3cec4;
    --border:      #7b7e82;
    --border-soft: #404b51;
    --accent:      #b5c0db;
    --accent-rgb:  181, 192, 219;
    --accent-on:   #202c47;
    color-scheme: dark;
}

/* Forced light */
html[data-theme="light"] {
    color-scheme: light;
}

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

/* ── Base ── */
body {
    font-family: Georgia, "Times New Roman", serif;
    background:
        radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.07), transparent 40%),
        linear-gradient(180deg, var(--bg-grad-top) 0%, var(--bg) 100%);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
}

/* ── Layout ── */
main {
    max-width: 860px;
    margin: 0 auto;
    padding: 56px 20px 56px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ── Card ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.10);
}

/* ── Typography ── */
h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 12px;
    color: var(--text);
}

h2 {
    font-size: 1.3rem;
    line-height: 1.2;
    margin: 36px 0 12px;
    color: var(--accent);
}

h2:first-child {
    margin-top: 0;
}

p {
    font-size: 1rem;
    margin-bottom: 14px;
}

p:last-child {
    margin-bottom: 0;
}

ul {
    margin: 0 0 14px 20px;
    padding: 0;
}

li {
    font-size: 1rem;
    margin-bottom: 4px;
}

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

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 10px;
    font-family: Georgia, serif;
    font-size: 1rem;
    text-decoration: none;
    transition: opacity 0.15s;
}

.btn:hover {
    opacity: 0.82;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-on);
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.30);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}

/* ── Theme toggle ── */
#theme-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    color: var(--muted);
    font-family: Georgia, serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}

#theme-toggle svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: currentColor;
}

/* ── Footer ── */
footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.875rem;
    padding: 4px 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

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

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

.footer-apps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 0;
}

.footer-apps a {
    padding: 0 12px;
    border-right: 1px solid var(--border-soft);
    line-height: 1;
}

.footer-apps a:last-child {
    border-right: none;
}
