/* ==========================================================================
   CODIRISE — Components
   Every class here is standalone and reusable. No section knowledge.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Eyebrow — a labelled section marker. The dot is a live indicator, so it is
   only ever used on a section that is actually on screen.
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--ink-faint);
}

.eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #000000;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: var(--line-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  border-radius: var(--r-pill);
  white-space: nowrap;
  /* A long label must never push past its container on a narrow screen. The
     pill keeps its shape until it physically can't, then wraps rather than
     overflowing. */
  max-width: 100%;
  text-align: center;
  transition: transform var(--t-base) var(--ease),
    background-color var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease), color var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

.btn__icon {
  width: 16px;
  height: 16px;
  transition: transform var(--t-base) var(--ease);
}

.btn:hover .btn__icon {
  transform: translateX(3px);
}

.btn--primary {
  --btn-bg: #000000;
  --btn-fg: #ffffff;
  --btn-border: #000000;
  font-weight: 600;
}

.btn--primary:hover {
  --btn-bg: #27272a;
  --btn-border: #27272a;
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.25);
}

.btn--accent {
  --btn-bg: var(--blue-primary);
  --btn-fg: #ffffff;
  --btn-border: var(--blue-primary);
  font-weight: 600;
}

.btn--accent:hover {
  --btn-bg: var(--blue-accent);
  --btn-border: var(--blue-accent);
  box-shadow: 0 12px 32px -16px var(--accent-glow);
}

.btn--ghost:hover {
  --btn-bg: var(--surface-2);
  --btn-border: var(--line-strong);
  --btn-fg: var(--ink-strong);
}

.btn--sm {
  padding: 9px 16px;
  font-size: var(--fs-small);
}

.btn--lg {
  padding: 17px 30px;
  font-size: 16px;
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-busy="true"] {
  opacity: 0.55;
  pointer-events: none;
}

/* Text link with an underline that draws from the left */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* Clears the 24px minimum target without changing the visual rhythm. */
  padding-block: 3px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink);
  transition: color var(--t-base) var(--ease);
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 1px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}

.link:hover {
  color: var(--blue-accent);
}
.link:hover::after {
  transform: scaleX(1);
}

.link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--t-base) var(--ease);
}
.link:hover svg {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  transition: background-color var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease), backdrop-filter var(--t-base);
  border-bottom: 1px solid transparent;
}

.header.is-stuck {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo__img {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
}

.logo__img--footer {
  height: 96px;
  width: auto;
  margin-bottom: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink-muted);
  transition: color var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease);
}

.nav__link:hover {
  color: var(--ink-strong);
  background: var(--surface-2);
}

.nav__link[aria-current="page"] {
  color: var(--ink-strong);
}

/* Navbar Dropdown */
.nav__item--has-dropdown {
  position: relative;
  padding-bottom: 8px;
  margin-bottom: -8px;
}

.nav__link--dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav__arrow {
  transition: transform var(--t-base) var(--ease);
}

.nav__item--has-dropdown:hover .nav__arrow,
.nav__item--has-dropdown:focus-within .nav__arrow,
.nav__item--has-dropdown.is-open .nav__arrow {
  transform: rotate(180deg);
}

.nav__dropdown {
  position: absolute;
  top: calc(100% - 4px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 580px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.04);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s ease;
  z-index: 1000;
}

/* Invisible bridge connecting trigger button to dropdown box */
.nav__dropdown::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
}

.nav__item--has-dropdown:hover .nav__dropdown,
.nav__item--has-dropdown:focus-within .nav__dropdown,
.nav__item--has-dropdown.is-open .nav__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown-header {
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  margin-bottom: 12px;
  border: 1px solid var(--line);
}

.nav__dropdown-main-link {
  display: block;
  text-decoration: none;
}

.nav__dropdown-main-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-strong);
}

.nav__dropdown-main-title::after {
  content: "→";
  font-family: var(--font-sans);
  transition: transform var(--t-fast) var(--ease);
}

.nav__dropdown-main-link:hover .nav__dropdown-main-title::after {
  transform: translateX(4px);
}

.nav__dropdown-main-sub {
  display: block;
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.nav__dropdown-divider {
  height: 1px;
  background: var(--line);
  margin-bottom: 12px;
}

.nav__dropdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.nav__dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.nav__dropdown-item:hover {
  background: var(--surface-2);
  transform: translateX(2px);
}

.nav__dropdown-icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
  color: var(--blue-accent);
}

.nav__dropdown-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-strong);
  line-height: 1.3;
}

.nav__dropdown-desc {
  display: block;
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.35;
  margin-top: 2px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--s-1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface-card);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
  cursor: pointer;
  padding: 0;
  transition: border-color var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}

.nav-toggle:hover {
  border-color: var(--line-focus);
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.8px;
  background: var(--ink-strong);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease;
  transform-origin: center;
}

.nav-toggle span + span {
  margin-top: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.3px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.3px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav,
  .header__actions .btn {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
}

/* Below this width there simply isn't room for a long label on one line, so
   release nowrap and let the pill grow taller instead of wider. */
@media (max-width: 560px) {
  .btn {
    white-space: normal;
    line-height: 1.3;
    border-radius: var(--r-lg);
  }
  .btn--sm {
    border-radius: var(--r-pill);
  }
}

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 72px 0 0;
  z-index: calc(var(--z-header) - 1);
  background: var(--canvas);
  padding: var(--s-4) var(--gutter) var(--s-8);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base) var(--ease),
    transform var(--t-base) var(--ease), visibility var(--t-base);
}

.drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.drawer a:not(.btn) {
  padding: var(--s-2) 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  border-bottom: 1px solid var(--line);
}

.drawer__group {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
}

.drawer__group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--s-2) 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.drawer__group-toggle .drawer__arrow {
  transition: transform var(--t-base) var(--ease);
}

.drawer__group-toggle[aria-expanded="true"] .drawer__arrow {
  transform: rotate(180deg);
}

.drawer__sub-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0 12px;
}

.drawer__sub-links[hidden] {
  display: none;
}

.drawer__sub-link {
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 6px 12px !important;
  color: var(--ink-muted) !important;
  border-bottom: none !important;
  border-radius: var(--r-sm);
  transition: all var(--t-fast) var(--ease);
}

.drawer__sub-link:hover,
.drawer__sub-link[aria-current="page"] {
  color: var(--blue-accent) !important;
  background: var(--surface-2);
  padding-left: 16px !important;
}

.drawer .btn {
  margin-top: var(--s-3);
  border-bottom: none !important;
  color: #ffffff !important;
}

.drawer .btn--primary {
  color: #ffffff !important;
  background-color: #000000;
}

/* Scroll progress line, pinned under the header */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(
    90deg,
    var(--blue-primary),
    var(--blue-accent)
  );
  z-index: calc(var(--z-header) + 1);
  will-change: transform;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--s-4);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease),
    background-color var(--t-base) var(--ease),
    transform var(--t-base) var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

/* Cursor-tracking spotlight. --mx/--my are written by spotlight.js.
   This is the one hover effect used across the site — one idea, repeated,
   instead of five different ones. */
.card--spot::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    rgba(90, 132, 200, 0.1),
    transparent 62%
  );
  transition: opacity var(--t-base) var(--ease);
}

.card--spot:hover::before {
  opacity: 1;
}

.card--link:hover {
  transform: translateY(-2px);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--s-3);
  border-radius: var(--r-md);
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--blue-accent);
  transition: color var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease);
}

.card:hover .card__icon {
  border-color: var(--accent-ring);
}

.card__icon svg {
  width: 20px;
  height: 20px;
}

.card__title {
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: var(--ls-h3);
  color: var(--ink-strong);
  margin-bottom: var(--s-1);
}

.card__text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-muted);
}

.card__features {
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
}

.card__foot {
  margin-top: auto;
  padding-top: var(--s-3);
}

/* Services Swiper Carousel */
.services-swiper-container,
.portfolio-swiper-container {
  position: relative;
  width: 100%;
  margin-top: var(--s-4);
}

.services-swiper,
.portfolio-swiper {
  width: 100%;
  padding: 6px 4px 16px;
  overflow: hidden;
}

.services-swiper .swiper-wrapper,
.portfolio-swiper .swiper-wrapper {
  display: flex;
}

.services-swiper .swiper-slide,
.portfolio-swiper .swiper-slide {
  height: auto;
  display: flex;
}

.services-swiper .swiper-slide .card,
.portfolio-swiper .swiper-slide .work {
  width: 100%;
  height: 100%;
}

.work__link-badge {
  display: inline-block;
  margin-left: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #000000;
}

/* Professional Browser Frame Mockup for Cards & Modal */
.browser-frame {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #0d1117;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.browser-frame__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #161b22;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.browser-frame__dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.browser-frame__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.browser-frame__dots i.dot-red { background: #ff5f56; }
.browser-frame__dots i.dot-yellow { background: #ffbd2e; }
.browser-frame__dots i.dot-green { background: #27c93f; }

.browser-frame__url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 10px;
  border-radius: 10px;
  margin: 0 auto;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-frame__viewport {
  width: 100%;
  max-height: 520px;
  overflow-y: auto;
  background: #0d1117;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.browser-frame__viewport img {
  width: 100%;
  height: auto;
  min-height: 180px;
  object-fit: contain;
  object-position: top center;
  display: block;
  background: #0d1117;
  border: 0;
  border-radius: 0;
}

.browser-frame--card {
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  box-shadow: none;
}

.browser-frame--card .browser-frame__viewport {
  aspect-ratio: 16 / 10;
  max-height: none;
  height: 100%;
}

.browser-frame--card .browser-frame__viewport img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  background: #0d1117;
}

.browser-frame--modal {
  margin: 16px 16px 0;
  width: calc(100% - 32px);
  border-radius: var(--r-lg);
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
}

.slider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #000000;
  border: 1px solid #000000;
  color: #ffffff;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-fast) var(--ease);
}

.slider-btn:hover {
  background: #222222;
  color: #ffffff;
  border-color: #222222;
  box-shadow: var(--shadow-md);
  transform: scale(1.05);
}

.slider-btn.swiper-button-disabled,
.slider-btn[disabled] {
  background: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
  opacity: 0.55 !important;
  cursor: not-allowed;
  transform: none;
}

.slider-btn svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff !important;
  color: #ffffff !important;
  fill: none;
  display: block;
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: var(--canvas-deep);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  color: var(--ink-muted);
}

.badge--live {
  color: #6ee7a8;
  border-color: rgba(110, 231, 168, 0.24);
  background: rgba(110, 231, 168, 0.08);
}
.badge--draft {
  color: #f0c674;
  border-color: rgba(240, 198, 116, 0.24);
  background: rgba(240, 198, 116, 0.08);
}
.badge--new {
  color: var(--blue-accent);
  border-color: var(--accent-ring);
  background: var(--accent-soft);
}

/* Announcement pill used above the hero headline */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 6px 6px 6px 14px;
  font-size: 13px;
  color: var(--ink);
  background: #f4f4f5;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  transition: all var(--t-base) var(--ease);
}

.pill:hover {
  border-color: #000000;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.pill__tag {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: #000000;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}

.field__label {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink);
}

.field__label span {
  color: var(--ink-faint);
  font-weight: 400;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  color: var(--ink-strong);
  background: var(--canvas-deep);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--ink-faint);
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--line-strong);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface-1);
}

.textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.7;
}

.select {
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236d7382' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.select option {
  background: var(--surface-1);
  color: var(--ink);
}

.field__error {
  font-size: 13px;
  color: #f28b82;
  min-height: 18px;
}

.field.is-invalid .input,
.field.is-invalid .textarea,
.field.is-invalid .select {
  border-color: rgba(242, 139, 130, 0.5);
}

/* Segmented control — used for budget and timeline, where the options are
   few and fixed. Radios read better than a dropdown here. */
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label {
  padding: 9px 16px;
  font-size: var(--fs-small);
  color: var(--ink-muted);
  background: var(--canvas-deep);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}

.segmented label:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.segmented input:checked + label {
  color: var(--ink-strong);
  background: var(--surface-3);
  border-color: var(--accent-ring);
}

.segmented input:focus-visible + label {
  outline: 2px solid var(--blue-accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Accordion
   -------------------------------------------------------------------------- */
.accordion {
  border-top: 1px solid var(--line);
}

.accordion__item {
  border-bottom: 1px solid var(--line);
}

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  width: 100%;
  padding: var(--s-3) 0;
  text-align: left;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: color var(--t-fast) var(--ease);
}

.accordion__trigger:hover {
  color: var(--ink-strong);
}

.accordion__trigger[aria-expanded="true"] {
  color: var(--ink-strong);
}

.accordion__sign {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
}

.accordion__sign::before,
.accordion__sign::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform var(--t-base) var(--ease),
    opacity var(--t-base) var(--ease);
}

.accordion__sign::before {
  width: 12px;
  height: 1.5px;
}
.accordion__sign::after {
  width: 1.5px;
  height: 12px;
}

.accordion__trigger[aria-expanded="true"] .accordion__sign::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.accordion__panel {
  overflow: hidden;
  height: 0;
  transition: height var(--t-base) var(--ease);
}

.accordion__panel > div {
  padding-bottom: var(--s-3);
  max-width: 68ch;
  color: var(--ink-muted);
  line-height: var(--lh-body);
}

/* --------------------------------------------------------------------------
   Toast + inline states
   -------------------------------------------------------------------------- */
.toast-stack {
  position: fixed;
  right: var(--s-3);
  bottom: var(--s-3);
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  padding: 12px 18px;
  font-size: var(--fs-small);
  color: var(--ink-strong);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  animation: toast-in var(--t-base) var(--ease);
}

.toast--error {
  border-color: rgba(242, 139, 130, 0.4);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.empty {
  padding: var(--s-8) var(--s-3);
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  color: var(--ink-muted);
}

.empty h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--ink-strong);
  margin-bottom: var(--s-1);
}

/* Skeleton loading — same footprint as the real card, so nothing shifts. */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  min-height: 220px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(222, 222, 224, 0.04),
    transparent
  );
  animation: shimmer 1.4s infinite;
}

/* --------------------------------------------------------------------------
   Animations & Micro-interactions
   -------------------------------------------------------------------------- */
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulseDot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.25);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0);
  }
}

/* Button Shimmer Sweep Effect */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover::after {
  left: 100%;
}

.btn:active {
  transform: scale(0.96) !important;
}

/* Card Icon Hover Animation */
.card:hover .card__icon {
  transform: scale(1.12) rotate(-3deg);
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.card__icon {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Chip Hover Micro-Interaction */
.chip {
  transition: all 0.25s ease;
}

.chip:hover {
  background: #000000;
  color: #ffffff;
  transform: translateY(-1.5px);
}

/* Process Dot Active Pulse */
.step.is-active .step__dot {
  background: #000000;
  border-color: #000000;
  animation: pulseDot 2.2s infinite;
}

/* --------------------------------------------------------------------------
   Reveal on scroll — set by reveal.js
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal="scale"] {
  opacity: 0;
  transform: scale(0.93) translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal="scale"].is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal="scale"] {
    opacity: 1;
    transform: none;
  }
}
