/* CueClass site — layout: sections, buttons, links, footer, glyph-field bands, reveal, reduced motion. */

/* ---------------------------------------------------------------- sections */

.section {
  position: relative;
  padding: var(--section) 0;
}

.section + .section {
  padding-top: calc(var(--section) * 0.4);
}

.section.section--tight-top {
  padding-top: 0;
}

.section-alt,
.section + .section-alt,
.section.section-alt {
  padding-top: var(--section);
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-alt + .section {
  padding-top: var(--section);
}

.section-head {
  display: grid;
  gap: 16px 64px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

@media (min-width: 900px) {
  .section-head {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: end;
  }
}

.section-head h2 {
  margin: 0;
}

.section-lead {
  max-width: 32em;
  margin: 0;
  font-size: 1.1rem;
  color: var(--muted);
}

.section-head--center {
  justify-items: center;
  text-align: center;
}

@media (min-width: 900px) {
  .section-head--center {
    grid-template-columns: 1fr;
  }
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 72px;
  }
  .split-aside {
    position: sticky;
    top: calc(var(--header-h) + 32px);
    align-self: start;
  }
}

.split-aside h2 {
  margin-bottom: 20px;
}

.split-body > :first-child {
  margin-top: 0;
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
}

.arrow-chip {
  display: inline-block;
  transition: transform 200ms var(--ease);
}

.more-link:hover .arrow-chip {
  transform: translateX(3px);
}

/* ---------------------------------------------------------------- buttons */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 28px 0 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}

.btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

.btn-primary:hover {
  color: #ffffff;
  background: var(--brand-ink);
  border-color: var(--brand-ink);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  color: var(--disabled-ink);
  background: var(--disabled-bg);
  border: 1px dashed var(--line-strong);
  cursor: not-allowed;
  transform: none;
}

/* on the dark bands */
.on-night .btn:not(.btn-primary):not([aria-disabled="true"]):not(:disabled) {
  color: var(--on-night);
  background: transparent;
  border-color: #3a4558;
}

.on-night .btn:not(.btn-primary):not([aria-disabled="true"]):not(:disabled):hover {
  border-color: var(--on-night);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  position: relative;
  padding: clamp(48px, 6vw, 72px) 0 28px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px 48px;
}

.site-footer p {
  margin: 0 0 6px;
  color: var(--muted);
}

.site-footer .brand-small {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a[aria-current] {
  color: var(--ink);
  font-weight: 650;
}

.footer-barcode {
  display: none;
}

.site-footer .footer-mark {
  margin: clamp(32px, 5vw, 56px) 0 0;
  padding-top: 20px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------------- glyph-field bands (glyphfield.js) */

html:not(.js) canvas[data-glyph-field] {
  display: none;
}

/* a thin interactive band under each inner page head */
.glyph-band {
  display: block;
  width: 100%;
  height: 72px;
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------------------------------------------------------------- scroll reveal (ui.js adds .rv / .in) */

.js-reveal .rv {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 700ms var(--ease), transform 900ms var(--ease);
  transition-delay: var(--rv-delay, 0ms);
}

.js-reveal .rv.in {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
  .js-reveal .rv {
    transform: none;
    transition: opacity 200ms linear !important;
    transition-delay: 0ms !important;
  }
}
