/* PRISM — shared stylesheet (v3: conservative, dense, tweakable)
   Design tokens are CSS variables; the Tweaks panel mutates them at runtime. */

:root {
  /* Color */
  --ink:    #0F1E2C;
  --body:   #2D3845;
  --muted:  #6B7682;
  --rule:   #E5E2DA;
  --rule-w: #DDE1E6;
  --paper:  #FFFFFF;
  --cream:  #EFEEE8;
  --accent: #085472;       /* PRISM brand teal-blue */
  --accent-bright: #3FA9C9;/* lighter brand teal for dark surfaces */

  /* Layout — TIGHTER baseline */
  --max:    1320px;
  --pad:    56px;
  --gap-section: 80px;

  /* Type scale — DENSER baseline (tweak via panel) */
  --fs-h1-home:   72px;   /* home hero (was 110px) */
  --fs-h1-page:   44px;   /* sub-page hero (was 88px) */
  --fs-h2:        28px;   /* section headings (was 48px) */
  --fs-lede:      17px;
  --fs-body:      15px;
  --fs-meta:      11px;

  /* Section padding — TIGHTER baseline (tweak via panel) */
  --pad-section:    72px;
  --pad-section-tall: 96px;
  --pad-section-short: 48px;

  /* Density toggles */
  --line-tight:   1.05;
  --line-body:    1.55;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
h1, h2, h3, h4, p, ul, li { margin: 0; padding: 0; }
ul { list-style: none; }
em { font-style: italic; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

.page { width: 100%; max-width: var(--max); margin: 0 auto; }

/* ---------- Nav ---------- */
.nav {
  padding: 22px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav .brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.nav .brand-logo { height: 28px; width: auto; display: block; }
.nav .brand-name {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
}
.nav .links { display: flex; gap: 28px; align-items: center; font-size: 14px; }
.nav .links a {
  color: var(--ink);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.nav .links a:hover,
.nav .links a.active { border-bottom-color: var(--ink); }
.nav .links .lang {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding-left: 14px;
  border-left: 1px solid var(--rule-w);
}
.nav .contact-link {
  font-size: 14px;
  padding: 9px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.nav .contact-link:hover { background: var(--ink); color: #fff; }

/* ---------- Sections ---------- */
section { padding: var(--pad-section) var(--pad); }
section.cream { background: var(--cream); }
section.tall  { padding: var(--pad-section-tall) var(--pad); }
section.short { padding: var(--pad-section-short) var(--pad); }

/* Section heading row */
.h-row { margin-bottom: 32px; max-width: 880px; }
.h-row .kicker {
  font-size: var(--fs-meta);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 500;
}
.h-row h2 {
  font-size: var(--fs-h2);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.h-row h2 em { color: var(--accent); }

.section-lede {
  font-size: var(--fs-lede);
  line-height: var(--line-body);
  color: var(--body);
  max-width: 680px;
  margin-top: 18px;
  text-wrap: pretty;
}

/* ---------- Page hero (subpages — dark overlay style) ---------- */
.page-hero {
  margin: 0;
  height: clamp(400px, 40vh, 460px);
  position: relative;
  background: #07202e url('images/Picture%204.png') center/cover no-repeat;
  image-rendering: auto;
  overflow: hidden;
  color: #fff;
  display: flex;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,32,46,0.45) 0%, rgba(7,32,46,0.15) 45%, rgba(7,32,46,0.80) 100%);
}
.page-hero > .scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7,32,46,0.70) 0%, rgba(7,32,46,0.10) 55%, rgba(7,32,46,0) 100%);
}
.page-hero > .body {
  position: relative;
  padding: 56px var(--pad) 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  gap: 24px;
}
.page-hero .kicker {
  font-size: var(--fs-meta);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  font-weight: 500;
  margin-bottom: 16px;
}
.page-hero h1 {
  font-size: var(--fs-h1-page);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
  max-width: 22ch;
  text-wrap: balance;
  margin: 0;
  color: #fff;
}
.page-hero h1 em { color: var(--accent-bright); font-style: italic; }
.page-hero .lede {
  font-size: var(--fs-lede);
  line-height: var(--line-body);
  color: rgba(255,255,255,.85);
  max-width: 620px;
  margin: 0;
  text-wrap: pretty;
}

/* ---------- Two-column body ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 1080px;
}
.two-col p {
  font-size: var(--fs-lede);
  line-height: var(--line-body);
  color: var(--body);
  text-wrap: pretty;
}

/* ---------- Buttons & inline links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
}
.btn-ghost:hover { background: var(--ink); color: #fff; }
.ilink {
  font-size: 13px;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  display: inline-block;
}

/* ---------- Domain list (home page framework) ---------- */
.domain-list { border-top: 1px solid var(--rule-w); }
section.cream .domain-list { border-top-color: var(--rule); }
.domain-list .row {
  display: grid;
  grid-template-columns: 60px 1fr 2fr;
  gap: 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule-w);
  align-items: baseline;
}
section.cream .domain-list .row { border-bottom-color: var(--rule); }
.domain-list .num { font-size: 12px; color: var(--muted); letter-spacing: 0.14em; }
.domain-list .name {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.008em;
}
.domain-list .meta-row {
  font-size: 11px; color: var(--muted); letter-spacing: 0.06em; margin-top: 3px;
}
.domain-list .desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--body);
  font-style: italic;
  text-wrap: pretty;
}

/* (tile grid removed — home now uses domain-list) */

/* ---------- Five-domain detail page ---------- */
.domain-block {
  padding: 56px var(--pad);
  border-top: 1px solid var(--rule-w);
}
.domain-block.cream { background: var(--cream); border-top-color: var(--rule); }
.domain-block-grid {
  display: grid;
  grid-template-columns: 64px 1fr 1.4fr;
  gap: 40px;
  max-width: 1180px;
}
.domain-block-grid .num {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 500;
  padding-top: 10px;
}
.domain-block-grid h2 {
  font-size: 32px;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.018em;
}
.domain-block-grid .sub {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 12px;
}
.domain-block-grid .lede {
  font-size: 16px;
  line-height: 1.5;
  margin-top: 20px;
  color: var(--ink);
  text-wrap: pretty;
}
.domain-block-grid .body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--body);
  text-wrap: pretty;
}
.domain-block-grid ul { margin-top: 18px; }
.domain-block-grid li {
  padding: 10px 0;
  border-top: 1px solid var(--rule-w);
  font-size: 13px;
  color: var(--body);
}
.domain-block.cream .domain-block-grid li { border-top-color: var(--rule); }

/* ---------- Cascade hero variant (Five Domains page) ---------- */
.page-hero.cascade {
  background: #07090b;
}
.page-hero.cascade .cascade-frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #07090b;
  transform: translateX(22%);
}
.page-hero.cascade .cascade-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
}
.page-hero.cascade::before {
  background: linear-gradient(180deg, rgba(7,9,11,0.40) 0%, rgba(7,9,11,0.05) 35%, rgba(7,9,11,0.80) 100%);
  z-index: 1;
}
.page-hero.cascade > .scrim {
  background: linear-gradient(90deg, rgba(7,9,11,0.55) 0%, rgba(7,9,11,0.10) 35%, rgba(7,9,11,0) 65%);
  z-index: 1;
}
.page-hero.cascade > .body { z-index: 2; }

/* ---------- Cascade band (home page embedded teaser) ---------- */
.cascade-band {
  padding: var(--pad-section) var(--pad);
  background: #07090b;
  color: #fff;
}
.cascade-band .h-row { margin-bottom: 32px; max-width: 880px; }
.cascade-band .kicker { color: rgba(255, 255, 255, 0.55); }
.cascade-band h2 { color: #fff; }
.cascade-band h2 em { color: var(--accent-bright); font-style: italic; }
.cascade-band .section-lede { color: rgba(255, 255, 255, 0.78); max-width: 720px; }
.cascade-link {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  outline: none;
}
.cascade-link:focus-visible { box-shadow: 0 0 0 2px var(--accent-bright); }
.cascade-embed {
  position: relative;
  width: 100%;
  height: clamp(440px, 55vh, 620px);
  overflow: hidden;
  background: #07090b;
}
.cascade-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
}

/* ---------- Service rows ---------- */
.service-row {
  padding: 56px var(--pad);
  border-top: 1px solid var(--rule-w);
}
.service-row.cream { background: var(--cream); border-top-color: var(--rule); }
.service-grid {
  display: grid;
  grid-template-columns: 90px 1fr 1.4fr;
  gap: 40px;
  max-width: 1180px;
  align-items: start;
}
.service-grid .stage {
  font-size: 11px; letter-spacing: 0.18em; color: var(--muted); font-weight: 500; padding-top: 8px;
}
.service-grid h2 {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.014em;
  text-wrap: balance;
}
.service-grid .brief {
  font-size: 15px;
  line-height: 1.5;
  color: var(--body);
  margin-top: 12px;
  font-style: italic;
  text-wrap: pretty;
}
.service-grid .detail {
  font-size: 14px;
  line-height: 1.7;
  color: var(--body);
  text-wrap: pretty;
}
.service-meta {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  border-top: 1px solid var(--rule-w);
  padding-top: 14px;
}
.service-row.cream .service-meta { border-top-color: var(--rule); }
.service-meta .label {
  font-size: 10px; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; font-weight: 600; margin-bottom: 4px;
}
.service-meta .value { font-size: 13px; line-height: 1.5; color: var(--ink); }

/* ---------- About page ---------- */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  max-width: 1180px;
}
.about-intro .lead {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
  text-wrap: pretty;
  letter-spacing: -0.005em;
}
.about-intro .body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--body);
  text-wrap: pretty;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-w);
}
section.cream .stats-row { border-top-color: var(--rule); }
.stat .n {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1;
}
.stat .l { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.4; }

.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 56px;
  max-width: 1080px;
}
.principles .h { font-size: 16px; font-weight: 600; letter-spacing: -0.005em; }
.principles p {
  font-size: 14px; line-height: 1.65; color: var(--body); margin-top: 8px; text-wrap: pretty;
}

.offices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
.office { border-top: 1px solid var(--ink); padding-top: 12px; }
.office .city { font-size: 18px; font-weight: 500; letter-spacing: -0.008em; }
.office .addr { font-size: 12px; color: var(--body); margin-top: 6px; line-height: 1.55; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 72px;
  max-width: 1180px;
}
.field { display: block; margin-bottom: 22px; }
.field-label {
  font-size: 11px; color: var(--muted); letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 500; margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 0; font-size: 14px;
  background: transparent; border: none;
  border-bottom: 1px solid var(--rule-w); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--ink);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-routes .route {
  border-bottom: 1px solid var(--rule-w);
  margin-bottom: 22px;
}
.contact-routes .route:last-child { margin-bottom: 0; }
.contact-routes .route-label {
  font-size: 11px; color: var(--muted); letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 500; margin-bottom: 6px;
}
.contact-routes .route-value {
  display: block; font-weight: 400; letter-spacing: -0.008em; color: var(--ink);
  padding: 10px 0; font-size: 14px;
}
.contact-routes .route-value.lg,
.contact-routes .route-value.md { font-size: 14px; }

/* ---------- Footer ---------- */
footer {
  padding: 56px var(--pad) 24px;
  border-top: 1px solid var(--rule-w);
  color: var(--body);
  font-size: 13px;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
}
.footer-mark {
  font-size: 14px; font-weight: 600; letter-spacing: 0.18em; color: var(--ink);
}
.footer-tagline {
  font-size: 13px; line-height: 1.55; color: var(--body); margin-top: 10px; max-width: 280px;
}
.footer-subsidiary { font-size: 12px; color: var(--muted); margin-top: 6px; font-style: italic; }
.footer-col-title {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; margin-bottom: 14px;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: var(--ink); transition: color .15s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 18px;
  border-top: 1px solid var(--rule-w);
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  font-size: 11px; color: var(--muted);
}
.footer-legal { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.footer-legal a { color: var(--muted); }
.footer-legal a:hover { color: var(--ink); }
.footer-legal .sep { color: var(--rule-w); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root {
    --pad: 24px;
    --fs-h1-home: 44px;
    --fs-h1-page: 32px;
    --fs-h2: 22px;
    --pad-section: 56px;
    --pad-section-tall: 72px;
    --pad-section-short: 36px;
  }
  .nav {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand contact"
      "links links";
    align-items: center;
    gap: 12px 20px;
    padding: 16px var(--pad);
  }
  .nav .brand { grid-area: brand; }
  .nav .contact-link { grid-area: contact; justify-self: end; }
  .nav .links {
    grid-area: links;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    padding-top: 4px;
  }
  .page-hero { height: clamp(320px, 50vh, 400px); }
  .page-hero > .body { padding: 40px var(--pad) 32px; }
  .page-hero h1 { max-width: 100%; }
  .domain-list .row { grid-template-columns: 1fr; gap: 4px; }
  .domain-block-grid, .service-grid { grid-template-columns: 1fr; gap: 16px; }
  .service-meta { grid-template-columns: 1fr; gap: 14px; }
  .two-col, .about-intro, .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .stats-row { grid-template-columns: 1fr; gap: 16px; }
  .principles { grid-template-columns: 1fr; gap: 28px; }
  .offices { grid-template-columns: 1fr; gap: 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .page-hero.cascade .cascade-frame { transform: none; }
  .cascade-embed { height: clamp(340px, 50vh, 460px); }
}

@media (max-width: 480px) {
  :root {
    --pad: 20px;
    --fs-h1-page: 28px;
    --fs-h2: 20px;
  }
  .nav .brand-name { font-size: 22px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}
