/* ==========================================================================
   KORT Payments — docs theme
   Matches kortpayments.com: navy #012776, orange #FF6C2C.
   Deliberately minimal — accent colours only; typography is Scalar's default.
   ========================================================================== */

:root {
  --kort-navy: #012776;
  --kort-orange: #ff6c2c;
}

.light-mode {
  --scalar-color-1: #050a0d;
  --scalar-color-accent: var(--kort-navy);
  --scalar-sidebar-color-active: var(--kort-navy);
  --scalar-sidebar-indent-border-active: var(--kort-orange);
  --scalar-button-1: var(--kort-navy);
  --scalar-button-1-color: #ffffff;
}

.dark-mode {
  /* Navy is too dark to read on a dark background — use the orange instead. */
  --scalar-color-accent: var(--kort-orange);
  --scalar-sidebar-indent-border-active: var(--kort-orange);
  --scalar-button-1: var(--kort-orange);
  --scalar-button-1-color: #10131a;
}

/* Step CTA links ("View endpoints →") sit tighter under their description */
scalar-step p + p {
  margin-top: 0.5rem;
}

scalar-step .text-sm {
  font-size: 0.875rem;
  font-weight: 550;
}

/* ==========================================================================
   Landing page (docs homepage)
   ========================================================================== */

/* The hero carries the page's identity, so drop the stock breadcrumb + title */
.page:has(.kort-hero) .page-header {
  display: none;
}

/* Lay the product cards out as a grid. The cards are siblings of the hero in
   .page-node, so grid the container and let the full-width blocks span it —
   wrapping the cards in a div would stop their markdown from rendering. */
.page-node:has(.kort-hero) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}

.page-node:has(.kort-hero) > .kort-hero,
.page-node:has(.kort-hero) > .kort-section-label,
.page-node:has(.kort-hero) > .kort-section-lede {
  grid-column: 1 / -1;
}

/* Lead card (PayHQ) runs the full width; the rest pair up beneath it. */
.page-node:has(.kort-hero) > .kort-section-lede + .card {
  grid-column: 1 / -1;
}

.page-node:has(.kort-hero) > .card {
  margin: 0;
  height: 100%;
  transition: border-color 0.15s ease;
}

.page-node:has(.kort-hero) > .card:hover {
  border-color: var(--kort-orange);
}

@media (max-width: 720px) {
  .page-node:has(.kort-hero) {
    grid-template-columns: minmax(0, 1fr);
  }
}

.kort-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 2rem;
  padding: 3.5rem 2.5rem;
  border-radius: 12px;
  background: var(--kort-navy);
  color: #fff;
}

.kort-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 45rem;
}

.kort-hero__logo {
  display: block;
  width: auto;
  height: 46px;
  margin-bottom: 1.75rem;
}

.kort-hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: #fff;
}

.kort-hero p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.kort-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* The hero is navy in both colour schemes, so these buttons must not inherit
   the theme's link colours — hence the explicit states. */
.kort-hero .kort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.62rem 1.15rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.kort-hero a.kort-btn--primary,
.kort-hero a.kort-btn--primary:link,
.kort-hero a.kort-btn--primary:visited,
.kort-hero a.kort-btn--primary:hover,
.kort-hero a.kort-btn--primary:focus,
.kort-hero a.kort-btn--primary:active {
  background: var(--kort-orange);
  color: #1a1005;
  text-decoration: none;
}

.kort-hero a.kort-btn--ghost,
.kort-hero a.kort-btn--ghost:link,
.kort-hero a.kort-btn--ghost:visited,
.kort-hero a.kort-btn--ghost:hover,
.kort-hero a.kort-btn--ghost:focus,
.kort-hero a.kort-btn--ghost:active {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  text-decoration: none;
}

.kort-hero a.kort-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.kort-section-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--scalar-color-3);
}

.kort-section-lede {
  margin: 0 0 1.5rem;
  color: var(--scalar-color-2);
}

@media (max-width: 640px) {
  .kort-hero {
    padding: 2.5rem 1.5rem;
  }
}
