/* ==========================================================================
   Innovation AI Portal — v1
   ========================================================================== */

@font-face {
  font-family: 'HEINEKENCurve';
  src: url('font/HEINEKENCurve-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HEINEKENCurve';
  src: url('font/HEINEKENCurve-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HEINEKENCurve';
  src: url('font/HEINEKENCurve-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HEINEKENCore';
  src: url('font/HEINEKENCore-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HEINEKENCore';
  src: url('font/HEINEKENCore.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HEINEKENCore';
  src: url('font/HEINEKENCore-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: 'HEINEKENCurve', sans-serif;
  --font-body: 'HEINEKENCore', sans-serif;

  --commerce: #21C15A;
  --support: #D4AF37;
  --supplychain: #C8102E;
  --general: #3E92CC;

  --bg: #051912;
  --bg-rgb: 5, 25, 18;
  --text: #f2f6f3;
  --text-secondary: #a7b7ae;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --nav-bg: rgba(5, 25, 18, 0.72);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="light"] {
  --commerce: #00843D;
  --support: #A67C00;
  --supplychain: #B5121B;
  --general: #1D6FA5;

  --bg: #f7f6f1;
  --bg-rgb: 247, 246, 241;
  --text: #0d2116;
  --text-secondary: #45564c;
  --card-bg: rgba(13, 33, 22, 0.03);
  --card-border: rgba(13, 33, 22, 0.09);
  --nav-bg: rgba(247, 246, 241, 0.72);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: color-mix(in srgb, var(--commerce) 35%, transparent);
  color: var(--text);
}

.nav,
.hero,
.scroll-cue,
.section-header,
.card {
  -webkit-user-select: none;
  user-select: none;
}

/* ---------- Ambient backgrounds ---------- */

.particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.cursor-spotlight {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--x, 50%) var(--y, 50%),
    rgba(var(--bg-rgb), 0),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}
:root[data-theme="dark"] .cursor-spotlight {
  background: radial-gradient(600px circle at var(--x, 50%) var(--y, 50%), rgba(242, 246, 243, 0.05), transparent 40%);
}
:root[data-theme="light"] .cursor-spotlight {
  background: radial-gradient(600px circle at var(--x, 50%) var(--y, 50%), rgba(13, 33, 22, 0.04), transparent 40%);
}
.cursor-spotlight.active {
  opacity: 1;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--card-border);
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

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

.logo-img-light {
  display: none;
}

:root[data-theme="light"] .logo-img-dark {
  display: none;
}

:root[data-theme="light"] .logo-img-light {
  display: block;
}

.logo-divider {
  width: 1px;
  height: 28px;
  margin: 0 14px;
  background: var(--card-border);
  transition: background-color 0.5s var(--ease);
}

.logo-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.82rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--text);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-links a {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-secondary);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a.active {
  color: var(--text);
  background: var(--card-bg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 999px;
  transition: background-color 0.3s var(--ease);
}

.theme-toggle:hover {
  background: var(--card-bg);
}

.toggle-icon {
  width: 15px;
  height: 15px;
  color: var(--text-secondary);
  opacity: 0.4;
  transition: color 0.4s var(--ease), opacity 0.4s var(--ease);
}

:root[data-theme="dark"] .icon-moon {
  color: var(--commerce);
  opacity: 1;
}

:root[data-theme="light"] .icon-sun {
  color: var(--commerce);
  opacity: 1;
}

.toggle-track {
  display: block;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  position: relative;
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--commerce);
  transition: transform 0.4s var(--ease), background-color 0.5s var(--ease);
}

:root[data-theme="light"] .toggle-knob {
  transform: translateX(16px);
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-burger span {
  display: block;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 8px 32px 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-mobile a {
  padding: 12px 0;
  color: var(--text-secondary);
  border-top: 1px solid var(--card-border);
}

.nav-mobile a.active,
.nav-mobile a:hover {
  color: var(--text);
}

.nav.mobile-open .nav-mobile {
  display: flex;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  z-index: 2;
  overflow: hidden;
}

.orb-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, 90vw);
  height: min(640px, 90vw);
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  will-change: transform, opacity;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--commerce);
  margin-bottom: 20px;
  transition: color 0.5s var(--ease);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.subheadline {
  font-weight: 300;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  z-index: 1;
}

.scroll-cue-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--commerce), transparent);
  animation: scrollcue 1.8s ease-in-out infinite;
}

@keyframes scrollcue {
  0% { transform: scaleY(0.3); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(0.3); transform-origin: bottom; opacity: 0.4; }
}

/* ---------- Sections ---------- */

.category-section {
  position: relative;
  z-index: 2;
  padding: 100px 24px;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 56px;
  max-width: 620px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.section-header.in-view {
  opacity: 1;
  transform: translateY(0);
}

.section-eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent, var(--commerce));
  margin-bottom: 14px;
}

[data-accent="commerce"] { --accent: var(--commerce); }
[data-accent="support"] { --accent: var(--support); }
[data-accent="supplychain"] { --accent: var(--supplychain); }
[data-accent="general"] { --accent: var(--general); }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (min-width: 901px) {
  .card-grid--single {
    grid-template-columns: minmax(0, 384px);
  }
}

/* ---------- Cards ---------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  overflow: hidden;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease),
    box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}

.card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    280px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--accent) 22%, transparent),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--card-border));
  box-shadow: 0 20px 60px -20px color-mix(in srgb, var(--accent) 35%, transparent);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.card-index {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.card-badge {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.card-description {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 20px;
  min-height: 7.75em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.card-poc {
  position: relative;
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  font-size: 0.78rem;
}

.poc-peek {
  position: absolute;
  top: -13px;
  right: -7px;
  width: 28px;
  height: 29px;
  transform: rotate(32deg);
  transform-origin: 100% 100%;
  pointer-events: none;
}

.poc-peek-window {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 19px;
  overflow: hidden;
  display: block;
}

.poc-peek-face {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 21px;
  height: auto;
  transform: translate(-50%, 100%);
  animation: tiger-peek 6s ease-in-out infinite;
}

.poc-peek-paws {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: auto;
  z-index: 2;
}

@keyframes tiger-peek {
  0%, 58%, 100% { transform: translate(-50%, 100%); }
  67% { transform: translate(-50%, 2%); }
  76% { transform: translate(-50%, -3%); }
  85% { transform: translate(-50%, 2%); }
  93% { transform: translate(-50%, 100%); }
}

.poc-tiger {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--card-border);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.poc-tiger-icon {
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  animation: tiger-collab 2.4s ease-in-out infinite;
}

@keyframes tiger-collab {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-8deg) translateY(-1px); }
  50% { transform: rotate(0deg) translateY(0); }
  75% { transform: rotate(8deg) translateY(-1px); }
}

.poc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
}

.poc-label {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.poc-value {
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.card-poc--contact {
  display: flex;
  align-items: center;
}

.poc-note {
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

.card-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  font-size: 1rem;
  margin-top: auto;
  transform: rotate(-45deg);
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease),
    color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.card:hover .card-arrow {
  transform: rotate(0deg);
  background: var(--accent);
  border-color: var(--accent);
  color: #051912;
}

/* ---------- Footer ---------- */

.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--card-border);
  padding: 16px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-powered {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.footer-powered-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.footer-powered-primary {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.footer-powered-secondary {
  font-size: 0.72rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.footer-logo-img {
  height: 28px;
  width: 28px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.footer-support {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.support-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.support-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--commerce);
  color: var(--commerce);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.support-btn:hover {
  background: var(--commerce);
  color: var(--bg);
}

.icon-mail {
  width: 16px;
  height: 16px;
}

.support-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
}

.support-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.support-email {
  font-size: 0.8rem;
  color: var(--commerce);
  transition: color 0.3s var(--ease);
}

.support-email:hover {
  text-decoration: underline;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
  .nav-burger {
    display: flex;
  }
  .nav-inner {
    padding: 0 20px;
  }
  .category-section {
    padding: 72px 20px;
  }
  .hero {
    padding: 100px 20px 64px;
  }
  .footer-inner {
    justify-content: center;
  }
  .footer-support {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .logo-divider,
  .logo-title {
    display: none;
  }
  .support-info {
    white-space: normal;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .section-header,
  .card {
    opacity: 1 !important;
    transform: none !important;
  }
  .card-description {
    -webkit-line-clamp: unset;
    min-height: 0;
  }
}
