/* Outside The Box Consulting — shared design system (inner pages) */
:root {
  --black: #0e0e0c;
  --char: #16160f;
  --white: #f0ede4;
  --grey: #8f8c82;
  --grey-dim: #4a4840;
  --line: #262620;
  --veil: 14,14,12;
  --orange: #ff5c1f;
  --orange-deep: #e84e14;
  --sans: 'Space Grotesk', Helvetica, sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --mono: 'IBM Plex Mono', monospace;
}
[data-theme="light"] {
  --black: #eaedee;
  --char: #dfe3e4;
  --white: #17191b;
  --grey: #585f63;
  --grey-dim: #b0b6b9;
  --line: #cbd1d3;
  --veil: 234,237,238;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--black); color: var(--white); font-family: var(--sans); overflow-x: hidden; transition: background .4s ease, color .4s ease; }

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 48px;
  background: transparent;
  border-bottom: 1px solid transparent;
}
nav.scrolled { background: rgb(var(--veil)); border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 30px; height: 28px; color: var(--white); }
.brand .name { font-size: 15px; font-weight: 600; letter-spacing: -0.3px; color: var(--white); line-height: 1.1; }
.brand .name small { display: block; font-size: 9px; font-weight: 400; letter-spacing: 2.5px; color: var(--grey); }
nav ul { display: flex; gap: 34px; list-style: none; align-items: center; }
nav a { font-size: 13px; color: var(--white); text-decoration: none; opacity: .75; }
nav a:hover { opacity: 1; }
nav a.hot { opacity: 1; color: var(--orange); }
nav a.active { opacity: 1; border-bottom: 1px solid var(--orange); padding-bottom: 3px; }
#theme-toggle { background: none; border: 1px solid var(--line); color: var(--white); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; transition: all .25s; margin-left: 14px; }
#theme-toggle:hover { border-color: var(--orange); color: var(--orange); }

/* — Nav mega-menu — */
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px; }
nav ul.nav-menu > li { position: relative; }
.has-menu > a::after { content: '⌄'; font-size: 11px; margin-left: 5px; opacity: .55; position: relative; top: -2px; }
.mega { position: absolute; top: calc(100% + 16px); left: 50%;
  transform: translateX(calc(-50% + var(--mega-nudge, 0px))) translateY(8px);
  background: var(--char); border: 1px solid var(--line); border-radius: 4px; padding: 22px;
  opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease; z-index: 60;
  box-shadow: 0 24px 60px rgba(0,0,0,.5); max-width: calc(100vw - 32px); }
.mega::before { content: ''; position: absolute; top: -16px; left: 0; right: 0; height: 16px; }
.has-menu:hover .mega, .has-menu:focus-within .mega { opacity: 1; visibility: visible;
  transform: translateX(calc(-50% + var(--mega-nudge, 0px))) translateY(0); }
.mega-grid { display: grid; gap: 4px 28px; }
.mega-2 { grid-template-columns: repeat(2, minmax(230px, 1fr)); }
.mega-4 { grid-template-columns: repeat(4, minmax(186px, 1fr)); gap: 2px 18px; }
.mega-4 .mega-item { padding: 10px; }
.mega-4 .mi-txt small { font-size: 11.5px; }
@media (max-width: 1180px) { .mega-4 { grid-template-columns: repeat(2, minmax(200px, 1fr)); } }
.mg-head { grid-column: 1 / -1; font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--grey-dim); margin: 2px 4px 8px; }
.mega-item { display: flex; gap: 14px; align-items: flex-start; padding: 11px 12px; border-radius: 3px; text-decoration: none; transition: background .2s; }
.mega-item:hover { background: var(--black); }
.mi-icon { flex: 0 0 auto; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 3px; display: flex; align-items: center; justify-content: center; color: var(--white); transition: border-color .2s, color .2s; }
.mega-item:hover .mi-icon { border-color: var(--orange); color: var(--orange); }
.mi-icon svg { width: 19px; height: 19px; }
.mi-txt b { display: block; font-size: 14px; font-weight: 600; color: var(--white); letter-spacing: -.2px; }
.mi-txt small { display: block; font-size: 12px; color: var(--grey); margin-top: 3px; line-height: 1.4; }
.mega-cards { display: flex; gap: 14px; }
.mega-card { position: relative; width: 236px; height: 188px; border-radius: 4px; overflow: hidden; text-decoration: none; }
.mega-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.55) saturate(.8); transition: transform .5s ease, filter .3s ease; }
.mega-card:hover img { transform: scale(1.05); filter: brightness(.72) saturate(.9); }
.mega-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 38%, rgba(14,14,12,.9)); }
.mc-txt { position: absolute; left: 0; bottom: 0; z-index: 2; padding: 16px; }
.mc-txt b { display: block; font-size: 16px; font-weight: 600; color: #f0ede4; letter-spacing: -.3px; }
.mc-txt small { display: block; font-size: 12px; color: rgba(240,237,228,.78); margin-top: 4px; line-height: 1.4; }

.mega-sub { display: flex; gap: 20px; margin-top: 12px; padding: 13px 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; align-items: baseline; }
.mega-sub .ms-h { font-family: var(--mono); font-size: 9px; letter-spacing: 2px; color: var(--grey-dim); margin-right: 4px; }
.mega-sub a { font-size: 12.5px; color: var(--grey); text-decoration: none; transition: color .2s; }
.mega-sub a:hover { color: var(--orange); }
.mega-cta { display: flex; justify-content: space-between; align-items: baseline; gap: 30px; margin-top: 14px; padding: 14px 12px 2px; border-top: 1px solid var(--line); font-size: 13px; color: var(--grey); text-decoration: none; }
.mega-cta b { color: var(--orange); font-weight: 500; white-space: nowrap; }
.mega-cta:hover b { color: var(--white); }

/* — Footer sitemap — */
footer { padding: 70px 48px 44px; }
.foot-grid { max-width: 1240px; margin: 0 auto 56px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px; }
.fg-brand svg { width: 34px; height: 31px; color: var(--white); }
.fg-brand p { font-size: 13.5px; color: var(--grey); line-height: 1.6; margin-top: 14px; max-width: 250px; }
.fg-brand a { color: var(--white); text-decoration: none; border-bottom: 1px solid var(--orange); }
.fg-h { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--grey-dim); margin-bottom: 16px; }
a.fg-link { display: block; font-size: 13.5px; color: var(--grey); text-decoration: none; padding: 5px 0; transition: color .2s; }
a.fg-link:hover { color: var(--orange); }

/* — Persistent contact button — */
.float-contact { position: fixed; bottom: 24px; right: 24px; z-index: 80; background: var(--orange); color: #0e0e0c; font-family: var(--sans); font-weight: 600; font-size: 13.5px; padding: 14px 22px; border-radius: 40px; text-decoration: none; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .2s ease, background .2s ease; }
.float-contact:hover { transform: translateY(-2px); background: var(--white); }

.page-hero { padding: 190px 48px 80px; border-bottom: 1px solid var(--line); }
.page-hero .inner, .sect .inner { max-width: 1240px; margin: 0 auto; }
.kicker { font-size: 12px; letter-spacing: 3px; color: var(--orange); margin-bottom: 26px; }
.page-hero h1 { font-size: clamp(38px, 5.6vw, 76px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; max-width: 1000px; }
.page-hero .lede { font-size: 17px; line-height: 1.7; color: var(--grey); max-width: 560px; margin-top: 30px; }
.page-hero .lede b { color: var(--white); font-weight: 500; }

.sect { padding: 110px 48px; }
.sect + .sect { padding-top: 0; }
.sect-head { font-size: 13px; letter-spacing: 2.5px; color: var(--orange); margin-bottom: 48px; }
.sect h2 { font-size: clamp(26px, 3.2vw, 42px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 26px; max-width: 760px; }
.prose { font-size: 16px; line-height: 1.8; color: var(--grey); max-width: 680px; }
.prose p + p { margin-top: 18px; }
.prose b { color: var(--white); font-weight: 500; }
.prose em { font-family: var(--serif); font-style: italic; color: var(--orange); }

.dlist { border-top: 1px solid var(--line); }
.dlist .row { display: grid; grid-template-columns: 90px 1fr 1.6fr; gap: 30px; padding: 36px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.dlist .num { font-family: var(--mono); font-size: 13px; color: var(--grey-dim); }
.dlist h3 { font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; letter-spacing: -0.5px; }
.dlist p { font-size: 14.5px; line-height: 1.65; color: var(--grey); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tile { background: var(--black); padding: 40px 32px 46px; transition: background .3s; text-decoration: none; color: var(--white); display: block; }
.tile:hover { background: var(--char); }
.tile .t-kick { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--orange); }
.tile h3 { font-size: 21px; font-weight: 600; margin: 14px 0 12px; letter-spacing: -0.4px; transition: color .3s; }
.tile p { font-size: 14px; line-height: 1.65; color: var(--grey); }
a.tile:hover h3 { color: var(--orange); }
.dlist a.row { text-decoration: none; color: inherit; }
.dlist a.row h3 { transition: color .3s; }
.dlist a.row:hover h3 { color: var(--orange); }

.siglist { list-style: none; max-width: 760px; }
.siglist li { padding: 20px 0 20px 38px; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.6; color: var(--grey); position: relative; }
.siglist li::before { content: '→'; position: absolute; left: 0; color: var(--orange); }
.siglist li b { color: var(--white); font-weight: 500; }

.cta-band { padding: 120px 48px; border-top: 1px solid var(--line); }
.cta-band .inner { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(30px, 4.5vw, 58px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; max-width: 640px; }
.cta-band h2 em { font-style: normal; color: var(--orange); }
.btn { display: inline-block; background: var(--orange); color: #0e0e0c; font-weight: 500; font-size: 14px; padding: 16px 32px; text-decoration: none; transition: all .25s; }
.btn:hover { background: var(--white); }

footer { padding: 60px 48px 44px; border-top: 1px solid var(--line); }
.foot-meta { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; font-size: 12px; color: var(--grey); flex-wrap: wrap; gap: 16px; }

.reveal-root { perspective: 900px; }
.reveal { opacity: 0; transform: rotateX(-55deg) translateY(64px); transform-origin: 50% 0; will-change: transform, opacity;
  transition: transform 1.15s cubic-bezier(.19,.71,.22,1), opacity .9s ease; }
.reveal.in { opacity: 1; transform: rotateX(0) translateY(0); }

.post { display: grid; grid-template-columns: 264px 1fr 44px; gap: 40px; padding: 40px 0; border-bottom: 1px solid var(--line); text-decoration: none; align-items: start; }
.post .p-thumb { overflow: hidden; aspect-ratio: 3 / 2; background: var(--char); }
.post .p-thumb img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.72) saturate(.8) contrast(1.05); transition: transform .6s cubic-bezier(.19,.71,.22,1), filter .35s ease; display: block; }
[data-theme="light"] .post .p-thumb img { filter: brightness(1) saturate(.85); }
.post .p-body { min-width: 0; }
.post .p-tags { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.post .p-meta { font-family: var(--mono); font-size: 11px; color: var(--grey-dim); letter-spacing: 1px; }
.post h3 { font-size: clamp(22px, 2.4vw, 32px); font-weight: 600; letter-spacing: -0.7px; color: var(--white); transition: color .3s; line-height: 1.15; }
.post p.excerpt { font-size: 14.5px; line-height: 1.65; color: var(--grey); margin-top: 12px; max-width: 620px; }
.post .go { width: 22px; height: 22px; color: var(--grey-dim); transition: transform .3s ease, color .3s ease; margin-left: auto; display: block; align-self: center; }
.post:hover h3 { color: var(--orange); }
.post:hover .p-thumb img { transform: scale(1.06); filter: brightness(.85) saturate(.95) contrast(1.05); }
.post:hover .go { color: var(--orange); transform: translateX(5px); }

form .field { margin-bottom: 22px; }
form label { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--grey); margin-bottom: 10px; }
form input, form select, form textarea {
  width: 100%; background: var(--char); border: 1px solid var(--line); color: var(--white);
  font-family: var(--sans); font-size: 15px; padding: 14px 16px; outline: none; transition: border-color .25s;
}
form input:focus, form select:focus, form textarea:focus { border-color: var(--orange); }
form textarea { min-height: 140px; resize: vertical; }
form button.btn { border: none; cursor: pointer; font-family: var(--sans); }
.form-success { display: none; border: 1px solid var(--orange); padding: 32px; }
.form-success h3 { font-size: 22px; margin-bottom: 10px; }
.form-success p { color: var(--grey); font-size: 15px; line-height: 1.6; }

/* — Imagery & motion layer — */
.page-hero.with-img { position: relative; overflow: hidden; }
.page-hero .ph-bg { position: absolute; inset: 0; z-index: 0; }
.page-hero .ph-bg img { width: 100%; height: 118%; object-fit: cover; filter: brightness(.45) saturate(.85) contrast(1.1); will-change: transform; }
[data-theme="light"] .page-hero .ph-bg img { filter: brightness(.85) saturate(.8); }
.page-hero .ph-bg::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(95deg, rgba(var(--veil),.95) 30%, rgba(var(--veil),.55) 65%, rgba(var(--veil),.2)),
              linear-gradient(rgba(var(--veil),.4), transparent 40%, rgba(var(--veil),.9)); }
.page-hero .inner { position: relative; z-index: 2; }

.pq-band { height: 62vh; position: relative; overflow: hidden; will-change: clip-path; }
.pq-band img { position: absolute; width: 100%; height: 135%; top: -17%; object-fit: cover; filter: brightness(.5) saturate(.9); will-change: transform; }
[data-theme="light"] .pq-band img { filter: brightness(.9) saturate(.85); }
.pq-band::before { content: ''; position: absolute; inset: 0; background: rgba(var(--veil),.35); z-index: 1; }
.pq-band .inner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2; padding: 0 48px; text-align: center; perspective: 900px; }
.pq-band h2 { font-size: clamp(26px, 4.2vw, 52px); font-weight: 600; letter-spacing: -.03em; max-width: 900px; line-height: 1.1; }
.pq-band h2 em { font-style: normal; color: var(--orange); }
.pq-band .tag { position: absolute; bottom: 20px; right: 48px; z-index: 2; font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--grey); }

.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 56px; }
.chip { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; color: var(--grey); border: 1px solid var(--line); background: none; padding: 9px 16px; cursor: pointer; transition: all .25s; }
.chip:hover { border-color: var(--orange); color: var(--orange); }
.chip.active { background: var(--orange); border-color: var(--orange); color: #0e0e0c; }
.post .cat { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; color: var(--orange); border: 1px solid var(--line); padding: 4px 10px; }
.post.hidden { display: none; }

/* — Editorial variation kit — */
.gnum { font-size: clamp(90px, 13vw, 190px); font-weight: 600; letter-spacing: -.05em; line-height: .8; color: transparent; -webkit-text-stroke: 1px var(--grey-dim); }
.offset { display: grid; grid-template-columns: 1fr 1.7fr; gap: 60px; align-items: start; }
.mnote { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; color: var(--grey-dim); line-height: 2.1; }
.mnote .o { color: var(--orange); }
.mnote .w { color: var(--grey); }
.serif-pull { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.45; color: var(--grey); }
.serif-pull em { color: var(--orange); }
.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table th { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--orange); text-align: left; padding: 0 24px 16px 0; font-weight: 400; border-bottom: 1px solid var(--white); }
.cmp-table td { padding: 22px 24px 22px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--grey); line-height: 1.6; vertical-align: top; }
.cmp-table td:first-child { color: var(--white); font-weight: 500; font-size: 16px; }
.qlist { counter-reset: q; list-style: none; max-width: 860px; }
.qlist li { counter-increment: q; padding: 28px 0 28px 76px; border-bottom: 1px solid var(--line); position: relative; font-size: clamp(17px, 1.9vw, 23px); line-height: 1.45; font-weight: 500; }
.qlist li::before { content: counter(q, decimal-leading-zero); position: absolute; left: 0; top: 30px; font-family: var(--mono); font-size: 13px; color: var(--orange); }
.qlist li small { display: block; font-size: 13.5px; font-weight: 400; color: var(--grey); margin-top: 8px; line-height: 1.6; }
.dashed-row { border: 1px dashed var(--grey-dim); padding: 26px 30px; margin-bottom: 14px; display: flex; gap: 28px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; transition: border-color .3s; }
.dashed-row:hover { border-color: var(--orange); }
.dashed-row h3 { font-size: 20px; font-weight: 600; letter-spacing: -.3px; }
.dashed-row p { font-size: 14px; color: var(--grey); line-height: 1.6; flex-basis: 55%; }
.dashed-row .fig { font-family: var(--mono); font-size: 10px; color: var(--orange); letter-spacing: 1.5px; }
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--white); gap: 0 32px; }
.timeline > div { padding-top: 26px; position: relative; }
.timeline > div::before { content: ''; position: absolute; top: -2px; left: 0; width: 34px; height: 2px; background: var(--orange); }
.timeline .tk { font-family: var(--mono); font-size: 11px; color: var(--orange); letter-spacing: 1.5px; }
.timeline h3 { font-size: 20px; font-weight: 600; margin: 12px 0 10px; letter-spacing: -.3px; }
.timeline p { font-size: 13.5px; line-height: 1.65; color: var(--grey); }
.endline { border-top: 1px solid var(--line); padding: 70px 48px 90px; }
.endline .inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: baseline; justify-content: space-between; gap: 36px; flex-wrap: wrap; }
.post.featured { padding: 52px 0; }
.post.featured h3 { font-size: clamp(28px, 3.4vw, 46px); }

@media (max-width: 900px) {
  .offset { grid-template-columns: 1fr; gap: 30px; }
  .timeline { grid-template-columns: 1fr; gap: 34px 0; border-top: none; }
  .timeline > div { border-top: 2px solid var(--white); }
  .dashed-row p { flex-basis: 100%; }
  .cmp-table { display: block; overflow-x: auto; }
  nav { padding: 14px 24px; }
  .nav-toggle { display: block; }
  nav ul.nav-menu { display: none; position: fixed; top: 56px; left: 0; right: 0; background: var(--black); border-top: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 32px; max-height: calc(100vh - 56px); overflow-y: auto; }
  nav.open ul.nav-menu { display: flex; }
  nav ul.nav-menu > li { border-bottom: 1px solid var(--line); }
  nav ul.nav-menu > li > a { display: block; padding: 16px 0; font-size: 16px; opacity: 1; }
  .has-menu > a::after { content: ''; }
  .mega { position: static; opacity: 1; visibility: visible; transform: none !important; max-width: none; box-shadow: none; background: none; border: none; padding: 2px 0 14px; }
  .mega-4 { grid-template-columns: 1fr; }
  .mega::before { display: none; }
  .mega-2 { grid-template-columns: 1fr; }
  .mega-item { padding: 10px 4px; }
  .mega-cards { flex-direction: column; }
  .mega-card { width: 100%; height: 120px; }
  #theme-toggle { position: fixed; bottom: 20px; left: 20px; z-index: 90; background: var(--char); }
  .float-contact { bottom: 16px; right: 16px; padding: 12px 18px; font-size: 13px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .fg-brand { grid-column: 1 / -1; }
  .page-hero, .sect, .cta-band, footer { padding-left: 24px; padding-right: 24px; }
  .page-hero { padding-top: 150px; }
  .dlist .row { grid-template-columns: 50px 1fr; } .dlist p { grid-column: 2; }
  .tiles { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; gap: 16px; } .post .go { display: none; } .post .p-thumb { aspect-ratio: 16 / 9; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-delay: 0s !important; animation-duration: .01s !important; transition-duration: .01s !important; }
}
