/* ============================================
   OSISIS — Design tokens
   ============================================ */
:root {
  --bg: #0A0C0F;
  --surface: #12151A;
  --surface-2: #181C22;
  --border: #262B33;
  --border-soft: #1D2129;

  --text: #EDEEF0;
  --text-muted: #8D939C;
  --text-faint: #565C66;

  --amber: #F2A23D;
  --amber-bright: #FFBE5C;
  --amber-dim: #7A5220;
  --oxblood: #9B2323;
  --oxblood-bright: #C23838;
  --oxblood-dim: #4A1414;
  --status-ok: #6FBF8B;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-w: 1120px;
  --radius: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  :root { --transition: 220ms cubic-bezier(.4,0,.2,1); }
}
@media (prefers-reduced-motion: reduce) {
  :root { --transition: 0ms; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--amber);
  margin: 0 0 14px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--text);
}

h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 16px; letter-spacing: -0.01em; }
h3 { font-size: 19px; margin-bottom: 8px; }

p { margin: 0 0 16px; color: var(--text-muted); }

a { color: inherit; }

img { max-width: 100%; height: auto; display: block; }

/* subtle film-grain texture for depth without gradients */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================
   Image placeholders
   ============================================ */
.img-ph {
  border: 1px dashed var(--border);
  background:
    repeating-linear-gradient(
      135deg,
      var(--surface) 0px, var(--surface) 10px,
      var(--surface-2) 10px, var(--surface-2) 20px
    );
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 20px;
}
.img-ph span:first-child {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.img-ph-dim {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

/* Aspect-ratio utilities. Shared by the dashed placeholder divs AND real
   <img> tags — this is what keeps a swapped-in photo responsive and capped,
   with no HTML changes needed beyond the class already on the element. */
.ar-portrait, .ar-4-3, .ar-wide, .ar-square {
  border-radius: var(--radius);
  overflow: hidden;
}
.ar-portrait { aspect-ratio: 4 / 5; }
.ar-4-3 { aspect-ratio: 4 / 3; }
.ar-wide { aspect-ratio: 21 / 9; }
.ar-square { aspect-ratio: 1 / 1; width: 96px; margin-bottom: 20px; }

/* Real images: fill the box, crop instead of distorting, never overflow it. */
img.ar-portrait, img.ar-4-3, img.ar-wide, img.ar-square {
  display: block;
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--border);
}
img.ar-square { width: 96px; }

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 15, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo-img {
  height: 40px;
  width: auto;
  display: block;
}
.logo-img.small { height: 30px; }

.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  transition: color var(--transition);
}
.main-nav a:hover { color: var(--text); }
.nav-cta {
  color: var(--bg) !important;
  background: var(--amber);
  padding: 9px 16px;
  border-radius: var(--radius);
  font-weight: 500;
}
.nav-cta:hover { background: var(--amber-bright); }

/* Nav dropdown — The Structure Shelf */
.nav-item { position: relative; }
.nav-caret {
  font-size: 9px;
  margin-left: 3px;
  display: inline-block;
  transform: translateY(-1px);
  color: var(--text-faint);
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 230px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 60;
}
.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 2px;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.dropdown-menu a:hover { background: var(--surface-2); color: var(--amber); }

@media (max-width: 720px) {
  .main-nav { gap: 14px; }
  .main-nav a:not(.nav-cta) { display: none; }
  .main-nav .nav-item { display: none; }
}

/* ============================================
   Structure Shelf page
   ============================================ */
.structure-hero { padding: 96px 32px 32px; }
.structure-hero h1 {
  font-size: clamp(32px, 4.4vw, 48px);
  max-width: 20ch;
  margin-bottom: 18px;
}
.structure-hero p { max-width: 60ch; font-size: 17px; }

.structure-section { padding: 48px 32px 8px; border-top: 1px solid var(--border-soft); }
.structure-section h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 12px; }
.structure-section-desc { max-width: 62ch; font-size: 16px; margin-bottom: 8px; }

.assessment-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  margin: 28px 0 64px;
}
.assessment-card {
  background: var(--bg);
  padding: 30px 28px;
  border-top: 2px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.assessment-card:hover { border-top-color: var(--amber); background: var(--surface); }
.assessment-card h3 { font-size: 18px; margin-bottom: 8px; }
.assessment-card p { font-size: 14.5px; margin-bottom: 18px; }

.downloads-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 40px 44px;
  margin: 28px 0 96px;
}
.downloads-box p { max-width: 62ch; }
.downloads-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
}
.downloads-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 6px 12px;
}

@media (max-width: 600px) {
  .structure-hero { padding: 64px 20px 24px; }
  .structure-section { padding: 32px 20px 8px; }
  .downloads-box { padding: 28px 24px; }
}

/* ============================================
   Hero
   ============================================ */
.hero { padding: 96px 32px 80px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 64px;
}
.hero-grid .img-ph, .hero-grid .ar-portrait { max-height: 480px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid .img-ph, .hero-grid .ar-portrait { max-height: 320px; order: -1; }
}

.hero-headline {
  font-size: clamp(36px, 5.6vw, 62px);
  max-width: 15ch;
  margin-bottom: 28px;
}
.hl { color: var(--amber); }

.hero-sub {
  max-width: 56ch;
  font-size: 18px;
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--amber); color: var(--bg); }
.btn-primary:hover { background: var(--amber-bright); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text-muted); }

/* ---- Signature element: The Ledger ---- */
.ledger {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 640px;
}
.ledger-head, .ledger-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  padding: 13px 20px;
}
.ledger-head {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
}
.ledger-row {
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  align-items: center;
}
.ledger-row:last-of-type { border-bottom: none; }
.ledger-label { color: var(--text); }
.ledger-value { color: var(--text); font-size: 15px; }
.ledger-state { text-align: right; font-size: 12px; }
.ledger-state.ok { color: var(--status-ok); }
.ledger-foot {
  padding: 10px 20px;
  font-size: 11px;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
}

/* ============================================
   Tracks intro
   ============================================ */
.tracks-intro { padding: 40px 32px 8px; text-align: center; }
.tracks-intro .eyebrow { display: block; }
.section-sub {
  max-width: 62ch;
  margin: 0 auto;
  font-size: 17px;
}
.section-note {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 14px;
  letter-spacing: 0.01em;
}

/* ============================================
   Track sections
   ============================================ */
.track { padding: 72px 0; border-top: 1px solid var(--border-soft); }

.track-header-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 44px;
}
.track-header-row .img-ph, .track-header-row .ar-4-3 { max-height: 260px; }

@media (max-width: 760px) {
  .track-header-row { grid-template-columns: 1fr; }
  .track-header-row .img-ph, .track-header-row .ar-4-3 { max-height: 220px; order: -1; }
}

.track-head { max-width: 62ch; }
.track-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 14px;
}
.track-amber .track-tag { color: var(--amber); border: 1px solid var(--amber-dim); }
.track-oxblood .track-tag { color: var(--oxblood-bright); border: 1px solid var(--oxblood-dim); }

.track-desc { font-size: 16px; max-width: 58ch; }

.offering-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
}
.offering {
  background: var(--bg);
  padding: 32px 30px;
  border-top: 2px solid transparent;
}
.track-amber .offering:nth-child(1) { border-top-color: var(--amber-dim); }
.track-amber .offering:nth-child(2) { border-top-color: var(--amber); }
.track-oxblood .offering:nth-child(1) { border-top-color: var(--oxblood-dim); }
.track-oxblood .offering:nth-child(2) { border-top-color: var(--oxblood-bright); }

.offering-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.offering-desc { font-size: 15px; margin-bottom: 18px; }
.offering-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.offering-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.offering-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 1px;
  background: var(--text-faint);
}
.offering-list li:last-child { margin-bottom: 0; }

.offering-note {
  font-size: 12px;
  color: var(--text-faint);
  margin: 20px 2px 0;
}

@media (max-width: 760px) {
  .offering-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Approach
   ============================================ */
/* ============================================
   Regulated industries callout
   ============================================ */
.regulated { padding: 56px 32px; border-top: 1px solid var(--border-soft); }
.regulated-inner {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 40px 44px;
  position: relative;
  overflow: hidden;
}
.regulated-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--amber) 50%, var(--oxblood-bright) 50%, var(--oxblood-bright) 100%);
}
.regulated-tag { color: var(--text-muted); border: 1px solid var(--border); }
.regulated h2 { font-size: clamp(22px, 2.6vw, 28px); max-width: 42ch; margin: 14px 0 16px; }
.regulated-desc { max-width: 64ch; font-size: 15.5px; margin-bottom: 22px; }
.regulated-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.regulated-points li {
  font-size: 12px;
  color: var(--text-muted);
  position: relative;
  padding-left: 16px;
}
.regulated-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

@media (max-width: 600px) {
  .regulated { padding: 40px 20px; }
  .regulated-inner { padding: 28px 24px; }
}

.approach { padding: 88px 32px; border-top: 1px solid var(--border-soft); }
.approach-img { margin-bottom: 48px; }
.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.approach h2 { font-size: clamp(22px, 2.6vw, 28px); }
.approach p { font-size: 15.5px; }
@media (max-width: 760px) {
  .approach-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Contact
   ============================================ */
.contact { padding: 88px 32px 120px; border-top: 1px solid var(--border-soft); }
.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
}
@media (max-width: 800px) {
  .contact-inner { grid-template-columns: 1fr; }
}

.contact-copy h2 { font-size: clamp(26px, 3vw, 34px); }
.contact-copy p { font-size: 16px; max-width: 40ch; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 13px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color var(--transition);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--amber);
}
.field textarea { resize: vertical; min-height: 100px; }

.btn-submit { width: 100%; text-align: center; border: none; margin-top: 4px; }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-status { min-height: 18px; margin: 12px 0 0; font-size: 13px; }
.form-status.success { color: var(--status-ok); }
.form-status.error { color: #D97757; }

.form-note {
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 10px 0 0;
}

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ============================================
   Footer
   ============================================ */
.site-footer { border-top: 1px solid var(--border-soft); padding: 32px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-note { font-size: 12px; color: var(--text-faint); }

/* ============================================
   Blog — index / listing
   ============================================ */
.blog-intro { padding: 96px 32px 32px; }
.blog-intro h1 {
  font-size: clamp(32px, 4.4vw, 48px);
  max-width: 18ch;
  margin-bottom: 18px;
}
.blog-intro p { max-width: 60ch; font-size: 17px; }

.post-list {
  border-top: 1px solid var(--border-soft);
  margin: 24px 0 96px;
}
.post-item {
  display: block;
  padding: 32px 0;
  border-bottom: 1px solid var(--border-soft);
  text-decoration: none;
  color: inherit;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.post-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}
.category-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid var(--border);
}
.category-chip.regulated { color: var(--oxblood-bright); border-color: var(--oxblood-dim); }
.category-chip.general { color: var(--amber); border-color: var(--amber-dim); }

.post-item-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 8px;
  transition: color var(--transition);
}
.post-item:hover .post-item-title { color: var(--amber); }
.post-excerpt { color: var(--text-muted); font-size: 15px; max-width: 68ch; margin: 0; }

/* ============================================
   Blog — individual post
   ============================================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  margin: 28px 0 0;
}
.back-link:hover { color: var(--amber); }

.post-header { padding: 24px 0 40px; border-bottom: 1px solid var(--border-soft); margin-bottom: 48px; }
.post-header h1 { font-size: clamp(30px, 4.2vw, 46px); max-width: 22ch; margin-bottom: 18px; }
.post-header .post-meta { margin-bottom: 0; }

.post-wrap { max-width: 760px; margin: 0 auto; padding: 0 32px 96px; }

.article-prose h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  margin-top: 44px;
  margin-bottom: 14px;
}
.article-prose h3 {
  font-size: 17px;
  margin-top: 30px;
  margin-bottom: 10px;
}
.article-prose p {
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 18px;
  color: var(--text-muted);
}
.article-prose ul, .article-prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}
.article-prose li { margin-bottom: 8px; }
.article-prose strong { color: var(--text); font-weight: 600; }
.article-prose blockquote {
  border-left: 2px solid var(--amber);
  padding: 2px 0 2px 22px;
  margin: 32px 0;
  font-style: italic;
  color: var(--text);
  font-size: 18px;
}
.article-prose blockquote cite {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-style: normal;
  color: var(--text-faint);
}
.article-prose em { color: var(--text-faint); font-size: 13.5px; }

.post-footer-note {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px;
  color: var(--text-faint);
}

@media (max-width: 600px) {
  .blog-intro { padding: 64px 20px 24px; }
  .post-wrap { padding: 0 20px 64px; }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 600px) {
  .hero { padding: 64px 20px 56px; }
  .wrap { padding: 0 20px; }
  .ledger-head, .ledger-row { grid-template-columns: 1.4fr 0.9fr 1fr; padding: 12px 14px; font-size: 12.5px; }
  .track { padding: 56px 0; }
  .approach, .contact { padding: 56px 20px; }
}
