/* =====================================================================
   Platform9 OS Section — shared styles (front end + editor)
   Base design is preserved from the original embed.
   Background is switched via .is-navy / .is-blue / .is-lightblue / .is-grey / .is-white
   Light backgrounds also get .is-light, which flips text colors for readability.
   ===================================================================== */

.p9os * { box-sizing: border-box; margin: 0; padding: 0; }

.p9os {
  padding: 72px 40px 80px;
  position: relative;
  overflow: hidden;
  font-family: inherit;
  /* Full-bleed: break out of Astra's container to span the full viewport width */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* ── Background variants ── */
.p9os.is-navy      { background: linear-gradient(135deg, #0a4a63 0%, #015977 55%, #01374a 100%); box-shadow: 0 24px 40px -24px rgba(1, 25, 33, 0.45); }
.p9os.is-blue      { background: linear-gradient(135deg, #0a6ca0 0%, #087cb6 100%); box-shadow: 0 24px 40px -24px rgba(1, 25, 33, 0.35); }
.p9os.is-lightblue { background: #eef5fc; }
.p9os.is-grey      { background: #f7f9fb; }
.p9os.is-white     { background: #ffffff; }

/* Decorative radial glows (suit the dark variants) */
.p9os::before {
  content: "";
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,.18) 0%, transparent 70%);
  pointer-events: none;
}
.p9os::after {
  content: "";
  position: absolute;
  bottom: -300px; left: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
  pointer-events: none;
}
/* Hide the white glows on light backgrounds */
.p9os.is-light::before,
.p9os.is-light::after { opacity: 0; }

/* Bottom seam */
.p9os-seam {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35) 20%, rgba(255,255,255,.35) 80%, transparent);
  z-index: 2;
}
.p9os.is-light .p9os-seam {
  background: linear-gradient(90deg, transparent, rgba(14,31,58,.15) 20%, rgba(14,31,58,.15) 80%, transparent);
}

.p9os-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Header ── */
.p9os-header {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 48px;
}
.p9os .p9os-header h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.p9os .p9os-lead {
  font-size: 18px;
  color: rgba(255,255,255,.92) !important;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}
.p9os .p9os-lead strong { color: #fff !important; font-weight: 600; }

/* ── 3-column tiles ── */
.p9os-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
@media (max-width: 900px) {
  .p9os-tiles { grid-template-columns: 1fr; }
}

.p9os-tile {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
  transition: transform .2s ease, box-shadow .2s ease;
}
.p9os-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
/* On light backgrounds soften the tile shadow, lean on the border instead */
.p9os.is-light .p9os-tile {
  border-color: #e4eaf2;
  box-shadow: 0 4px 16px rgba(14,31,58,.06);
}

.p9os-tile-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef6ff 0%, #d0eaf9 100%);
  border: 1px solid #b8d9f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.p9os-tile-icon svg {
  width: 26px; height: 26px;
  stroke: #087cb6;
  fill: none;
}

.p9os .p9os-tile h3 {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a !important;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 10px;
}
.p9os .p9os-tile p {
  font-size: 18px;
  color: #475569 !important;
  line-height: 1.6;
}

/* ── Pull quote ── */
.p9os-quote {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.3);
}
.p9os-qmark {
  display: block;
  height: 28px;
  margin-bottom: 16px;
  opacity: .8;
}
.p9os-qmark path { fill: #ffffff; }
.p9os .p9os-quote blockquote {
  font-size: 20px;
  line-height: 1.55;
  color: rgba(255,255,255,.96) !important;
  font-weight: 400;
  letter-spacing: -0.005em;
  margin-bottom: 24px;
}
.p9os .p9os-quote blockquote strong { color: #fff !important; font-weight: 700; }
.p9os-attribution {
  display: flex;
  align-items: center;
  gap: 16px;
}
.p9os .p9os-name  { font-weight: 700; color: #fff !important; font-size: 16px; line-height: 1.3; }
.p9os .p9os-title { font-size: 14px; color: rgba(255,255,255,.8) !important; }

/* ── Light-background text overrides (readability) ── */
.p9os.is-light .p9os-header h2       { color: #0e1f3a !important; }
.p9os.is-light .p9os-lead            { color: #475569 !important; }
.p9os.is-light .p9os-lead strong     { color: #0e1f3a !important; }
.p9os.is-light .p9os-quote           { border-top-color: #e4eaf2; }
.p9os.is-light .p9os-quote blockquote{ color: #334155 !important; }
.p9os.is-light .p9os-quote blockquote strong { color: #0e1f3a !important; }
.p9os.is-light .p9os-qmark path      { fill: #087cb6; }
.p9os.is-light .p9os-name            { color: #0e1f3a !important; }
.p9os.is-light .p9os-title           { color: #64748b !important; }
