/* Trip G Consulting — design tokens
   Source of truth for ggdata.net. Matches the Nov 2026 business card.
   Fonts: add to <head>:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;600&display=swap" rel="stylesheet">
*/

:root {
  /* ---- Color: core palette ---- */
  --tg-cream:  #F7F5F0;   /* page ground (light) */
  --tg-navy:   #12202F;   /* ink, dark ground */
  --tg-red:    #D7263D;   /* brand accent — the GGG mark */
  --tg-slate:  #4A5563;   /* secondary text on cream (6.96:1) */
  --tg-mist:   #C9D1DB;   /* secondary text on navy (10.7:1) */
  --tg-white:  #FFFFFF;
  --tg-red-ink:      #B81E32; /* red for TEXT on cream, if ever needed (5.89:1) */
  --tg-red-on-dark:  #F05A6A; /* red for TEXT on navy, if ever needed (5.01:1) */

  /* ---- Color: semantic (light theme) ---- */
  --bg:            var(--tg-cream);
  --bg-inverse:    var(--tg-navy);
  --surface:       var(--tg-white);
  --text:          var(--tg-navy);
  --text-muted:    var(--tg-slate);
  --text-inverse:  var(--tg-cream);
  --text-inverse-muted: var(--tg-mist);
  --accent:        var(--tg-red);
  --rule:          var(--tg-navy);
  --rule-subtle:   rgba(18, 32, 47, 0.14);
  --focus:         var(--tg-red);

  /* ---- Type ---- */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --weight-regular: 400;
  --weight-medium:  500;  /* mono only */
  --weight-bold:    600;

  --text-xs:   0.75rem;   /* 12px — mono labels, fine print */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px — body */
  --text-lg:   1.25rem;   /* 20px — lead paragraph */
  --text-xl:   1.5rem;    /* 24px — h3 */
  --text-2xl:  2rem;      /* 32px — h2 */
  --text-3xl:  clamp(2.25rem, 5vw, 3.5rem); /* h1 / hero */

  --leading-tight: 1.1;
  --leading-snug:  1.3;
  --leading-body:  1.6;
  --tracking-tight: -0.02em;  /* headings */
  --tracking-label:  0.12em;  /* mono caps labels */

  /* ---- Space (4px base) ---- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 96px; --space-10: 128px;

  /* ---- Layout ---- */
  --container: 1120px;
  --container-narrow: 720px;
  --gutter: clamp(16px, 4vw, 32px);

  /* ---- Shape ---- */
  --radius: 0;            /* square corners everywhere */
  --border: 1px solid var(--rule);
  --border-subtle: 1px solid var(--rule-subtle);
}

/* Dark theme: navy ground, cream ink. Accent stays the same red. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--tg-navy);
    --bg-inverse: var(--tg-cream);
    --surface: #1A2B3D;
    --text: var(--tg-cream);
    --text-muted: var(--tg-mist);
    --text-inverse: var(--tg-navy);
    --text-inverse-muted: var(--tg-slate);
    --rule: var(--tg-cream);
    --rule-subtle: rgba(247, 245, 240, 0.16);
  }
}
:root[data-theme="dark"] {
  --bg: var(--tg-navy);
  --bg-inverse: var(--tg-cream);
  --surface: #1A2B3D;
  --text: var(--tg-cream);
  --text-muted: var(--tg-mist);
  --text-inverse: var(--tg-navy);
  --text-inverse-muted: var(--tg-slate);
  --rule: var(--tg-cream);
  --rule-subtle: rgba(247, 245, 240, 0.16);
}

/* ---- Base ---- */
html { background: var(--bg); color: var(--text); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); line-height: var(--leading-snug); }
p  { text-wrap: pretty; }
a  { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ---- Utilities / components ---- */

/* Mono caps label ("eyebrow") — used above section headings */
.tg-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Mono for contact details, emails, phone, URLs, small metadata */
.tg-mono { font-family: var(--font-mono); }

/* Buttons */
.tg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 0 var(--space-5);
  font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-bold);
  border-radius: var(--radius); border: var(--border);
  text-decoration: none; cursor: pointer;
  background: var(--text); color: var(--bg);
}
.tg-btn:hover { background: transparent; color: var(--text); }
.tg-btn--secondary { background: transparent; color: var(--text); }
.tg-btn--secondary:hover { background: var(--text); color: var(--bg); }

/* Card */
.tg-card {
  background: var(--surface);
  border: var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-6);
}

/* Inverse band (navy section, like the card back) */
.tg-inverse {
  background: var(--bg-inverse);
  color: var(--text-inverse);
}
.tg-inverse .tg-label { color: var(--text-inverse-muted); }

/* Section rhythm */
.tg-section { padding-block: var(--space-9); }
.tg-container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* Logo lockup: mark + wordmark */
.tg-logo { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--text); }
.tg-logo__mark { width: 27px; height: 15px; flex-shrink: 0; }
.tg-logo__word { font-weight: var(--weight-bold); font-size: var(--text-base); letter-spacing: -0.01em; }
