/*
 * Gillette Generators design system — foundation.
 *
 * Source: "Gillette Generators Design System_Final.pdf" (Brand Guidelines v1.0).
 * How to apply it across the templates: docs/design-system.md.
 *
 * This sheet is loaded after style.css and before custom.css. It holds the
 * tokens, the base type, and the shared components. Templates and plugin
 * overrides should reference the tokens, never a raw hex value.
 */

/* ── 1. Tokens ─────────────────────────────────────────────────────────── */

:root {
  /* Colour — brand (guide p.4). Red is punctuation, never a large fill. */
  --gg-red:        #C8102E;   /* brand red: sine wave, CTAs, eyebrows, accents */
  --gg-red-dark:   #9E0C24;   /* hover state of anything red */
  --gg-black:      #111111;   /* near-black backgrounds, headings */
  --gg-ink:        #1A1A1A;   /* body text */
  --gg-charcoal:   #2B2B2B;
  --gg-steel:      #5A5F66;   /* secondary text, icons */
  --gg-silver:     #C8CCD0;   /* borders, dividers that are not the red rule */
  --gg-mist:       #F4F5F6;   /* subtle panels, table stripes */
  --gg-white:      #FFFFFF;   /* page */

  /* Colour — status (guide p.4). Only for state, never decoration. */
  --gg-running:    #2E7D32;
  --gg-maint:      #E08600;
  --gg-fault:      #C8102E;

  /* Type (guide p.5). Free fonts named by the guide as the production set. */
  --gg-font-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --gg-font-body:    "Barlow", Helvetica, Arial, sans-serif;
  --gg-font-mono:    "JetBrains Mono", Consolas, Menlo, monospace;
  --gg-tracking-display: 0.03em;

  /* Spacing — 4px base (guide p.6). */
  --gg-space-1: 4px;
  --gg-space-2: 8px;
  --gg-space-3: 12px;
  --gg-space-4: 16px;
  --gg-space-6: 24px;
  --gg-space-8: 32px;
  --gg-space-12: 48px;

  /* Corner radii — sharp by default (guide p.6). */
  --gg-radius-panel:  0;
  --gg-radius-input:  2px;
  --gg-radius-button: 4px;
  --gg-radius-pill:   999px;   /* status badges only */

  /* Elevation (guide p.6). */
  --gg-shadow-1: 0 1px 2px rgba(17, 17, 17, 0.12);                               /* cards */
  --gg-shadow-2: 0 4px 12px rgba(17, 17, 17, 0.16);                              /* hover */
  --gg-shadow-3: 0 12px 32px rgba(17, 17, 17, 0.24), 0 2px 6px rgba(17, 17, 17, 0.12); /* modal */

  /* Motion (guide p.6): cross-fades only, 320ms, ease(.2,0,.2,1). */
  --gg-motion: 320ms cubic-bezier(0.2, 0, 0.2, 1);

  /* The divider (guide p.6): a straight 2px red rule between sections. */
  --gg-rule: 2px solid var(--gg-red);
}

/* ── 2. Base type ──────────────────────────────────────────────────────── */

body {
  font-family: var(--gg-font-body);
  color: var(--gg-ink);
  background: var(--gg-white);   /* flat white page; no photo behind content */
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--gg-font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--gg-tracking-display);
  line-height: 1.15;
  color: var(--gg-black);
}

h1 { font-size: 2.5rem; }    /* ~40px display / tagline size */
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }
h5, h6 { font-size: 0.875rem; }

/* Eyebrow: the small red line above a headline ("WELCOME TO GILLETTE GENERATORS"). */
.gg-eyebrow {
  font-family: var(--gg-font-display);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gg-red);
}

/* Specs and model numbers. */
.gg-mono, code.gg-spec {
  font-family: var(--gg-font-mono);
  font-weight: 500;
  font-size: 0.9375rem;
}

/* ── 3. Components ─────────────────────────────────────────────────────── */

/* The divider. Use it on a section boundary, never the sine wave. */
.gg-rule,
hr.gg-rule {
  border: 0;
  border-top: var(--gg-rule);
  margin: var(--gg-space-8) 0;
}

/* Buttons. Primary fills red and darkens on hover; outline fills solid on
   hover. No scale, no squish, no shadow jump. */
.gg-btn {
  display: inline-block;
  font-family: var(--gg-font-display);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none !important;
  line-height: 1;
  padding: var(--gg-space-3) var(--gg-space-6);
  border: 2px solid var(--gg-red);
  border-radius: var(--gg-radius-button);
  cursor: pointer;
  transition: background-color var(--gg-motion), color var(--gg-motion), border-color var(--gg-motion);
}
.gg-btn--primary {
  background: var(--gg-red);
  color: var(--gg-white) !important;
}
.gg-btn--primary:hover,
.gg-btn--primary:focus-visible {
  background: var(--gg-red-dark);
  border-color: var(--gg-red-dark);
  color: var(--gg-white) !important;
}
.gg-btn--outline {
  background: transparent;
  color: var(--gg-red) !important;
}
.gg-btn--outline:hover,
.gg-btn--outline:focus-visible {
  background: var(--gg-red);
  color: var(--gg-white) !important;
}
.gg-btn--on-black {               /* outline variant for pure-black surfaces */
  border-color: var(--gg-white);
  color: var(--gg-white) !important;
}
.gg-btn--on-black:hover {
  background: var(--gg-white);
  color: var(--gg-black) !important;
}

/* Status badge: the only pill in the system. */
.gg-status {
  display: inline-block;
  font-family: var(--gg-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px var(--gg-space-2);
  border-radius: var(--gg-radius-pill);
  color: var(--gg-white);
  background: var(--gg-steel);
}
.gg-status--running { background: var(--gg-running); }
.gg-status--maint   { background: var(--gg-maint); }
.gg-status--fault   { background: var(--gg-fault); }

/* Card / panel: sharp corners, elevation 1, elevation 2 on hover. */
.gg-card {
  background: var(--gg-white);
  border: 1px solid var(--gg-silver);
  border-radius: var(--gg-radius-panel);
  box-shadow: var(--gg-shadow-1);
  transition: box-shadow var(--gg-motion);
}
.gg-card:hover { box-shadow: var(--gg-shadow-2); }

/* Inputs. */
.gg-input,
.woocommerce .input-text,
.woocommerce select {
  border: 1px solid var(--gg-silver);
  border-radius: var(--gg-radius-input);
  font-family: var(--gg-font-body);
  color: var(--gg-ink);
}

/* Photo overlay: text sits on a black bottom-up protection gradient only. */
.gg-photo-overlay {
  position: relative;
}
.gg-photo-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 60%);
  pointer-events: none;
}
.gg-photo-overlay > * { position: relative; z-index: 1; }

/* ── 4. Existing theme classes mapped onto the system ──────────────────── */

/* Theme-owned buttons already in the templates. Each becomes a primary or an
   outline button without the template markup changing. New markup should use
   .gg-btn directly. */
main button,
.button,
a.blue-btns,
.pdf-view-btn,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce .button.alt {
  font-family: var(--gg-font-display);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gg-red);
  color: var(--gg-white);
  border: 2px solid var(--gg-red);
  border-radius: var(--gg-radius-button);
  transition: background-color var(--gg-motion), border-color var(--gg-motion), color var(--gg-motion);
}
main button:hover,
.button:hover,
a.blue-btns:hover,
.pdf-view-btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce .button.alt:hover {
  background: var(--gg-red-dark);
  border-color: var(--gg-red-dark);
  color: var(--gg-white) !important;
}
.button.inverse,
main button.inverse {
  background: transparent;
  color: var(--gg-red);
}
.button.inverse:hover,
main button.inverse:hover {
  background: var(--gg-red);
  color: var(--gg-white);
}
.button.rounded,
main button.rounded { border-radius: var(--gg-radius-button); }   /* no pills on buttons */

/* Page titles and section headings already carry the 2px rule; keep it red. */
.page-title,
.category-box h3,
.widget-area.sidebar h2 { border-bottom: var(--gg-rule); }

/* Links in copy. */
main a { color: var(--gg-red); }
main a:hover { color: var(--gg-red-dark); }

/* ── 5. Quick wins applied with the foundation ─────────────────────────── */

/* Cards already in the templates: category column boxes, manual-product
   cards and marketing-library cards. Sharp corners, elevation 1, elevation 2
   on hover (guide p.6). */
.top-boxes-col,
.manual-card,
.pdf-card {
  border: 1px solid var(--gg-silver);
  border-radius: var(--gg-radius-panel);
  box-shadow: var(--gg-shadow-1);
  transition: box-shadow var(--gg-motion), border-color var(--gg-motion);
}
.top-boxes-col:hover,
.manual-card:hover,
.pdf-card:hover {
  box-shadow: var(--gg-shadow-2);
  border-color: var(--gg-silver);
}

/* Forms: WPForms (contact page) and WooCommerce (login, register, account). */
.wpforms-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.wpforms-form textarea,
.wpforms-form select,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  border: 1px solid var(--gg-silver);
  border-radius: var(--gg-radius-input);
  background: var(--gg-white);
  color: var(--gg-ink);
  font-family: var(--gg-font-body);
}
.wpforms-form input:not([type="submit"]):focus,
.wpforms-form textarea:focus,
.wpforms-form select:focus,
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  outline: none;
  border-color: var(--gg-red);
  box-shadow: 0 0 0 2px rgba(200, 16, 46, 0.2);
}
.wpforms-form label.wpforms-field-label,
.woocommerce form .form-row label {
  font-family: var(--gg-font-body);
  font-weight: 500;
  color: var(--gg-ink);
}
.wpforms-form button[type="submit"],
.wpforms-form .wpforms-submit {
  font-family: var(--gg-font-display);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gg-red);
  color: var(--gg-white);
  border: 2px solid var(--gg-red);
  border-radius: var(--gg-radius-button);
  transition: background-color var(--gg-motion), border-color var(--gg-motion);
}
.wpforms-form button[type="submit"]:hover,
.wpforms-form .wpforms-submit:hover {
  background: var(--gg-red-dark);
  border-color: var(--gg-red-dark);
  color: var(--gg-white);
}

/* The PDF viewer modal sits at elevation 3. */
.pdf-modal-box { box-shadow: var(--gg-shadow-3); }

/* ── 6. Header, nav and base size ───────────────────────────────────────── */

/* Body copy sits at 15px (the guide's 11pt body), never lighter than 400.
   Light weights were never loaded, and 14px Barlow 400 reads soft. */
body { font-size: 15px; }

/* Navigation is Title Case in the markup and uppercase display type on screen. */
header nav a,
header .menu-header-menu-container ul.menu > li > a,
header nav ul ul a {
  font-family: var(--gg-font-display);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
header nav ul ul a {
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;         /* dropdown items are product names: Title Case */
}

/* Top bar: tagline and phone. */
header div.top {
  font-family: var(--gg-font-body);
  font-weight: 400;
}
header div.top #top-phone { font-family: var(--gg-font-mono); font-weight: 500; font-style: normal; }
header div.top a { color: var(--gg-red); }
