/* ==============================================
   INDA - Megas Teknologi Indonesia
   Global Stylesheet
   ============================================== */

/* ======================
   1. CSS RESET & BASE
   ====================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  line-height: var(--line-height);
  color: var(--color-light);
  background-color: var(--color-dark);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

button {
  cursor: pointer;
}

/* ======================
   2. CSS VARIABLES
   ====================== */
:root {
  /* Colors */
  --color-primary: #0E1A2B;
  --color-dark: #0A0F18;
  --color-light: #F8F9FB;
  --color-text: #4A5568;
  --color-text-light: #8896A6;
  --color-cta: #C62828;
  --color-cta-hover: #A11D1D;
  --color-overlay: rgba(10, 15, 24, 0.95);
  --color-border: rgba(248, 249, 251, 0.08);
  --color-border-light: rgba(14, 26, 43, 0.1);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-h1: 64px;
  --font-size-h2: 42px;
  --font-size-h3: 28px;
  --font-size-body: 18px;
  --font-size-caption: 14px;
  --font-size-small: 12px;
  --line-height: 1.6;
  --letter-spacing-tight: -0.02em;
  --letter-spacing-wide: 0.08em;

  /* Spacing */
  --container-max-width: 1200px;
  --section-spacing: 120px;
  --grid-gutter: 24px;
  --container-padding: 24px;
  --header-height: 72px;

  /* Animation */
  --transition-speed: 0.6s;
  --transition-fast: 0.3s;
  --easing: cubic-bezier(0.16, 1, 0.3, 1);
  --easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======================
   3. TYPOGRAPHY
   ====================== */
h1, .h1 {
  font-size: var(--font-size-h1);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--letter-spacing-tight);
}

h2, .h2 {
  font-size: var(--font-size-h2);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: var(--letter-spacing-tight);
}

h3, .h3 {
  font-size: var(--font-size-h3);
  font-weight: 600;
  line-height: 1.3;
}

h4, .h4 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

p {
  color: var(--color-text-light);
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

.caption {
  font-size: var(--font-size-caption);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  font-weight: 500;
}

.label-tag {
  font-size: var(--font-size-small);
  color: var(--color-cta);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  font-weight: 600;
}

.text-large {
  font-size: 22px;
  line-height: 1.5;
}

/* Dark bg text */
.bg-dark p,
.bg-primary p {
  color: var(--color-text-light);
}

/* Light bg text */
.bg-light p {
  color: var(--color-text);
}

.bg-light h1,
.bg-light h2,
.bg-light h3,
.bg-light h4 {
  color: var(--color-primary);
}

/* ======================
   4. LAYOUT SYSTEM
   ====================== */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gutter);
}

.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

.col-offset-1 { grid-column-start: 2; }
.col-offset-2 { grid-column-start: 3; }
.col-offset-3 { grid-column-start: 4; }
.col-offset-4 { grid-column-start: 5; }

.section {
  padding: var(--section-spacing) 0;
  position: relative;
}

.section-sm {
  padding: 80px 0;
}

/* Background variants */
.bg-dark {
  background-color: var(--color-dark);
  color: var(--color-light);
}

.bg-primary {
  background-color: var(--color-primary);
  color: var(--color-light);
}

.bg-light {
  background-color: var(--color-light);
  color: var(--color-primary);
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-top: var(--header-height);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.hero-inner {
  max-width: 900px;
}

.hero-center {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--color-text-light);
  margin-top: 24px;
  max-width: 640px;
}

.hero-center .hero-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 48px;
}

.hero-center .hero-actions {
  justify-content: center;
}

/* Page Hero (shorter) */
.page-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  position: relative;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.page-hero .hero-inner {
  padding: 80px 0;
}

/* Hero geometric bg decoration */
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  opacity: 0.15;
}

.hero-bg-pattern::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  border: 1px solid rgba(248, 249, 251, 0.1);
  transform: rotate(45deg);
}

.hero-bg-pattern::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  border: 1px solid rgba(248, 249, 251, 0.08);
  transform: rotate(30deg);
}

/* ======================
   5. HEADER & FOOTER
   ====================== */

/* Header */
.header-main {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: background var(--transition-fast) ease, 
              box-shadow var(--transition-fast) ease;
}

.header-main.scrolled {
  background: var(--color-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1001;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.logo-svg {
  height: 32px;
  width: auto;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-light);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-light);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast) ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-light);
  transition: width var(--transition-fast) ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-light);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.nav-cta {
  color: var(--color-light);
  background: var(--color-cta);
  padding: 8px 20px;
  font-weight: 600;
  transition: background var(--transition-fast) ease;
}

.nav-link.nav-cta::after {
  display: none;
}

.nav-link.nav-cta:hover {
  background: var(--color-cta-hover);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 4px;
  z-index: 1001;
  cursor: pointer;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-light);
  transition: all var(--transition-fast) ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Footer */
.footer-main {
  background: var(--color-dark);
  border-top: 1px solid var(--color-border);
  padding: 80px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: var(--font-size-caption);
  color: var(--color-text);
  max-width: 280px;
}

.footer-col h4 {
  font-size: var(--font-size-caption);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  font-size: 15px;
  color: var(--color-text-light);
  padding: 4px 0;
  transition: color var(--transition-fast) ease;
}

.footer-col a:hover {
  color: var(--color-light);
}

.footer-bottom {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: var(--font-size-caption);
  color: var(--color-text);
}

/* ======================
   6. COMPONENTS
   ====================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition-fast) ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-cta);
  color: var(--color-light);
}

.btn-primary:hover {
  background: var(--color-cta-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-light);
  border: 1px solid rgba(248, 249, 251, 0.25);
}

.btn-secondary:hover {
  border-color: var(--color-light);
  transform: translateY(-1px);
}

.bg-light .btn-secondary {
  color: var(--color-primary);
  border-color: rgba(14, 26, 43, 0.2);
}

.bg-light .btn-secondary:hover {
  border-color: var(--color-primary);
}

.btn-text {
  background: none;
  color: var(--color-light);
  padding: 0;
  font-weight: 500;
  border-bottom: 1px solid rgba(248, 249, 251, 0.3);
  padding-bottom: 2px;
}

.btn-text:hover {
  border-bottom-color: var(--color-light);
}

.bg-light .btn-text {
  color: var(--color-primary);
  border-bottom-color: rgba(14, 26, 43, 0.3);
}

.bg-light .btn-text:hover {
  border-bottom-color: var(--color-primary);
}

.btn-arrow::after {
  content: '\2192';
  transition: transform var(--transition-fast) ease;
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* Section Header */
.section-header {
  margin-bottom: 64px;
}

.section-header .caption {
  margin-bottom: 16px;
}

.section-header p {
  margin-top: 20px;
  max-width: 600px;
}

.section-header-center {
  text-align: center;
}

.section-header-center p {
  margin-left: auto;
  margin-right: auto;
}

/* Cards */
.card {
  background: rgba(248, 249, 251, 0.03);
  border: 1px solid var(--color-border);
  padding: 40px;
  transition: all var(--transition-fast) ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(248, 249, 251, 0.15);
  background: rgba(248, 249, 251, 0.05);
}

.card-number {
  font-size: 48px;
  font-weight: 700;
  color: rgba(248, 249, 251, 0.08);
  line-height: 1;
  margin-bottom: 20px;
}

.card h3 {
  margin-bottom: 16px;
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  color: var(--color-cta);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

/* Light bg cards */
.bg-light .card {
  background: white;
  border-color: var(--color-border-light);
}

/* Equal height cards inside grid columns */
.grid-12 > [class*="col-"] > .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.grid-12 > [class*="col-"] > .card p:last-child {
  flex-grow: 1;
}

.bg-light .card:hover {
  border-color: rgba(14, 26, 43, 0.2);
  box-shadow: 0 8px 32px rgba(14, 26, 43, 0.08);
}

.bg-light .card h3,
.bg-light .card h4 {
  color: var(--color-primary);
}

.bg-light .card-number {
  color: rgba(14, 26, 43, 0.06);
}

/* Platform/Solution Cards */
.card-platform {
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-platform .card-icon {
  margin-bottom: 32px;
}

.card-platform h3 {
  font-size: 22px;
  margin-bottom: 16px;
}

.card-platform p {
  font-size: 16px;
  flex-grow: 1;
}

.card-platform .card-link {
  margin-top: 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-cta);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-fast) ease;
}

.card-platform .card-link:hover {
  gap: 10px;
}

.card-platform .card-link::after {
  content: '\2192';
}

/* Capability List */
.capability-list {
  margin-top: 20px;
}

.capability-list li {
  position: relative;
  padding-left: 16px;
  padding: 6px 0 6px 16px;
  font-size: 15px;
  color: var(--color-text-light);
}

.capability-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 1px;
  background: var(--color-cta);
}

.bg-light .capability-list li {
  color: var(--color-text);
}

/* Phase Blocks (MIEM) */
.phase-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}

.phase-block {
  background: rgba(248, 249, 251, 0.03);
  border: 1px solid var(--color-border);
  padding: 40px 24px;
  text-align: center;
  position: relative;
  transition: all var(--transition-fast) ease;
}

.phase-block:hover {
  background: rgba(248, 249, 251, 0.06);
  border-color: rgba(248, 249, 251, 0.15);
}

.phase-number {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: var(--letter-spacing-wide);
  color: var(--color-cta);
  margin-bottom: 16px;
}

.phase-block h3 {
  font-size: 20px;
  margin-bottom: 16px;
}

.phase-block p {
  font-size: var(--font-size-caption);
}

.phase-block .capability-list {
  text-align: left;
  margin-top: 16px;
}

.phase-block .capability-list li {
  font-size: 13px;
}

/* Phase blocks on light bg */
.bg-light .phase-block {
  background: white;
  border-color: var(--color-border-light);
}

.bg-light .phase-block:hover {
  background: var(--color-light);
  border-color: rgba(14, 26, 43, 0.15);
  box-shadow: 0 4px 20px rgba(14, 26, 43, 0.06);
}

.bg-light .phase-block h3 {
  color: var(--color-primary);
}

.bg-light .phase-block p {
  color: var(--color-text);
}

.bg-light .phase-block:not(:last-child)::after {
  border-right-color: var(--color-text);
  border-top-color: var(--color-text);
}

/* Phase connector arrow */
.phase-block:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-right: 1px solid var(--color-text);
  border-top: 1px solid var(--color-text);
  transform: translateY(-50%) rotate(45deg);
  z-index: 2;
  opacity: 0.3;
}

/* Industry Blocks */
.industry-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gutter);
  align-items: center;
  padding: 80px 0;
  border-bottom: 1px solid var(--color-border);
}

.industry-block:last-child {
  border-bottom: none;
}

.industry-block.reverse {
  direction: rtl;
}

.industry-block.reverse > * {
  direction: ltr;
}

.industry-content h3 {
  margin-bottom: 16px;
}

.industry-visual {
  aspect-ratio: 4/3;
  background: rgba(248, 249, 251, 0.03);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.industry-visual svg {
  width: 64px;
  height: 64px;
  color: var(--color-text);
  opacity: 0.5;
}

/* Org Chart */
.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.org-level {
  display: flex;
  gap: 2px;
  justify-content: center;
  position: relative;
  width: 100%;
}

.org-box {
  background: rgba(248, 249, 251, 0.04);
  border: 1px solid var(--color-border);
  padding: 20px 32px;
  text-align: center;
  min-width: 180px;
  transition: all var(--transition-fast) ease;
}

.org-box:hover {
  border-color: rgba(248, 249, 251, 0.2);
  background: rgba(248, 249, 251, 0.06);
}

.org-box h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.org-box p {
  font-size: 13px;
  margin: 0;
}

.org-connector {
  width: 1px;
  height: 32px;
  background: var(--color-border);
  margin: 0 auto;
}

.org-branch {
  display: flex;
  justify-content: center;
  position: relative;
}

.org-branch::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 1px;
  background: var(--color-border);
}

/* Risk Grid */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gutter);
}

.risk-item {
  padding: 40px;
  border: 1px solid var(--color-border);
}

.risk-item h4 {
  margin-bottom: 16px;
  font-size: 18px;
}

/* Risk items on light bg */
.bg-light .risk-item {
  border-color: var(--color-border-light);
  background: white;
}

.bg-light .risk-item h4 {
  color: var(--color-primary);
}

/* Philosophy items on light bg */
.bg-light .philosophy-item {
  border-left-color: var(--color-cta);
}

.bg-light .philosophy-item h4 {
  color: var(--color-primary);
}

/* Insight Cards */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gutter);
}

.insight-card {
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast) ease;
  overflow: hidden;
}

.insight-card:hover {
  transform: translateY(-6px);
  border-color: rgba(248, 249, 251, 0.15);
}

.insight-thumb {
  aspect-ratio: 16/9;
  background: var(--color-primary);
  position: relative;
  overflow: hidden;
}

.insight-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(198, 40, 40, 0.1), transparent);
}

.insight-body {
  padding: 28px;
}

.insight-body .label-tag {
  margin-bottom: 12px;
  display: inline-block;
}

.insight-body h3 {
  font-size: 20px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.insight-body p {
  font-size: 15px;
  margin-bottom: 16px;
}

.insight-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-cta);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-fast) ease;
}

.insight-link:hover {
  gap: 10px;
}

.insight-link::after {
  content: '\2192';
}

/* Light bg insight cards */
.bg-light .insight-card {
  border-color: var(--color-border-light);
}

.bg-light .insight-card:hover {
  border-color: rgba(14, 26, 43, 0.2);
  box-shadow: 0 12px 40px rgba(14, 26, 43, 0.1);
}

.bg-light .insight-body h3 {
  color: var(--color-primary);
}

/* Contact Form */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: var(--font-size-caption);
  font-weight: 500;
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: rgba(248, 249, 251, 0.04);
  border: 1px solid var(--color-border);
  color: var(--color-light);
  font-size: 16px;
  transition: border-color var(--transition-fast) ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-cta);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%234A5568' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form-group select option {
  background: var(--color-dark);
  color: var(--color-light);
}

.bg-light .form-group label {
  color: var(--color-text);
}

.bg-light .form-group input,
.bg-light .form-group textarea,
.bg-light .form-group select {
  background: white;
  border-color: var(--color-border-light);
  color: var(--color-primary);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gutter);
}

.stat-item {
  text-align: center;
  padding: 40px 20px;
}

.stat-number {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--color-light);
}

.bg-light .stat-number {
  color: var(--color-primary);
}

.stat-suffix {
  font-size: 32px;
  font-weight: 600;
  color: var(--color-cta);
}

.stat-label {
  font-size: var(--font-size-caption);
  color: var(--color-text);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}

/* Divider */
.divider {
  width: 60px;
  height: 2px;
  background: var(--color-cta);
  margin: 32px 0;
}

.divider-center {
  margin-left: auto;
  margin-right: auto;
}

/* Feature list with icons */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-cta);
}

.feature-item p {
  margin: 0;
  font-size: 16px;
}

/* Industries Preview Grid (Home) */
.industries-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--grid-gutter);
  justify-content: center;
}

.industries-preview-grid > .industry-preview-item {
  flex: 0 0 calc(33.333% - 16px);
  min-width: 0;
}

.industries-preview-grid > .industry-preview-item > .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.industries-preview-grid > .industry-preview-item > .card p {
  flex-grow: 1;
}

/* Grid line background decoration */
.grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(248, 249, 251, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(248, 249, 251, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ======================
   7. ANIMATIONS
   ====================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes lineExpand {
  from { width: 0; }
  to { width: 60px; }
}

/* Reveal classes */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--easing),
              transform 0.8s var(--easing);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--easing),
              transform 0.8s var(--easing);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--easing),
              transform 0.8s var(--easing);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s var(--easing),
              transform 0.8s var(--easing);
}

.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-scale.active {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* Hero animation (plays on load) */
.hero-anim {
  opacity: 0;
  transform: translateY(30px);
}

.hero-anim.loaded {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1s var(--easing),
              transform 1s var(--easing);
}

.hero-anim.delay-1 { transition-delay: 0.15s; }
.hero-anim.delay-2 { transition-delay: 0.3s; }
.hero-anim.delay-3 { transition-delay: 0.45s; }
.hero-anim.delay-4 { transition-delay: 0.6s; }

/* Parallax */
.parallax-element {
  will-change: transform;
}

/* ======================
   8. PAGE-SPECIFIC
   ====================== */

/* Home - Infrastructure section */
.home-infra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

/* Home - Vision CTA section */
.vision-section {
  text-align: center;
  padding: 160px 0;
}

.vision-section h2 {
  max-width: 700px;
  margin: 0 auto 16px;
}

.vision-section p {
  font-size: 20px;
  max-width: 500px;
  margin: 0 auto 48px;
}

/* About - Structure grid */
.structure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.structure-item {
  background: rgba(248, 249, 251, 0.03);
  border: 1px solid var(--color-border);
  padding: 48px 32px;
}

.structure-item .item-number {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-cta);
  letter-spacing: var(--letter-spacing-wide);
  margin-bottom: 20px;
}

.structure-item h4 {
  margin-bottom: 12px;
}

/* Framework - Phase detail */
.phase-detail {
  padding: 60px 0;
  border-bottom: 1px solid var(--color-border);
}

.phase-detail:last-child {
  border-bottom: none;
}

.phase-detail-header {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 24px;
}

.phase-detail-number {
  font-size: 72px;
  font-weight: 700;
  color: rgba(248, 249, 251, 0.06);
  line-height: 1;
}

/* Solutions - Solution block */
.solution-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  padding: 80px 0;
  border-bottom: 1px solid var(--color-border);
}

.solution-block:last-child {
  border-bottom: none;
}

.solution-block.reverse {
  direction: rtl;
}

.solution-block.reverse > * {
  direction: ltr;
}

/* Governance - Philosophy */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gutter);
}

.philosophy-item {
  padding: 40px;
  border-left: 2px solid var(--color-cta);
}

.philosophy-item h4 {
  margin-bottom: 12px;
}

/* ======================
   9. UTILITIES
   ====================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mx-auto { margin-left: auto; margin-right: auto; }

.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }
.mt-80 { margin-top: 80px; }

.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

.py-80 { padding-top: 80px; padding-bottom: 80px; }
.py-120 { padding-top: 120px; padding-bottom: 120px; }

.max-w-600 { max-width: 600px; }
.max-w-800 { max-width: 800px; }

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ======================
   10. RESPONSIVE
   ====================== */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --font-size-h1: 52px;
    --font-size-h2: 36px;
    --font-size-h3: 24px;
    --section-spacing: 80px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand {
    grid-column: span 2;
  }

  .phase-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .phase-block:not(:last-child)::after {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-infra-grid,
  .solution-block {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .industries-preview-grid > .industry-preview-item {
    flex: 0 0 calc(50% - 12px);
  }

  .solution-block.reverse {
    direction: ltr;
  }

  .industry-block {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .industry-block.reverse {
    direction: ltr;
  }

  .industry-visual {
    max-height: 300px;
  }

  .structure-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .risk-grid {
    grid-template-columns: 1fr;
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
  }

  .col-offset-1, .col-offset-2,
  .col-offset-3, .col-offset-4 {
    grid-column-start: auto;
  }

  .phase-detail .grid-12 {
    grid-template-columns: 1fr;
  }

  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .org-level {
    flex-wrap: wrap;
    gap: 8px;
  }

  .org-box {
    min-width: 140px;
    padding: 16px 20px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --font-size-h1: 40px;
    --font-size-h2: 32px;
    --font-size-h3: 22px;
    --font-size-body: 16px;
    --section-spacing: 60px;
    --container-padding: 20px;
    --header-height: 64px;
  }

  /* Mobile Nav */
  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-overlay);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast) ease,
                visibility var(--transition-fast) ease;
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-menu .nav-link {
    font-size: 24px;
    color: var(--color-light);
  }

  .nav-menu .nav-cta {
    margin-top: 16px;
  }

  .hamburger {
    display: flex;
  }

  /* Layout */
  .grid-12 {
    grid-template-columns: 1fr;
  }

  .col-1, .col-2, .col-3, .col-4, .col-5,
  .col-6, .col-7, .col-8, .col-9, .col-10,
  .col-11, .col-12 {
    grid-column: span 1;
  }

  .col-offset-1, .col-offset-2,
  .col-offset-3, .col-offset-4 {
    grid-column-start: auto;
  }

  /* Contact form 2-col grid collapse */
  .contact-form .grid-12 {
    grid-template-columns: 1fr !important;
  }

  .hero-section {
    min-height: 85vh;
  }

  .page-hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 40px;
  }

  .page-hero .hero-inner {
    padding: 40px 0;
  }

  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .phase-grid {
    grid-template-columns: 1fr;
  }

  .industries-preview-grid > .industry-preview-item {
    flex: 0 0 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-number {
    font-size: 40px;
  }

  .structure-grid {
    grid-template-columns: 1fr;
  }

  .insights-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .vision-section {
    padding: 80px 0;
  }

  .card {
    padding: 28px;
  }

  .card-platform {
    padding: 32px 24px;
  }

  .org-level {
    flex-direction: column;
    align-items: center;
  }

  .org-box {
    min-width: 200px;
  }

  .org-branch::before {
    display: none;
  }

  .phase-detail-header {
    gap: 16px;
  }

  .phase-detail-number {
    font-size: 48px;
  }

  .phase-detail .grid-12 {
    grid-template-columns: 1fr;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  :root {
    --font-size-h1: 34px;
    --font-size-h2: 28px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-anim {
    opacity: 1;
    transform: none;
  }
}

/* Body no scroll when nav open */
body.nav-open {
  overflow: hidden;
}
