/* Design tokens: every value the theme settings can change lives here. */

:root {
    --font-heading: var(--gh-font-heading, "Noto Serif", Georgia, serif);
    --font-body: var(--gh-font-body, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);

    --text: #fff;
    --text-soft: rgba(255, 255, 255, 0.88);
    --ink: #111;

    --glass-fill: rgba(255, 255, 255, 0.14);
    --glass-fill-strong: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.28);
    --glass-blur: 18px;
    --glass-saturate: 140%;

    --optical-shift: 0.045em;

    --radius-card: 20px;
    --radius-pill: 999px;

    --column: 600px;
    --column-text: 680px;
    --column-wide: 1000px;

    --hl: #c9b8ff;
    --bg: linear-gradient(#0c0a24, #1b1240);
}

/* Background presets (used when no photo is uploaded) and their matching highlight */
.bg-dusk {
    --bg: linear-gradient(180deg, #1a5366 0%, #286f84 35%, #a8704a 75%, #c0652f 100%);
    --hl: #ffc58a;
}
.bg-nebula {
    --bg: radial-gradient(60% 50% at 25% 30%, #7b4dff 0%, transparent 60%),
        radial-gradient(50% 45% at 80% 70%, #ff5fa2 0%, transparent 60%),
        linear-gradient(#0c0a24, #1b1240);
    --hl: #c9b8ff;
}
.bg-aurora {
    --bg: radial-gradient(70% 40% at 30% 20%, #2ee6a6 0%, transparent 60%),
        radial-gradient(60% 40% at 75% 35%, #2b8cff 0%, transparent 60%),
        linear-gradient(#04121f, #0b2233 60%, #123a4a);
    --hl: #86f2cb;
}
.bg-grey {
    --bg: linear-gradient(180deg, #3a3f47 0%, #6f7780 50%, #a7a29a 100%);
    --hl: #cfe3ff;
}
.has-bg-image {
    --hl: #cfe3ff;
}
/* On photos the light frost gets a smoky base, so a bright photo can't wash out the text */
.has-bg-image.tint-light {
    --glass-fill: rgba(16, 16, 26, 0.25);
    --glass-fill-strong: rgba(16, 16, 26, 0.33);
}
.has-bg-image { --text-soft: rgba(255, 255, 255, 0.92); }
/* Brand accent mode: a light tint of the accent, so even a near-black accent
   stays visible on dark glass (citation pills, underlines, focus rings) */
.hl-accent {
    --hl: #cfe3ff;
    --hl: color-mix(in srgb, var(--ghost-accent-color, #cfe3ff) 40%, #fff);
}

/* Edge tone: the background fades into it at the top and bottom of the screen, and the
   page base colour matches it. iPhone Safari paints the bars behind the clock and the
   toolbar with the base colour, so they blend into the page instead of showing a seam. */
body { --edge: #0b0a1c; }
.bg-dusk { --edge: #111519; }
.bg-nebula { --edge: #0b0a1c; }
.bg-aurora { --edge: #030b12; }
.bg-grey { --edge: #25282d; }
.has-bg-image { --edge: #101116; }
html { background-color: #0b0a1c; }
html:has(.bg-dusk) { background-color: #111519; }
html:has(.bg-nebula) { background-color: #0b0a1c; }
html:has(.bg-aurora) { background-color: #030b12; }
html:has(.bg-grey) { background-color: #25282d; }
html:has(.has-bg-image) { background-color: #101116; }

/* Frost */
.tint-dark {
    --glass-fill: rgba(10, 10, 20, 0.35);
    --glass-fill-strong: rgba(10, 10, 20, 0.45);
    --glass-border: rgba(255, 255, 255, 0.16);
}
.blur-subtle { --glass-blur: 8px; }
.blur-medium { --glass-blur: 18px; }
.blur-strong { --glass-blur: 30px; }
