/* ------------------------------------------------
   Utilities & Gradients
   ------------------------------------------------ */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: var(--text-on-primary);
}

.isolate {
  isolation: isolate;
}

.link-reset {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline !important;
  color: inherit !important;
  text-decoration: none !important;
  box-shadow: none !important;
  line-height: inherit !important;
  font: inherit !important;
  cursor: pointer;
}

/* ============================ */
/* Container Info (Responsive)  */
/* ============================ */
.container-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-inline-size: 100%;
  margin-inline: auto;
}

.container-info > * {
  max-inline-size: 100%;
  min-inline-size: 0;
}

@media (max-width: 640px) {
  .container-info {
    display: grid;
    place-items: center;
    text-align: center;
    inline-size: 100%;
    max-inline-size: 100%;
    padding-inline: var(--gutter);
  }
  .container-info > * {
    margin: 0 auto;
    max-inline-size: 100%;
    min-inline-size: 0;
  }
  .container-info p,
  .container-info .measure {
    width: auto !important;
    max-inline-size: min(100%, var(--text-max-width));
    overflow-wrap: anywhere;
  }
  .container-info :is(img, video, svg, .gb-custom-select, .btn) {
    max-inline-size: 100%;
  }
}
.left {
  left: 100%;
}

/* ------------------------------------------------
   Erewhon process line connector (cards)
   ------------------------------------------------ */
.card-ereprocess__wrapper {
  counter-increment: item;
  /* Horizontal connector between cards, except last */
}
.card-ereprocess__wrapper:not(:last-child)::before {
  content: "";
  width: var(--grid-gap);
  height: 0;
  border-block-start: 1px dashed oklch(18% 0.025 257.7deg / 0.4);
  position: absolute;
  left: 100%;
  z-index: -1;
}
.card-ereprocess__wrapper {
  /* Tablet */
}
@media (max-width: 991px) {
  .card-ereprocess__wrapper:nth-child(2)::before {
    border: none;
  }
}
.card-ereprocess__wrapper {
  /* Mobile: turn connector vertical between cards */
}
@media (max-width: 767px) {
  .card-ereprocess__wrapper:not(:first-child)::before, .card-ereprocess__wrapper:nth-child(2)::before {
    content: "";
    width: 0;
    height: var(--container-gap);
    border-block-start: none;
    border-inline-start: 1px dashed oklch(18% 0.025 257.7deg / 0.4);
    position: absolute;
    left: 50%;
    bottom: 100%;
  }
  .card-ereprocess__wrapper:nth-child(1)::before {
    border: none;
  }
}
.card-ereprocess__wrapper .card-ereprocess__step::after {
  content: counter(item, decimal-leading-zero);
}

/* ------------------------------------------------
   Background/Text gradients
   ------------------------------------------------ */
.primary-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 50%, var(--primary-dark) 100%);
}

/* text gradient (token-only, no hex) */
.text-gradient-primary {
  background: linear-gradient(to right, var(--primary-dark), var(--primary-focus));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* ------------------------------------------------
   Text/Border/Shadow Utilities
   ------------------------------------------------ */
.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-tertiary {
  color: var(--text-tertiary);
}

.text-muted {
  color: var(--text-muted);
}

.border-primary {
  border-color: var(--border-primary);
}

.border-light {
  border-color: var(--border-light);
}

.border-medium {
  border-color: var(--border-medium);
}

.shadow-primary {
  box-shadow: 0 4px 6px var(--shadow-primary);
}

.shadow-secondary {
  box-shadow: 0 6px 8px var(--shadow-secondary);
}

/* Status */
.bg-success {
  background-color: var(--success);
}

.bg-error {
  background-color: var(--error);
}

.bg-warning {
  background-color: var(--warning);
}

.bg-info {
  background-color: var(--info);
}

.text-success {
  color: var(--success);
}

.text-error {
  color: var(--error);
}

.text-warning {
  color: var(--warning);
}

.text-info {
  color: var(--info);
}

/* ------------------------------------------------
   Text Size Utilities (sync with Typography)
   ------------------------------------------------ */
.text-xs {
  font-size: var(--text-xs);
}

.text-s {
  font-size: var(--text-s);
}

.text-m-smaller {
  font-size: var(--text-m-smaller);
}

.text-m {
  font-size: var(--text-m);
}

.text-l {
  font-size: var(--text-l);
  line-height: var(--lh-text-tight);
  letter-spacing: var(--ls-text-s);
}

.text-xl {
  font-size: var(--text-xl);
  line-height: var(--lh-text-tight);
  letter-spacing: var(--ls-text-s);
}

/* Heading-ish */
.text-l.heading,
.text-xl.heading {
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.06em;
}

/* ------------------------------------------------
   Clamp & balance
   ------------------------------------------------ */
.line-limit-3,
.line-limit-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-limit-3 {
  -webkit-line-clamp: 3;
}

.line-limit-2 {
  -webkit-line-clamp: 2;
}

.line-limit-responsive {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
}

.line-limit-responsive::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40%;
  height: 1.5em;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--bg-surface) 70%);
  pointer-events: none;
}

@media (max-width: 480px) {
  .line-limit-responsive {
    -webkit-line-clamp: 1;
  }
}
@media (min-width: 481px) and (max-width: 1024px) {
  .line-limit-responsive {
    -webkit-line-clamp: 2;
  }
}
@media (min-width: 1025px) {
  .line-limit-responsive {
    -webkit-line-clamp: 3;
  }
}
/* Misc */
.no-ul a {
  text-decoration: none !important;
}

.balance {
  text-wrap: balance;
}

.visually-hidden:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* ------------------------------------------------
   Prefs & Inputs
   ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
    transform: none !important;
  }
  .gb-custom-select__menu {
    transition: none;
  }
}
@media (pointer: coarse) {
  .btn {
    padding: 1.2em 2.8em;
    min-width: auto;
  }
}
