/* ============================================================
   AICES — Shared Site Styles
   Dark foundation, refined serif display, gold signature accent
   ============================================================ */

:root {
  --ink: #0a0a0a;
  --ink-soft: #1a1a1a;
  --ink-line: #2a2a2a;
  --paper: #fafaf7;
  --paper-warm: #f4f1e8;
  --gold: #c9a24b;
  --gold-bright: #e6bf5e;
  --gold-deep: #8a6a28;
  --gold-glow: rgba(201, 162, 75, 0.15);
  --mute: #6b6b68;
  --mute-light: #8a8a85;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--ink);
  color: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
  font-weight: 400;
}
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

/* ============ NAV (shared) ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ink-line);
  z-index: 100;
  padding: 18px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-brand {
  display: inline-flex;
  align-items: baseline;
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--paper);
  letter-spacing: -0.01em;
  line-height: 1;
}
.nav-brand-a {
  /* A is 25% taller than ICES cap-height for strong optical overshoot.
     Base aligns with ICES baseline; apex extends visibly above cap line. */
  display: inline-block;
  width: 0.95em;
  height: 1.35em;
  margin-right: 0.03em;
  vertical-align: baseline;
  position: relative;
  top: 0.05em;
}
.nav-brand-a svg { width: 100%; height: 100%; display: block; overflow: visible; }
.nav-brand-ices {
  color: var(--paper);
}
.nav-links {
  display: flex;
  gap: 36px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav-links a { color: var(--mute); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-cta {
  padding: 10px 20px;
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--gold-bright); }

/* ============ SECTION STRUCTURE (shared) ============ */
section {
  padding: 120px 48px;
  position: relative;
  border-bottom: 1px solid var(--ink-line);
}
.container { max-width: 1200px; margin: 0 auto; }
.container-narrow { max-width: 860px; margin: 0 auto; }

.section-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 600;
}
.section-heading {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 28px;
  max-width: 900px;
}
.section-heading em { font-style: italic; color: var(--gold); font-weight: 400; }
.section-intro {
  font-size: 18px;
  color: var(--mute);
  max-width: 680px;
  line-height: 1.6;
  margin-bottom: 64px;
}

/* ============ BUTTONS (shared) ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid var(--gold);
  transition: all 0.25s ease;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-bright); border-color: var(--gold-bright); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--ink-line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ============ PAGE HEADER (sub-pages) ============ */
.page-header {
  padding: 180px 48px 80px;
  background:
    radial-gradient(ellipse at 70% 20%, var(--gold-glow) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(201, 162, 75, 0.06) 0%, transparent 55%),
    var(--ink);
  border-bottom: 1px solid var(--ink-line);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 162, 75, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 162, 75, 0.04) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  pointer-events: none;
}
.page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.page-eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 500;
}
.page-eyebrow::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--gold);
}
.page-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 32px;
  max-width: 1100px;
}
.page-title em { font-style: italic; color: var(--gold); font-weight: 400; }
.page-lede {
  font-size: 20px;
  color: var(--mute-light);
  max-width: 720px;
  line-height: 1.55;
}

/* ============ FOOTER (shared) ============ */
footer.site-footer {
  background: var(--ink);
  padding: 40px 48px;
  border-top: 1px solid var(--ink-line);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--mute);
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex;
  align-items: baseline;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  color: var(--paper);
  letter-spacing: -0.01em;
  line-height: 1;
  font-weight: 500;
}
.footer-brand-a {
  display: inline-block;
  width: 0.95em;
  height: 1.35em;
  margin-right: 0.03em;
  vertical-align: baseline;
  position: relative;
  top: 0.05em;
}
.footer-brand-a svg { width: 100%; height: 100%; display: block; overflow: visible; }
.footer-brand-ices { color: var(--paper); }
.footer-right {
  display: flex;
  gap: 28px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 11px;
}
.footer-tag {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--gold-deep);
  text-transform: none;
  letter-spacing: 0;
}

/* ============ MOBILE NAV TOGGLE ============ */
.nav-mobile-toggle {
  display: none;
  width: 28px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001;
}
.nav-mobile-toggle span {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--paper);
  transition: transform 0.3s ease, opacity 0.2s ease, top 0.3s ease;
}
.nav-mobile-toggle span:nth-child(1) { top: 2px; }
.nav-mobile-toggle span:nth-child(2) { top: 10px; }
.nav-mobile-toggle span:nth-child(3) { top: 18px; }
/* When checkbox is checked, transform into X */
.nav-mobile-check { display: none; }
.nav-mobile-check:checked ~ .nav .nav-mobile-toggle span:nth-child(1) {
  top: 10px;
  transform: rotate(45deg);
}
.nav-mobile-check:checked ~ .nav .nav-mobile-toggle span:nth-child(2) {
  opacity: 0;
}
.nav-mobile-check:checked ~ .nav .nav-mobile-toggle span:nth-child(3) {
  top: 10px;
  transform: rotate(-45deg);
}

/* Mobile menu panel */
.nav-mobile-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--ink);
  z-index: 999;
  padding: 100px 32px 32px;
  flex-direction: column;
  gap: 28px;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  overflow-y: auto;
}
.nav-mobile-check:checked ~ .nav-mobile-panel {
  opacity: 1;
  pointer-events: auto;
}
.nav-mobile-panel a {
  color: var(--paper);
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 400;
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.2;
  padding: 8px 0;
  border-bottom: 1px solid var(--ink-line);
}
.nav-mobile-panel a:last-child {
  border-bottom: none;
  margin-top: 24px;
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  padding: 16px 24px;
  text-align: center;
  font-family: 'Inter Tight', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
}

/* Keep nav above the panel so the X toggle is visible when menu is open */
.nav-mobile-check:checked ~ .nav {
  background: var(--ink);
  z-index: 1001;
}

/* ============ RESPONSIVE BASELINE (shared) ============ */
@media (max-width: 900px) {
  .nav { padding: 14px 24px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-mobile-panel { display: flex; }
  section { padding: 80px 24px; }
  .page-header { padding: 140px 24px 60px; }
  footer.site-footer { padding: 32px 24px; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; justify-content: center; }
}

/* ============ SERVICE DETAIL PAGES (shared) ============ */
.svc-problem { background: var(--ink); }
.svc-problem-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
}
.svc-problem-text { font-size: 17px; line-height: 1.75; color: var(--mute-light); }
.svc-problem-text p { margin-bottom: 24px; }
.svc-problem-text strong { color: var(--paper); font-weight: 500; }
.svc-problem-text em { color: var(--gold); font-style: italic; }

/* what we do list */
.svc-work { background: var(--ink-soft); }
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 24px;
  border-top: 1px solid var(--ink-line);
  border-left: 1px solid var(--ink-line);
}
.work-cell {
  padding: 36px 32px;
  border-right: 1px solid var(--ink-line);
  border-bottom: 1px solid var(--ink-line);
  min-height: 200px;
  transition: background 0.25s;
}
.work-cell:hover { background: linear-gradient(180deg, transparent, rgba(201, 162, 75, 0.05)); }
.work-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 14px;
  font-weight: 600;
}
.work-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--paper);
  margin-bottom: 12px;
  line-height: 1.2;
}
.work-desc {
  font-size: 14px;
  color: var(--mute);
  line-height: 1.6;
}

/* engagement shape */
.svc-shape { background: var(--ink); }
.shape-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}
.shape-card {
  padding: 36px 32px;
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  transition: all 0.25s ease;
}
.shape-card:hover {
  border-color: var(--gold-deep);
  transform: translateY(-2px);
}
.shape-kicker {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 600;
}
.shape-title {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--paper);
  margin-bottom: 16px;
  line-height: 1.2;
}
.shape-body {
  font-size: 14px;
  color: var(--mute-light);
  line-height: 1.65;
  margin-bottom: 20px;
}
.shape-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.08em;
  padding-top: 16px;
  border-top: 1px solid var(--ink-line);
  line-height: 1.8;
}

/* cross-link services */
.cross-services { background: var(--ink); padding: 80px 48px; }
.cross-services-head {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 32px;
  text-align: center;
  font-weight: 600;
}
.cross-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cross-tile {
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  padding: 24px 28px;
  transition: all 0.2s;
  display: block;
}
.cross-tile:hover { border-color: var(--gold-deep); transform: translateY(-2px); }
.cross-tile-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 600;
}
.cross-tile-name {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--paper);
  line-height: 1.2;
}

/* Closing CTA (shared) */
.closing { background: var(--ink); padding: 120px 48px; text-align: center; border-bottom: none; }
.closing h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 28px;
  color: var(--paper);
}
.closing h2 em { font-style: italic; color: var(--gold); }
.closing p {
  font-size: 17px;
  color: var(--mute);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .svc-problem-grid { grid-template-columns: 1fr; gap: 32px; }
  .work-grid { grid-template-columns: 1fr; }
  .shape-grid { grid-template-columns: 1fr; }
  .cross-grid { grid-template-columns: 1fr; }
  .cross-services { padding: 60px 24px; }
  .closing { padding: 80px 24px; }
}
