/* ==================================================
   TECHNOLOGIES
   Purpose:
   The technology ecosystem section on the homepage, the
   grouped technology index, and the stack / use-case
   blocks that appear on individual technology pages.
================================================== */

/* ==================================================
   TECHNOLOGY CARD
   Compact card naming one platform or framework.
================================================== */

.technology-card {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--surface);
  transition: transform var(--transition-normal),
              border-color var(--transition-normal),
              box-shadow var(--transition-normal);
}

.technology-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-200);
  box-shadow: var(--shadow-md);
}

.technology-card__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background-color: var(--brand-50);
  border: 1px solid var(--brand-100);
}

.technology-card__icon img { width: 21px; height: 21px; }

.technology-card__name {
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--ink-800);
  letter-spacing: var(--tracking-snug);
}

.technology-card__role {
  display: block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-regular);
  color: var(--ink-400);
  margin-top: 2px;
}

/* Dark variant for the technology expertise band. */
.technology-card--on-dark {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.technology-card--on-dark:hover {
  background-color: rgba(255, 255, 255, 0.07);
  border-color: rgba(78, 155, 255, 0.42);
}

.technology-card--on-dark .technology-card__name { color: #FFFFFF; }
.technology-card--on-dark .technology-card__role { color: var(--color-on-dark-muted); }

.technology-card--on-dark .technology-card__icon {
  background-color: rgba(22, 104, 255, 0.18);
  border-color: rgba(78, 155, 255, 0.3);
}

/* ==================================================
   TECHNOLOGY GROUP
   Frontend / backend / mobile / database / cloud
   groupings on the technology index and homepage.
================================================== */

.tech-group + .tech-group { margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); }

.tech-group__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-3) var(--s-4);
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--color-border);
}

.tech-group__title {
  font-size: var(--fs-h3);
}

.tech-group__note {
  font-size: var(--fs-sm);
  color: var(--ink-400);
}

.section--dark .tech-group__header { border-bottom-color: rgba(255, 255, 255, 0.12); }
.section--dark .tech-group__note { color: var(--color-on-dark-muted); }

.tech-group__grid {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

/* ==================================================
   STACK WALL
   Purpose:
   The grouped technology and platform overview — one
   card per family, each listing the platforms in it.
   Items with their own page are links; the rest are
   plain tiles, so the wall can describe the whole stack
   without pointing at pages that do not exist.
================================================== */

.stack-wall {
  display: grid;
  gap: var(--gap-grid);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.stack-group {
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background-color: var(--surface);
  box-shadow: var(--shadow-xs);
}

.stack-group__heading {
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--color-border);
}

.stack-group__items {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 92px), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.stack-item__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  height: 100%;
  padding: var(--s-3) var(--s-2);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  text-align: center;
  transition: border-color var(--transition-fast),
              background-color var(--transition-fast),
              transform var(--transition-fast);
}

/* Only the linked tiles respond to the pointer; static ones must not look
   clickable when they are not. */
a.stack-item__link:hover {
  border-color: var(--brand-200);
  background-color: var(--brand-50);
  transform: translateY(-2px);
}

.stack-item__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background-color: var(--surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-xs);
  /* Each product's own colour, mapped from data-brand by css/tech-tints.css. */
  color: var(--brand-tint, var(--brand-500));
  font-size: 1.2rem;
  line-height: 1;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

a.stack-item__link:hover .stack-item__icon {
  border-color: currentColor;
  transform: scale(1.05);
}

/* Reserve the glyph's box so the grid does not reflow when the icon kit
   finishes loading. */
.stack-item__icon i {
  display: block;
  width: 1.2em;
  height: 1.2em;
  line-height: 1.2em;
  text-align: center;
}

.stack-item__label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: 1.35;
  color: var(--ink-600);
}

a.stack-item__link:hover .stack-item__label { color: var(--brand-700); }

.stack-item__link--static .stack-item__label { color: var(--ink-500); }

/* Dark presentation for use inside a .section--dark band. */
.section--dark .stack-group {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.section--dark .stack-group__heading {
  color: var(--ink-300);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.section--dark .stack-item__icon {
  background: rgba(22, 104, 255, 0.18);
  border-color: rgba(78, 155, 255, 0.3);
}

.section--dark .stack-item__label { color: var(--color-on-dark-muted); }

.section--dark a.stack-item__link:hover {
  border-color: rgba(78, 155, 255, 0.45);
  background-color: rgba(22, 104, 255, 0.14);
}

.section--dark a.stack-item__link:hover .stack-item__label { color: #FFFFFF; }

/* ==================================================
   STACK TABLE
   Plain, scannable "what we use it with" table on
   technology pages. Scrolls inside its own container on
   narrow screens so the page never scrolls sideways.
================================================== */

.stack-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}

.stack-table {
  width: 100%;
  min-width: 520px;
  font-size: var(--fs-sm);
  text-align: left;
}

.stack-table th,
.stack-table td {
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.stack-table thead th {
  background-color: var(--surface-muted);
  font-weight: var(--fw-semibold);
  color: var(--ink-700);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  white-space: nowrap;
}

.stack-table tbody tr:last-child td { border-bottom: none; }

.stack-table td:first-child {
  font-weight: var(--fw-semibold);
  color: var(--ink-800);
  white-space: nowrap;
}

.stack-table td { color: var(--ink-500); }

/* ==================================================
   USE-CASE LIST
   "Good fit for / less suited to" honesty block that
   keeps technology pages useful rather than promotional.
================================================== */

.fit-grid {
  display: grid;
  gap: var(--gap-grid);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.fit-card {
  padding: var(--s-6);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--surface);
}

.fit-card__title {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: var(--fs-h4);
  margin-bottom: var(--s-4);
}

.fit-card__title::before {
  content: "";
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: var(--success-50);
  background-position: center;
}

.fit-card--caution .fit-card__title::before { background-color: var(--accent-100); }

.fit-card__list { display: grid; gap: var(--s-3); }

.fit-card__item {
  display: flex;
  gap: var(--s-3);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--ink-500);
}

.fit-card__item::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: var(--success-500);
}

.fit-card--caution .fit-card__item::before { background-color: var(--accent-500); }

/* ==================================================
   VERSION / MATURITY NOTE
   Small print clarifying that stack choices are made per
   project rather than by default.
================================================== */

.stack-note {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--radius-sm);
  background-color: var(--brand-50);
  border: 1px solid var(--brand-100);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--brand-800);
}
