/* ============================================================
   style.css — Mastery Logistics Systems
   Global stylesheet. Every page links to this file.
   Sections:
   1.  Local font face
   2.  CSS variables — brand colors, typography, spacing, layout
   3.  Reset and base styles
   4.  Typography scale
   5.  Layout containers
   6.  Buttons
   7.  Forms
   8.  Images and media
   9.  Utility classes
   10. Responsive overrides — mobile
============================================================ */


/* ============================================================
   1. LOCAL FONT FACE
============================================================ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/inter-latin-300-700.woff2') format('woff2');
}


/* ============================================================
   2. CSS VARIABLES
============================================================ */
:root {

  /* ----------------------------------------------------------
     BRAND COLORS — from Mastery Brand Guidelines V4
  ---------------------------------------------------------- */

  /* Copper — primary brand accent */
  --color-copper:           #b25d42;   /* Primary copper */
  --color-copper-light:     #fc9365;   /* Highlight copper — gradient light end */
  --color-copper-dark:      #873f2b;   /* Deep copper — dark accent */
  --color-copper-darker:    #662f22;   /* Darkest copper for hover states */
  --color-copper-pale:      #fdbea3;   /* Very light copper — backgrounds, tints */

  /* Canonical brand gradient — logo, primary controls, and branded accents. */
  --gradient-copper: linear-gradient(135deg, #fc9365 0%, #b25d42 100%);

  /* Teal / Blue — data visualization ONLY */
  --color-teal:             #3ca197;
  --color-teal-light:       #50d6c9;
  --color-teal-dark:        #235951;
  --color-teal-pale:        #bdf2ea;

  /* Neutrals */
  --color-black:            #000000;
  --color-dark:             #111111;
  --color-dark-alt:         #1a1a1a;
  --color-gray-90:          #3c3c3c;
  --color-gray-70:          #606060;
  --color-gray-50:          #707070;
  --color-gray-40:          #939393;
  --color-gray-20:          #aaaaaa;
  --color-gray-10:          #e5e5e5;
  --color-gray-05:          #f5f5f5;
  --color-white:            #ffffff;

  /* Semantic color aliases — use these in components */
  --color-text-primary:     #1a1a1a;
  --color-text-secondary:   #707070;
  --color-text-muted:       #939393;
  --color-text-accent:      #aa563d;   /* Accessible copper text on light surfaces */
  --color-text-inverse:     #ffffff;
  --color-text-inverse-muted: #999999;
  --color-bg-page:          #ffffff;
  --color-bg-dark:          #111111;
  --color-bg-subtle:        #f5f5f5;
  --color-border:           #e5e5e5;
  --color-border-dark:      #2a2a2a;


  /* ----------------------------------------------------------
     TYPOGRAPHY
  ---------------------------------------------------------- */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.25rem;
  --text-5xl:   3rem;
  --text-6xl:   3.75rem;

  --font-size-h1: clamp(2.25rem, 5vw, 3.75rem);
  --font-size-h2: clamp(1.75rem, 3.5vw, 2.5rem);
  --font-size-h3: clamp(1.25rem, 2.5vw, 1.75rem);
  --font-size-h4: clamp(1.125rem, 2vw, 1.375rem);

  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.6;
  --leading-loose:  1.8;

  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;


  /* ----------------------------------------------------------
     SPACING SCALE
  ---------------------------------------------------------- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --section-padding-y: clamp(3rem, 6vw, 6rem);


  /* ----------------------------------------------------------
     LAYOUT
  ---------------------------------------------------------- */
  --max-width:       1200px;
  --max-width-wide:  1400px;
  --max-width-text:  720px;
  --nav-height:      56px;
  --container-px:    2rem;


  /* ----------------------------------------------------------
     BORDERS AND RADIUS
  ---------------------------------------------------------- */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  --border-width: 1px;
  --border-color: var(--color-border);


  /* ----------------------------------------------------------
     SHADOWS
  ---------------------------------------------------------- */
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.10);
  --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.12);


  /* ----------------------------------------------------------
     TRANSITIONS
  ---------------------------------------------------------- */
  --transition-fast:   0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow:   0.4s ease;

}


/* ============================================================
   3. RESET AND BASE STYLES
============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
h1, h2, h3, h4, h5, h6,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 56px;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2000;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #111111;
  font-weight: var(--weight-semibold);
  text-decoration: none;
  transform: translateY(calc(-100% - 1rem));
}

.skip-link:focus-visible {
  outline: 3px solid var(--color-copper);
  outline-offset: 2px;
  transform: translateY(0);
}

main {
  flex: 1;
  scroll-margin-top: 56px;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  font-family: var(--font-primary);
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

input,
textarea,
select {
  font-family: var(--font-primary);
  font-size: var(--text-base);
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

h1, h2, h3, h4, h5, h6,
p, span, li, td, th {
  font-family: var(--font-primary);
}


/* ============================================================
   4. TYPOGRAPHY SCALE
============================================================ */

h1 {
  font-size: var(--font-size-h1);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-h2);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--font-size-h3);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}

h4 {
  font-size: var(--font-size-h4);
  font-weight: var(--weight-medium);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
}

h5, h6 {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
}

p {
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
}

.text-lead {
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--color-text-secondary);
}

small,
.text-small {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-text-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.text-copper {
  color: var(--color-text-accent);
}

.text-inverse {
  color: var(--color-text-inverse);
}

.text-muted {
  color: var(--color-text-secondary);
}


/* ============================================================
   5. LAYOUT CONTAINERS
============================================================ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.container-wide {
  width: 100%;
  max-width: var(--max-width-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.container-text {
  width: 100%;
  max-width: var(--max-width-text);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
}

.section-dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-inverse);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark p {
  color: var(--color-text-inverse);
}

.section-subtle {
  background-color: var(--color-bg-subtle);
}


/* ============================================================
   6. BUTTONS
   Primary, secondary, text-link, and white button styles.
   Apply these classes to any <a> or <button> element.
============================================================ */

/* Base button — shared by all button variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 10px;
}

/* Primary button — copper gradient, white text */
.btn-primary {
  background: var(--gradient-copper);
  color: var(--color-white);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fd9e75 0%, #c06838 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Primary button — large size variant */
.btn-primary-lg {
  background: var(--gradient-copper);
  color: var(--color-white);
  border: none;
  padding: 0.875rem 2rem;
  font-size: var(--text-base);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-primary);
  font-weight: var(--weight-medium);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary-lg:hover {
  background: linear-gradient(135deg, #fd9e75 0%, #c06838 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Secondary button — outlined, transparent background */
.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-copper);
  color: var(--color-copper);
}

/* Secondary button on dark backgrounds */
.btn-secondary-inverse {
  background: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-secondary-inverse:hover {
  border-color: var(--color-white);
  background: rgba(255, 255, 255, 0.08);
}

/* White button — white fill, dark text. Paired with the primary
   copper CTA on dark backgrounds (e.g. hero "See the platform").
   Same 10px corner radius as all other buttons. */
.btn-white {
  background: var(--color-white);
  color: var(--color-text-primary);
  border: none;
  padding: 0.875rem 2rem;
  font-size: var(--text-base);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-primary);
  font-weight: var(--weight-semibold);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-white:hover {
  background: var(--color-gray-05);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-white:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Text link button — no border, no background */
.btn-text {
  background: none;
  border: none;
  color: var(--color-copper);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  padding: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-primary);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.btn-text:hover {
  color: var(--color-copper-dark);
}


/* ============================================================
   7. FORMS
============================================================ */

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  color: var(--color-text-primary);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem;
  outline: none;
  transition: border-color var(--transition-fast);
  appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-copper);
  box-shadow: 0 0 0 3px rgba(178, 93, 66, 0.12);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.hubspot-form-placeholder {
  background-color: var(--color-bg-subtle);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}


/* ============================================================
   8. IMAGES AND MEDIA
============================================================ */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.aspect-video {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.aspect-square {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.aspect-video img,
.aspect-square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* ============================================================
   9. UTILITY CLASSES
============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.d-flex  { display: flex; }
.d-grid  { display: grid; }
.d-block { display: block; }
.d-none  { display: none; }

.align-center   { align-items: center; }
.justify-center { justify-content: center; }
.justify-between{ justify-content: space-between; }
.flex-wrap      { flex-wrap: wrap; }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

.mt-4  { margin-top: var(--space-4); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-8  { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

.divider-dark {
  border: none;
  border-top: 1px solid var(--color-border-dark);
  margin: var(--space-8) 0;
}

.copper-bar {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gradient-copper);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background-color: var(--color-copper-pale);
  color: var(--color-copper-dark);
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: border-color var(--transition-fast);
}

.card:hover {
  border-color: var(--color-copper);
}


/* ============================================================
   10. RESPONSIVE — MOBILE OVERRIDES
============================================================ */
@media (max-width: 768px) {

  :root {
    --container-px: 1rem;
    --section-padding-y: clamp(2rem, 5vw, 4rem);
  }

  h1 { letter-spacing: -0.01em; }
  h2 { letter-spacing: 0; }

  .text-center-mobile {
    text-align: center;
  }

  .d-none-mobile {
    display: none;
  }

  .d-block-mobile {
    display: block;
  }

}
