/**
 * Magic System 360 — standalone page styles (msa-theme).
 *
 * Loaded only on the page-system360.php template / slug magic-system-360.
 * Namespaced under .system360-* so nothing leaks into the homepage or other
 * templates. Reuses global tokens from main.css (--night, --sky, --green,
 * --red, --noble, --radius, --shadow, etc.) and global helpers (.hero, .btn,
 * .section, .container, .eyebrow, .section-head).
 */

/* ---- Hero ---- */
.system360-hero{min-height:auto;padding-top:128px;padding-bottom:74px}
.system360-hero:after{display:none}
.system360-hero .hero-grid{align-items:center;gap:44px}
.system360-hero-sub{
  margin:14px 0 0;
  color:var(--sky);
  font-size:1.12rem;
  font-weight:900;
  letter-spacing:.01em;
}
.system360-hero .hero-copy{margin-top:14px;max-width:560px}

/* ---- Hero orbit — mirrors the homepage Magic System 360 orbit, adapted
 *      for the dark hero. Reuses the global keyframes ms360Spin /
 *      ms360SpinRev / ms360Pulse defined in main.css. ---- */
.system360-orbit{
  --orbit-radius:164px;
  position:relative;
  width:min(420px,100%);
  aspect-ratio:1;
  margin-inline:auto;
}
.system360-orbit-rotor{
  position:absolute;
  inset:0;
  animation:ms360Spin 90s linear infinite;
}
.system360-orbit-ring{
  position:absolute;
  inset:48px;
  border:2px dashed rgba(255,255,255,.24);
  border-radius:50%;
}
.system360-orbit-ring:before,
.system360-orbit-ring:after{
  content:"";
  position:absolute;
  inset:40px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:inherit;
}
.system360-orbit-ring:after{inset:-32px;border-style:solid;opacity:.4}
.system360-orbit-spoke{
  position:absolute;
  left:50%;
  top:50%;
  width:var(--orbit-radius);
  height:2px;
  transform-origin:left center;
  transform:rotate(var(--angle));
  background:linear-gradient(90deg,rgba(255,255,255,0),color-mix(in srgb,var(--accent),transparent 30%));
  opacity:.5;
}
.system360-orbit-core{
  position:absolute;
  left:50%;
  top:50%;
  z-index:2;
  display:grid;
  place-items:center;
  width:124px;
  height:124px;
  padding:10px;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:linear-gradient(150deg,var(--noble),var(--night));
  color:#fff;
  text-align:center;
  font-weight:950;
  font-size:1.02rem;
  border:1px solid rgba(255,255,255,.2);
  box-shadow:0 28px 60px -28px rgba(6,10,34,.95),inset 0 1px 0 rgba(255,255,255,.18);
}
.system360-orbit-core:before{
  content:"";
  position:absolute;
  inset:-14px;
  border-radius:inherit;
  background:rgba(91,197,242,.2);
  z-index:-1;
  animation:ms360Pulse 3.4s ease-out infinite;
}
.system360-orbit-item{
  --size:70px;
  position:absolute;
  left:50%;
  top:50%;
  width:var(--size);
  min-height:var(--size);
  display:grid;
  place-items:center;
  padding:10px;
  border-radius:22px;
  background:var(--accent);
  border:2px solid transparent;
  box-shadow:0 16px 36px -24px rgba(6,10,34,.85),inset 0 0 0 1px rgba(255,255,255,.25);
  transform:translate(-50%,-50%) rotate(var(--angle)) translateX(var(--orbit-radius)) rotate(calc(var(--angle) * -1));
}
.system360-orbit-item svg{width:27px;height:27px;color:#fff;animation:ms360SpinRev 90s linear infinite}

/* ---- Model section ---- */
.system360-accent-line{
  color:var(--noble);
  font-weight:900;
  margin-top:12px;
}
/* ---- Directions grid (7 premium cards) ----
 * Flexbox so the final row (cards 05-07) centers under the first four,
 * instead of aligning left. 4 per row on desktop, 2 on tablet, 1 on mobile. */
.system360-grid{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:18px;
}
.system360-card{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:0 1 calc((100% - 3 * 18px) / 4);
  padding:26px 24px 24px;
  border-radius:22px;
  background:#fff;
  border:1px solid var(--line);
  overflow:hidden;
  box-shadow:0 18px 54px -44px rgba(35,43,87,.5);
  transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease;
}
.system360-card:before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:4px;
  background:var(--accent,var(--noble));
}
.system360-card:hover{
  transform:translateY(-5px);
  box-shadow:0 34px 74px -42px rgba(35,43,87,.62);
  border-color:color-mix(in srgb,var(--accent,var(--noble)),transparent 55%);
}
.system360-card-num{
  position:absolute;
  top:18px;
  right:20px;
  color:color-mix(in srgb,var(--accent,var(--noble)),transparent 55%);
  font-size:1.5rem;
  font-weight:950;
  line-height:1;
}
.system360-card-icon{
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  border-radius:15px;
  background:color-mix(in srgb,var(--accent,var(--noble)),transparent 86%);
  color:var(--accent,var(--noble));
}
.system360-card-icon svg{width:26px;height:26px}
.system360-card h3{margin:6px 0 0;color:var(--night);font-size:1.18rem;line-height:1.18}
.system360-card p{margin:0;color:var(--muted);font-size:.95rem}

/* ---- Why it matters — contrasting dark navy section with glass cards ---- */
.system360-why-section{
  position:relative;
  background:linear-gradient(135deg,var(--night),var(--noble));
  overflow:hidden;
}
.system360-why-section:before{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(40% 55% at 85% 0%,rgba(91,197,242,.2),transparent 60%);
  pointer-events:none;
}
.system360-why-section .container{position:relative;z-index:1}
.system360-why-section .eyebrow{color:#fff}
.system360-why-section .section-head h2{color:#fff}
.system360-why-section .section-head p{color:#d4daf4}
.system360-why-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.system360-why-card{
  position:relative;
  padding:28px 26px;
  border-radius:22px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.16);
  border-top:4px solid var(--accent,var(--noble));
  box-shadow:0 24px 56px -34px rgba(6,10,34,.9),inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.system360-why-card h3{margin:0 0 10px;color:#fff;font-size:1.22rem}
.system360-why-card p{margin:0;color:rgba(236,241,255,.86)}

/* ---- Final CTA ---- */
.system360-cta{
  position:relative;
  overflow:hidden;
  padding:clamp(40px,6vw,72px) clamp(24px,5vw,64px);
  border-radius:34px;
  background:linear-gradient(135deg,var(--night),var(--noble));
  color:#fff;
  text-align:center;
  box-shadow:var(--shadow);
}
.system360-cta:before{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(45% 60% at 80% 10%,rgba(91,197,242,.22),transparent 60%);
  pointer-events:none;
}
.system360-cta .eyebrow{color:#fff;justify-content:center}
.system360-cta h2{position:relative;color:#fff;margin:12px auto 0;max-width:760px}
.system360-cta p{position:relative;margin:16px auto 0;max-width:620px;color:#d9def4;font-size:1.05rem}
.system360-cta .hero-actions{position:relative;justify-content:center;margin-top:28px}

@media (min-width:1101px){
  .system360-hero{padding-top:138px;padding-bottom:84px}
}

/* ---- Tablet: directions 2 per row, why 1 column ---- */
@media (max-width:1100px){
  .system360-card{flex-basis:calc((100% - 18px) / 2)}
  .system360-why-grid{grid-template-columns:1fr}
}

/* ---- Mobile: single column, compact orbit ---- */
@media (max-width:820px){
  .system360-hero{padding-top:104px;padding-bottom:52px}
  .system360-hero .hero-grid{gap:30px}
  .system360-card{flex-basis:100%}
  .system360-orbit{width:min(330px,100%);--orbit-radius:128px}
  .system360-orbit-item{--size:56px}
  .system360-orbit-item svg{width:24px;height:24px}
  .system360-why-grid{grid-template-columns:1fr}
}
@media (max-width:480px){
  .system360-hero .hero-actions .btn{width:100%}
  .system360-orbit{width:min(282px,100%);--orbit-radius:108px}
  .system360-orbit-item{--size:48px}
  .system360-orbit-core{width:104px;height:104px;font-size:.92rem}
}

@media (prefers-reduced-motion:reduce){
  .system360-orbit-rotor{animation:none}
  .system360-orbit-item svg{animation:none}
  .system360-orbit-core:before{animation:none}
}
