/*
  Core Microsystems Inc.
  File: /css/home.css
  Version: v1.4
  Updated: 2026-01-23
  Notes:
  - Consolidated duplicate Services CSS blocks (single source of truth)
  - Hero fade-out on scroll (via CSS vars)
  - Services: image zoom + lighter overlay on hover (pseudo layers)
  - Proven Success: orbit rings + orbiting dots
  - Orbit: uses INNER .orbit-spin wrapper to prevent loop “jump”
  - Orbit dots: uses background-image inline style on .orb (scaled + centered)
  - Orbit dot glow REMOVED for simplicity
  - Dots: +20% size; CMS dot is +20% larger than other dots
  - Respects prefers-reduced-motion
  - Remove wide card for services
  - Add cards for RSS
*/

/* ===== Hero ===== */
.hero{
  position:relative;
  height:93vh;
  min-height: 720px;
  color:#fff;
  overflow:hidden;
}
.hero-bg{
  position:absolute;
  inset:0;
  background:
    radial-gradient(1200px 700px at 85% 80%, rgba(255,255,255,.08), transparent 60%),
    radial-gradient(700px 400px at 75% 20%, rgba(47,164,198,.18), transparent 60%),
    linear-gradient(135deg, var(--blue-950), var(--blue-800));
}

/* decorative line motif */
.hero-bg::before{
  content:"";
  position:absolute;
  inset:-20%;
  background:
    repeating-radial-gradient(circle at 70% 65%,
      rgba(255,255,255,.10) 0px,
      rgba(255,255,255,.10) 1px,
      transparent 2px,
      transparent 18px);
  opacity:.22;
  transform: rotate(-10deg);
}
/* ===== Hero: true circular orbit star (reliable + precise) ===== */

/* Ensure hero-bg is a positioning context */
.hero-bg{
  position:absolute;
  inset:0;
}

/* Orbit container: sets center + radius */
.hero-orbit-star{
  position:absolute;

  /* Center of orbit — tune to wrap EST. 1994 + headline */
  left: 75%;
  top: 40%;

  /* Radius = 280px (2x your old ~140) */
  width: 560px;
  height: 560px;

  /* Center the orbit container on left/top */
  margin-left: -280px;
  margin-top:  -280px;

  pointer-events:none;

  /* Start at 10 o’clock */
  transform: rotate(-60deg);

  /* Run once */
  animation: heroOrbitSpinOnce 4.5s linear 1 forwards;
  will-change: transform;
}

/* The star itself (pinned to circle edge at 12 o’clock) */
.hero-orbit-star::before{
  content:"";
  position:absolute;
  left: 50%;
  top: 0;                 /* 12 o’clock */
  transform: translateX(-50%);

  width: 4px;
  height: 4px;
  border-radius: 999px;

  background: rgba(255,255,255,.95);
  box-shadow:
    0 0 10px rgba(255,255,255,.55),
    0 0 16x rgba(47,164,198,.30);

  opacity: .85;

  /* Fade out near end */
  animation: heroOrbitFadeOnce 4.5s linear 1 forwards;
  will-change: opacity;
}

/* Rotate EXACTLY 270 degrees from 10 o’clock */
@keyframes heroOrbitSpinOnce{
  from { transform: rotate(-60deg); }  /* 10 o’clock */
  to   { transform: rotate(210deg); }  /* -60 + 270 */
}

/* Fade as it approaches the title again */
@keyframes heroOrbitFadeOnce{
  0%   { opacity: .25; }
  25%  { opacity: .85; }
  50%  { opacity: .95; }
  75%  { opacity: .55; }
  100% { opacity: 0; }
}

/* Keep it behind hero content */
.hero-orbit-star{ z-index: 0; }
.hero-inner{ position:relative; z-index: 2; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .hero-orbit-star,
  .hero-orbit-star::before{
    animation:none;
  }
}


.hero-inner{
  position:relative;
  height:100%;
  display:flex;
  padding-left: clamp(2rem, 6vw, 4rem);
  align-items:center;
  justify-content: flex-start;
}

.hero-copy{
  max-width: 900px;
  padding: 3rem 0;
  margin-left: 0;
  margin-right: auto;
  text-align: left;
  /* JS controls fade/slide via CSS variables */
  opacity: var(--heroFade, 1);
  transform: translateY(var(--heroShift, 0px));
  transition: opacity .08s linear, transform .08s linear;
  will-change: opacity, transform;
}

.eyebrow{
  letter-spacing:.22em;
  font-size:1rem;
  font-weight: 600;
  text-transform:uppercase;
  color: var(--blue-500);
  opacity:.85;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;   /* space between line and text */
}
.eyebrow::before{
  content:"";
  display: inline-block;
  width: 40px;              /* length of line */
  height: 2px;             /* thickness */
  background: rgba(255,255,255,.65);  /* line color */
  border-radius: 2px;      /* slightly softened ends */
  background: var(--blue-500);
  opacity: .9;
}

.hero-title{
  display:block;          /* block stays aligned */
}

.hero-title-inner{
  display:inline-block;
  /* transform: scaleX(0.98);
  transform: scaleY(1.2); */
  transform-origin: left center;
}
.hero h1{
  margin: 1rem 0 1rem;
  line-height:1;
  font-size: clamp(3.2rem, 7.0vw, 10rem);
  letter-spacing: -0.02em;
  font-weight:800;
}
/* Default fallback (always visible) */
.hero-accent{
  color: var(--blue-500);
}

/* Only apply gradient when supported AND with safe fallbacks */
@supports (-webkit-background-clip: text) or (background-clip: text){
  .hero-accent{
    display: inline-block;
    padding-bottom: .08em;     /* prevents descender clipping (g, y, p) */
    line-height: 1.12;         /* only affects the accent span, not the whole h1 */
    /* Use fallbacks so missing vars won't break the gradient */
    background-image: linear-gradient(
      90deg,
      var(--blue-600, #1986b5),
      var(--white, #ffffff)
    );

    -webkit-background-clip: text;
    background-clip: text;

    /* Safari/Chrome need this; Firefox is fine with color:transparent too */
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.hero-sub{
  max-width: 720px;
  font-size: 1.3rem;
  opacity:.92;
}

.hero-actions{
  margin-top: 2rem;
  font-weight: 100;
  display:flex;
  gap: 1rem;
  flex-wrap:wrap;
}

/* Scroll indicator */
.scroll-indicator{
  position:absolute;
  left:50%;
  bottom: 2rem;
  transform: translateX(-50%);
  color: rgba(255,255,255,.82);
  text-decoration:none;
  letter-spacing:.22em;
  font-size:.72rem;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.55rem;
}
.scroll-dot{
  width:10px; height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.85);
  animation: bounce 1.4s ease-in-out infinite;
}
@keyframes bounce{
  0%,100%{ transform: translateY(0); opacity:.65; }
  50%{ transform: translateY(8px); opacity:1; }
}

/* Reduced motion: keep hero stable + stop scroll dot */
@media (prefers-reduced-motion: reduce){
  .hero-copy{
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .scroll-dot{ animation:none; }
}

/* ===== Keyword Tiles Grid (home section) ===== */
.tiles-grid{
  display:grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .9rem;
}
.tile{
  background: #eef2f5;
  border: 1px solid rgba(2,6,23,.10);
  border-radius: 12px;
  padding: .95rem .75rem;
  text-align:center;
  font-weight:900;
  letter-spacing:.08em;
  color: var(--blue-800);
  text-transform:uppercase;
  box-shadow: 0 6px 18px rgba(2,6,23,.05);
}

/* Home-specific responsive tweaks */
@media (max-width: 980px){
  .tiles-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .tiles-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero{ min-height: 640px; }
}

/* ===== Services (Premium Grid) ===== */
.services-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 2rem;
  grid-auto-rows: 1fr;
}

/* Base card (single source of truth for layout) */
.svc-card{
  position:relative;
  border-radius: 26px;
  padding: 1.6rem;
  padding-top: 4rem;                /* reserve space under the icon */
  border: 1px solid rgba(2,6,23,.08);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.10);
  overflow:hidden;
  min-height: 220px;
  height: 100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;       /* consistent top alignment */
  transition: transform .22s ease, box-shadow .22s ease;
}

.svc-card p{ margin: 0; }           /* normalize spacing everywhere */
.svc-card .svc-link{ margin-top:auto; } /* CTA pinned to bottom */

.svc-card:hover{
  transform: translateY(-3px);
  box-shadow: 0 26px 70px rgba(2,6,23,.22);
}

.svc-card h3{
  margin: 0 0 .5rem;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  min-height: 3.0em;  /* room for up to 2 lines */

}

.svc-icon{
  position:absolute;
  top: 1.2rem;
  left: 1.2rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(2,6,23,.08);
}

.svc-icon-img{
  width: 24px;
  height: 24px;
  display:block;
  object-fit: contain;
}

/* Link style */
.svc-link{
  margin-top: 1rem; /* kept, but overridden by margin-top:auto above */
  text-decoration:none;
  font-weight: 900;
  color: var(--blue-800);
  display:inline-flex;
  align-items:center;
  gap: .4rem;
}
.svc-link:hover{ color: var(--blue-500); }

.svc-muted{ color: rgba(255,255,255,.82); }

/* Light card */
.svc-card--light{
  background:#ffffff;
}

/* Dark card */
.svc-card--dark{
  background: linear-gradient(180deg, rgba(5,36,58,.96), rgba(6,47,79,.96));
  color:#ffffff;
  border-color: rgba(255,255,255,.10);
}
.svc-card--dark .svc-icon{
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.20);
}
.svc-link--light{ color: rgba(255,255,255,.92); }
.svc-link--light:hover{ color: #ffffff; }

/* Image cards: keep only image-specific concerns here */
.svc-card--image{
  color:#ffffff;
  border-color: rgba(255,255,255,.12);
  background-color: var(--blue-900); /* fallback */
}

/* image layer */
.svc-card--image::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform .35s ease;
  will-change: transform;
  z-index:0;
}

/* overlay layers (blue tint + dark contrast) */
.svc-card--image::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(180deg, rgba(5,36,58,.28), rgba(5,36,58,.85)),
    linear-gradient(135deg, rgba(12,74,110,.58), rgba(47,164,198,.38));
  transition: opacity .35s ease;
  opacity: 1.0;
  z-index:1;
}

/* keep content above overlays (but DO NOT break the absolute icon) */
.svc-card--image > :not(.svc-icon){
  position:relative;
  z-index:2;
}

/* ensure icon stays absolute on image cards */
.svc-card--image .svc-icon{
  position:absolute;
  z-index:3;
}

/* Hover: zoom image + lighten overlay */
.svc-card--image:hover::before{ transform: scale(1.07); }
.svc-card--image:hover::after{ opacity: .72; }



/* Desktop layout */
@media (min-width: 981px){
  .services-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


/* Desktop layout
  @media (min-width: 981px){
  .services-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .services-grid > .svc-card:nth-child(4){ grid-column: span 2; }
  .services-grid > .svc-card:nth-child(5){ grid-column: span 1; }
}
*/

/* Tablet */
@media (max-width: 980px){
  .services-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tablet
@media (max-width: 980px){
  .services-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-grid > .svc-card:nth-child(4),
  .services-grid > .svc-card:nth-child(5){ grid-column: span 2; }
}
*/
/* Mobile */
@media (max-width: 720px){
  .services-grid{ grid-template-columns: 1fr; }
  .services-grid > .svc-card{ grid-column: auto !important; }
}

/* ===== Feature hover (used elsewhere on home) ===== */
.feature{ transition: transform .18s ease; }
.feature h3,
.feature .icon{ transition: color .18s ease, background-color .18s ease, border-color .18s ease; }
.icon-img{ transition: filter .18s ease; }
.feature:hover{ transform: translateY(-2px); }
.feature:hover h3{ color: var(--blue-800); }
.feature:hover .icon{ background: var(--blue-800); border-color: var(--blue-800); }
.feature:hover .icon-img{ filter: brightness(0) invert(1); }

/* ===== Proven Success ===== */
.proven{
  background:#fff;
  padding: 5.5rem 0;
}

.proven-grid{
  display:grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items:center;
}

.proven-orbit{
  display:grid;
  place-items:center;
  min-height: 520px;
}

.orbit-wrap{
  position:relative;
  width: min(520px, 92vw);
  aspect-ratio: 1 / 1;
  display:grid;
  place-items:center;
}

/* ambient halo behind the whole orbit */
.orbit-wrap::before{
  content:"";
  position:absolute;
  inset:-12%;
  border-radius:50%;
  background:
    radial-gradient(circle at 50% 50%,
      rgba(47,164,198,.12) 0%,
      rgba(2,6,23,.06) 35%,
      transparent 68%);
  filter: blur(16px);
  z-index:0;
}

.orbit-rings{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  z-index:1;
}

/* ring depth/glow */
.ring{
  position:absolute;
  border-radius:50%;
  border: 1px solid rgba(2,6,23,.14);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.34),
    0 10px 26px rgba(2,6,23,.10),
    0 0 22px rgba(47,164,198,.10);
  pointer-events:none;
}

/* gentle highlight so rings don’t feel flat */
.ring::after{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:inherit;
  background:
    radial-gradient(140px 90px at 28% 22%,
      rgba(255,255,255,.10),
      transparent 62%);
  opacity:.85;
  pointer-events:none;
}

/* Your current ring sizing (kept) */
.ring.r1{ width:90%; height:95%; opacity:.20; }
.ring.r2{ width:105%; height:105%; opacity:.25; }
.ring.r3{ width:115%; height:110%; opacity:.35; }

/* Outer orbital holds position + initial angle (NO animation here) */
.orbital{
  position:absolute;
  left:50%;
  top:50%;
  z-index:2;
  pointer-events:none;
  transform-origin:center;
}

/* size + starting angle */
.orbital.o1{ width:90%; height:95%; transform: translate(-50%, -50%) rotate(20deg); }
.orbital.o2{ width:105%; height:105%; transform: translate(-50%, -50%) rotate(140deg); }
.orbital.o3{ width:115%; height:110%; transform: translate(-50%, -50%) rotate(260deg); }

/* Inner wrapper spins to prevent loop “jump” */
@keyframes orbitSpinOnly{
  to { transform: rotate(360deg); }
}

.orbit-spin{
  position:absolute;
  inset:0;
  transform-origin:center;
  animation: orbitSpinOnly 20s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.orbital.o2 .orbit-spin{ animation-direction: reverse; }

/* If you want different speeds per ring later, change these */
.orbital.o1 .orbit-spin{ animation-duration: 15s; }
.orbital.o2 .orbit-spin{ animation-duration: 20s; }
.orbital.o3 .orbit-spin{ animation-duration: 14s; }

/* Orbit dot (NO glow) — background-image comes from inline style in HTML */
.orbit-spin .orb{
  position:absolute;
  top:-16px;
  left:50%;
  transform: translateX(-50%);
  width:34px;                 /* +20% over original 28px */
  height:34px;
  border-radius:999px;
  overflow:hidden;

  background-color: rgba(255,255,255,.92);
  border:1px solid rgba(2,6,23,.14);
  box-shadow: 0 12px 26px rgba(2,6,23,.14), 0 2px 6px rgba(2,6,23,.10);

  /* make inline background-image render as an icon */
  background-repeat: no-repeat;
  background-position: center;
  background-size: 70% 70%;
}

/* CMS logo dot — +20% larger than other dots */
.orbital.o3 .orbit-spin .orb{
  width:42px;
  height:42px;
  top:-23px;                  /* recenter vertically for larger dot */
  background-size: 88% 88%;   /* logo fills better */
}

/* Add breathing room under Proven section heading */
.proven-copy .section-title{
  margin-bottom: 2.8rem;
}

.proven-center{
  position:relative;
  z-index:3;
  text-align:center;
}

.proven-badge{
  width:78px;
  height:78px;
  margin: 0 auto 1.1rem;
  border-radius:999px;
  background: var(--blue-950);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 18px 45px rgba(2,6,23,.18);
}

.proven-badge-icon{
  width:34px;
  height:34px;
  border-radius:999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:900;
}

.proven-title{
  font-weight:900;
  font-size:1.35rem;
  color: var(--blue-950);
  margin:0 0 .3rem;
}

.proven-sub{
  color: rgba(2,6,23,.55);
  font-weight:600;
  font-size:.95rem;
}

/* Right-side list */
.proven-list{
  display:flex;
  flex-direction:column;
  gap: 1.4rem;
}

.proven-item{
  display:grid;
  grid-template-columns: 54px 1fr;
  gap: 1rem;
  align-items:start;
}

.proven-num{
  width:44px;
  height:44px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  color: var(--blue-800);
  background: rgba(47,164,198,.12);
  border: 1px solid rgba(47,164,198,.20);
}

.proven-text h3{
  margin:.15rem 0 .35rem;
  font-size:1.05rem;
  font-weight:900;
  color: var(--blue-950);
}

.proven-text p{
  margin:0;
  max-width:52ch;
}

/* Responsive */
@media (max-width: 980px){
  .hero-inner{ padding-left: 0.8rem; }
  .proven-grid{ grid-template-columns: 1fr; }
  .proven-orbit{ min-height: 420px; }
  .proven-text p{ max-width:none; }
}

@media (prefers-reduced-motion: reduce){
  .orbit-spin{ animation:none; }
}

.widget-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.widget-container h2 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: #333;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}
.news-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #222;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.8rem;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.card-image {
    height: 140px;
	width: 400px;
    background-size: cover;
    background-position: center;
}
.card-image.placeholder {
    background: #eee url('https://placehold.co/300x180?text=No+Image') center/cover;
}
.card-content {
    padding: 0.9rem;
    flex: 1;
}
.card-content h3 {
    font-size: 0.95rem;
	color: var(--blue-800);
    margin: 0 0 0.6rem;
    line-height: 1.1;
}
.meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.8rem;
}
.card-content p {
    font-size: 0.8rem;
    color: #555;
    margin: 0;
}
