/* ===================================================================
   ITD Next Dimension — Global
   =================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

a { color: inherit; text-decoration: none; transition: color var(--t-base); }
img, svg { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--ink); color: var(--bg); }

/* ===== Typography ===== */

h1, h2, h3, h4, h5 {
  font-family: var(--font-sans);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(44px, 7vw, 96px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

h2 {
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

h3 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

h4 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

p {
  color: var(--ink-2);
  line-height: 1.65;
}

/* Italic serif display — the brand signature */
.serif-italic, .italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
}

/* Mono — eyebrows, metadata, codes */
.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-3);
}

/* ===== Eyebrow tag ===== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-3);
}

.eyebrow::before {
  content: '·';
  color: var(--ink-3);
  font-size: 14px;
  line-height: 0;
  margin-right: 2px;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
}

.eyebrow-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal-green);
}

/* ===== Layout ===== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--section-pad-h);
}

section {
  padding: var(--section-pad-v) var(--section-pad-h);
  position: relative;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-inner--narrow {
  max-width: 1000px;
}

.section-alt { background: var(--bg-deep); }

/* ===== Section header ===== */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.section-header-text { max-width: 720px; }
.section-header .eyebrow { margin-bottom: 16px; }
.section-header h2 { margin-top: 4px; }

.section-header-aside {
  max-width: 380px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
}

.section-header.center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-header.center .section-header-text,
.section-header.center .section-header-aside {
  max-width: 720px;
}

/* ===== Page header (sub-page hero) ===== */

.page-header {
  padding: calc(var(--nav-height) + 100px) var(--section-pad-h) 80px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  opacity: 0.4;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 30% 40%, #000 0%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 70% at 30% 40%, #000 0%, transparent 80%);
  pointer-events: none;
}

.page-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-header .eyebrow {
  margin-bottom: 24px;
}

.page-header h1 {
  margin-bottom: 28px;
  max-width: 920px;
}

.page-header h1 .italic {
  display: inline;
}

.page-header p {
  font-size: 19px;
  max-width: 680px;
  margin-bottom: 18px;
  color: var(--ink-2);
  line-height: 1.55;
}

.page-header p:last-child { margin-bottom: 0; }

/* ===== Decorative dashed/grid backdrop ===== */

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* ===== Fade in ===== */

.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--t-slow), transform 0.7s var(--t-slow);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Utility ===== */

.text-ink-2 { color: var(--ink-2); }
.text-ink-3 { color: var(--ink-3); }
.flex-center { display: flex; align-items: center; justify-content: center; }
