/**
 * Excel Helper — Upwork-inspired design system
 * Global tokens: color, type, spacing, buttons, surfaces
 */

:root {
  /* Brand (Upwork-inspired green, not purple) */
  --eh-green: #14a800;
  --eh-green-hover: #108a00;
  --eh-green-soft: #e7f7e5;
  --eh-green-mint: #d5f0d1;
  --eh-ink: #181818;
  --eh-ink-soft: #5e6d55;
  --eh-muted: #9aaa97;
  --eh-border: #e4ebe4;
  --eh-surface: #ffffff;
  --eh-surface-alt: #f7faf7;
  --eh-hero-dark: #1f1f1f;
  --eh-focus: #0e6b00;

  /* Map legacy Excel vars → new system (backward compatible) */
  --excel-green: var(--eh-green);
  --excel-light-green: var(--eh-green-soft);
  --excel-dark-green: var(--eh-green-hover);
  --excel-gray: var(--eh-surface-alt);
  --excel-dark-gray: #d6ddd6;
  --excel-border: var(--eh-border);
  --excel-text: var(--eh-ink);
  --excel-blue: #13544e;
  --excel-white: var(--eh-surface);
  --excel-yellow: #f5c518;
  --excel-orange: #e36414;

  /* Typography */
  --eh-font: 'Manrope', system-ui, -apple-system, sans-serif;
  --eh-font-display: 'Source Serif 4', Georgia, serif;
  --font-base: var(--eh-font);
  --font-heading: var(--eh-font);

  /* Spacing & radius */
  --eh-radius-sm: 8px;
  --eh-radius: 16px;
  --eh-radius-lg: 24px;
  --eh-radius-pill: 999px;
  --container-width: min(1120px, calc(100% - 2.5rem));
  --section-spacing: clamp(3rem, 6vw, 5.5rem);
  --element-spacing: 1.25rem;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(24, 24, 24, 0.06);
  --shadow-md: 0 8px 24px rgba(24, 24, 24, 0.08);
  --shadow-lg: 0 16px 40px rgba(24, 24, 24, 0.12);

  --transition-fast: 0.15s ease;
  --transition-medium: 0.25s ease;
}

/* Base polish */
body {
  font-family: var(--eh-font);
  color: var(--eh-ink);
  background: var(--eh-surface);
  line-height: 1.65;
  letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--eh-font);
  color: var(--eh-ink);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }

p { color: var(--eh-ink-soft); }

a {
  color: var(--eh-green);
  text-underline-offset: 0.15em;
}

a:hover { color: var(--eh-green-hover); }

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--eh-focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 0.75rem 1.25rem;
  background: var(--eh-green);
  color: #fff;
  border-radius: var(--eh-radius-sm);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background: var(--eh-surface);
  clip: auto !important;
  clip-path: none;
  color: var(--eh-ink);
  display: block;
  font-size: 1rem;
  font-weight: 700;
  height: auto;
  left: 1rem;
  line-height: normal;
  padding: 0.75rem 1rem;
  text-decoration: none;
  top: 1rem;
  width: auto;
  z-index: 100000;
  border-radius: var(--eh-radius-sm);
}

/* Buttons — pill CTAs like Upwork */
.btn,
.button,
input[type="submit"],
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--eh-radius-pill);
  font-family: var(--eh-font);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-medium), color var(--transition-medium),
    border-color var(--transition-medium), box-shadow var(--transition-medium),
    transform var(--transition-fast);
  white-space: nowrap;
}

.btn-primary,
.button-primary {
  background: var(--eh-green);
  color: #ffffff !important;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
.button-primary:hover,
.btn-primary:focus,
.button-primary:focus {
  background: var(--eh-green-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--eh-ink) !important;
  border-color: var(--eh-border);
}

.btn-secondary:hover,
.btn-secondary:focus {
  border-color: var(--eh-ink);
  background: var(--eh-surface-alt);
  color: var(--eh-ink) !important;
}

.btn-outline,
.btn-outline-light {
  background: transparent;
  color: var(--eh-ink) !important;
  border-color: currentColor;
}

.btn-light {
  background: #ffffff;
  color: #181818 !important;
}

.btn-light:hover,
.btn-light:focus {
  background: #f2f7f2;
  color: #181818 !important;
}

.btn-cta {
  background: var(--eh-green);
  color: #ffffff !important;
  padding: 1rem 1.75rem;
}

.btn-cta:hover,
.btn-cta:focus {
  background: var(--eh-green-hover);
  color: #ffffff !important;
}

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; min-height: 0; }
.btn-lg { padding: 1rem 1.85rem; font-size: 1.05rem; }

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Layout helpers */
.eh-container,
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 0;
}

.eh-section {
  padding-block: var(--section-spacing);
}

.eh-section--alt {
  background: var(--eh-surface-alt);
}

.eh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--eh-green);
  margin-bottom: 0.75rem;
}

.eh-lead {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  max-width: 42rem;
  color: var(--eh-ink-soft);
}

/* Cards / surfaces — used only for interactive program content */
.eh-card {
  background: var(--eh-surface);
  border: 1px solid var(--eh-border);
  border-radius: var(--eh-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-medium), transform var(--transition-fast);
}

.eh-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.eh-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: var(--eh-radius-pill);
  border: 1px solid var(--eh-border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--eh-ink);
  background: var(--eh-surface);
}

.eh-grid {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
}

.eh-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.eh-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.eh-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .eh-grid--3,
  .eh-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .eh-grid--2,
  .eh-grid--3,
  .eh-grid--4 { grid-template-columns: 1fr; }

  .btn { width: 100%; }
  .btn-group { flex-direction: column; }
}
