/* ============================================================
   ONTIC GROUP — shared stylesheet
   All rules are scoped under .ontic so nothing collides with a
   WordPress theme. Brand colour schemes are set with the
   .ontic--group / --services / --sji / --eighty / --open2view
   modifier on the same wrapper element.
   ============================================================ */

html,body{ margin:0; padding:0; }

.ontic{
  /* fonts */
  --display:"Space Grotesk", system-ui, sans-serif;
  --body:"IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono:"IBM Plex Mono", ui-monospace, monospace;

  /* default = Ontic Group (house) light navy scheme */
  --bg:#EEF2F7;
  --bg-2:#002C73;
  --surface:#FFFFFF;
  --text:#1C2A44;
  --muted:#5C6B85;
  --heading:#002C73;
  --accent:#265A98;
  --accent-2:#4EA3D9;
  --on-accent:#FFFFFF;
  --line:#DBE2EC;
  --rail:#AEBED6;
  --logo-bg:#002C73;
  --logo-border:transparent;

  font-family:var(--body);
  color:var(--text);
  background:var(--bg);
  line-height:1.62;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  -webkit-font-smoothing:antialiased;
}
.ontic *,.ontic *::before,.ontic *::after{ box-sizing:border-box; }
.ontic a{ color:inherit; text-decoration:none; }
.ontic img{ display:block; max-width:100%; }

/* ---------- brand themes ---------- */
.ontic--services{
  --bg:#191617; --bg-2:#000000; --surface:#242021; --text:#E7E9EB; --muted:#9AA0A6;
  --heading:#FFFFFF; --accent:#4FA4D6; --accent-2:#4FA4D6; --on-accent:#062338;
  --line:#332E30; --rail:#4A4446; --logo-bg:#221E1F; --logo-border:#332E30;
}
.ontic--sji{
  --bg:#F5F5F4; --bg-2:#1A1A1A; --surface:#FFFFFF; --text:#262626; --muted:#6B6B6B;
  --heading:#1A1A1A; --accent:#F07324; --accent-2:#E01106; --on-accent:#FFFFFF;
  --line:#E3E1DE; --rail:#C9C7C4; --logo-bg:#FFFFFF; --logo-border:#E3E1DE;
}
.ontic--eighty{
  --bg:#1D1A1B; --bg-2:#000000; --surface:#292525; --text:#EAE7E5; --muted:#9C9A98;
  --heading:#FFFFFF; --accent:#F5811F; --accent-2:#F5811F; --on-accent:#241200;
  --line:#3A3535; --rail:#4A4444; --logo-bg:#221F20; --logo-border:#3A3535;
}
.ontic--open2view{
  --bg:#FFFFFF; --bg-2:#EC1C23; --surface:#FFFFFF; --text:#1A1A1A; --muted:#6B6B6B;
  --heading:#EC1C23; --accent:#EC1C23; --accent-2:#D4A800; --on-accent:#FFFFFF;
  --line:#F0DADB; --rail:#F2B9BB; --logo-bg:#EC1C23; --logo-border:transparent;
}

/* ---------- layout helpers ---------- */
.ontic-wrap{ width:100%; max-width:1120px; margin:0 auto; padding:0 26px; }
.ontic-main{ flex:1 0 auto; }

/* ---------- top bar / nav ---------- */
.ontic-top{
  background:var(--surface);
  border-bottom:1px solid var(--line);
  position:sticky; top:0; z-index:20;
}
.ontic-top .ontic-wrap{
  display:flex; align-items:center; justify-content:space-between;
  gap:18px; min-height:66px; flex-wrap:wrap;
}
.ontic-brand{
  display:inline-flex; align-items:center; gap:11px;
  font-family:var(--display); font-weight:600; font-size:.9rem;
  letter-spacing:.12em; text-transform:uppercase; color:var(--heading);
  white-space:nowrap;
}
.ontic-brand .dot{
  width:20px; height:20px; border-radius:4px; flex:none;
  background:var(--accent); position:relative;
}
.ontic-brand .dot::after{
  content:""; position:absolute; inset:4px; border:2px solid var(--surface); border-radius:2px;
}
.ontic-nav{
  display:flex; gap:6px; flex-wrap:wrap; align-items:center;
  font-size:.82rem;
}
.ontic-nav a{
  color:var(--muted); padding:7px 11px; border-radius:7px;
  transition:color .18s, background .18s;
  white-space:nowrap;
}
.ontic-nav a:hover{ color:var(--heading); background:var(--bg); }
.ontic-nav a.is-active{ color:var(--heading); background:var(--bg); font-weight:600; }

/* ---------- generic section ---------- */
.ontic-section{ padding:64px 0; }
.ontic-eyebrow{
  font-family:var(--mono); font-size:.72rem; letter-spacing:.2em;
  text-transform:uppercase; color:var(--accent);
  display:inline-flex; align-items:center; gap:11px; margin:0 0 20px;
}
.ontic-eyebrow::before{ content:""; width:30px; height:1px; background:var(--accent); }

/* ---------- home hero ---------- */
.ontic-home-hero{ padding:66px 0 8px; text-align:center; }
.ontic-home-hero h1{
  font-family:var(--display); font-weight:600;
  font-size:clamp(2.1rem,5.4vw,3.6rem); line-height:1.05;
  letter-spacing:-.02em; color:var(--heading); margin:0 auto; max-width:16ch;
}
.ontic-home-hero p{
  margin:22px auto 0; max-width:60ch; font-size:1.06rem; color:var(--muted);
}

/* ---------- ORG TREE (home) ---------- */
.ontic-tree{ padding:26px 0 8px; overflow-x:auto; }
.ontic-tree ul{
  display:flex; justify-content:center; position:relative;
  padding-top:34px; margin:0; list-style:none;
}
.ontic-tree > ul{ padding-top:0; }
.ontic-tree li{
  list-style:none; position:relative; padding:34px 16px 0; text-align:center;
}
/* connector lines */
.ontic-tree li::before,
.ontic-tree li::after{
  content:""; position:absolute; top:0; right:50%;
  width:50%; height:34px; border-top:2px solid var(--rail);
}
.ontic-tree li::after{ right:auto; left:50%; border-left:2px solid var(--rail); }
.ontic-tree li:only-child::before,
.ontic-tree li:only-child::after{ display:none; }
.ontic-tree li:only-child{ padding-top:0; }
.ontic-tree li:first-child::before,
.ontic-tree li:last-child::after{ border:0 none; }
.ontic-tree li:last-child::before{
  border-right:2px solid var(--rail); border-radius:0 7px 0 0;
}
.ontic-tree li:first-child::after{ border-radius:7px 0 0 0; }
.ontic-tree ul ul::before{
  content:""; position:absolute; top:0; left:50%;
  height:34px; border-left:2px solid var(--rail);
}
.ontic-tree > li{ display:flex; flex-direction:column; align-items:center; }

/* tile = a logo card that links to its page */
.ontic-tile{
  display:inline-flex; flex-direction:column; align-items:center;
  width:230px; max-width:74vw;
}
.ontic-tile .badge{
  width:100%; height:120px; border-radius:12px;
  background:var(--tile-bg,#fff); border:1px solid var(--tile-border,transparent);
  display:flex; align-items:center; justify-content:center; padding:18px 20px;
  box-shadow:0 10px 26px -18px rgba(15,25,45,.45);
  transition:transform .2s ease, box-shadow .2s ease;
}
.ontic-tile .badge img{ max-height:78px; width:auto; }
.ontic-tile:hover .badge{
  transform:translateY(-3px);
  box-shadow:0 16px 34px -18px rgba(15,25,45,.6);
}
.ontic-tile .more{
  margin-top:12px; font-family:var(--mono); font-size:.72rem; letter-spacing:.05em;
  color:var(--muted); display:inline-flex; align-items:center; gap:7px;
  transition:color .18s;
}
.ontic-tile .more .arr{ transition:transform .18s; }
.ontic-tile:hover .more{ color:var(--heading); }
.ontic-tile:hover .more .arr{ transform:translateX(3px); }
.ontic-tile.is-group{ width:300px; }
.ontic-tile.is-group .badge{ height:132px; }

/* tile brand backgrounds */
.tile--group{ --tile-bg:#002C73; }
.tile--services{ --tile-bg:#221E1F; }
.tile--sji{ --tile-bg:#FFFFFF; --tile-border:#E3E1DE; }
.tile--eighty{ --tile-bg:#221F20; }
.tile--open2view{ --tile-bg:#EC1C23; }

/* a subtle caption under the tree */
.ontic-tree-note{
  text-align:center; margin-top:26px; font-size:.9rem; color:var(--muted);
}

/* ---------- detail page hero ---------- */
.ontic-page-hero{ padding:56px 0 8px; }
.ontic-page-hero .row{
  display:flex; align-items:center; gap:34px; flex-wrap:wrap;
}
.ontic-logo-badge{
  flex:none; width:260px; max-width:100%; height:150px; border-radius:14px;
  background:var(--logo-bg); border:1px solid var(--logo-border);
  display:flex; align-items:center; justify-content:center; padding:22px 26px;
  box-shadow:0 14px 34px -20px rgba(0,0,0,.5);
}
.ontic-logo-badge img{ max-height:96px; width:auto; }
.ontic-page-hero .intro{ flex:1 1 320px; min-width:280px; }
.ontic-page-hero h1{
  font-family:var(--display); font-weight:600;
  font-size:clamp(2rem,4.6vw,3.1rem); line-height:1.06;
  letter-spacing:-.02em; color:var(--heading); margin:0;
}
.ontic-tagline{
  margin:16px 0 0; font-size:1.12rem; color:var(--text); max-width:52ch;
  font-weight:500;
}

/* ---------- body copy ---------- */
.ontic-body{ padding:12px 0 60px; }
.ontic-body .col{ max-width:720px; }
.ontic-body p{ margin:0 0 16px; font-size:1.05rem; color:var(--text); }
.ontic-body p strong{ color:var(--heading); }

/* ---------- link cards / buttons ---------- */
.ontic-links{
  display:flex; gap:14px; flex-wrap:wrap; margin-top:8px;
}
.ontic-btn{
  display:inline-flex; align-items:center; gap:10px;
  font-family:var(--mono); font-size:.8rem; letter-spacing:.04em;
  padding:13px 22px; border-radius:9px;
  background:var(--accent); color:var(--on-accent);
  border:1px solid var(--accent);
  transition:transform .18s, filter .18s;
}
.ontic-btn:hover{ transform:translateY(-2px); filter:brightness(1.06); }
.ontic-btn .arr{ transition:transform .18s; }
.ontic-btn:hover .arr{ transform:translateX(4px); }
.ontic-btn--ghost{
  background:transparent; color:var(--heading); border:1px solid var(--line);
}
.ontic-btn--ghost:hover{ background:var(--surface); }

/* child cards (parent pages listing subsidiaries) */
.ontic-children{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:18px; margin-top:30px;
}
.ontic-child{
  display:flex; flex-direction:column; gap:14px;
  background:var(--surface); border:1px solid var(--line);
  border-radius:14px; padding:22px; transition:transform .2s, box-shadow .2s;
}
.ontic-child:hover{ transform:translateY(-3px); box-shadow:0 16px 34px -22px rgba(0,0,0,.4); }
.ontic-child .cbadge{
  height:74px; border-radius:9px; display:flex; align-items:center;
  justify-content:center; padding:12px 16px;
}
.ontic-child .cbadge img{ max-height:52px; width:auto; }
.ontic-child h3{
  font-family:var(--display); font-weight:600; font-size:1.1rem; margin:0; color:var(--heading);
}
.ontic-child p{ margin:0; font-size:.92rem; color:var(--muted); }
.ontic-child .go{
  margin-top:auto; font-family:var(--mono); font-size:.74rem; color:var(--accent);
  display:inline-flex; align-items:center; gap:7px;
}
.cbadge--group{ background:#002C73; }
.cbadge--services{ background:#221E1F; }
.cbadge--sji{ background:#fff; border:1px solid var(--line); }
.cbadge--eighty{ background:#221F20; }
.cbadge--open2view{ background:#EC1C23; }

/* ---------- contact ---------- */
.ontic-contact{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:20px; margin-top:14px;
}
.ontic-card{
  background:var(--surface); border:1px solid var(--line);
  border-radius:14px; padding:26px;
}
.ontic-card .label{
  font-family:var(--mono); font-size:.7rem; letter-spacing:.16em;
  text-transform:uppercase; color:var(--accent); margin:0 0 10px;
}
.ontic-card .value{ font-size:1.12rem; color:var(--heading); margin:0; line-height:1.5; }
.ontic-card .value a{ color:var(--accent); }
.ontic-card .value a:hover{ text-decoration:underline; }

/* ---------- footer ---------- */
.ontic-foot{
  flex-shrink:0;
  background:var(--bg-2); color:#fff; margin-top:auto;
}
.ontic-foot .ontic-wrap{
  display:flex; justify-content:space-between; align-items:center;
  gap:20px; flex-wrap:wrap; padding-top:34px; padding-bottom:30px;
}
.ontic-foot .fbrand{
  font-family:var(--display); font-weight:600; letter-spacing:.1em;
  text-transform:uppercase; font-size:.9rem; color:#fff;
}
.ontic-foot .fnav{ display:flex; gap:16px; flex-wrap:wrap; font-size:.82rem; }
.ontic-foot .fnav a{ color:rgba(255,255,255,.82); }
.ontic-foot .fnav a:hover{ color:#fff; }
.ontic-foot .copy{
  width:100%; border-top:1px solid rgba(255,255,255,.18); padding-top:18px;
  font-family:var(--mono); font-size:.72rem; color:rgba(255,255,255,.7);
}
/* footer readability on very light brand bands */
.ontic--sji .ontic-foot,
.ontic--eighty .ontic-foot,
.ontic--services .ontic-foot{ color:#fff; }

/* ---------- responsive ---------- */
@media (max-width:720px){
  .ontic-section{ padding:46px 0; }
  .ontic-page-hero .row{ gap:24px; }
  .ontic-logo-badge{ width:100%; height:132px; }

  /* linearise the org tree into a centred vertical stack */
  .ontic-tree{ overflow:visible; }
  .ontic-tree ul{ flex-direction:column; align-items:center; padding-top:26px; }
  .ontic-tree > li{ align-items:center; }
  .ontic-tree li{ padding:26px 0 0; }
  .ontic-tree li::before,
  .ontic-tree li::after{ display:none; }
  .ontic-tree ul ul::before{
    left:50%; height:26px; top:0;
  }
  .ontic-tree ul::before{
    content:""; position:absolute; top:0; left:50%;
    height:26px; border-left:2px solid var(--rail);
  }
  .ontic-tree > ul::before{ display:none; }
  .ontic-tile.is-group{ width:270px; }
}

@media (prefers-reduced-motion:reduce){
  .ontic *{ transition:none !important; }
}
.ontic a:focus-visible,
.ontic .ontic-btn:focus-visible{
  outline:3px solid var(--accent-2); outline-offset:3px; border-radius:8px;
}
