/* =============================================================
   TransRisk v3 — industries.css
   Styles specific to industries.html
============================================================= */


/* ========================
   HERO
======================== */

.ind-hero {
  position: relative;
  background: var(--color-navy);
  padding: 96px 40px 88px;
  text-align: center;
  overflow: hidden;
}

.ind-hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.ind-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.ind-hero-title {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 760px;
  margin: 0;
}

.ind-hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  color: rgba(255,255,255,0.62);
  max-width: 620px;
  line-height: 1.75;
  margin: 0;
}

@media (max-width: 720px) {
  .ind-hero { padding: 72px 24px 64px; }
}


/* ========================
   SECTION 1 — INDUSTRY SELECTOR
======================== */

.ind-selector-section {
  background: var(--color-light);
  padding: 0 0 72px;
}

/* ── Tab bar ──
   A segmented pill track rather than an underline row. The panel below is now a
   free-standing bento card with its own border on all four sides, so the tabs no
   longer need to sit on a shared edge — and a floating track survives the sticky
   position without a hairline seam appearing between it and the panel.
   The wrap keeps the section background: it is sticky, so anything scrolling
   under it must be covered. ── */

.ind-tab-bar-wrap {
  background: var(--color-light);
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  padding: 16px 0 4px;
}

.ind-tab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ind-tab-bar::-webkit-scrollbar {
  display: none;
}

.ind-tab {
  flex-shrink: 0;
  /* 8 tabs must clear the 1152px container without horizontal scroll */
  padding: 9px 15px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-muted);
  background: none;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), background-color var(--transition);
}

.ind-tab:hover {
  color: var(--color-text);
  background: var(--color-light);
}

.ind-tab.active,
.ind-tab[aria-selected="true"] {
  color: #fff;
  background: var(--color-navy);
  font-weight: 600;
}

.ind-tab.active:hover,
.ind-tab[aria-selected="true"]:hover {
  color: #fff;
  background: var(--color-navy);
}

.ind-tab:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .ind-tab-bar {
    width: auto;
    border-radius: var(--radius-lg);
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .ind-tab-bar-wrap { padding: 12px 0 4px; }
  .ind-tab { padding: 8px 13px; font-size: 0.875rem; }
}


/* ── Panel wrapper ── */

.ind-panel {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 36px 36px 40px;
  margin-top: 16px;
  animation: panelFadeIn 0.22s ease;
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Panel header (icon + title) ── */

.ind-panel-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

/* Carries the same diagonal gradient as the tile chips, at rest rather than on
   hover — it is the one chip on the panel that is not competing for attention,
   so it can hold the brand hue outright. The tint was mixed from #2d7a3a, the
   pre-2026 green the token file records as 19° off the mark; it is on
   --color-green now like everything else. */
.ind-panel-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 133, 64, 0.07);
  background-image: linear-gradient(135deg, rgba(0, 133, 64, 0.16) 0%, transparent 76%);
  border-radius: var(--radius-lg);
  color: var(--color-green-dark);
}

.ind-panel-icon svg {
  width: 28px;
  height: 28px;
}

.ind-panel-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.ind-panel-subtitle {
  font-size: 0.9375rem;
  color: var(--color-muted);
  margin: 0;
}

/* ── Panel body — bento grid ──
   Five tiles on a three-column track: the two narrative tiles run two columns
   wide, the two reference tiles sit beside them, and the scope tile takes a
   full-width third row.

   Colour is a system of three, not a swatch per tile. The first cut of this
   grid carried five unrelated hue families — a pink card, a mint card, a slate
   card, blue instrument pills and near-black commodity chips with mint text —
   none of them the brand's, which is what made it read as generic. Now:

     clay     the problem, and only the problem
     emerald  what TransRisk does about it — the brand hue, unchanged
     navy     neutral reference; it states, it does not judge

   Every tile derives its chip, status pill, list marker, dot field and hover
   gradient from four custom properties, so re-hueing a tile is one line and
   nothing can drift out of step with it. ── */

.ind-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 32px;
  align-items: stretch;
}

.ind-bento-card {
  --tile-ink:  var(--color-navy);
  --tile-wash: rgba(15, 31, 46, 0.055);
  --tile-edge: rgba(15, 31, 46, 0.22);
  --tile-veil: rgba(15, 31, 46, 0.022);

  position: relative;
  overflow: hidden;
  padding: 18px 20px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  /* A veil rather than a fill: the hue fades out within 96px, so the tile is
     tinted at the chip and white where the text sits. */
  background: linear-gradient(180deg, var(--tile-veil), rgba(255, 255, 255, 0) 96px), #fff;
  transition: transform var(--transition), box-shadow var(--transition);
  will-change: transform;
}

.ind-bento-card--challenge {
  --tile-ink:  #9C3D31;
  --tile-wash: rgba(156, 61, 49, 0.075);
  --tile-edge: rgba(156, 61, 49, 0.34);
  --tile-veil: rgba(156, 61, 49, 0.030);
}

/* The answer and the coverage it rests on both speak for the platform, so both
   carry the brand emerald. */
.ind-bento-card--solution,
.ind-bento-card--instrument {
  --tile-ink:  var(--color-green-dark);
  --tile-wash: rgba(0, 133, 64, 0.075);
  --tile-edge: rgba(0, 133, 64, 0.32);
  --tile-veil: rgba(0, 133, 64, 0.026);
}

.ind-bento-card--wide {
  grid-column: span 2;
}

/* The scope tile runs the full track width as a third row, so the four tiles
   above keep their 2+1 / 2+1 rhythm and the grid stays whole — a two-wide tile
   in a third row would leave a hole beside it. */
.ind-bento-card--full {
  grid-column: span 3;
}

.ind-bento-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ── Hover: the two gradients ──
   Both are held at zero and faded in, so a tile is flat until it is the one
   being read.

   1. A gradient hairline drawn diagonally across the border. The element is
      filled edge to edge, then masked to its own 1px padding ring — the two
      masks overlap everywhere except that ring, and `exclude` keeps only the
      difference. A plain border cannot hold a gradient, and an inset shadow
      cannot be diagonal. ── */
.ind-bento-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent 12%, var(--tile-edge) 50%, transparent 88%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.ind-bento-card:hover::after {
  opacity: 1;
}

/* 2. The dot field, on the tile's own hue rather than one flat grey. */
.ind-bento-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image: radial-gradient(circle, var(--tile-wash) 1px, transparent 1px);
  background-size: 4px 4px;
  transition: opacity 0.3s ease;
}

.ind-bento-card:hover .ind-bento-dots {
  opacity: 1;
}

.ind-bento-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ind-bento-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* The chip is flat at rest and picks up a diagonal gradient on hover — the
   third of the three hover gradients, and the one that reads at a glance
   because it sits on a filled 32px square. `background-color` and
   `background-image` are set separately so the gradient layers over the wash
   instead of replacing it. */
.ind-bento-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background-color: var(--tile-wash);
  color: var(--tile-ink);
  transition: background-image 0.3s ease, box-shadow 0.3s ease;
}

.ind-bento-card:hover .ind-bento-icon {
  background-image: linear-gradient(135deg, var(--tile-edge) 0%, transparent 78%);
  box-shadow: 0 0 0 1px var(--tile-wash);
}

.ind-bento-icon svg {
  width: 17px;
  height: 17px;
}

.ind-bento-status {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: var(--radius-md);
  background: var(--tile-wash);
  color: var(--tile-ink);
  white-space: nowrap;
}

.ind-bento-title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
  line-height: 1.35;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ind-bento-card,
  .ind-bento-card::after,
  .ind-bento-icon,
  .ind-bento-dots { transition: none; }
  .ind-bento-card:hover { transform: none; }
}


/* ── Pills ──
   Data chips, not marketing pills: a rounded rectangle at the same radius as
   the icon chip and the status pill, so the three chip shapes on a tile agree.
   Commodities are navy — the market's own substance, stated flat. Instruments
   are emerald, because supporting one is a claim TransRisk makes.

   The previous commodity chip was near-black with mint text, which was the
   loudest object on a light page and the one piece of dark-mode styling in the
   whole design. ── */

.ind-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ind-pill {
  display: inline-block;
  padding: 5px 11px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  transition: background-color var(--transition), border-color var(--transition);
}

.ind-pill--commodity {
  background: rgba(15, 31, 46, 0.045);
  color: var(--color-navy);
  border: 1px solid rgba(15, 31, 46, 0.11);
}

.ind-pill--commodity:hover {
  background: rgba(15, 31, 46, 0.085);
  border-color: rgba(15, 31, 46, 0.2);
}

.ind-pill--instrument {
  background: rgba(0, 133, 64, 0.05);
  color: var(--color-green-dark);
  border: 1px solid rgba(0, 133, 64, 0.18);
}

.ind-pill--instrument:hover {
  background: rgba(0, 133, 64, 0.09);
  border-color: rgba(0, 133, 64, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .ind-pill { transition: none; }
}


/* ── Tile lists ──
   Markers inherit the tile's ink, so nothing here names a colour. */

.ind-bento-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ind-bento-list li {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #374151;
  padding-left: 20px;
  position: relative;
}

.ind-bento-list--challenge li::before {
  content: '\2715';
  position: absolute;
  left: 0;
  color: var(--tile-ink);
  font-weight: 700;
  font-size: 0.75rem;
  top: 3px;
}

.ind-bento-list--solution li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--tile-ink);
  font-weight: 700;
  font-size: 0.8125rem;
  top: 2px;
}

/* Scope list — six to nine short items, so it runs as columns rather than one
   long single-file column across a full-width tile. Overrides the flex column
   on .ind-bento-list. */
.ind-bento-list--solve {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 24px;
}

.ind-bento-list--solve li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: var(--tile-ink);
  font-weight: 700;
  font-size: 0.8125rem;
  top: 1px;
}

/* ── Panel CTA ── */

/* ── Panel CTA pair ──
   Two answers to one decision, so they share a metric — same height, same
   optical padding — and hierarchy is carried by weight, not by size. The row
   had no `gap`, which is why the two buttons sat edge to edge. ── */

.ind-panel-cta {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: stretch;
  gap: 12px;
}

.ind-panel-cta .btn-primary,
.ind-panel-cta .btn-secondary {
  padding: 0 22px;
  min-height: 46px;          /* comfortable touch target, and one shared height */
  font-size: 14px;
  letter-spacing: 0.005em;
}

/* The secondary is a quieter sibling, not a second primary: a hairline
   instead of the global 2px, and it only picks up green on hover. */
.ind-panel-cta .btn-secondary {
  background: #fff;
  border-width: 1px;
  border-color: var(--color-border);
  color: var(--color-navy);
}

.ind-panel-cta .btn-secondary:hover {
  background: #fff;
  border-color: var(--color-green);
  color: var(--color-green-dark);
}

/* The arrow is the affordance, so it moves instead of the whole button —
   the global .btn-primary:hover scale reads as jitter at this size. */
.ind-panel-cta .btn-arrow {
  transition: transform var(--transition);
}

.ind-panel-cta a:hover .btn-arrow,
.ind-panel-cta a:focus-visible .btn-arrow {
  transform: translateX(3px);
}

.ind-panel-cta .btn-primary:hover {
  background: var(--color-green-light);
  border-color: var(--color-green-light);
  box-shadow: 0 4px 16px rgba(0, 133, 64, 0.28);
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .ind-panel-cta .btn-arrow { transition: none; }
  .ind-panel-cta a:hover .btn-arrow,
  .ind-panel-cta a:focus-visible .btn-arrow { transform: none; }
}

@media (max-width: 560px) {
  .ind-panel-cta { flex-direction: column; }
  .ind-panel-cta .btn-primary,
  .ind-panel-cta .btn-secondary { width: 100%; white-space: normal; }
}

/* Two columns: the wide tiles take a full row each, so the two reference tiles
   are re-ordered to pair off underneath. Left in DOM order they would sit one
   per row with a hole beside each — a two-wide tile cannot follow a one-wide
   tile in a two-column track. Nothing inside a tile is focusable, so visual
   order and DOM order are free to differ here. */
@media (max-width: 1000px) {
  .ind-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ind-bento-card--challenge  { order: 1; }
  .ind-bento-card--solution   { order: 2; }
  .ind-bento-card--commodity  { order: 3; }
  .ind-bento-card--instrument { order: 4; }
  .ind-bento-card--solve      { order: 5; grid-column: span 2; }

  .ind-bento-list--solve {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .ind-bento {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .ind-bento-card--wide,
  .ind-bento-card--solve {
    grid-column: span 1;
  }

  .ind-bento-list--solve {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .ind-panel {
    padding: 24px 20px 28px;
    border-radius: var(--radius-lg);
  }

  .ind-panel-cta {
    justify-content: flex-start;
  }
}


/* ========================
   SECTION 2 — OTHER INDUSTRIES
======================== */

.other-industries-section {
  background: #fff;
}

.other-ind-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.other-ind-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Pills block */
.other-ind-pills-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px;
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  align-self: center;
}

.other-ind-pills-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0;
}

.other-ind-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.other-ind-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  transition: background var(--transition), color var(--transition);
}

.other-ind-pill:hover {
  background: #bbf7d0;
  color: #166534;
}

@media (max-width: 860px) {
  .other-ind-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}
