/* ============================================================
   Octagon Tabbed Feature Container  (home page, above footer)
   Tabs project OUT above a flat-topped octagon container.
   ============================================================ */

.octa-feature {
  position: relative;
  z-index: 2;
  overflow: hidden;                /* keeps the drifting octagons inside */
  padding: 50px 0 55px;
  /* Section background: fades in from the page, into a deep blue —
     no more pure black. Bottom colour is mirrored by .footerbackground. */
  background:
    radial-gradient(115% 70% at 50% 4%, rgba(46, 86, 190, 0.30) 0%, rgba(46, 86, 190, 0) 62%),
    linear-gradient(180deg,
      rgba(10, 19, 48, 0) 0%,
      #0a1330 15%,
      #0b1636 58%,
      #0c1738 100%);
}

/* content sits above the octagon field */
.octa-feature > .webdivider2,
.octa-feature > .auto-container {
  position: relative;
  z-index: 2;
}

/* ---- Section-wide octagon field ---------------------------
   Hard-edged octagon OUTLINES (real SVG polygons + strokes) in the
   site's skin colours, drifting across and through each other.     */
.octa-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.72;
}

/* size / colour / position are all driven by the JS simulation */
.of {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  overflow: visible;
  will-change: transform;
}
.of polygon {
  fill: none;                        /* outline only, no fill */
  stroke: currentColor;
  stroke-width: 1.5;                 /* fine hard border */
  vector-effect: non-scaling-stroke; /* constant width at any size */
  stroke-linejoin: miter;            /* keep the octagon corners sharp */
}

.octa-feature .auto-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.octa-feature .sec-title {
  margin-bottom: 30px;
}

/* Section heading — multicoloured site-skin gradient with a hard black stroke */
.octa-feature .sec-title_heading span.textoverride {
  -webkit-text-stroke: 0 !important;
}
/* Two layers: the element itself is a THICK black stroked copy (the outline),
   and ::after paints the multicoloured text on top at full size. Doing it this
   way means the stroke can be as heavy as we like without eating the colours. */
.octa-feature .sec-title_heading strong,
.tetris-one .sec-title_heading strong {
  position: relative;
  display: inline-block;
  background: none !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  -webkit-text-stroke: 4px #000 !important;   /* thick hard black outline */
  paint-order: stroke fill;
}
.octa-feature .sec-title_heading strong::after,
.tetris-one .sec-title_heading strong::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  -webkit-text-stroke: 0 !important;
  background: linear-gradient(95deg,
      #05E8F6 0%,
      #aafff7 13%,
      #e6ff00 28%,
      #ffdb28 42%,
      #ffa315 57%,
      #c91d7c 76%,
      #6401b2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
/* "Where the World Comes to Match" takes a slightly finer stroke than Discover */
.tetris-one .sec-title_heading strong {
  -webkit-text-stroke: 3px #000 !important;
}

.octa-feature .sec-title_heading span.textoverride {
  background: none !important;
  color: #7fa6d4 !important;
  -webkit-text-fill-color: #7fa6d4 !important;
  font-size: 15px;
  letter-spacing: 1.5px;
}

.octa-shell {
  max-width: 1000px;
  margin: 0 auto;
}

/* ============================================================
   TAB STRIP — octagonal tabs sitting on top of the container
   ============================================================ */
.octa-tabbar {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;   /* shared baseline (the shelf) */
  min-height: 70px;        /* fixed so growing/shrinking tabs never reflow the page */
  gap: 7px;
  /* 48px content padding + 1.5px bevel: lines the first tab's left border up
     exactly with the pane headings, and clears the container's 15px corner */
  padding-left: 50px;
  margin-bottom: -1.5px;   /* overlap the container top border by the bevel width */
}

.octa-tab {
  appearance: none;
  border: 0;
  padding: 1.5px 1.5px 0;
  cursor: pointer;
  background: linear-gradient(125deg, #1879c9, #05E8F6 40%, #aafff7 70%, #bed0e3);
  clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%, 0 15px);
  transition: filter 0.4s ease;
}

.octa-tab-face {
  display: flex;
  align-items: center;             /* label stays centred, so it RISES as the tab grows */
  justify-content: center;
  gap: 10px;
  /* height is driven by min-height (animated). Horizontal padding is the
     SAME for active/inactive, so only the HEIGHT changes on select. */
  min-height: 44px;
  padding: 0 22px;
  font-family: 'Squada One', 'Inter', sans-serif;
  font-size: 16px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #9fb4d6;
  background: linear-gradient(180deg, #10214b 0%, #0c1836 100%);
  clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%, 0 15px);
  transition: color 0.3s ease,
              background 0.3s ease,
              min-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              padding-bottom 0.5s cubic-bezier(0.22, 1, 0.36, 1);  /* smooth, unhurried pop */
}

.octa-tab:hover .octa-tab-face { color: #dbe8ff; }

/* ACTIVE — grows in HEIGHT only (label rides up with it), brighter,
   fill matches the container top so it reads as one continuous shape. */
.octa-tab.active {
  z-index: 4;
  filter: drop-shadow(0 -5px 14px rgba(5, 232, 246, 0.28));
}
.octa-tab.active .octa-tab-face {
  color: #ffffff;
  min-height: 66px;                /* only the height changes */
  padding-bottom: 26px;            /* pushes the label UP with the growing tab */
  background: linear-gradient(180deg, #16295a 0%, #0e1c40 100%);
}

/* ---- Octagonal icon bullet (bevel + fill + FA icon) ------- */
.octa-ico {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  padding: 2px;
  background: linear-gradient(135deg, #05E8F6, #1879c9);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  transition: background 0.3s ease, filter 0.3s ease;
}
.octa-ico-in {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1430;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
.octa-ico-in i {
  font-size: 10px;
  line-height: 1;
  color: #7fe9f6;
  transition: color 0.3s ease;
}
.octa-tab.active .octa-ico {
  background: linear-gradient(135deg, #6fd0ff, #1879c9);
  filter: drop-shadow(0 0 6px rgba(90, 200, 245, 0.7));
}
.octa-tab.active .octa-ico-in { background: #08122e; }
.octa-tab.active .octa-ico-in i { color: #aef0ff; }

/* ---- Carousel arrows (mobile only; hidden on desktop) ----- */
.octa-tab-arrow {
  display: none;            /* shown only in the mobile media query */
  appearance: none;
  border: 0;
  cursor: pointer;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 2px;
  background: linear-gradient(135deg, #05E8F6, #1879c9);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  transition: filter 0.2s ease, transform 0.12s ease;
}
.octa-arrow-in {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1430;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
.octa-arrow-in i { color: #7fe9f6; font-size: 15px; line-height: 1; }
.octa-tab-arrow:hover { filter: drop-shadow(0 0 6px rgba(90, 200, 245, 0.6)); }
.octa-tab-arrow:active { transform: scale(0.92); }

/* ============================================================
   CONTAINER — flat top (tabs sit on it), octagon bottom
   ============================================================ */
.octa-panel {
  position: relative;
  padding: 1.5px;
  background: linear-gradient(125deg, #1879c9, #05E8F6 35%, #aafff7 60%, #bed0e3);
  clip-path: polygon(
    15px 0,
    calc(100% - 15px) 0,
    100% 15px,
    100% calc(100% - 15px),
    calc(100% - 15px) 100%,
    15px 100%,
    0 calc(100% - 15px),
    0 15px
  );
  border-radius: 2px;
  filter: drop-shadow(0 14px 34px rgba(2, 6, 40, 0.55)) drop-shadow(0 0 20px rgba(5, 232, 246, 0.16));
}

.octa-panel-inner {
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: left;
  clip-path: polygon(
    15px 0,
    calc(100% - 15px) 0,
    100% 15px,
    100% calc(100% - 15px),
    calc(100% - 15px) 100%,
    15px 100%,
    0 calc(100% - 15px),
    0 15px
  );
  border-radius: 2px;
  background:
    radial-gradient(135% 90% at 50% -15%, rgba(24, 121, 201, 0.42) 0%, rgba(24, 121, 201, 0) 55%),
    radial-gradient(120% 130% at 100% 118%, rgba(5, 232, 246, 0.14) 0%, rgba(5, 232, 246, 0) 50%),
    linear-gradient(160deg, #0e1d40 0%, #0b1734 55%, #0c1a3e 100%);
  box-shadow: inset 0 0 0 1px rgba(90, 150, 255, 0.14);
}

/* ---- Decorative corner accents ----------------------------
   All four corners are 15px octagon chamfers, so every accent is a
   single slanted line running PARALLEL to its chamfer, sat ~10px inside it.
   Box is 30px at offset 0 -> bar centre (15,15) -> perpendicular distance
   to the chamfer (x+y=15) = |15+15-15|/sqrt(2) = ~10.6px.            */
.octa-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  z-index: 3;
  pointer-events: none;
  opacity: 0.85;
}
.octa-corner::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;          /* a touch longer than the 21px chamfer */
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to right, #05E8F6, #aafff7);
}
.octa-corner::after { content: none; }

.octa-corner.tl { top: 0; left: 0; }
.octa-corner.tr { top: 0; right: 0; }
.octa-corner.bl { bottom: 0; left: 0; }
.octa-corner.br { bottom: 0; right: 0; }

/* each bar is parallel to its own chamfer */
.octa-corner.tl::before { transform: translate(-50%, -50%) rotate(-45deg); }  /* "/" */
.octa-corner.tr::before { transform: translate(-50%, -50%) rotate(45deg); }   /* "\" */
.octa-corner.bl::before { transform: translate(-50%, -50%) rotate(45deg); }   /* "\" */
.octa-corner.br::before { transform: translate(-50%, -50%) rotate(-45deg); }  /* "/" */

/* ---- Fading content (sits above the octagon backdrop) ----- */
.octa-content {
  position: relative;
  z-index: 1;
  min-height: 340px;      /* fits the tallest tab so swapping panes doesn't shift the page */
  padding: 36px 48px 44px;
  opacity: 1;
  transition: opacity 0.26s ease;
}
.octa-content.is-fading { opacity: 0; }

.octa-tabpane { display: none; }
.octa-tabpane.active {
  display: block;
  animation: octaIn 0.42s ease;
}
@keyframes octaIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* carousel slides (mobile) */
@keyframes octaSlideNext {
  from { opacity: 0; transform: translateX(45px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes octaSlidePrev {
  from { opacity: 0; transform: translateX(-45px); }
  to   { opacity: 1; transform: translateX(0); }
}
/* the mobile tab header swapping in */
@keyframes octaTabSwap {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* the whole mobile card arriving from the opposite side */
@keyframes octaCardInNext {
  from { transform: translateX(115%);  opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes octaCardInPrev {
  from { transform: translateX(-115%); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

.octa-kicker {
  display: inline-block;
  font-family: 'Squada One', 'Inter', sans-serif;
  font-size: 13px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #6be3f4;
  margin-bottom: 10px;
}
.octa-kicker::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  vertical-align: middle;
  margin-right: 12px;
  background: linear-gradient(to right, #05E8F6, rgba(5, 232, 246, 0));
}

.octa-tabpane h3 {
  margin: 0 0 12px;
  font-family: 'Squada One', 'Inter', sans-serif;
  font-weight: bold;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0.6px;
  text-transform: capitalize;
  background: linear-gradient(to right, #e6ff00, #ffdb28, #ffa315, #fbff00);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.octa-underline {
  display: block;
  width: 64px;
  height: 3px;
  margin: 0 0 20px;
  border-radius: 2px;
  background: linear-gradient(to right, #05E8F6, #1879c9);
  box-shadow: 0 0 10px rgba(5, 232, 246, 0.5);
}

.octa-tabpane p {
  margin: 0 0 14px;
  max-width: 760px;
  color: #cddcf5;
  font-size: 16px;
  line-height: 1.78;
}
.octa-tabpane p:last-child { margin-bottom: 0; }

.octa-tabpane a { color: orange; text-decoration: none; }
.octa-tabpane a:hover { color: yellow; }

/* ---- "Read more" expander (mobile only) ------------------- */
.octa-more { }                    /* desktop: always shown, no clipping */
.octa-expand { display: none; }   /* desktop: no button needed */

/* ---- Footer corners continue the section colour ----------- */
.footerbackground { background: #0c1738 !important; }

/* ---- Reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .of { animation: none !important; }
  .octa-tab-face { transition: color 0.2s ease, background 0.2s ease; }
  .octa-tabpane.active { animation: none; }
}

/* ---- Responsive ------------------------------------------- */
@media only screen and (max-width: 767px) {
  .octa-feature { padding: 36px 0 62px; }   /* more room before the footer */

  /* The whole container is the carousel; tab buttons are hidden and the
     pane heading acts as the title. Arrows sit at the vertical middle. */
  /* Only the ACTIVE tab shows, centred above the container — it swaps out
     along with the content each time the carousel moves. */
  .octa-tabbar {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    flex-wrap: nowrap;
    padding-left: 0;
    min-height: 56px;
    margin-bottom: -1.5px;   /* matches the thinner bevel */
  }
  .octa-tab:not(.active) { display: none; }
  .octa-tab { max-width: 76vw; }
  .octa-tab-face { font-size: 14px; padding: 0 18px; gap: 8px; min-height: 52px; }
  .octa-tab.active .octa-tab-face { min-height: 52px; padding-bottom: 0; }  /* single tab: no pop needed */
  .octa-tab.active { animation: octaTabSwap 0.4s ease; }

  /* arrows centre on the CONTAINER (the stage), not the whole shell */
  .octa-stage { position: relative; }
  /* Container runs BEHIND the arrows by half an arrow width (arrows are 38px,
     so a 19px inset leaves the inner half of each arrow overlapping the panel). */
  .octa-panel { margin: 0 19px; }

  .octa-tab-arrow {
    display: inline-flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 38px;
    height: 38px;
  }
  .octa-prev { left: 0; }
  .octa-next { right: 0; }
  .octa-tab-arrow:active { transform: translateY(-50%) scale(0.92); }

  .octa-panel,
  .octa-panel-inner {
    clip-path: polygon(
      15px 0,
      calc(100% - 15px) 0,
      100% 15px,
      100% calc(100% - 15px),
      calc(100% - 15px) 100%,
      15px 100%,
      0 calc(100% - 15px),
      0 15px
    );
  }

  .octa-content { padding: 24px 20px 26px; min-height: 250px; }

  /* ---- Whole-card carousel -------------------------------
     The tab header + container move off screen together and the new
     card moves on. The arrows sit on .octa-stage and stay put. */
  .octa-tabbar,
  .octa-panel {
    transition: transform 0.3s ease, opacity 0.3s ease;
    will-change: transform, opacity;
  }
  .octa-shell { position: relative; }   /* anchors the outgoing ghost */

  /* the frozen copy of the outgoing card — slides off at the same time as
     the new card slides on, so the two overlap */
  .octa-ghost {
    position: absolute;
    inset: 0;
    z-index: 2;                /* above the panel, below the arrows (5) */
    pointer-events: none;
    transition: transform 0.42s ease, opacity 0.42s ease;
  }
  .octa-shell[data-dir="next"] .octa-ghost.octa-ghost-out { transform: translateX(-115%); opacity: 0; }
  .octa-shell[data-dir="prev"] .octa-ghost.octa-ghost-out { transform: translateX(115%);  opacity: 0; }

  .octa-shell[data-dir="next"] .octa-tabbar.octa-in,
  .octa-shell[data-dir="next"] .octa-panel.octa-in  { animation: octaCardInNext 0.42s ease; }
  .octa-shell[data-dir="prev"] .octa-tabbar.octa-in,
  .octa-shell[data-dir="prev"] .octa-panel.octa-in  { animation: octaCardInPrev 0.42s ease; }

  /* the card itself moves, so don't also animate the inner pane / tab */
  .octa-tabpane.active { animation: none; }
  .octa-tab.active { animation: none; }

  /* smaller type on mobile */
  .octa-kicker { font-size: 11px; letter-spacing: 2px; margin-bottom: 8px; }
  .octa-kicker::before { width: 18px; margin-right: 9px; }
  .octa-tabpane h3 { font-size: 20px; }
  .octa-underline { width: 48px; height: 2px; margin-bottom: 14px; }
  .octa-tabpane p { font-size: 13.5px; line-height: 1.7; }

  /* only the first paragraph shows; "+" reveals the rest, gradually */
  .octa-more {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.55s ease, opacity 0.45s ease;
  }
  .octa-more.open { max-height: 460px; opacity: 1; }

  .octa-expand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font-family: 'Squada One', 'Inter', sans-serif;
    font-size: 13px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #7fe9f6;
  }
  .octa-expand-ico {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* hard 50/50 split, not a gradient: light blue top, darker bottom */
    background: linear-gradient(to bottom, #aafff7 0%, #aafff7 50%, #05E8F6 50%, #05E8F6 100%);
    clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  }
  .octa-expand-ico i {
    font-size: 9px;
    color: #0b1430;
    transition: transform 0.35s ease;
  }
  .octa-expand.open .octa-expand-ico i { transform: rotate(45deg); }  /* + turns into x */

  .octa-corner { display: none; }
  .of polygon { stroke-width: 1.25; }
}
