/* ============================================================
   Canyon Consulting — Editorial Redesign
   Aesthetic: monochromatic, condensed display type, full-bleed,
   pill buttons, flat elevation. Single rust accent.
   ============================================================ */

:root {
  /* Core */
  --black: #111111;
  --white: #FFFFFF;
  --snow: #FAFAFA;
  --grey-50: #FAFAFA;
  --grey-100: #F5F5F5;
  --grey-200: #E5E5E5;
  --grey-300: #CACACB;
  --grey-500: #707072;
  --grey-700: #39393B;
  --grey-800: #28282A;
  --grey-900: #1F1F21;

  /* Semantic */
  --text-primary: #111111;
  --text-secondary: #707072;
  --text-disabled: #9E9EA0;
  --border-secondary: #CACACB;
  --error: #D30005;
  --link: #1151FF;
  --success: #007D48;

  /* Accent (Canyon rust — sparingly used) */
  --accent: #D33918;
  --accent-deep: #8a2410;

  /* Spacing */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px;
  --s9: 64px; --s10: 80px; --s11: 120px;

  /* Type */
  --display: 'Bebas Neue', 'Oswald', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--white);
  color: var(--text-primary);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ================ TYPOGRAPHY ================ */

.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 0.88;
  letter-spacing: -0.005em;
}
.display-xxl { font-size: clamp(64px, 11vw, 168px); }
.display-xl  { font-size: clamp(56px, 9vw, 128px); }
.display-lg  { font-size: clamp(44px, 6vw, 88px); }
.display-md  { font-size: clamp(32px, 4.5vw, 64px); }
.display-sm  { font-size: clamp(24px, 3vw, 40px); }

.h1 { font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.h2 { font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -0.005em; }
.h3 { font-size: 18px; font-weight: 600; line-height: 1.4; }

.body    { font-size: 16px; font-weight: 400; line-height: 1.75; }
.body-md { font-size: 16px; font-weight: 500; line-height: 1.75; }
.body-lg { font-size: 18px; font-weight: 400; line-height: 1.7; }
.caption { font-size: 14px; font-weight: 500; line-height: 1.5; }
.tiny    { font-size: 12px; font-weight: 500; line-height: 1.5; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

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

/* ================ LAYOUT ================ */

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 768px) { .container { padding: 0 24px; } }
@media (max-width: 480px) { .container { padding: 0 16px; } }

.section { padding: var(--s10) 0; }
.section-tight { padding: var(--s8) 0; }
@media (max-width: 768px) {
  .section { padding: var(--s8) 0; }
  .section-tight { padding: var(--s7) 0; }
}

.grid { display: grid; gap: var(--s6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--s2); } .gap-3 { gap: var(--s3); }
.gap-4 { gap: var(--s4); } .gap-6 { gap: var(--s6); }
.gap-8 { gap: var(--s8); }

/* ================ BUTTONS ================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  height: 48px;
  padding: 0 var(--s7);
  border-radius: 30px;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease, transform 100ms ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--black); color: var(--white); }
.btn-primary:hover { background: var(--grey-700); }

.btn-primary-inverse { background: var(--white); color: var(--black); }
.btn-primary-inverse:hover { background: var(--grey-300); }

.btn-secondary {
  background: transparent;
  color: var(--black);
  border: 1.5px solid var(--grey-300);
}
.btn-secondary:hover { border-color: var(--black); background: var(--grey-100); }

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

.btn-sm { height: 38px; padding: 0 var(--s5); font-size: 13px; }
.btn-lg { height: 56px; padding: 0 var(--s8); font-size: 16px; }

/* ================ NAV ================ */

.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--grey-200);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: var(--s2);
  font-family: var(--display);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
}
.nav-logo .wordmark {
  display: inline-flex;
  gap: 4px;
}
.nav-logo .mark {
  width: 22px; height: 22px;
  background: var(--black);
  align-self: flex-end;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M2 22 L8 8 L12 14 L16 4 L22 22 Z' fill='black'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M2 22 L8 8 L12 14 L16 4 L22 22 Z' fill='black'/></svg>") center/contain no-repeat;
}
.nav-links {
  display: flex; align-items: center; gap: var(--s7);
}
.nav-links a {
  font-size: 14px; font-weight: 500;
  color: var(--text-primary);
  transition: color 200ms ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-secondary); }
.nav-links a.active { position: relative; }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -22px;
  height: 2px; background: var(--black);
}
.nav-cta { display: flex; align-items: center; gap: var(--s3); }

@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* Promo banner */
.promo {
  background: var(--black); color: var(--white);
  text-align: center;
  padding: 10px 24px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.04em;
}
.promo .accent { color: var(--accent); }

/* ================ FOOTER ================ */

.footer { background: var(--black); color: var(--white); padding: var(--s10) 0 var(--s7); }
.footer a { color: var(--grey-300); transition: color 200ms ease; }
.footer a:hover { color: var(--white); }
.footer .display-xxl { color: var(--white); margin-bottom: var(--s8); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s8);
  padding-bottom: var(--s8);
  border-bottom: 1px solid var(--grey-800);
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--grey-500);
  margin-bottom: var(--s4);
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: var(--s2); }
.footer-bottom {
  display: flex; justify-content: space-between;
  padding-top: var(--s5);
  font-size: 12px; color: var(--grey-500);
}

/* ================ IMAGE PLACEHOLDERS ================ */

.img-block {
  position: relative;
  background: var(--grey-100);
  overflow: hidden;
}
.img-block img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-block .label {
  position: absolute; left: 12px; bottom: 12px;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  background: rgba(0,0,0,0.4);
  padding: 4px 8px;
  backdrop-filter: blur(4px);
}

.img-overlay::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 30%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
}

/* ================ CARDS ================ */

.svc-card {
  display: block;
  background: var(--white);
  border-top: 1px solid var(--black);
  padding: var(--s7) 0 var(--s8);
  cursor: pointer;
  transition: padding-left 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.svc-card:hover { padding-left: var(--s4); }
.svc-card .num {
  font-family: var(--mono);
  font-size: 12px; color: var(--text-secondary);
  margin-bottom: var(--s5);
}
.svc-card .title {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 64px);
  text-transform: uppercase;
  line-height: 0.95;
  margin-bottom: var(--s4);
}
.svc-card .desc {
  font-size: 16px; line-height: 1.7;
  color: var(--text-secondary);
  max-width: 56ch;
}
.svc-card .tags {
  display: flex; flex-wrap: wrap; gap: var(--s2);
  margin-top: var(--s5);
}
.svc-card .tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border: 1px solid var(--grey-300);
  border-radius: 30px;
}

/* ================ FORMS ================ */

.field { display: flex; flex-direction: column; gap: var(--s2); }
.field label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}
.field input, .field textarea, .field select {
  background: var(--grey-100);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text-primary);
  transition: background 200ms ease, border-color 200ms ease;
  width: 100%;
  font-family: var(--body);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  background: var(--white);
  border-color: var(--black);
}
.field.error input, .field.error textarea, .field.error select { border-color: var(--error); }
.field .err-msg {
  font-size: 12px; color: var(--error);
  font-family: var(--mono);
}

/* ================ MISC ================ */

.divider { height: 1px; background: var(--grey-200); border: 0; margin: 0; }
.kbd-rule {
  border-top: 1px solid var(--black);
  padding-top: var(--s4);
}

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  padding: 18px 0;
  font-family: var(--display);
  font-size: 56px;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
}
.marquee-track {
  display: flex; gap: 64px;
  animation: marquee 30s linear infinite;
  flex-shrink: 0;
  padding-right: 64px;
}
.marquee-dot { color: var(--accent); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* Stat block */
.stat {
  border-top: 1px solid var(--black);
  padding-top: var(--s5);
}
.stat .num {
  font-family: var(--display);
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.9;
  letter-spacing: -0.01em;
}
.stat .label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--s3);
}

/* Page hero (subpage) */
.page-hero {
  padding: var(--s10) 0 var(--s8);
}
.page-hero .crumbs {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--s7);
}

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(17,17,17,0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 24px;
  animation: fadeIn 200ms ease;
}
.modal {
  background: var(--white);
  max-width: 720px; width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  border-radius: 0;
  position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grey-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  z-index: 1;
}
.modal-close:hover { background: var(--grey-200); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal { animation: slideUp 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }

/* Utility */
.full-bleed { width: 100vw; margin-left: calc(50% - 50vw); }

/* Hero eyebrow style variants */
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-block;
}
.hero-eyebrow--plain {
  color: rgba(255,255,255,0.7);
}
.hero-eyebrow--pill {
  color: var(--white);
  background: var(--accent);
  padding: 8px 14px;
  border-radius: 30px;
}
.hero-eyebrow--outline {
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.5);
  padding: 8px 14px;
  border-radius: 30px;
}
.hero-eyebrow--badge {
  color: var(--white);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 14px;
  border-radius: 4px;
  border-left: 3px solid var(--accent);
}
.hero-eyebrow--ticker {
  color: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.4);
  padding: 8px 14px 8px 12px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,0.15);
}
.hero-eyebrow--ticker .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent);
  animation: pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
.hero-eyebrow--marker {
  color: var(--white);
  background: var(--black);
  padding: 8px 14px;
  position: relative;
}
.hero-eyebrow--marker::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%;
  transform: translateY(-50%);
  width: 8px; height: 100%;
  background: var(--accent);
}
[data-accent="rust"]    { --accent: #D33918; --accent-deep: #8a2410; }
[data-accent="blue"]    { --accent: #1151FF; --accent-deep: #0838b8; }
[data-accent="mono"]    { --accent: #111111; --accent-deep: #000000; }

/* Dark theme overrides */
body.theme-dark {
  background: var(--black);
  color: var(--white);
}
body.theme-dark .nav {
  background: rgba(17,17,17,0.96);
  border-bottom-color: var(--grey-800);
}
body.theme-dark .nav-links a { color: var(--white); }
body.theme-dark .nav-logo .mark { background: var(--white); }
body.theme-dark .btn-primary { background: var(--white); color: var(--black); }
body.theme-dark .btn-primary:hover { background: var(--grey-300); }
body.theme-dark .btn-secondary { color: var(--white); border-color: rgba(255,255,255,0.3); }
body.theme-dark .btn-secondary:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
body.theme-dark .svc-card { border-top-color: var(--white); color: var(--white); }
body.theme-dark .stat { border-top-color: var(--white); }
body.theme-dark .kbd-rule { border-top-color: var(--white); }
body.theme-dark .field input,
body.theme-dark .field textarea,
body.theme-dark .field select {
  background: var(--grey-900);
  color: var(--white);
}
body.theme-dark .field input:focus,
body.theme-dark .field textarea:focus,
body.theme-dark .field select:focus {
  background: var(--grey-800);
  border-color: var(--white);
}
body.theme-dark .footer { background: var(--grey-900); }
body.theme-dark section[style*="snow"] { background: var(--grey-900) !important; }
body.theme-dark .modal { background: var(--grey-900); color: var(--white); }
body.theme-dark .img-block { background: var(--grey-800); }
body.theme-dark .text-secondary,
body.theme-dark .muted { color: var(--grey-300) !important; }
body[data-promo="off"] .promo { display: none; }

/* Container max width responsive var */
.container { max-width: var(--container-max, 1440px); }

/* Display case toggle */
.display { text-transform: var(--display-case, uppercase); }
.svc-card .title,
.nav-logo,
.marquee {
  text-transform: var(--display-case, uppercase);
}

/* Button radius var */
.btn { border-radius: var(--btn-radius, 30px); }

[data-accent="custom"] { /* set inline */ }
