/* ============================================================
   GigaGym design tokens — dark-first "precision instrument".
   Source of truth: GigaGymDesign/design_handoff_gigagym/README.md
   Rules: Archivo 400/800 only, border-radius 0 everywhere,
   elevation = surface step + rule (never a glow), tabular numerals.
   ============================================================ */

:root {
    /* ---- Color — dark theme (the product theme) ---- */
    --gg-ground: #0d0c0c;          /* screen background, bottom bar, nav */
    --gg-surface: #171615;         /* cards, sheets, panels */
    --gg-row: #201e1d;             /* active set row, cells inside a card */
    --gg-divider: #3a3735;         /* 2px section rules, 1px row rules, control borders */
    --gg-dim: #605d5d;             /* labels, pending values, disabled */
    --gg-muted: #9b9797;           /* secondary copy */
    --gg-ink: #f3f2f2;             /* primary text and numerals */
    --gg-accent: #ff563c;          /* primary action, active state, live set, PR */
    --gg-accent-pressed: #dd2b0f;  /* pressed state of accent fills */
    --gg-drag: #2a2726;            /* element being dragged */

    /* ---- Semantic ---- */
    --gg-good: #6fbf9f;            /* target met, completed indices, adherence */
    --gg-on-accent: #0d0c0c;       /* ink on accent fills */

    /* ---- Light theme (marketing / print, from Modernist) ---- */
    --gg-light-bg: #f3f2f2;
    --gg-light-surface: #eae9e9;
    --gg-light-text: #201e1d;
    --gg-light-accent: #ec3013;
    --gg-light-divider: rgba(32, 30, 29, .4);

    /* ---- Typography ---- */
    --gg-font: "Archivo", "Archivo Fallback", "Segoe UI", system-ui, sans-serif;

    /* ---- Spacing — 4pt base ---- */
    --gg-s1: 4px;    /* inside a value pair */
    --gg-s2: 8px;    /* between chips/buttons */
    --gg-s3: 12px;   /* row padding */
    --gg-s4: 16px;   /* screen gutter */
    --gg-s6: 24px;   /* between exercise blocks */
    --gg-s8: 32px;   /* section break */

    /* ---- Touch targets ---- */
    --gg-tap-chip: 40px;      /* chips, non-critical taps only */
    --gg-tap-min: 48px;       /* absolute minimum interactive */
    --gg-tap-set: 64px;       /* anything used during a set */
    --gg-tap-primary: 76px;   /* bottom-bar primary, stepper keys */

    /* ---- Elevation (dark = surface step + rule, never glow) ---- */
    --gg-shadow-l2: 0 12px 32px rgba(0, 0, 0, .6);
    --gg-shadow-drag: 0 14px 34px rgba(0, 0, 0, .7);
    --gg-scrim: rgba(13, 12, 12, .72);
    --gg-drop-fill: rgba(255, 86, 60, .07);

    /* ---- Safe areas ----
       The hosts ship viewport-fit=cover, so anything pinned to a screen edge has to
       clear the notch, the home indicator and Android gesture nav itself. Zero on the
       web, real values inside the WebView. Named as tokens so every pinned element
       reads the same source instead of repeating env() by hand. */
    --gg-safe-top: env(safe-area-inset-top, 0px);
    --gg-safe-bottom: env(safe-area-inset-bottom, 0px);
    --gg-safe-left: env(safe-area-inset-left, 0px);
    --gg-safe-right: env(safe-area-inset-right, 0px);
}

/* ---- Archivo, self-hosted variable font (offline requirement — never a CDN) ---- */
@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/archivo-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   Type scale utilities (values from the handoff type table)
   ============================================================ */

.gg-kicker {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gg-dim);
}

.gg-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gg-dim);
}

.gg-value,
.gg-value-xl, .gg-value-l, .gg-value-m, .gg-value-s,
.gg-metric-display, .gg-rest-timer {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--gg-ink);
}

.gg-metric-display { font-size: 64px; letter-spacing: -.03em; }
.gg-rest-timer     { font-size: 92px; letter-spacing: -.04em; line-height: .9; }
.gg-value-xl       { font-size: 34px; }
.gg-value-l        { font-size: 28px; }
.gg-value-m        { font-size: 24px; }
.gg-value-s        { font-size: 19px; }

.gg-unit {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gg-dim);
}

.gg-body {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gg-muted);
}
