/* ==========================================================================
   Console Porting Services — page-specific styles.
   Reuses tokens + shared components from styles.css (header, buttons, kicker,
   trusted-strip, stat-card, footer, cookie banner). Public, indexable page.
   ========================================================================== */

/* ---- Display font (Oswald, self-hosted — porting page only) -------------- */
/* Oswald 600, latin subset. Self-hosted (no Google CDN) to match the site's
   privacy stance. The single static file claims the full weight range so any
   font-weight request maps to it. */
@font-face {
  font-family: "Oswald";
  src: url("assets/fonts/oswald-latin-600.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Re-point the shared --font-display token to Oswald for THIS page only.
   porting.css is loaded solely by porting.html, so the homepage and company
   profile keep their site-wide Impact. Oswald is condensed and far lighter,
   fixing the "too chunky" Impact headings. */
body {
  --font-display: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

/* ---- Accent theming (per section) --------------------------------------- */
.acc-cyan { --accent: var(--cyan); }
.acc-magenta { --accent: var(--magenta); }
.acc-green { --accent: var(--green); }
.acc-amber { --accent: var(--amber); }
.acc-blue { --accent: var(--blue); }

.kicker.acc-cyan { color: var(--cyan); }
.kicker.acc-magenta { color: var(--magenta); }
.kicker.acc-green { color: var(--green); }
.kicker.acc-amber { color: var(--amber); }
.kicker.acc-blue { color: var(--blue); }

/* ---- Generic section + headings ----------------------------------------- */
.port-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) clamp(24px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
}

.port-title {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5.4vw, 4.1rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.port-title span {
  color: #59a7ff;
}

.port-lead {
  max-width: 860px;
  margin: 22px 0 0;
  color: var(--text);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  font-weight: 500;
  line-height: 1.5;
}

/* The shared .stat-grid (styles.css) has no top margin — on the homepage it
   sits in a grid cell. Here it follows .port-lead directly, so add breathing
   room to match the other grids on this page. */
.port-section .stat-grid {
  margin-top: 46px;
}

/* ---- Hero --------------------------------------------------------------- */
.port-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(560px, 80vh, 780px);
  padding: 150px var(--page-pad) 90px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: #04060d;
}

.port-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: saturate(1.08);
}

.port-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(4, 6, 13, 0.5), rgba(4, 6, 13, 0.34) 38%, rgba(4, 6, 13, 0.94)),
    linear-gradient(90deg, rgba(22, 139, 255, 0.16), transparent 55%);
}

.port-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 920px;
}

.port-hero h1 {
  margin: 14px 0 0;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.4rem);
  line-height: 0.92;
  text-transform: uppercase;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.6);
}

.port-hero h1 span {
  color: #59a7ff;
}

.port-hero-platforms {
  margin: 26px 0 0;
  color: #fff;
  font-size: clamp(1.05rem, 2.1vw, 1.5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.port-hero-sub {
  margin: 18px 0 0;
  max-width: 690px;
  color: #c4d2e8;
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.55;
}

.port-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

/* ---- The opportunity ---------------------------------------------------- */
.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin-top: 46px;
}

.problem-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent, var(--blue));
  background: linear-gradient(180deg, rgba(15, 27, 52, 0.55), rgba(5, 10, 20, 0.82));
}

.problem-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 0.8;
  color: var(--accent, var(--blue));
  opacity: 0.9;
}

.problem-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.problem-card p {
  margin: 0;
  color: #cdd9ec;
  font-size: 0.98rem;
  line-height: 1.55;
}

.solution-banner {
  margin-top: 26px;
  padding: 24px clamp(22px, 3vw, 32px);
  border: 1px solid rgba(118, 223, 79, 0.4);
  border-left: 3px solid var(--green);
  background: linear-gradient(120deg, rgba(118, 223, 79, 0.08), transparent 60%), rgba(7, 14, 28, 0.6);
}

.solution-banner p {
  margin: 0;
  color: #e7f4df;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 500;
  line-height: 1.5;
}

.solution-banner strong {
  color: #fff;
}

/* ---- Accreditation ------------------------------------------------------ */
.port-accredit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.port-accredit > p {
  margin: 0;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.port-accredit ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.port-accredit li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 650;
}

.port-accredit img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.85;
}

/* ---- Capabilities ------------------------------------------------------- */
.cap-top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.port-engines {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.port-engines span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 18px;
  border: 1px solid var(--cyan);
  border-radius: 999px;
  background: rgba(40, 215, 255, 0.08);
  color: #cdeffb;
  font-size: 0.88rem;
  font-weight: 700;
}

.cap-visual {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.cap-visual img {
  width: 100%;
}

.cap-arrow {
  font-size: 2rem;
  color: var(--cyan);
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 22px);
  margin-top: clamp(40px, 5vw, 64px);
}

.cap-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 28px 26px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 27, 52, 0.6), rgba(5, 10, 20, 0.82));
  transition: border-color 160ms ease, transform 160ms ease;
}

.cap-card:hover {
  border-color: rgba(40, 215, 255, 0.6);
  transform: translateY(-3px);
}

.cap-icon {
  width: 52px;
  height: 52px;
  filter: brightness(0) saturate(100%) invert(70%) sepia(96%) saturate(1332%) hue-rotate(152deg) brightness(102%) contrast(103%) drop-shadow(0 0 12px rgba(40, 215, 255, 0.25));
}

.cap-card h3 {
  margin: 0;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1.15;
  text-transform: uppercase;
}

.cap-card p {
  margin: 0;
  color: #cdd9ec;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---- Process steps ------------------------------------------------------ */
.port-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: clamp(40px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: pstep;
}

.port-step {
  position: relative;
  padding: 26px 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 27, 52, 0.6), rgba(5, 10, 20, 0.8));
}

.port-step::before {
  counter-increment: pstep;
  content: counter(pstep, decimal-leading-zero);
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--green);
}

.port-step p {
  margin: 0;
  color: #d7e2f4;
  font-size: 0.96rem;
  line-height: 1.5;
}

/* ---- Case study --------------------------------------------------------- */
.case-study {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: center;
  margin-top: 44px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(198, 70, 255, 0.32);
  border-left: 3px solid var(--magenta);
  background: linear-gradient(120deg, rgba(198, 70, 255, 0.08), transparent 55%), rgba(7, 14, 28, 0.55);
}

.case-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
}

.case-role {
  margin: 0 0 8px;
  color: var(--magenta);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.case-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 0.98;
  text-transform: uppercase;
}

.case-copy p {
  margin: 18px 0 0;
  color: #d7e2f4;
  font-size: 1rem;
  line-height: 1.55;
}

.case-copy .outline-button {
  margin-top: 24px;
  min-height: 48px;
  padding: 0 22px;
  font-size: 0.76rem;
}

/* ---- Recent ports grid -------------------------------------------------- */
.port-proof-label {
  margin: clamp(48px, 6vw, 72px) 0 0;
}

.port-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
  margin-top: 24px;
}

.port-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 27, 52, 0.82), rgba(5, 10, 20, 0.9));
  box-shadow: var(--shadow);
}

.port-card > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.port-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 16px;
}

.port-card-body h3 {
  display: flex;
  align-items: flex-start;
  min-height: 2.3em;
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.18;
  text-transform: uppercase;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.platforms span {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #cdd9ec;
  font-size: 0.7rem;
  font-weight: 650;
}

/* ---- Assessment CTA ----------------------------------------------------- */
.port-assessment {
  position: relative;
  padding: clamp(64px, 9vw, 120px) clamp(24px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgba(22, 139, 255, 0.16), transparent 60%),
    rgba(5, 9, 19, 0.65);
}

.assessment-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.port-assessment .port-title {
  max-width: 18ch;
}

.assessment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin-top: 44px;
}

.assessment-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--cyan);
  background: linear-gradient(180deg, rgba(15, 27, 52, 0.6), rgba(5, 10, 20, 0.82));
}

.assessment-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  line-height: 0.8;
  color: var(--cyan);
}

.assessment-card h3 {
  margin: 0;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 850;
  text-transform: uppercase;
}

.assessment-card p {
  margin: 0;
  color: #cdd9ec;
  font-size: 0.96rem;
  line-height: 1.5;
}

.assessment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
}

.solid-button.big {
  min-height: 70px;
  padding: 0 34px;
  font-size: 0.9rem;
}

.assessment-tagline {
  margin: 32px 0 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* ---- FAQ ---------------------------------------------------------------- */
.faq-list {
  margin-top: clamp(40px, 5vw, 56px);
  border-top: 1px solid var(--line);
}

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

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px;
  cursor: pointer;
  list-style: none;
  color: #fff;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  font-weight: 750;
  line-height: 1.35;
}

/* Hide the native disclosure triangle (we draw our own +/- marker). */
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ""; }

.faq-item summary:hover .faq-q,
.faq-item[open] .faq-q {
  color: var(--cyan);
}

.faq-q {
  transition: color 160ms ease;
}

/* +/- marker built from two bars; the vertical bar collapses when open. */
.faq-mark {
  position: relative;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.faq-mark::before,
.faq-mark::after {
  content: "";
  position: absolute;
  background: var(--cyan);
  transition: transform 200ms ease, opacity 200ms ease;
}

.faq-mark::before {
  top: 9px;
  left: 0;
  width: 20px;
  height: 2px;
}

.faq-mark::after {
  top: 0;
  left: 9px;
  width: 2px;
  height: 20px;
}

.faq-item[open] .faq-mark::after {
  transform: scaleY(0);
  opacity: 0;
}

.faq-a {
  max-width: 880px;
  padding: 0 4px 24px;
}

.faq-a p {
  margin: 0;
  color: #cdd9ec;
  font-size: 1rem;
  line-height: 1.6;
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1080px) {
  .cap-top {
    grid-template-columns: 1fr;
  }

  .opportunity-grid,
  .cap-grid,
  .port-steps,
  .assessment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .port-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .case-study {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .opportunity-grid,
  .cap-grid,
  .port-steps,
  .assessment-grid {
    grid-template-columns: 1fr;
  }

  .port-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .port-card-body h3 {
    min-height: 0;
  }

  .port-hero-actions .solid-button,
  .port-hero-actions .outline-button,
  .assessment-actions .solid-button,
  .assessment-actions .outline-button {
    width: 100%;
  }
}
