/* ── Kolisof Portfolio ───────────────────────────────────────────── */

:root {
  --navy-950: #01020f;
  --navy-900: #030c4a;
  --navy-800: #0c225e;
  --navy-700: #263079;
  --navy-600: #454c7c;
  --navy-500: #515583;
  --navy-400: #536eb8;
  --navy-300: #7a90a8;

  --accent: #ff9500;
  --accent-dim: #e4b36e;
  --green: #00cc66;
  --blue: #007aff;
  --red: #dc3545;

  --bg: #f0f2f5;
  --surface: #ffffff;
  --ink: #1a1f2e;
  --ink-muted: #5a6478;
  --border: #dde3ec;

  --header-bg: #0d1821;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(1, 2, 15, 0.08);
  --shadow-lg: 0 12px 48px rgba(1, 2, 15, 0.14);

  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --container: 1120px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy-700); text-decoration: none; transition: color 0.2s, outline 0.2s; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: rgba(38, 48, 121, 0.08);
  padding: 0.15em 0.45em;
  border-radius: 4px;
}

strong { font-weight: 700; }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--navy-950);
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ── Header ──────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: rgba(13, 24, 33, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}
.nav-brand:hover { color: var(--accent); }

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.logo-badge--sm {
  width: 44px;
  height: 44px;
  padding: 6px;
}

.logo-badge--lg {
  width: min(300px, 72vw);
  height: min(300px, 72vw);
  padding: 2rem;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
}

.logo-badge img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.nav-menu a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-cta {
  background: var(--accent) !important;
  color: var(--navy-950) !important;
  font-weight: 700 !important;
}
.nav-cta:hover {
  background: var(--accent-dim) !important;
  color: var(--navy-950) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ── Hero ────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: calc(var(--header-h) + 4rem) 0 5rem;
  overflow: hidden;
  background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 45%, var(--navy-800) 100%);
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(83, 110, 184, 0.25), transparent),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(255, 149, 0, 0.12), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-400);
}
.hero .eyebrow { color: var(--accent-dim); }

.eyebrow--accent { color: var(--navy-400); }
.eyebrow--orange { color: var(--accent); }

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 2rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: var(--navy-950);
  box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}
.btn-primary:hover { 
  background: linear-gradient(135deg, #ffaa33, var(--accent));
  color: var(--navy-950);
  box-shadow: 0 6px 16px rgba(255, 149, 0, 0.4);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-ghost:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.hero-logo-wrap {
  position: relative;
  z-index: 1;
  animation: float 6s ease-in-out infinite;
}

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

.hero-orbit {
  position: absolute;
  inset: 0;
}

.orbit-chip {
  position: absolute;
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  animation: orbit 8s ease-in-out infinite;
}
.orbit-chip--erp { top: 10%; right: 5%; color: var(--navy-400); animation-delay: 0s; }
.orbit-chip--hmi { bottom: 15%; left: 0; color: var(--accent); animation-delay: -2.5s; }
.orbit-chip--api { top: 45%; right: -5%; color: var(--green); animation-delay: -5s; }

@keyframes orbit {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, -8px); }
}

/* ── Stats ───────────────────────────────────────────────────────── */

.stats {
  margin-top: -2.5rem;
  position: relative;
  z-index: 2;
  padding-bottom: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-700);
  line-height: 1.3;
}

.stat-label {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  font-weight: 500;
}

/* ── Sections ────────────────────────────────────────────────────── */

.section {
  padding: 5rem 0;
}

.section-header {
  max-width: 640px;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-lead {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.0625rem;
}

/* ── Overview cards ──────────────────────────────────────────────── */

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.overview-card {
  padding: 2rem 1.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: box-shadow 0.25s, transform 0.25s;
}
.overview-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.overview-card h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.overview-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.overview-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.overview-icon svg { width: 26px; height: 26px; }

.overview-icon--erp { background: rgba(38, 48, 121, 0.1); color: var(--navy-700); }
.overview-icon--hmi { background: rgba(255, 149, 0, 0.12); color: var(--accent); }
.overview-icon--sync { background: rgba(0, 204, 102, 0.1); color: var(--green); }

/* ── Project sections ──────────────────────────────────────────── */

.project--erp { background: var(--surface); }
.project--hmi { background: var(--bg); }

.project-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.project-layout--reverse .project-copy { order: 2; }
.project-layout--reverse .project-panel { order: 1; }

.project-copy h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 2.8vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.project-copy > p {
  margin: 0 0 1.5rem;
  color: var(--ink-muted);
}

.feature-list {
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.5rem;
  font-size: 0.9375rem;
  color: var(--ink);
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--navy-700);
  background: rgba(38, 48, 121, 0.08);
  border-radius: 4px;
  border: 1px solid rgba(38, 48, 121, 0.12);
}

.tag--orange {
  color: #b36b00;
  background: rgba(255, 149, 0, 0.1);
  border-color: rgba(255, 149, 0, 0.2);
}

/* ── Benefit panel (office section) ─────────────────────────────── */

.benefit-panel {
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.benefit-panel-title {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy-700);
}

.benefit-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.benefit-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.benefit-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.benefit-item strong {
  display: block;
  font-size: 0.9375rem;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.benefit-item p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* ── Terminal mockup (unused) ───────────────────────────────────── */

.terminal {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1rem;
  background: #1a2332;
}
.terminal-bar span:nth-child(1) { background: #ff5f57; width: 12px; height: 12px; border-radius: 50%; }
.terminal-bar span:nth-child(2) { background: #febc2e; width: 12px; height: 12px; border-radius: 50%; }
.terminal-bar span:nth-child(3) { background: #28c840; width: 12px; height: 12px; border-radius: 50%; }

.terminal-title {
  margin-left: auto;
  font-size: 0.75rem;
  font-family: var(--mono);
  color: rgba(255, 255, 255, 0.4);
}

.terminal-body {
  margin: 0;
  padding: 1.25rem;
  background: var(--header-bg);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  overflow-x: auto;
}
.terminal-body code { background: none; padding: 0; color: rgba(255, 255, 255, 0.85); }

.t-dim { color: rgba(255, 255, 255, 0.35); }
.t-ok { color: var(--green); }
.t-info { color: var(--blue); }
.t-accent { color: var(--accent); }

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}
.module-grid span {
  padding: 0.55rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy-700);
  background: rgba(38, 48, 121, 0.06);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ── HMI mockup ──────────────────────────────────────────────────── */

.hmi-screen {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid #2a3a4d;
  background: #0a121c;
  color: #fff;
}

.hmi-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--header-bg);
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.hmi-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.hmi-dot--green { background: var(--green); box-shadow: 0 0 8px var(--green); }

.hmi-time {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

.hmi-body {
  padding: 2rem 1.5rem;
  text-align: center;
}

.hmi-material-name {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hmi-material-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
}

.hmi-weight {
  margin: 1.75rem 0 0.75rem;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  transition: background 0.3s;
}
.hmi-weight--green { background: rgba(40, 167, 69, 0.9); }
.hmi-weight--yellow { background: rgba(255, 193, 7, 0.9); }
.hmi-weight--red { background: rgba(220, 53, 69, 0.9); }

.hmi-weight-value {
  font-size: 3.5rem;
  font-weight: 800;
  font-family: var(--mono);
  line-height: 1;
}

.hmi-weight-unit {
  font-size: 1.25rem;
  font-weight: 600;
  margin-left: 0.25rem;
  opacity: 0.8;
}

.hmi-band {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.75rem;
}
.hmi-band-status { color: var(--green); font-weight: 700; }

.hmi-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.hmi-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 1s ease;
}

.hmi-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.hmi-ing {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}
.hmi-ing.done { background: rgba(0, 204, 102, 0.2); color: var(--green); }
.hmi-ing.active { background: rgba(255, 149, 0, 0.25); color: var(--accent); }

.hmi-footer {
  padding: 0.75rem 1rem;
  background: #121c28;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.hmi-footer kbd {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  background: linear-gradient(180deg, #2a3a4d, #121c28);
  border: 1px solid #7a90a8;
  border-radius: 3px;
  color: #ffe066;
}

/* ── Architecture ────────────────────────────────────────────────── */

.architecture { background: var(--surface); }

.flow-diagram {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 1rem 2rem;
  max-width: 560px;
  margin: 0 auto 3rem;
  position: relative;
}

.flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.flow-node strong {
  font-size: 0.9375rem;
  color: var(--ink);
}
.flow-node span {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.flow-node--erp { border-color: var(--navy-400); }
.flow-node--hmi { border-color: var(--accent); }
.flow-node--api {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  border-color: transparent;
  color: #fff;
}
.flow-node--api strong { color: #fff; }
.flow-node--api span { color: rgba(255, 255, 255, 0.6); }

.flow-node--db {
  grid-column: 1 / -1;
  border-color: var(--green);
}

.flow-connector {
  display: none;
}

.arch-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.arch-card {
  padding: 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.arch-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.arch-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* ── Productivity ────────────────────────────────────────────────── */

.productivity-visual {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, rgba(38, 48, 121, 0.05), rgba(38, 48, 121, 0.01));
  border-radius: var(--radius);
  border: 1px dashed rgba(38, 48, 121, 0.2);
}

.prod-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.prod-card:hover {
  transform: translateX(8px);
  border-color: var(--navy-400);
}

.prod-icon {
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(255, 149, 0, 0.1);
  border-radius: 50%;
  flex-shrink: 0;
}

.prod-text strong {
  display: block;
  font-size: 1.05rem;
  color: var(--navy-700);
  margin-bottom: 0.15rem;
}
.prod-text span {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* ── Features ────────────────────────────────────────────────────── */

.features { background: var(--bg); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.feature-category {
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-category:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 149, 0, 0.4);
}

.fc-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: inline-block;
  padding: 0.5rem;
  background: rgba(38, 48, 121, 0.05);
  border-radius: var(--radius-sm);
  transition: transform 0.3s ease;
}

.feature-category:hover .fc-icon {
  transform: scale(1.1) rotate(5deg);
}

.feature-category h3 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy-700);
}

.feature-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-category ul li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.feature-category ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0.35rem;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ── Integrations ─────────────────────────────────────────────────── */

.integration-card {
  padding: 2.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.03);
  height: 100%;
}
.roadmap-card {
  background: linear-gradient(145deg, var(--surface), rgba(255, 149, 0, 0.04));
  border-color: rgba(255, 149, 0, 0.2);
}

.int-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.integration-card h3 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  color: var(--navy-900);
  font-weight: 800;
}

.integration-card p {
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

/* ── Platforms ────────────────────────────────────────────────────── */

.platforms { background: var(--surface); border-top: 1px solid var(--border); }

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.platform-card {
  padding: 2rem 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.platform-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--navy-400);
}

.platform-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.platform-card strong {
  display: block;
  font-size: 1.05rem;
  color: var(--navy-700);
}

/* ── Contact ─────────────────────────────────────────────────────── */

.contact {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-950));
  color: #fff;
}

.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.contact .eyebrow { color: var(--accent-dim); }

.contact-copy h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
}

.contact-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  max-width: 28rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}
.contact-link:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.contact-link svg { width: 20px; height: 20px; }

/* ── Footer ──────────────────────────────────────────────────────── */

.site-footer {
  padding: 2rem 0;
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}
.footer-brand:hover { color: var(--accent); }

.footer-copy { margin: 0; }

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-inner,
  .project-layout,
  .overview-grid,
  .arch-details {
    grid-template-columns: 1fr;
  }
  
  .stats-grid,
  .platforms-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-visual { order: -1; min-height: 200px; }
  .logo-badge--lg { width: 220px; height: 220px; padding: 1.5rem; }

  .project-layout--reverse .project-copy,
  .project-layout--reverse .project-panel { order: unset; }

  .contact-inner { flex-direction: column; text-align: center; }
  .contact-copy p { max-width: none; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    padding: 1rem;
    background: var(--header-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }
  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-menu a { width: 100%; text-align: center; padding: 0.75rem; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .stats-grid, .platforms-grid { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
}

/* ── Scroll reveal ───────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Login modal ─────────────────────────────────────────────────── */

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
}
.login-modal[hidden] { display: none; }
.login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 2, 15, 0.55);
}
.login-modal__panel {
  position: relative;
  width: min(420px, 92vw);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
}
.login-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink-muted);
}
.login-modal__lead {
  color: var(--ink-muted);
  margin: 0.5rem 0 1rem;
}
.login-modal__panel label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.login-modal__panel input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 1rem;
}
.login-modal__error {
  color: var(--red);
  min-height: 1.25rem;
  margin-top: 0.75rem;
}

/* ── Error pages (404, server not found, subscription, agent offline) ─ */

.error-page {
  overflow-x: hidden;
}

.error-page .not-found-hero {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: calc(var(--header-h) + 1.5rem) max(1rem, env(safe-area-inset-right))
    max(1.5rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  box-sizing: border-box;
}

.error-page .not-found-inner {
  position: relative;
  width: min(100%, 36rem);
  margin-inline: auto;
}

.error-page .error-page__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.5rem, 4.5vw, 2.5rem);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(1, 2, 15, 0.25);
  backdrop-filter: blur(10px);
}

.error-page .not-found-logo {
  display: flex;
  margin: 0 auto 0.75rem;
  width: clamp(96px, 24vw, 132px);
  height: clamp(96px, 24vw, 132px);
  padding: clamp(1rem, 3vw, 1.35rem);
}

.error-page .not-found-logo img {
  width: 100%;
  height: auto;
}

.error-page .eyebrow {
  display: block;
  width: 100%;
  margin: 0 0 0.85rem;
}

.error-page .not-found-inner h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.45rem, 4.8vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.error-page .error-page__server-id {
  display: inline-block;
  color: var(--accent);
  font-weight: 800;
}

.error-page .not-found-lead {
  margin: 0 auto 1rem;
  max-width: 30rem;
  font-size: clamp(1rem, 2.8vw, 1.125rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

.error-page .error-page__help {
  margin: 0 auto 1.5rem;
  max-width: 28rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}

.error-page .not-found-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
  max-width: 20rem;
  margin-inline: auto;
}

.error-page .not-found-actions .btn {
  width: 100%;
  min-height: 3rem;
  padding-inline: 1.25rem;
}

.error-page .not-found-actions .btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
}

.error-page .not-found-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
}

@media (min-width: 520px) {
  .error-page .not-found-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    max-width: none;
    gap: 0.75rem;
  }

  .error-page .not-found-actions .btn {
    width: auto;
    min-width: 10.5rem;
    flex: 0 1 auto;
  }
}

@media (max-width: 519px) {
  .error-page .login-modal__panel {
    width: calc(100vw - 1.5rem);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    padding: 1.25rem;
  }

  .error-page .login-modal__close {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .error-page .login-modal__panel input,
  .error-page .login-modal__panel .btn {
    min-height: 3rem;
  }
}
