/* ============================================================
   Platforms Section — editorial/institutional, light theme
   Adapted from the Claude Design handoff to blend with the
   rest of the (light) crimex-landing page.
   Scoped under .platforms-v2 to avoid style leakage.
   ============================================================ */

.platforms-v2 {
  /* Light tokens */
  --pv-bg:        #f7f8fc;          /* matches existing section bg */
  --pv-bg-1:      #ffffff;
  --pv-surface:   #ffffff;
  --pv-line:      rgba(15, 17, 25, 0.08);
  --pv-line-2:    rgba(15, 17, 25, 0.14);
  --pv-line-3:    rgba(15, 17, 25, 0.22);

  /* Text */
  --pv-ink:       #0f1119;          /* near-black */
  --pv-ink-2:     #3a4050;
  --pv-ink-3:     #6b7280;
  --pv-ink-4:     #9ca3af;

  /* Accents — align with existing site palette */
  --pv-blue:      #2563EB;
  --pv-blue-ar:   #148ada;
  --pv-purple:    #c260fb;
  --pv-cyan:      #0ea5e9;

  /* Dark canvas for the device mocks only */
  --pv-canvas:    #0b0d17;
  --pv-canvas-2:  #05060a;

  --pv-font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pv-font-serif:"Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --pv-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --pv-maxw:      1240px;
  --pv-pad:       clamp(20px, 4vw, 56px);

  position: relative;
  padding: clamp(72px, 9vw, 120px) 0 !important;
  background: linear-gradient(180deg, #ffffff 0%, var(--pv-bg) 60%, #ffffff 100%) !important;
  color: var(--pv-ink);
  font-family: var(--pv-font-sans);
  font-feature-settings: "ss01", "cv11", "tnum";
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* Keep the top accent hair-line that the rest of the site uses for section rhythm */
.platforms-v2::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 60px !important;
  height: 3px !important;
  background: linear-gradient(90deg, var(--pv-blue), var(--pv-purple)) !important;
  border-radius: 2px !important;
  opacity: 0.4 !important;
  display: block !important;
}

.platforms-v2 .wrap {
  max-width: var(--pv-maxw);
  margin: 0 auto;
  padding-left: var(--pv-pad);
  padding-right: var(--pv-pad);
}

/* ---------- Eyebrow + editorial display type ---------- */
.platforms-v2 .eyebrow {
  font-family: var(--pv-font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--pv-ink-3);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.platforms-v2 .eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--pv-line-3);
}
.platforms-v2 .eyebrow .num { color: var(--pv-ink-2); }

.platforms-v2 .display {
  font-family: var(--pv-font-serif);
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.02;
  color: var(--pv-ink);
  margin: 0;
}
.platforms-v2 .display em {
  font-style: italic;
  color: var(--pv-blue);
  font-weight: 400;
}
.platforms-v2 h2.display { font-size: clamp(30px, 3.6vw, 52px); }

.platforms-v2 .section-head {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 56px;
}
.platforms-v2 .section-head .eyebrow { margin-bottom: 22px; }
.platforms-v2 .section-head .title { max-width: 18ch; }
.platforms-v2 .section-head .lede {
  color: var(--pv-ink-2);
  font-size: 16px;
  line-height: 1.65;
  max-width: 52ch;
  font-family: var(--pv-font-serif);
  font-weight: 400;
  font-style: italic;
  margin: 0;
}
@media (max-width: 820px) {
  .platforms-v2 .section-head { grid-template-columns: 1fr; gap: 22px; margin-bottom: 40px; }
}

/* ---------- Tabs ---------- */
.platforms-v2 .plat-tabs {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--pv-line-2);
  border-radius: 999px;
  background: #ffffff;
  margin-bottom: 36px;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(15, 17, 25, 0.03);
}
.platforms-v2 .plat-tab {
  font: inherit;
  padding: 10px 22px;
  font-size: 13px;
  color: var(--pv-ink-3);
  border-radius: 999px;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background .2s, color .2s;
  letter-spacing: -0.005em;
}
.platforms-v2 .plat-tab .idx {
  font-family: var(--pv-font-mono);
  font-size: 10px;
  color: var(--pv-ink-4);
  letter-spacing: 0.1em;
}
.platforms-v2 .plat-tab.active {
  background: rgba(37, 99, 235, 0.08);
  color: var(--pv-blue);
}
.platforms-v2 .plat-tab.active .idx { color: var(--pv-blue); }
@media (max-width: 620px) {
  .platforms-v2 .plat-tabs { width: 100%; }
  .platforms-v2 .plat-tab { flex: 1; justify-content: center; padding: 10px 12px; font-size: 12px; }
}

/* ---------- Panel ---------- */
.platforms-v2 .plat-panel {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--pv-line);
  border-radius: 16px;
  background: var(--pv-surface);
  overflow: hidden;
  box-shadow: 0 10px 40px -20px rgba(15, 17, 25, 0.18),
              0 2px 8px rgba(15, 17, 25, 0.04);
}
.platforms-v2 .plat-panel[hidden] { display: none !important; }
@media (max-width: 900px) {
  .platforms-v2 .plat-panel { grid-template-columns: 1fr; }
}

.platforms-v2 .plat-panel .p-head {
  padding: 44px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 1px solid var(--pv-line);
}
@media (max-width: 900px) {
  .platforms-v2 .plat-panel .p-head { border-right: 0; border-bottom: 1px solid var(--pv-line); padding: 32px; }
}

.platforms-v2 .plat-panel .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.18);
  font-family: var(--pv-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pv-blue);
  margin-bottom: 22px;
  width: fit-content;
}
.platforms-v2 .plat-panel[data-tone="ar"] .tag {
  background: rgba(20, 138, 218, 0.06);
  border-color: rgba(20, 138, 218, 0.22);
  color: var(--pv-blue-ar);
}
.platforms-v2 .plat-panel[data-tone="vr"] .tag {
  background: rgba(194, 96, 251, 0.06);
  border-color: rgba(194, 96, 251, 0.22);
  color: var(--pv-purple);
}

.platforms-v2 .plat-panel h3 {
  font-family: var(--pv-font-serif);
  font-size: clamp(24px, 2.3vw, 34px);
  letter-spacing: -0.02em;
  font-weight: 400;
  line-height: 1.12;
  color: var(--pv-ink);
  margin: 0;
}
.platforms-v2 .plat-panel .sub {
  color: var(--pv-ink-2);
  margin: 16px 0 0;
  max-width: 44ch;
  font-size: 15px;
  line-height: 1.65;
}

/* Who / Do / Get rows */
.platforms-v2 .who-grid { margin-top: 32px; display: grid; gap: 0; }
.platforms-v2 .who-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--pv-line);
  font-size: 14px;
  line-height: 1.55;
}
.platforms-v2 .who-row:first-child { border-top: 1px solid var(--pv-line-2); }
.platforms-v2 .who-row .k {
  font-family: var(--pv-font-mono);
  font-size: 10.5px;
  color: var(--pv-ink-4);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-top: 3px;
}
.platforms-v2 .who-row .v { color: var(--pv-ink-2); }
.platforms-v2 .who-row .v strong { color: var(--pv-ink); font-weight: 600; }

/* ---------- Visual canvas (stays dark: it's a device/screen mock) ---------- */
.platforms-v2 .plat-panel .p-visual {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  background: radial-gradient(420px 320px at 75% 15%, rgba(37, 99, 235, 0.22), transparent 65%),
              linear-gradient(180deg, #0d1220, #05060a);
}
.platforms-v2 .plat-panel[data-tone="ar"] .p-visual {
  background: radial-gradient(420px 320px at 75% 15%, rgba(20, 138, 218, 0.24), transparent 65%),
              linear-gradient(180deg, #0a1220, #04060c);
}
.platforms-v2 .plat-panel[data-tone="vr"] .p-visual {
  background: radial-gradient(420px 320px at 75% 15%, rgba(194, 96, 251, 0.20), transparent 65%),
              linear-gradient(180deg, #0d0a1c, #06040a);
}

.platforms-v2 .p-visual .gridlines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 85%);
          mask-image: radial-gradient(ellipse at 50% 50%, black 40%, transparent 85%);
}

/* Dashboard mock */
.platforms-v2 .p-screen {
  position: absolute;
  inset: 40px;
  border-radius: 8px;
  background: rgba(10, 12, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.platforms-v2 .p-screen .bar {
  display: flex; gap: 6px; align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
}
.platforms-v2 .p-screen .bar span {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.platforms-v2 .p-screen .bar .url {
  width: auto; height: auto; border-radius: 0; background: transparent;
  margin-left: 14px;
  font-family: var(--pv-font-mono);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.05em;
}
.platforms-v2 .p-screen .body {
  padding: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}
.platforms-v2 .p-tile {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  min-height: 86px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.platforms-v2 .p-tile .l {
  font-family: var(--pv-font-mono);
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.platforms-v2 .p-tile .v {
  font-family: var(--pv-font-serif);
  font-size: 28px;
  font-weight: 400;
  color: #eef0f5;
  letter-spacing: -0.02em;
  line-height: 1;
}
.platforms-v2 .p-tile .bars {
  display: flex; gap: 3px; align-items: flex-end;
  height: 30px;
}
.platforms-v2 .p-tile .bars i {
  display: block;
  width: 6px;
  background: linear-gradient(180deg, #60a5fa, rgba(96, 165, 250, 0.15));
  border-radius: 1px;
}

/* AR phone */
.platforms-v2 .p-phone {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-5deg);
  width: 210px;
  aspect-ratio: 9/19;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #04050a;
  box-shadow: 0 40px 80px -20px rgba(20, 138, 218, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.platforms-v2 .p-phone .notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 66px; height: 14px; border-radius: 10px;
  background: #000;
  z-index: 2;
}
.platforms-v2 .p-phone .cam {
  position: absolute; inset: 0;
  background:
    radial-gradient(160px 160px at 50% 45%, rgba(20, 138, 218, 0.32), transparent 70%),
    linear-gradient(180deg, #0a1019, #04060a);
}
.platforms-v2 .p-phone .scan {
  position: absolute;
  left: 22%; right: 22%; top: 28%;
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px dashed rgba(159, 212, 238, 0.7);
}
.platforms-v2 .p-phone .scan::before,
.platforms-v2 .p-phone .scan::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1.5px solid #9fd4ee;
}
.platforms-v2 .p-phone .scan::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.platforms-v2 .p-phone .scan::after  { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.platforms-v2 .p-phone .tag-ar {
  position: absolute;
  left: 14px; right: 14px; bottom: 16px;
  padding: 9px 12px;
  border-radius: 6px;
  background: rgba(5, 6, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--pv-font-mono);
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.platforms-v2 .p-phone .tag-ar .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #9fd4ee; box-shadow: 0 0 6px #9fd4ee;
}

/* VR headset */
.platforms-v2 .p-headset {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 58%; aspect-ratio: 2.3/1;
  border-radius: 26% / 38%;
  background: linear-gradient(180deg, #15102a, #05040e);
  border: 1px solid rgba(194, 96, 251, 0.28);
  box-shadow: 0 0 60px rgba(194, 96, 251, 0.22), inset 0 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16%;
  padding: 0 12%;
}
.platforms-v2 .p-headset .lens {
  width: 68px; height: 68px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.8), rgba(194, 96, 251, 0.6) 30%, rgba(90, 40, 180, 0.5) 60%, #0a0f1f);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.7), 0 0 24px rgba(194, 96, 251, 0.32);
}
.platforms-v2 .p-headset .strap {
  position: absolute;
  top: 32%; right: -6%;
  width: 14%; height: 36%;
  border: 1px solid rgba(194, 96, 251, 0.24);
  border-left: 0;
  border-radius: 0 100px 100px 0;
}

@media (prefers-reduced-motion: reduce) {
  .platforms-v2 .plat-tab { transition: none; }
}
