/**
 * axsysTek Sandbox — Components
 * Buttons, Cards, Badges, Stat Block, Section Labels
 * Depends on: tokens.css, base.css
 */

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

/* Base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-family: var(--btn-font);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  letter-spacing: var(--btn-letter-spacing);
  border-radius: var(--btn-radius);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--btn-transition);
  white-space: nowrap;
  line-height: 1;
}

.btn:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

/* Primary — Signal Orange CTA */
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--btn-primary-bg-hover);
  border-color: var(--btn-primary-bg-hover);
  color: var(--btn-primary-text);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232, 83, 10, 0.30);
  text-decoration: none;
}

/* Secondary — axsysTek Blue filled */
.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  border-color: var(--btn-secondary-bg);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--btn-secondary-bg-hover);
  border-color: var(--btn-secondary-bg-hover);
  color: var(--btn-secondary-text);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Ghost — white outline (for dark sections) */
.btn-ghost {
  background: var(--btn-ghost-bg);
  color: var(--btn-ghost-text);
  border-color: var(--btn-ghost-border);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--btn-ghost-bg-hover);
  border-color: var(--btn-ghost-border-hover);
  color: var(--btn-ghost-text);
  text-decoration: none;
}

/* Outline — blue outline (for light sections) */
.btn-outline {
  background: var(--btn-outline-bg);
  color: var(--btn-outline-text);
  border-color: var(--btn-outline-border);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--btn-outline-bg-hover);
  color: var(--btn-outline-text-hover);
  border-color: var(--btn-outline-border);
  text-decoration: none;
}

/* Text link button */
.btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-orange);
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
  letter-spacing: var(--ls-wide);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  text-decoration: none;
  transition: var(--transition-color);
}

.btn-link:hover {
  color: var(--color-orange-lt);
  text-decoration: none;
}

.btn-link svg,
.btn-link .arrow {
  transition: transform var(--duration-default) var(--ease-out);
}

.btn-link:hover svg,
.btn-link:hover .arrow {
  transform: translateX(4px);
}

/* ── Arrow icon (CSS-drawn) ──────────────────────────────────────────── */
.btn .icon-arrow::after {
  content: '→';
  font-style: normal;
}

/* ============================================================
   BADGES & LABELS
   ============================================================ */

.badge {
  display: inline-block;
  font-family: var(--badge-font);
  font-size: var(--badge-font-size);
  font-weight: var(--badge-font-weight);
  letter-spacing: var(--badge-letter-spacing);
  text-transform: var(--badge-text-transform);
  padding: var(--badge-padding);
  border-radius: var(--badge-radius);
  line-height: 1;
}

.badge-blue {
  background: var(--badge-blue-bg);
  color: var(--badge-blue-text);
}

.badge-orange {
  background: var(--badge-orange-bg);
  color: var(--badge-orange-text);
}

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

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

.card-service {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  box-shadow: var(--card-shadow);
  transition:
    transform var(--duration-default) var(--ease-out),
    box-shadow var(--duration-default) var(--ease-out),
    border-color var(--duration-default) var(--ease-out);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Orange left accent border on hover */
.card-service::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--card-accent-border);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--duration-default) var(--ease-out);
}

.card-service:hover {
  transform: translateY(var(--card-lift));
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(232, 83, 10, 0.20);
}

.card-service:hover::before {
  transform: scaleY(1);
}

.card-service__icon {
  width: var(--icon-size-xl);
  height: var(--icon-size-xl);
  color: var(--color-orange);
  margin-bottom: var(--space-5);
  flex-shrink: 0;
}

.card-service__title {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--color-ink);
  margin-bottom: var(--space-3);
  line-height: var(--lh-snug);
}

.card-service__desc {
  font-size: var(--text-sm);
  line-height: var(--lh-relaxed);
  color: var(--color-mid);
  flex: 1;
  margin-bottom: var(--space-5);
}

.card-service__link {
  margin-top: auto;
}

/* ============================================================
   CLIENT STORY CARDS
   ============================================================ */

.card-story {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition:
    transform var(--duration-default) var(--ease-out),
    box-shadow var(--duration-default) var(--ease-out);
  display: flex;
  flex-direction: column;
}

.card-story:hover {
  transform: translateY(var(--card-lift));
  box-shadow: var(--card-shadow-hover);
}

.card-story__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-sky);
}

.card-story__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.card-story:hover .card-story__image img {
  transform: scale(1.04);
}

.card-story__body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-story__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.card-story__category {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-orange);
}

.card-story__read-time {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-mid);
}

.card-story__title {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--color-ink);
  line-height: var(--lh-snug);
  margin-bottom: var(--space-4);
}

/* Large metric display */
.card-story__metric {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--fw-extrabold);
  color: var(--color-blue);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.card-story__metric-label {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-mid);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  margin-bottom: var(--space-4);
}

.card-story__link {
  margin-top: auto;
}

/* ============================================================
   INSIGHTS / BLOG CARDS
   ============================================================ */

.card-insight {
  border-bottom: 2px solid var(--color-border);
  padding-bottom: var(--space-6);
  transition: border-color var(--duration-default) var(--ease-default);
  display: flex;
  flex-direction: column;
}

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

.card-insight__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-mid);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

.card-insight__meta-divider {
  opacity: 0.4;
}

.card-insight__title {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--color-ink);
  line-height: var(--lh-snug);
  margin-bottom: var(--space-4);
  transition: color var(--duration-default) var(--ease-default);
}

.card-insight:hover .card-insight__title,
.card-insight a:hover .card-insight__title {
  color: var(--color-blue);
}

.card-insight__excerpt {
  font-size: var(--text-sm);
  line-height: var(--lh-relaxed);
  color: var(--color-mid);
  flex: 1;
  margin-bottom: var(--space-4);
}

.card-insight__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.card-insight__author {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
}

/* ============================================================
   STATS BLOCK (Impact Band — Signal Orange bg)
   ============================================================ */

.stat-block {
  text-align: center;
  padding: var(--space-6) var(--space-4);
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--fw-extrabold);
  color: var(--color-white);
  line-height: 1;
  display: block;
  margin-bottom: var(--space-2);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  display: block;
}

/* ============================================================
   SECTION HEADER (reusable)
   ============================================================ */

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-12);
}

.section-header--left {
  text-align: left;
  margin-left: 0;
}

.section-header__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--color-ink);
  margin-bottom: var(--space-4);
}

/* Dark sections: white headline */
.section--dark .section-header__title {
  color: var(--color-white);
}

.section-header__subtitle {
  font-size: var(--text-lg);
  line-height: var(--lh-relaxed);
  color: var(--color-mid);
}

.section--dark .section-header__subtitle {
  color: rgba(255, 255, 255, 0.70);
}

/* ============================================================
   TESTIMONIAL / PULL QUOTE
   ============================================================ */

.pull-quote {
  border-left: 4px solid var(--color-amber);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
}

.pull-quote__text {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  font-style: italic;
  color: var(--color-ink);
  line-height: var(--lh-snug);
  margin-bottom: var(--space-4);
}

.pull-quote__attribution {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-mid);
}

.pull-quote__attribution strong {
  color: var(--color-ink);
  display: block;
}

/* ============================================================
   PARTNER / CLIENT LOGO GRID
   ============================================================ */

.logo-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-12);
}

.logo-grid__item img {
  height: 32px;
  width: auto;
  opacity: 0.65;
  filter: grayscale(1) brightness(0) invert(1); /* white logos on dark */
  transition: opacity var(--duration-default) var(--ease-default);
}

.logo-grid__item:hover img {
  opacity: 1;
}

/* On light sections */
.logo-grid--light .logo-grid__item img {
  filter: grayscale(1);
  opacity: 0.50;
}

.logo-grid--light .logo-grid__item:hover img {
  opacity: 0.80;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */

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

.form-control {
  display: block;
  width: 100%;
  padding: var(--input-padding-y) var(--input-padding-x);
  font-family: var(--font-body);
  font-size: var(--input-font-size);
  color: var(--input-text);
  background-color: var(--input-bg);
  border: var(--border-width) solid var(--input-border);
  border-radius: var(--input-radius);
  transition: border-color var(--duration-default) var(--ease-default),
              box-shadow var(--duration-default) var(--ease-default);
  appearance: none;
}

.form-control::placeholder {
  color: var(--input-placeholder);
}

.form-control:focus {
  outline: none;
  border-color: var(--input-border-focus);
  box-shadow: var(--input-shadow-focus);
}

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

/* Privacy Policy — Sticky TOC Sidebar (Node 97) */
.page-node-97 .col-lg-3 {
  position: sticky;
  top: 80px;
  align-self: flex-start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.page-node-97 .col-lg-3 ol {
  list-style: decimal;
  padding-left: 1.2rem;
}
.page-node-97 .col-lg-3 ol li {
  display: list-item;
  padding: 0.2rem 0;
}
.page-node-97 .col-lg-3 ol li a {
  display: inline;
  color: #1950D7;
  text-decoration: none;
}
.page-node-97 .col-lg-3 ol li a:hover {
  color: #E8530A;
  text-decoration: underline;
}

/* Hide Bootstrap li > artifacts in TOC */
.page-node-97 .col-lg-3 .list-group-item::after,
.page-node-97 .col-lg-3 li::after { content: none !important; }
.page-node-97 .col-lg-3 li > ol { display: block; }

/* Hide the CSS block title from footer */
#block-axsystek-sandbox-privacypolicystickysidebarcss .block-title { display: none; }

/* Terms & Conditions — Sticky TOC Sidebar (Node 98) */
.page-node-98 .col-lg-3 {
  position: sticky;
  top: 80px;
  align-self: flex-start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.page-node-98 .col-lg-3 ol {
  list-style: decimal;
  padding-left: 1.2rem;
}
.page-node-98 .col-lg-3 ol li {
  display: list-item;
  padding: 0.2rem 0;
}
.page-node-98 .col-lg-3 ol li::after { content: none !important; }
.page-node-98 .col-lg-3 ol li a {
  display: inline;
  color: #1950D7;
  text-decoration: none;
}
.page-node-98 .col-lg-3 ol li a:hover {
  color: #E8530A;
  text-decoration: underline;
}

/* Privacy Policy TOC — CSS Counter (fixes CKEditor5 JS splitting <ol> into 17 separate lists) */
.page-node-97 .col-lg-3 { counter-reset: toc-counter; }
.page-node-97 .col-lg-3 ol { list-style: none !important; }
.page-node-97 .col-lg-3 ol li::before { content: counter(toc-counter) ". "; counter-increment: toc-counter; font-weight: normal; }

/* Terms & Conditions TOC — CSS Counter (defensive, same fix) */
.page-node-98 .col-lg-3 { counter-reset: toc-counter; }
.page-node-98 .col-lg-3 ol { list-style: none !important; }
.page-node-98 .col-lg-3 ol li::before { content: counter(toc-counter) ". "; counter-increment: toc-counter; font-weight: normal; }

/* Privacy Policy TOC — CSS Counter (fixes CKEditor5 JS splitting <ol> into 17 separate lists) */
.page-node-97 .col-lg-3 { counter-reset: toc-counter; }
.page-node-97 .col-lg-3 ol { list-style: none !important; }
.page-node-97 .col-lg-3 ol li::before { content: counter(toc-counter) ". "; counter-increment: toc-counter; font-weight: normal; }

/* Terms & Conditions TOC — CSS Counter (defensive, same fix) */
.page-node-98 .col-lg-3 { counter-reset: toc-counter; }
.page-node-98 .col-lg-3 ol { list-style: none !important; }
.page-node-98 .col-lg-3 ol li::before { content: counter(toc-counter) ". "; counter-increment: toc-counter; font-weight: normal; }

/* ============================================
   TYPOGRAPHY POLISH — Privacy Policy & T&C
   Ref: Slalom, Oxford Global, PORSCHEvolution
   ============================================ */

/* Body copy — better readability & breathing room */
.page-node-97 .col-lg-9,
.page-node-98 .col-lg-9 {
  font-size: 1rem;
  line-height: 1.75;
  color: #222222;
}

/* Paragraphs — space between blocks */
.page-node-97 .col-lg-9 p,
.page-node-98 .col-lg-9 p {
  margin-bottom: 1.25rem;
}

/* H2 section headings — premium tight-headline style (Slalom-inspired) */
.page-node-97 .col-lg-9 h2,
.page-node-98 .col-lg-9 h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111111;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

/* TOC sidebar — right scale, more breathing room */
.page-node-97 .col-lg-3 ol li,
.page-node-98 .col-lg-3 ol li {
  padding: 0.35rem 0;
  line-height: 1.4;
}

/* TOC "Contents" label — uppercase eyebrow style */
.page-node-97 .col-lg-3 p,
.page-node-98 .col-lg-3 p {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888888;
  margin-bottom: 0.75rem;
}


/* ============================================
   TYPOGRAPHY POLISH — Privacy Policy & T&C
   Ref: Slalom, Oxford Global, PORSCHEvolution
   ============================================ */

/* Body copy — better readability & breathing room */
.page-node-97 .col-lg-9,
.page-node-98 .col-lg-9 {
  font-size: 1rem;
  line-height: 1.75;
  color: #222222;
}

/* Paragraphs — space between blocks */
.page-node-97 .col-lg-9 p,
.page-node-98 .col-lg-9 p {
  margin-bottom: 1.25rem;
}

/* H2 section headings — premium tight-headline style (Slalom-inspired) */
.page-node-97 .col-lg-9 h2,
.page-node-98 .col-lg-9 h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111111;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

/* TOC sidebar — right scale, more breathing room */
.page-node-97 .col-lg-3 ol li,
.page-node-98 .col-lg-3 ol li {
  padding: 0.35rem 0;
  line-height: 1.4;
}

/* TOC "Contents" label — uppercase eyebrow style */
.page-node-97 .col-lg-3 p,
.page-node-98 .col-lg-3 p {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888888;
  margin-bottom: 0.75rem;
}


/* ============================================================
   Basic Page — two-column layout (Privacy Policy, T&C, etc.)
   ============================================================ */
.node--type-page .col-lg-3 { counter-reset: toc-counter; }
.node--type-page .col-lg-3 ol { list-style: none !important; padding-left: 0; }
.node--type-page .col-lg-3 ol li::before {
  content: counter(toc-counter) ". ";
  counter-increment: toc-counter;
  font-weight: normal;
}
.node--type-page .col-lg-3 ol li { padding: 0.35rem 0; line-height: 1.4; }
.node--type-page .col-lg-3 p {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888888;
  margin-bottom: 0.75rem;
}
.node--type-page .col-lg-9 {
  font-size: 1rem;
  line-height: 1.75;
  color: #222222;
}
.node--type-page .col-lg-9 p { margin-bottom: 1.25rem; }
.node--type-page .col-lg-9 h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111111;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
