/*
Theme Name: SB Edge
Theme URI: https://sbmarketingedge.com
Author: Shray Bhambi
Author URI: https://sbmarketingedge.com
Description: Bespoke theme for SB Marketing Edge. Instrument-panel identity in navy and gold, with an interactive 3D service orrery, GetResponse opt-in, enquiry capture and one-click page provisioning.
Version: 2.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sb-edge
Tags: business, one-column, custom-menu, custom-colors, editor-style, block-styles, wide-blocks, accessibility-ready
*/

:root {
  --bg: #0b1020;
  --bg-2: #101734;
  --surface: #141d3d;
  --line: #27315a;
  --line-soft: #1b2446;
  --text: #e9ecf6;
  --muted: #8e98b8;
  --gold: #e0b257;
  --gold-dim: #a8822f;
  --white: #ffffff;

  --measure: 36rem;

  --s--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --s-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --s-1: clamp(1.2rem, 1.12rem + 0.35vw, 1.42rem);
  --s-2: clamp(1.5rem, 1.33rem + 0.8vw, 2.05rem);
  --s-3: clamp(2rem, 1.63rem + 1.7vw, 3.1rem);
  --s-4: clamp(2.5rem, 1.8rem + 3.2vw, 4.5rem);

  --ring: 0 0 0 1px var(--line);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--s-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display, .brand, .btn, .eyebrow, .node-label, .stat__n {
  font-family: Sora, "IBM Plex Sans", Arial, sans-serif;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--white); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

img, svg, canvas { max-width: 100%; display: block; }

/* ---------------- shell ---------------- */

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 999;
  background: var(--gold); color: #1a1205; padding: .6rem 1rem; border-radius: 3px;
}

/* ---------------- header ---------------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 16, 32, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.admin-bar .site-head { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-head { top: 46px; } }

.nav {
  display: flex; flex-wrap: wrap; gap: .75rem 2rem;
  align-items: center; justify-content: space-between;
  padding-block: 1.1rem;
}

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 600; font-size: 1.02rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
}
.brand__mark {
  width: 1.45rem; height: 1.45rem; flex: none;
  border: 1px solid var(--gold); border-radius: 50%;
  position: relative;
}
.brand__mark::after {
  content: ""; position: absolute; inset: 32%;
  background: var(--gold); border-radius: 50%;
}

.nav__menu, .nav__menu ul {
  display: flex; flex-wrap: wrap; gap: 1.6rem;
  list-style: none; margin: 0; padding: 0;
  font-family: Sora, Arial, sans-serif;
  font-size: var(--s--1); font-weight: 500;
}
.nav__menu a { color: var(--muted); text-decoration: none; transition: color .15s ease; }
.nav__menu a:hover,
.nav__menu .current-menu-item > a,
.nav__menu .current_page_item > a { color: var(--text); }
.nav__menu .current-menu-item > a,
.nav__menu .current_page_item > a {
  box-shadow: 0 2px 0 var(--gold);
}

/* ---------------- hero + orrery ---------------- */

.hero {
  position: relative;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem);
  display: grid; gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 64rem) { .hero { grid-template-columns: 1.02fr 0.98fr; } }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 500; letter-spacing: .08em;
  color: var(--gold);
  margin-bottom: 1.1rem;
}

.hero h1 { font-size: var(--s-4); letter-spacing: -0.04em; font-weight: 700; }
.hero__sub {
  margin-top: 1.3rem; font-size: var(--s-1);
  color: var(--muted); max-width: 32rem;
}

.actions { display: flex; flex-wrap: wrap; gap: .9rem 1.2rem; align-items: center; margin-top: 2.1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: Sora, Arial, sans-serif;
  font-size: var(--s--1); font-weight: 600;
  padding: .9rem 1.7rem; border-radius: 3px;
  background: var(--gold); color: #180f02;
  border: 1px solid var(--gold); text-decoration: none; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: #efc877; border-color: #efc877; color: #180f02; transform: translateY(-1px); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); border-color: var(--gold); color: var(--text); transform: translateY(-1px); }

/* orrery stage */

.orrery {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
}
.orrery__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.orrery__fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.orrery__fallback svg { width: 100%; height: auto; }
.orrery.is-live .orrery__fallback { display: none; }

.orrery__hint {
  position: absolute; left: 50%; bottom: -.4rem; transform: translateX(-50%);
  font-size: .72rem; color: var(--muted); letter-spacing: .04em;
  opacity: 0; transition: opacity .4s ease; pointer-events: none;
}
.orrery.is-live .orrery__hint { opacity: 1; }

.node-label {
  position: absolute; transform: translate(-50%, -50%);
  font-size: .72rem; font-weight: 500; letter-spacing: .01em;
  color: var(--text); background: rgba(20, 29, 61, .92);
  border: 1px solid var(--line); border-radius: 2px;
  padding: .22rem .5rem; white-space: nowrap;
  pointer-events: none; opacity: 0; transition: opacity .18s ease;
}
.node-label.is-on { opacity: 1; }

/* ---------------- sections ---------------- */

.band { padding-block: clamp(3.5rem, 8vw, 6.5rem); position: relative; }
.band--line { border-top: 1px solid var(--line-soft); }
.band--sunk { background: var(--bg-2); border-block: 1px solid var(--line-soft); }

.band__head { margin-bottom: 2.75rem; max-width: 42rem; }
.band__head h2 { font-size: var(--s-2); }
.band__head p { margin-top: .9rem; color: var(--muted); }

/* ---------------- service grid ---------------- */

.svc-grid {
  display: grid; gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 4px; overflow: hidden;
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .svc-grid { grid-template-columns: repeat(3, 1fr); } }

.svc-card {
  background: var(--bg);
  padding: 1.9rem 1.6rem;
  display: flex; flex-direction: column; gap: .6rem;
  transition: background .18s ease;
}
.svc-card:hover { background: var(--surface); }
.svc-card h3 { font-size: var(--s-1); }
.svc-card p { color: var(--muted); font-size: var(--s--1); margin: 0; max-width: none; }
.svc-card__n {
  font-family: Sora, Arial, sans-serif;
  font-size: .72rem; font-weight: 600; color: var(--gold);
  letter-spacing: .06em;
}

/* ---------------- prose ---------------- */

.entry-content { max-width: var(--measure); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: var(--s-2); margin: 2.6rem 0 .9rem; }
.entry-content h3 { font-size: var(--s-1); margin: 2rem 0 .55rem; }
.entry-content ul, .entry-content ol { padding-left: 1.15rem; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .5em; }
.entry-content strong { color: var(--white); font-weight: 600; }

.lede { font-size: var(--s-1); color: var(--muted); max-width: 34rem; }

.entry-content blockquote {
  margin: 1.8em 0; padding: .2rem 0 .2rem 1.2rem;
  border-left: 2px solid var(--gold); color: var(--muted); font-style: normal;
}
.entry-content hr { border: 0; border-top: 1px solid var(--line-soft); margin: 2.6rem 0; }

.page-head { padding-block: clamp(2.75rem, 7vw, 4.5rem) 0; }
.page-head h1 { font-size: var(--s-3); max-width: 34rem; }

/* ---------------- numbered sequence ---------------- */

.entry-content ol.sb-seq { list-style: none; padding: 0; counter-reset: seq; max-width: 42rem; }
.entry-content ol.sb-seq li {
  counter-increment: seq;
  display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem;
  padding-block: .95rem; border-bottom: 1px solid var(--line-soft); margin: 0;
}
.entry-content ol.sb-seq li::before {
  content: counter(seq, decimal-leading-zero);
  font-family: Sora, Arial, sans-serif; font-weight: 600;
  font-size: .76rem; color: var(--gold); padding-top: .35em;
}

/* ---------------- service entries (long form) ---------------- */

.svc {
  display: grid; gap: .7rem 2.5rem;
  padding-block: 2.2rem; border-top: 1px solid var(--line-soft);
  grid-template-columns: 1fr; max-width: none;
}
@media (min-width: 52rem) { .svc { grid-template-columns: 17rem 1fr; } }
.svc h3 { font-size: var(--s-1); }
.svc__meta { font-size: var(--s--1); color: var(--gold); margin-top: .45rem; }
.svc__body p { color: var(--muted); }
.svc__body ul { margin: .8em 0 0; padding-left: 1.1rem; font-size: var(--s--1); color: var(--muted); }
.svc__body li { margin-bottom: .4em; }

/* ---------------- panels & forms ---------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}
.panel__rule { height: 2px; background: linear-gradient(90deg, var(--gold), transparent); }
.panel__body { padding: 1.7rem clamp(1.25rem, 3vw, 1.9rem) 1.8rem; }

.rec__row {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: .7rem 1rem;
  padding-block: .72rem; border-bottom: 1px solid var(--line-soft);
  font-size: var(--s--1); align-items: baseline;
}
.rec__row:last-child { border-bottom: 0; }
.rec__key { font-family: Sora, Arial, sans-serif; font-size: .72rem; font-weight: 500; color: var(--muted); letter-spacing: .05em; }
.rec__val { color: var(--text); }
.rec__status { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--gold); }
.rec__dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--gold); flex: none; }

.sb-form { max-width: 27rem; }
.sb-form__field { margin-bottom: 1.05rem; }
.sb-form label {
  display: block; font-family: Sora, Arial, sans-serif;
  font-size: .76rem; font-weight: 500; letter-spacing: .02em;
  color: var(--muted); margin-bottom: .4rem;
}
.sb-form input, .sb-form select, .sb-form textarea {
  width: 100%; font-family: inherit; font-size: var(--s-0);
  color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 3px;
  padding: .72rem .85rem;
}
.sb-form input::placeholder, .sb-form textarea::placeholder { color: #5d678a; }
.sb-form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: right 1rem center, right .75rem center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.sb-form input:focus, .sb-form select:focus, .sb-form textarea:focus { border-color: var(--gold); outline: 2px solid rgba(224,178,87,.28); outline-offset: 0; }
.sb-form textarea { min-height: 8rem; resize: vertical; }
.sb-form .btn { width: 100%; }
.sb-form__note { font-size: .78rem; color: var(--muted); margin-top: 1rem; }

.sb-hp { position: absolute; left: -9999px; }

.sb-notice {
  border: 1px solid var(--line); border-left: 2px solid var(--gold);
  background: var(--bg); border-radius: 3px;
  padding: .9rem 1.1rem; font-size: var(--s--1); margin-bottom: 1.4rem; color: var(--text);
}
.sb-notice--error { border-left-color: #e0574f; }

.sb-slot {
  border: 1px dashed var(--line); border-radius: 4px;
  padding: 1.5rem; color: var(--muted); font-size: var(--s--1); max-width: var(--measure);
}

/* ---------------- footer ---------------- */

.foot {
  padding-block: 3rem 3.5rem;
  border-top: 1px solid var(--line-soft);
  font-size: var(--s--1); color: var(--muted);
  background: var(--bg-2);
}
.foot__grid { display: flex; flex-wrap: wrap; gap: 1.6rem 3rem; justify-content: space-between; align-items: baseline; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot__menu { list-style: none; margin: 0; padding: 0; }
.foot__menu li { margin-bottom: .35rem; }
.foot__legal { max-width: 34rem; margin-top: 1.8rem; font-size: .76rem; color: #6c77a0; }

/* ---------------- blog fallback ---------------- */

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding-block: 1.7rem; border-bottom: 1px solid var(--line-soft); max-width: 46rem; }
.post-list h2 { font-size: var(--s-1); margin-bottom: .4rem; }
.post-list time { font-size: var(--s--1); color: var(--muted); }
.pager { margin-top: 2.5rem; display: flex; gap: 1.5rem; font-size: var(--s--1); }

/* ---------------- WordPress housekeeping ---------------- */

.screen-reader-text {
  border: 0; clip-path: inset(50%); height: 1px; width: 1px;
  margin: -1px; padding: 0; overflow: hidden; position: absolute; word-wrap: normal !important;
}
.alignleft { float: left; margin: .5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .5rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.wp-caption, .gallery-caption { font-size: var(--s--1); color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
