/* shiftee design tokens. Source of truth for colour, type, shape and motion.
   Light is the default. Dark applies from the OS setting, or from data-theme="dark" on <html>.
   See BRAND.md for the rules on how these may be combined. */

:root {
  color-scheme: light;

  /* Neutrals: cool green-grey, never cream */
  --sh-bg: #F4F7F6;            /* page */
  --sh-surface: #FFFFFF;       /* cards, sheets */
  --sh-sunk: #E9EEEC;          /* wells, inactive fills */
  --sh-border: #D3DBD8;        /* hairlines */
  --sh-border-strong: #8A9794; /* input outlines, 3:1 on surface */
  --sh-ink: #10201E;           /* primary text */
  --sh-muted: #52625F;         /* secondary text */

  /* Brand */
  --sh-teal: #0B7A75;          /* the only interactive colour */
  --sh-teal-hover: #0A5560;
  --sh-on-teal: #FFFFFF;
  --sh-citron: #D4F24A;        /* the callout. Same value in both themes */
  --sh-citron-soft: #EAF99A;
  --sh-citron-edge: #7E9612;   /* 1px edge when citron sits on a light surface */
  --sh-citron-text: #5F7300;   /* if a citron-family text colour is unavoidable on light */
  --sh-on-citron: #10201E;     /* always ink, in both themes */
  --sh-carrier: #10201E;       /* the dark track citron lines and motion run inside */

  /* Data colours: fills and strokes in charts and status, not body text */
  --sh-solar: #E9A800;
  --sh-grid: #5E6B7D;
  --sh-peak: #D64045;
  --sh-peak-text: #B3262B;
  --sh-success: #1F7A4D;

  /* Gradients: two close stops, one hue. At most one gradient surface per view */
  --sh-gradient-hero: linear-gradient(135deg, #0B7A75 0%, #0A5560 100%);
  --sh-gradient-citron: linear-gradient(180deg, #EAF99A 0%, #D4F24A 100%);
  --sh-on-hero: #FFFFFF;
  --sh-on-hero-muted: #C9ECE8;

  /* Logo */
  --sh-logo-slot: #10201E;
  --sh-logo-letter: #F4F7F6;

  /* Type */
  --sh-font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --sh-font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sh-font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sh-text-xs: 0.75rem;
  --sh-text-sm: 0.875rem;
  --sh-text-md: 1rem;
  --sh-text-lg: 1.25rem;
  --sh-text-xl: 1.75rem;
  --sh-text-2xl: 2.75rem;
  --sh-tracking-display: -0.025em;

  /* Shape */
  --sh-radius-sm: 6px;
  --sh-radius-md: 10px;   /* controls */
  --sh-radius-lg: 14px;   /* cards */
  --sh-radius-pill: 999px;
  --sh-slot-ratio: 72 / 92;  /* the logo tile, reusable as a shape */

  /* Motion */
  --sh-ease: cubic-bezier(0.3, 0, 0.2, 1);
  --sh-dur-fast: 120ms;
  --sh-dur-base: 240ms;
  --sh-dur-slow: 480ms;
  --sh-dur-flow: 1600ms;    /* one cycle of travelling dashes */
  --sh-dur-breathe: 2800ms; /* one cycle of a pulsing active element */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --sh-bg: #0C1514;
    --sh-surface: #14201F;
    --sh-sunk: #22312F;
    --sh-border: #2A3B39;
    --sh-border-strong: #5C706C;
    --sh-ink: #E8EFED;
    --sh-muted: #9DB0AC;
    --sh-teal: #3CC9BC;
    --sh-teal-hover: #6FDBD0;
    --sh-on-teal: #0C1514;
    --sh-citron-edge: transparent;
    --sh-citron-text: #D4F24A;
    --sh-carrier: #2A3B39;
    --sh-solar: #FFC94A;
    --sh-grid: #8FA0B5;
    --sh-peak: #FF6B6B;
    --sh-peak-text: #FF6B6B;
    --sh-success: #5FD39A;
    --sh-gradient-hero: linear-gradient(135deg, #17403C 0%, #14201F 70%);
    --sh-on-hero: #E8EFED;
    --sh-on-hero-muted: #9DB0AC;
    --sh-logo-slot: #22312F;
    --sh-logo-letter: #E8EFED;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --sh-bg: #0C1514;
  --sh-surface: #14201F;
  --sh-sunk: #22312F;
  --sh-border: #2A3B39;
  --sh-border-strong: #5C706C;
  --sh-ink: #E8EFED;
  --sh-muted: #9DB0AC;
  --sh-teal: #3CC9BC;
  --sh-teal-hover: #6FDBD0;
  --sh-on-teal: #0C1514;
  --sh-citron-edge: transparent;
  --sh-citron-text: #D4F24A;
  --sh-carrier: #2A3B39;
  --sh-solar: #FFC94A;
  --sh-grid: #8FA0B5;
  --sh-peak: #FF6B6B;
  --sh-peak-text: #FF6B6B;
  --sh-success: #5FD39A;
  --sh-gradient-hero: linear-gradient(135deg, #17403C 0%, #14201F 70%);
  --sh-on-hero: #E8EFED;
  --sh-on-hero-muted: #9DB0AC;
  --sh-logo-slot: #22312F;
  --sh-logo-letter: #E8EFED;
}

/* Motion primitives. Use only where something is actually moving or in progress. */
@keyframes sh-flow { to { stroke-dashoffset: -20; } }
@keyframes sh-breathe { 0%, 100% { opacity: 0.72; } 50% { opacity: 1; } }
@keyframes sh-hop { 0%, 34%, 100% { transform: translateY(0); } 17% { transform: translateY(-10px); } }

.sh-flow { stroke-dasharray: 3 7; stroke-linecap: round; animation: sh-flow var(--sh-dur-flow) linear infinite; }
.sh-breathe { animation: sh-breathe var(--sh-dur-breathe) ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .sh-flow, .sh-breathe { animation: none; }
}
