/* System.css — global tokens, layout, buttons, utilities
   Scope: used by coded page templates; safe for use site-wide.
*/

/* Brand tokens */
:root {
  --brand-green: #a0e672;
  --brand-black: #111111;
  --brand-white: #ffffff;
  --brand-gray-100: #f5f5f5;
  --text-main: #111111;
  --text-muted: #464646;

  --container-max: 1275px;  /* locked */
  --gutter: 24px;           /* locked */

  --radius-8: 8px;
  --radius-pill: 9999px;    /* pill buttons */

  --shadow-soft: 0 10px 30px rgba(0,0,0,.08);
  --shadow-hover: 0 14px 40px rgba(0,0,0,.12);

  /* Type (baseline; actual sizes will often use clamp in page css) */
  --font-body: "Gotham-Book", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Gotham-Medium", "Inter", "Helvetica Neue", Arial, sans-serif;

  --fs-body: 16px; /* locked reference */
  --lh-body: 1.6;
}

/* Webfonts: Gotham (local preview + WP template) */
@font-face {
  font-family: "Gotham-Book";
  src: url("../fonts/Gotham-Book.woff2") format("woff2"),
       url("../fonts/Gotham-Book.otf") format("opentype"),
       url("../fonts/Gotham-Book.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gotham-Medium";
  src: url("../fonts/Gotham-Medium.woff2") format("woff2"),
       url("../fonts/Gotham-Medium.otf") format("opentype"),
       url("../fonts/Gotham-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gotham-Bold";
  src: url("../fonts/Gotham-Bold_1.woff2") format("woff2"),
       url("../fonts/Gotham-Bold_1.otf") format("opentype"),
       url("../fonts/Gotham-Bold_1.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Base */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
body {
  margin: 0;
  color: var(--text-main);
  background: var(--brand-white);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout helpers */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  background: var(--brand-white);
}
.section--fullvh {
  min-height: 100svh; /* safer on mobile browser chrome */
  display: grid;
  align-items: center;
}

/* Stack utility: vertical spacing between children */
.stack > * + * { margin-top: clamp(12px, 1.5vw, 32px); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  padding: 10px 35px; /* locked reference */
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: transform .25s ease-in-out, box-shadow .25s ease-in-out, background-color .25s ease, color .25s ease, border-color .25s ease;
  will-change: transform, box-shadow;
  font-size: 15px;
}
.btn:focus-visible { outline: 2px solid var(--brand-green); outline-offset: 2px; }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--brand-green);
  color: var(--brand-black);
  border-color: var(--brand-green);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--brand-black);
  color: var(--brand-white);
  border-color: var(--brand-black);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.btn--secondary {
  background: var(--brand-black);
  color: var(--brand-white);
  border-color: var(--brand-black);
}
.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: var(--brand-green);
  color: var(--brand-black);
  border-color: var(--brand-green);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

/* Ensure link states keep intended colors (no blue visited links) */
.btn:link,
.btn:visited { text-decoration: none; }

.btn--primary:link:not(:hover):not(:focus-visible),
.btn--primary:visited:not(:hover):not(:focus-visible) { color: var(--brand-black); }

.btn--secondary:link:not(:hover):not(:focus-visible),
.btn--secondary:visited:not(:hover):not(:focus-visible) { color: var(--brand-white); }

/* Simple text helpers */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Grid helpers */
.grid { display: grid; gap: clamp(16px, 2vw, 32px); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: clamp(16px, 2vw, 32px); }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: clamp(16px, 2vw, 32px); }

/* Responsive: desktop only breakpoint (match Divi) */
@media (min-width: 981px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Banner hover pattern (generic) */
.banner-link {
  display: inline-block;
  border-radius: 16px;
  border: 1px solid var(--brand-gray-100);
  overflow: hidden;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transform: translateY(0);
  transition: transform .25s ease, box-shadow .25s ease;
  will-change: transform, box-shadow;
}
.banner-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.banner-link img {
  display: block;
  width: 100%;
  height: auto;
}

/* Safe utility spacing (8px scale) */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-12 { margin-top: 12px !important; }
.mb-12 { margin-bottom: 12px !important; }
.mt-16 { margin-top: 16px !important; }
.mb-16 { margin-bottom: 16px !important; }
.mt-24 { margin-top: 24px !important; }
.mb-24 { margin-bottom: 24px !important; }
.mt-32 { margin-top: 32px !important; }
.mb-32 { margin-bottom: 32px !important; }
.mt-48 { margin-top: 48px !important; }
.mb-48 { margin-bottom: 48px !important; }

/* Visually hidden (for a11y) */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Global: remove focus rings site-wide and tap highlight */
a, button, input, textarea, select, [tabindex] {
  -webkit-tap-highlight-color: transparent;
}

/* Suppress outlines/box-shadows on all focus states */
a:focus, button:focus, input:focus, textarea:focus, select:focus, [tabindex]:focus,
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
