/* ============================================================
   NOVAE RATIO — Layout: Header, Footer, Hero, Page Hero
   ============================================================ */

/* ── Header ── */
#site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--bg); border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; gap: var(--sp-5);
}
.nav-logo {
  text-decoration: none; font-family: var(--font-body); font-weight: 500;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap; flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.nav-links a {
  text-decoration: none; font-size: 13px; color: var(--ink-3);
  padding: 6px 10px; border-radius: var(--radius); transition: color 0.15s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: var(--sp-4); flex-shrink: 0; }
.nav-external {
  text-decoration: none; font-size: 13px; color: var(--ink-3);
  border: 1px solid var(--rule); padding: 5px 12px;
  transition: border-color 0.15s, color 0.15s; white-space: nowrap;
  border-radius: var(--radius);
}
.nav-external:hover { border-color: var(--ink-3); color: var(--ink); }

/* Mobile toggle */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--ink); flex-direction: column;
  gap: 5px; width: 36px; height: 36px; justify-content: center; align-items: center;
}
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform 0.2s, opacity 0.2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
#mobile-menu {
  display: none; position: fixed; top: 60px; left: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 190; overflow-y: auto;
  border-top: 1px solid var(--rule);
  padding: var(--sp-5) var(--pad-x) var(--sp-7);
}
#mobile-menu.open { display: block; }
.mobile-section   { margin-bottom: var(--sp-5); }
.mobile-section-label {
  font-size: 11px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--ink-4); padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--rule-faint); margin-bottom: var(--sp-3);
}
.mobile-links { display: flex; flex-direction: column; gap: 8px; }
.mobile-links a {
  text-decoration: none; font-size: 18px; color: var(--ink-2);
  padding: 8px 0; border-bottom: 1px solid var(--rule-faint); transition: color 0.15s;
}
.mobile-links a:hover { color: var(--ink); }
.mobile-external {
  text-decoration: none; font-size: 18px; color: var(--accent);
  font-weight: 400; padding: 8px 0; display: block;
}

/* ── Hero (homepage) ── */
.hero { padding: var(--sp-8) 0; background: var(--bg); }
.hero-inner {
  display: grid; grid-template-columns: 1fr 360px;
  align-items: end; gap: var(--sp-7); min-height: 520px;
}
.hero-headline { display: flex; flex-direction: column; justify-content: flex-end; gap: var(--sp-5); }
.hero-label { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.hero-label::before { content: ''; display: block; width: 24px; height: 1px; background: var(--accent); }
.hero-headline h1 {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(58px, 9vw, 118px); line-height: 0.95;
  letter-spacing: -0.02em; color: var(--ink);
}
.hero-headline h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-family: var(--font-display); font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 300; font-style: italic; color: var(--ink-2); line-height: 1.4; max-width: 600px;
}
.hero-body { font-size: 16px; color: var(--ink-3); max-width: 520px; line-height: 1.65; padding-top: var(--sp-3); }
.hero-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; padding-top: var(--sp-4); border-top: 1px solid var(--rule); }
.hero-sidebar { padding-top: var(--sp-6); border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: var(--sp-5); }
.hero-sidebar-item .label { margin-bottom: 8px; }
.hero-sidebar-item p { font-size: 13px; color: var(--ink-3); line-height: 1.6; }

/* ── Page hero (inner pages) ── */
.page-hero { padding: var(--sp-8) 0 var(--sp-6); border-bottom: 1px solid var(--rule); }
.page-hero__label { margin-bottom: var(--sp-4); }
.page-hero__title {
  font-family: var(--font-display); font-size: clamp(42px, 6vw, 88px);
  font-weight: 300; line-height: 1.0; letter-spacing: -0.02em; margin-bottom: var(--sp-5);
}
.page-hero__sub {
  font-family: var(--font-display); font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 300; font-style: italic; color: var(--ink-2); line-height: 1.4; max-width: 640px;
}

/* ── Footer ── */
footer { background: var(--bg-deep); color: #c8c7c2; padding: var(--sp-8) 0 var(--sp-6); }
.footer-top {
  display: grid; grid-template-columns: 280px repeat(4, 1fr);
  gap: var(--sp-6); padding-bottom: var(--sp-6);
  border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: var(--sp-6);
}
.footer-brand .footer-logo {
  font-family: var(--font-body); font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: #e8e7e2;
  text-decoration: none; display: block; margin-bottom: var(--sp-3);
}
.footer-brand p { font-size: 13px; color: rgba(200,199,194,0.6); line-height: 1.6; max-width: 200px; }
.footer-col h4 { font-size: 11px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(200,199,194,0.5); margin-bottom: var(--sp-3); }
.footer-col a  { display: block; text-decoration: none; font-size: 13px; color: rgba(200,199,194,0.7); padding: 3px 0; transition: color 0.12s; }
.footer-col a:hover { color: #e8e7e2; }
.footer-col .footer-external { color: rgba(100,150,220,0.8); }
.footer-col .footer-external:hover { color: rgba(100,150,220,1); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.footer-bottom p { font-size: 11px; color: rgba(200,199,194,0.35); }
.footer-bottom-links { display: flex; gap: var(--sp-4); }
.footer-bottom-links a { font-size: 11px; color: rgba(200,199,194,0.35); text-decoration: none; transition: color 0.12s; }
.footer-bottom-links a:hover { color: rgba(200,199,194,0.7); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .process-flow { grid-template-columns: repeat(3, 1fr); }
  .footer-top   { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--sp-6); }
  .hero-sidebar { display: none; }
  .capability-grid { grid-template-columns: 1fr 1fr; }
  .capability-card:nth-child(3n) { border-right: 1px solid var(--rule); }
  .capability-card:nth-child(2n) { border-right: none; }
  .industry-list { grid-template-columns: 1fr 1fr; }
  .industry-item:nth-child(4n) { border-right: 1px solid var(--rule); }
  .industry-item:nth-child(2n) { border-right: none; }
  .knowledge-domains { grid-template-columns: 1fr 1fr; }
  .knowledge-domain:nth-child(3n) { border-right: 1px solid var(--rule); }
  .knowledge-domain:nth-child(2n) { border-right: none; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card:nth-child(2n) { border-right: none; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card { border-right: none; border-bottom: 1px solid var(--rule); }
  .blog-card:last-child { border-bottom: none; }
  .about-strip { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .layout-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .nerditout-block { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: 1fr 1fr; }
  .trust-pillars { grid-template-columns: 1fr; }
  .resource-item { grid-template-columns: 80px 1fr; }
  .resource-item__meta { display: none; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 640px) {
  :root { --pad-x: 20px; --sp-8: 72px; }
  .nav-links, .nav-external { display: none; }
  .nav-toggle { display: flex; }
  .capability-grid { grid-template-columns: 1fr; }
  .capability-card { border-right: none !important; }
  .industry-list { grid-template-columns: 1fr 1fr; }
  .knowledge-domains { grid-template-columns: 1fr; }
  .knowledge-domain { border-right: none !important; }
  .people-grid { grid-template-columns: 1fr; }
  .person-card:nth-child(3n) { border-right: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .process-flow { grid-template-columns: repeat(3, 1fr); }
}
