/* =====================================================================
   AlphaGraphics Shavano Park — Foundations
   Colors + Typography
   ===================================================================== */

@font-face {
  font-family: "Roboto";
  src: url("./fonts/Roboto-VariableFont_wdth,wght.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("./fonts/Roboto-Italic-VariableFont_wdth,wght.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Slab";
  src: url("./fonts/RobotoSlab-VariableFont_wght.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- BRAND COLOR ATOMS ----------
     Official codes per AlphaGraphics Brand Guidelines (V1, Feb 2021).
     Primary equity color is AG Red. Shades of AG Red and tints of AG Gray
     are permitted to add dimension. ====================================== */
  --ag-red:        #DA291C;   /* AG RED — Pantone 485C — primary brand red */
  --ag-red-deep:   #B11F14;   /* AG Red shade — hover / pressed */
  --ag-red-bright: #FF4F4B;   /* non-brand tint, retained for legacy only — avoid */

  /* AG Red shades — "shades of AG Red are permitted" (darker, toward black) */
  --ag-red-80:     color-mix(in srgb, var(--ag-red) 80%, #000);
  --ag-red-60:     color-mix(in srgb, var(--ag-red) 60%, #000);
  --ag-red-40:     color-mix(in srgb, var(--ag-red) 40%, #000);
  --ag-red-20:     color-mix(in srgb, var(--ag-red) 20%, #000);

  --ag-rich-black: #000000;   /* RICH BLACK — logo, slogan & text >12pt (CMYK 50/50/50/100) */
  --ag-black:      #010203;   /* near-black, digital body text & authority surfaces */
  --ag-ink:        #1A1A1C;   /* slightly softer body color */
  --ag-white:      #FFFFFF;
  --ag-paper:      #F7F7F7;   /* subtle off-white sections */

  /* AG GRAY — Pantone Cool Gray 9C — the single official neutral */
  --ag-gray-900:   #2B2D2F;
  --ag-gray-700:   #4A4D50;
  --ag-gray-500:   #75787B;   /* AG GRAY base */
  --ag-gray-300:   #BFC1C3;
  --ag-gray-200:   #DDDEE0;
  --ag-gray-100:   #EEEFF0;
  /* AG Gray light tints — "5% AG Gray" is the canonical soft section background */
  --ag-gray-tint-20: color-mix(in srgb, var(--ag-gray-500) 20%, #fff);
  --ag-gray-tint-15: color-mix(in srgb, var(--ag-gray-500) 15%, #fff);
  --ag-gray-tint-10: color-mix(in srgb, var(--ag-gray-500) 10%, #fff);
  --ag-gray-tint-5:  color-mix(in srgb, var(--ag-gray-500)  5%, #fff);

  /* ---------- SECONDARY PALETTE — SERVICE-PILLAR COLORS ----------
     Each secondary color maps to one service pillar. Use SPARINGLY:
     under 25% of any one piece; never the predominant color. ============= */
  --ag-yellow:     #F8AA1D;   /* AG YELLOW — Pantone 7408C — PRINT */
  --ag-green:      #569197;   /* AG GREEN  — Pantone 5483C — MARKETING */
  --ag-blue:       #406184;   /* AG BLUE   — Pantone 647C  — SIGNS */
  --ag-maroon:     #942522;   /* AG MAROON — Pantone 484C  — TECHNOLOGY */

  /* Legacy aliases (pre-guidelines names) — prefer the official names above */
  --ag-amber:      var(--ag-yellow);
  --ag-teal:       var(--ag-green);
  --ag-navy:       var(--ag-blue);

  /* ---------- SEMANTIC TOKENS ---------- */
  --color-bg:           var(--ag-white);
  --color-bg-alt:       var(--ag-paper);
  --color-bg-inverse:   var(--ag-black);

  --color-fg:           var(--ag-ink);
  --color-fg-muted:     var(--ag-gray-500);
  --color-fg-subtle:    var(--ag-gray-700);
  --color-fg-inverse:   var(--ag-white);

  --color-brand:        var(--ag-red);
  --color-brand-hover:  var(--ag-red-deep);
  --color-link:         var(--ag-red);
  --color-link-hover:   var(--ag-red-deep);

  --color-border:       var(--ag-gray-200);
  --color-border-strong:var(--ag-gray-300);
  --color-divider:      var(--ag-gray-100);

  /* Service-pillar semantic tokens — use for pillar-specific callouts/icons */
  --color-pillar-print:      var(--ag-yellow);
  --color-pillar-marketing:  var(--ag-green);
  --color-pillar-signs:      var(--ag-blue);
  --color-pillar-technology: var(--ag-maroon);

  /* Legacy accent aliases — map onto official pillar colors */
  --color-accent-teal:  var(--ag-green);
  --color-accent-amber: var(--ag-yellow);
  --color-accent-navy:  var(--ag-blue);
  --color-accent-coral: var(--ag-red-bright);

  /* ---------- TYPE STACKS ---------- */
  --font-display: "Roboto Slab", Georgia, "Times New Roman", serif;
  --font-body:    "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* ---------- TYPE SCALE (modular, 1.250 major third) ---------- */
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-30: 1.875rem;
  --fs-36: 2.25rem;
  --fs-48: 3rem;
  --fs-60: 3.75rem;
  --fs-72: 4.5rem;
  --fs-96: 6rem;

  --lh-tight:  1.05;   /* @kind font */
  --lh-snug:   1.2;    /* @kind font */
  --lh-normal: 1.4;    /* @kind font */
  --lh-relaxed:1.6;    /* @kind font */

  --tracking-tight:  -0.02em;  /* @kind font */
  --tracking-snug:   -0.01em;  /* @kind font */
  --tracking-normal: 0em;      /* @kind font */
  --tracking-wide:   0.04em;   /* @kind font */
  --tracking-eyebrow:0.14em;   /* @kind font */

  --fw-light:    300;  /* @kind font */
  --fw-regular:  400;  /* @kind font */
  --fw-medium:   500;  /* @kind font */
  --fw-semibold: 600;  /* @kind font */
  --fw-bold:     700;  /* @kind font */
  --fw-black:    900;  /* @kind font */

  /* ---------- SPACING (4px base) ---------- */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
  --s-32: 128px;

  /* ---------- RADII ---------- */
  --radius-none: 0;
  --radius-sm:   2px;
  --radius-md:   4px;     /* default — corners are kept tight, corporate */
  --radius-lg:   6px;
  --radius-pill: 999px;

  /* ---------- ELEVATION ---------- */
  --shadow-xs: 0 1px 2px rgba(1, 2, 3, 0.06);
  --shadow-sm: 0 2px 6px rgba(1, 2, 3, 0.08);
  --shadow-md: 0 6px 16px rgba(1, 2, 3, 0.10);
  --shadow-lg: 0 18px 40px rgba(1, 2, 3, 0.14);
  --shadow-inset: inset 0 0 0 1px rgba(1, 2, 3, 0.06);

  /* ---------- MOTION ---------- */
  --ease-standard: cubic-bezier(0.2, 0.0, 0.0, 1.0);  /* @kind other */
  --ease-out:      cubic-bezier(0.0, 0.0, 0.2, 1.0);  /* @kind other */
  --ease-in-out:   cubic-bezier(0.4, 0.0, 0.2, 1.0);  /* @kind other */
  --dur-fast:   120ms;  /* @kind other */
  --dur-base:   200ms;  /* @kind other */
  --dur-slow:   360ms;  /* @kind other */

  /* ---------- LAYOUT ---------- */
  --container-max: 1280px;    /* @kind spacing */
  --container-gutter: 24px;   /* @kind spacing */
}

/* =====================================================================
   SEMANTIC TYPE CLASSES
   ===================================================================== */

html { color: var(--color-fg); background: var(--color-bg); }
body {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);           /* body copy is Roboto Regular (per brand text hierarchy) */
  font-size: var(--fs-16);
  line-height: var(--lh-relaxed);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  font-size: var(--fs-12);
  color: var(--color-brand);
}

.h-display, h1.display {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: clamp(var(--fs-48), 6vw, var(--fs-96));
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-brand);
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-60);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-brand);
  margin: 0 0 var(--s-6);
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-36);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
  color: var(--ag-black);
  margin: 0 0 var(--s-4);
}

h3, .h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-24);
  line-height: var(--lh-snug);
  color: var(--ag-black);
  margin: 0 0 var(--s-3);
}

h4, .h4 {
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-size: var(--fs-18);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-normal);
  color: var(--ag-black);
  text-transform: uppercase;
}

p, .body {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-16);
  line-height: var(--lh-relaxed);
  color: var(--color-fg);
}

.body-lg {
  font-size: var(--fs-18);
  line-height: var(--lh-relaxed);
}

.body-sm {
  font-size: var(--fs-14);
  line-height: var(--lh-normal);
}

.caption {
  font-family: var(--font-body);
  font-size: var(--fs-12);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-fg-muted);
  font-weight: var(--fw-medium);
}

a, .link {
  color: var(--color-link);
  text-decoration: none;
  font-weight: var(--fw-regular);
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard);
}
a:hover {
  color: var(--color-link-hover);
  border-bottom-color: currentColor;
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--ag-gray-100);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
}
