/* ============================================================
   NISE Software — Design System
   Version: 1.0.0
   ============================================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Brand Colors */
  --nise-indigo: #3F447B;
  --nise-indigo-light: #5054A4;
  --nise-indigo-dark: #2D3260;
  --nise-blue: #2563EB;
  --nise-blue-light: #3B82F6;
  --nise-blue-dark: #1D4ED8;
  --nise-cyan: #06B6D4;
  --nise-cyan-glow: #22D3EE;

  /* Neutrals */
  --nise-white: #FFFFFF;
  --nise-gray-50: #F8FAFC;
  --nise-gray-100: #F1F5F9;
  --nise-gray-200: #E2E8F0;
  --nise-gray-300: #CBD5E1;
  --nise-gray-400: #94A3B8;
  --nise-gray-500: #64748B;
  --nise-gray-600: #475569;
  --nise-gray-700: #334155;
  --nise-gray-800: #1E293B;
  --nise-gray-900: #0F172A;
  --nise-black: #020617;

  /* Semantic Colors */
  --color-primary: var(--nise-indigo);
  --color-accent: var(--nise-blue);
  --color-surface: var(--nise-white);
  --color-surface-alt: var(--nise-gray-50);
  --color-text: var(--nise-gray-900);
  --color-text-secondary: var(--nise-gray-600);
  --color-text-tertiary: var(--nise-gray-400);
  --color-border: var(--nise-gray-200);

  /* Typography */
  --font-display: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-max: 1280px;
  --container-wide: 1440px;
  --gutter: clamp(1.5rem, 4vw, 3rem);

  /* Borders & Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
  --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.15);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Focus indicator for keyboard users */
*:focus-visible {
  outline: 2px solid var(--nise-indigo);
  outline-offset: 2px;
}

/* Skip navigation link (accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 9999;
  padding: var(--space-3) var(--space-6);
  background: var(--nise-indigo);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: top 0.2s;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-4);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-surface);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; }

::selection {
  background: var(--nise-indigo);
  color: white;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.h1, h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); letter-spacing: -0.03em; }
.h2, h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.h3, h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.h4, h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.h5, h5 { font-size: 1.125rem; }

.text-lg { font-size: 1.125rem; line-height: 1.75; }
.text-xl { font-size: 1.25rem; line-height: 1.7; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); font-size: 0.875em; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-balance { text-wrap: balance; }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-white { color: white; }
.text-accent { color: var(--nise-blue); }
.text-primary { color: var(--nise-indigo); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(4rem, 6vw, 6rem) 0;
}

.section-lg {
  padding: clamp(5rem, 8vw, 8rem) 0;
}

[id].section,
[id].section-lg {
  scroll-margin-top: 80px;
}

.grid {
  display: grid;
  gap: var(--space-8);
}

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

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-4) 0;
  transition: all var(--duration-normal) var(--ease-out);
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0px);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-3) 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-logo {
  display: flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}

.nav-logo svg {
  height: 32px;
  width: auto;
  transition: transform var(--duration-normal) var(--ease-out);
}

.nav-logo:hover svg { transform: scale(1.05); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--nise-gray-700);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
}

.nav-link:hover {
  color: var(--nise-indigo);
  background: var(--nise-gray-50);
}

.nav-link.active {
  color: var(--nise-indigo);
  font-weight: 600;
}

.nav-cta {
  margin-left: var(--space-4);
}

/* Mobile nav toggle */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--nise-gray-100);
  border-radius: var(--radius-full);
  padding: 2px;
  margin-right: var(--space-3);
}

.lang-btn {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 12px;
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--nise-gray-500);
  transition: all var(--duration-fast);
  letter-spacing: 0.02em;
}

.lang-btn.active {
  background: var(--nise-indigo);
  color: white;
  box-shadow: 0 1px 3px rgba(63, 68, 123, 0.3);
}

.lang-btn:hover:not(.active) {
  color: var(--nise-gray-700);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-3);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--nise-gray-700);
  border-radius: 2px;
  transition: all var(--duration-normal) var(--ease-out);
}

.nav-mobile {
  display: flex;
  position: fixed;
  inset: 0;
  background: white;
  z-index: 999;
  padding: 80px var(--gutter) var(--gutter);
  flex-direction: column;
  gap: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms cubic-bezier(0.16, 1, 0.3, 1), visibility 300ms;
}

.nav-mobile.open {
  opacity: 1;
  visibility: visible;
}

.nav-mobile .nav-link {
  font-size: 1.25rem;
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-md);
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--nise-indigo);
  color: white;
  box-shadow: 0 2px 8px rgba(63, 68, 123, 0.25);
}

.btn-primary:hover {
  background: var(--nise-indigo-light);
  box-shadow: 0 4px 16px rgba(63, 68, 123, 0.35);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--nise-blue);
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-accent:hover {
  background: var(--nise-blue-light);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--nise-indigo);
  border: 1.5px solid var(--nise-gray-300);
}

.btn-outline:hover {
  border-color: var(--nise-indigo);
  background: var(--nise-gray-50);
}

.btn-outline-white {
  background: transparent;
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

/* --- Cards --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all var(--duration-normal) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--nise-gray-300);
}

.card-dark {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.card-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.card-feature {
  background: linear-gradient(135deg, var(--nise-gray-50), white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
}

.card-blue {
  background: var(--nise-blue);
  border: none;
  color: white;
}

/* --- Tags / Badges --- */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--nise-gray-100);
  color: var(--nise-indigo);
  border: 1px solid var(--nise-gray-200);
}

.tag-blue {
  background: rgba(37, 99, 235, 0.08);
  color: var(--nise-blue);
  border-color: rgba(37, 99, 235, 0.15);
}

.tag-white {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

/* --- Section Backgrounds --- */
.bg-dark {
  background: var(--nise-gray-900);
  color: white;
}

.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark h5 {
  color: white;
}

.bg-dark .text-secondary { color: var(--nise-gray-400); }

.bg-navy {
  background: linear-gradient(135deg, #0F172A 0%, #1a2344 50%, #1E293B 100%);
  color: white;
}

.bg-navy h1, .bg-navy h2, .bg-navy h3, .bg-navy h4 { color: white; }

.bg-blue {
  background: linear-gradient(135deg, #1D4ED8, #2563EB);
  color: white;
}

.bg-blue h1, .bg-blue h2, .bg-blue h3, .bg-blue h4 { color: white; }

.bg-alt {
  background: var(--nise-gray-50);
}

.bg-gradient-mesh {
  position: relative;
}

.bg-gradient-mesh::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
          radial-gradient(ellipse 80% 60% at 20% 40%, rgba(63, 68, 123, 0.06) 0%, transparent 70%),
          radial-gradient(ellipse 60% 50% at 80% 20%, rgba(37, 99, 235, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: var(--space-16);
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 11;
  max-width: 680px;
}

.hero-title {
  margin-bottom: var(--space-6);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--nise-gray-600);
  line-height: 1.8;
  margin-bottom: var(--space-10);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-visual {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 55%;
  height: 80%;
  z-index: 1;
}

.hero-tags {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

/* --- Grid Pattern Background --- */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
          linear-gradient(rgba(63, 68, 123, 0.03) 1px, transparent 1px),
          linear-gradient(90deg, rgba(63, 68, 123, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 70%);
  pointer-events: none;
}

/* --- Section Headers --- */
.section-header {
  max-width: 720px;
  margin-bottom: var(--space-16);
}

.section-header.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header .tag { margin-bottom: var(--space-5); }

.section-header h2 { margin-bottom: var(--space-5); }

.section-header p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* --- Feature Grid --- */
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(63, 68, 123, 0.08), rgba(37, 99, 235, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  color: var(--nise-indigo);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.feature-desc {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Pillar Cards (Three pillars on home) --- */
.pillar-card {
  position: relative;
  padding: var(--space-10);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration-slow) var(--ease-out);
  border: 1px solid var(--color-border);
  background: white;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--nise-indigo);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out);
}

.pillar-card:hover::before { transform: scaleX(1); }

.pillar-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.pillar-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: var(--nise-gray-100);
  line-height: 1;
  margin-bottom: var(--space-4);
}

.pillar-title {
  font-size: 1.4rem;
  margin-bottom: var(--space-4);
}

.pillar-text {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  line-height: 1.75;
}

.pillar-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.pillar-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.9rem;
  color: var(--nise-gray-700);
}

.pillar-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nise-indigo);
  flex-shrink: 0;
}

/* --- Stats --- */
.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--nise-indigo), var(--nise-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
}

/* --- Footer --- */
.footer {
  background: var(--nise-gray-900);
  color: var(--nise-gray-400);
  padding: var(--space-20) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-16);
}

.footer-brand p {
  margin-top: var(--space-4);
  font-size: 0.9rem;
  line-height: 1.75;
  max-width: 320px;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-5);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-link {
  font-size: 0.9rem;
  color: var(--nise-gray-400);
  transition: color var(--duration-fast);
}

.footer-link:hover { color: white; }

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.footer-logo svg { height: 24px; }
.footer-logo svg path { fill: white; }

/* --- Form Styles --- */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nise-gray-700);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--nise-gray-200);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--color-text);
  background: white;
  transition: all var(--duration-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--nise-indigo);
  box-shadow: 0 0 0 3px rgba(63, 68, 123, 0.1);
}

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

/* --- Divider --- */
.divider {
  width: 60px;
  height: 3px;
  background: var(--nise-indigo);
  border-radius: 2px;
  margin: var(--space-8) 0;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Scroll-triggered: default fade-up */
.js .animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll-triggered: slide from left */
.js .animate-slide-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.animate-slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scroll-triggered: slide from right */
.js .animate-slide-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.animate-slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scroll-triggered: scale up */
.js .animate-scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.animate-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }

/* Nav link hover underline */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--nise-indigo);
  border-radius: 1px;
  transition: width 0.3s var(--ease-out), left 0.3s var(--ease-out);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 60%;
  left: 20%;
}

/* Button press feedback */
.btn:active {
  transform: translateY(0) scale(0.98);
}

/* Card hover lift — standardized */
.card:hover,
.pillar-card:hover,
.engagement-card:hover,
.industry-card:hover {
  transform: translateY(-4px);
}

/* Feature icon subtle float on card hover */
.card:hover .feature-icon,
.pillar-card:hover .feature-icon {
  transform: translateY(-2px);
  transition: transform 0.4s var(--ease-out);
}

/* Image zoom on hover (for cards with images) */
.pillar-card img,
.img-overlay img {
  transition: transform 0.6s var(--ease-out);
}
.pillar-card:hover img,
.img-overlay:hover img {
  transform: scale(1.04);
}

/* Tag subtle pulse on section header visible */
.section-header.visible .tag,
.animate-on-scroll.visible .tag {
  animation: scaleIn 0.4s var(--ease-out) both;
}

/* Hero content staggered load */
.hero-content .hero-tags { animation: fadeInUp 0.6s 0.1s var(--ease-out) both; }
.hero-content .hero-title { animation: fadeInUp 0.6s 0.2s var(--ease-out) both; }
.hero-content .hero-subtitle { animation: fadeInUp 0.6s 0.3s var(--ease-out) both; }
.hero-content .hero-actions { animation: fadeInUp 0.6s 0.4s var(--ease-out) both; }

/* Tech bar slide in */
.tech-bar.visible {
  animation: fadeInUp 0.5s 0.1s var(--ease-out) both;
}

/* Footer link hover */
.footer-link {
  transition: color var(--duration-fast), transform var(--duration-fast);
}
.footer-link:hover {
  color: white;
  transform: translateX(2px);
}

/* Form focus glow animation */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--nise-indigo);
  box-shadow: 0 0 0 3px rgba(63, 68, 123, 0.08);
  transition: border-color 0.2s, box-shadow 0.3s;
}

/* Smooth page load */
body {
  animation: fadeIn 0.4s ease-out;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-on-scroll,
  .animate-slide-left,
  .animate-slide-right,
  .animate-scale {
    opacity: 1;
    transform: none;
  }
}

/* --- Images --- */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-rounded { border-radius: var(--radius-lg); }
.img-rounded-md { border-radius: var(--radius-md); }

.img-aspect-video { aspect-ratio: 16 / 9; }
.img-aspect-4-3 { aspect-ratio: 4 / 3; }
.img-aspect-square { aspect-ratio: 1; }

.img-overlay {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.img-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.7) 100%);
  pointer-events: none;
}

.img-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.img-overlay:hover img { transform: scale(1.04); }

.section-img {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.section-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-img-float {
  position: absolute;
  right: 0;
  top: 0;
  width: 45%;
  height: 100%;
  z-index: 1;
}

.hero-img-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-img-float::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--nise-gray-50) 0%, transparent 30%);
  z-index: 2;
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero-img-float { display: none; }
}

/* --- Laptop screens --- */
@media (max-width: 1366px) {
  .hero-img-float { width: 40%; }
  .pillar-card, .card-feature { padding: var(--space-8); }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-visual { width: 50%; right: -8%; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: var(--space-8); }
  .hero-img-float { width: 38%; }
  .hero-content { max-width: 58%; }
  .pillar-card, .card-feature { padding: var(--space-8); }
  .nav-link { font-size: 0.85rem; padding: var(--space-2) var(--space-3); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 120px; padding-bottom: var(--space-16); }
  .hero-visual { display: none; }
  .hero-content { max-width: 100%; }
  .section-header { margin-bottom: var(--space-10); }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .lang-switcher { margin-left: auto; margin-right: var(--space-3); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
  .footer-bottom { flex-direction: column; gap: var(--space-4); text-align: center; }
  .hero-actions { flex-direction: column; }
  .btn-lg { width: 100%; }
  .about-split, .tech-split, .sys-split, .form-split { grid-template-columns: 1fr !important; }
  .pillar-card, .card-feature { padding: var(--space-6); }
  .pillar-card img { height: 140px; }
  .guide-chapter { padding: var(--space-6); }
  .page-hero { padding: 120px 0 60px; }
  .footer-link { padding: var(--space-2) 0; min-height: 44px; display: flex; align-items: center; }
  .footer-link a { display: flex; align-items: center; min-height: inherit; }
  .tag, .guide-topic { min-height: 32px; display: inline-flex; align-items: center; }
}

/* --- Landscape mobile --- */
@media (max-width: 768px) and (orientation: landscape) {
  .hero { padding-top: 80px; padding-bottom: var(--space-8); }
  .page-hero { padding: 100px 0 48px; }
}

/* --- Small screens --- */
@media (max-width: 480px) {
  .page-hero { padding: 100px 0 48px; }
  .hero { padding-top: 100px; }
  .pillar-card, .card-feature { padding: var(--space-5); }
  .pillar-card img { height: 120px; }
  .guide-chapter { padding: var(--space-5); }
  .footer-grid { grid-template-columns: 1fr; }
  .btn { white-space: normal; text-align: center; }
}

/* --- Mobile nav active state --- */
.nav-mobile .nav-link.active {
  color: var(--nise-indigo);
  font-weight: 600;
  background: var(--nise-gray-50);
}

/* --- Bilingual text overflow safety --- */
.hero-title, .pillar-title, .feature-title, .platform-title, .chapter-title {
  overflow-wrap: break-word;
  hyphens: auto;
}