/* Guest pages: shared design tokens.
   Loaded once from index.php's <head>, before each view's own <style>, so a
   view can use these and still override a rule for itself.

   Colour: one neutral family (the deep-water ink below), one accent
   (--brand, the Primary Color from Admin -> Settings, see
   requires/brand-colors.php) and one sparing secondary (--g-sand), used
   for a marker or a highlight, never for a fill or a button.

   Type: Fraunces for headings, Instrument Sans for everything else. Sizes
   step on a 1.25 scale; weights carry hierarchy (600 headings, 500 labels,
   400 body) rather than everything being extra-bold.

   Radius, shadow and motion each have one scale. Cards are flat and
   bordered; a shadow means "this floats over something" (menus, dialogs),
   not decoration. */

:root {
    --g-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --g-font-body: 'Instrument Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

    --g-fs-xs: 0.75rem;    /* 12 */
    --g-fs-sm: 0.875rem;   /* 14 */
    --g-fs-base: 1rem;     /* 16 */
    --g-fs-md: 1.125rem;   /* 18 */
    --g-fs-lg: 1.375rem;   /* 22 */
    --g-fs-xl: 1.75rem;    /* 28 */
    --g-fs-2xl: 2.25rem;   /* 36 */
    --g-fs-3xl: 3rem;      /* 48 */

    /* 4px grid */
    --g-1: 4px;  --g-2: 8px;  --g-3: 12px; --g-4: 16px;
    --g-5: 20px; --g-6: 24px; --g-8: 32px; --g-10: 40px;
    --g-12: 48px; --g-16: 64px; --g-24: 96px;

    --g-r-sm: 6px;   /* inputs, chips, small buttons */
    --g-r: 8px;      /* buttons, alerts */
    --g-r-lg: 12px;  /* cards, dialogs */

    --g-shadow-1: 0 1px 2px rgba(2, 6, 23, 0.24);
    --g-shadow-2: 0 12px 32px rgba(2, 6, 23, 0.40);

    --g-t: 160ms cubic-bezier(.2, 0, 0, 1);

    /* Neutrals: one family, from the ground up. */
    --g-ink-950: #050b14;
    --g-ink-900: #0b1522;
    --g-ink-800: #142131;
    --g-ink-700: #22324a;
    --g-ink-500: #5d6f86;
    --g-ink-400: #8b9bb0;
    --g-ink-200: #cdd6e1;
    --g-ink-50:  #f3f6f9;

    /* Sparing secondary: dry sand. */
    --g-sand: #d9b77e;
}

[data-theme="light"] {
    --g-shadow-1: 0 1px 2px rgba(11, 21, 34, 0.08);
    --g-shadow-2: 0 12px 32px rgba(11, 21, 34, 0.14);
    --g-sand: #9a6a1e;
}

body {
    font-family: var(--g-font-body);
    font-size: var(--g-fs-base);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "ss01";
}

h1, h2,
.brand-lockup__name {
    font-family: var(--g-font-display);
    font-optical-sizing: auto;
    font-weight: 600;
    letter-spacing: -0.015em;
}
h3, h4, h5, h6 { font-family: var(--g-font-body); font-weight: 600; letter-spacing: -0.005em; }

/* Figures that get compared line up. */
table, .tabular, time { font-variant-numeric: tabular-nums; }

/* Disabled controls look disabled, not merely faded. */
button:disabled, .btn:disabled, .btn.disabled { cursor: not-allowed; }

/* Loading placeholder for anything filled in by fetch(). */
.g-skeleton {
    display: block;
    border-radius: var(--g-r-sm);
    background: rgba(139, 155, 176, 0.14);
    min-height: 1em;
    position: relative;
    overflow: hidden;
}
.g-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(139, 155, 176, 0.14), transparent);
    transform: translateX(-100%);
    animation: g-shimmer 1.2s infinite;
}
@keyframes g-shimmer { to { transform: translateX(100%); } }
