/* ============================================
   TemproNG — 2026 Modern Website
   CSS Nesting, oklch(), scroll-driven animations,
   container queries, view transitions
   ============================================ */

/* --- Custom Properties --- */
:root {
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Montserrat', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Secondary accent — warm amber / mint for break-the-monochrome moments */
  --accent-warm: oklch(0.82 0.14 75);
  --accent-mint: oklch(0.78 0.14 160);

  /* TemproNG Brand Colors — Navy palette */
  --primary: oklch(0.78 0.15 230);        /* light blue accent (formerly headings) */
  --primary-light: oklch(0.85 0.12 225);  /* lighter blue */
  --primary-dark: oklch(0.96 0.02 240);   /* near-white for headings on dark bg */
  --accent: oklch(0.78 0.15 230);         /* bright blue accent */
  --accent-2: oklch(0.85 0.13 225);       /* sky accent */
  --success: oklch(0.78 0.14 160);        /* mint-green */

  /* Dark-first design — same in light & dark modes */
  --bg: oklch(0.12 0.02 255);             /* dark navy base */
  --bg-alt: oklch(0.15 0.025 255);        /* slightly lighter navy */
  --bg-soft: oklch(0.18 0.03 255);        /* surface elevation */
  --bg-dark: oklch(0.10 0.018 255);       /* deepest navy */
  --surface: oklch(0.16 0.025 255);       /* card surface */
  --surface-hover: oklch(0.20 0.03 255);
  --border: oklch(0.26 0.04 255);
  --border-strong: oklch(0.32 0.05 245);

  --text: oklch(0.96 0.02 240);
  --text-muted: oklch(0.72 0.025 245);
  --text-light: oklch(0.98 0.01 240);
  --text-light-muted: oklch(0.75 0.02 255);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.04), 0 1px 2px oklch(0 0 0 / 0.06);
  --shadow-md: 0 4px 20px oklch(0 0 0 / 0.06), 0 2px 8px oklch(0 0 0 / 0.04);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.08), 0 4px 16px oklch(0 0 0 / 0.04);
  --shadow-glow: 0 0 60px oklch(0.42 0.11 255 / 0.18);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  --max-width: 1200px;
  --header-height: 76px;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: 'ss01', 'cv11';
}

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

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

address { font-style: normal; }

ul { list-style: none; }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Skip link (a11y) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--text-light);
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 0.9rem;
  transition: top 0.2s ease;

  &:focus { top: 1rem; }
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Container --- */
.container {
  width: min(var(--max-width), 100% - 3rem);
  margin-inline: auto;
}

.container-narrow {
  width: min(900px, 100% - 3rem);
  margin-inline: auto;
}

/* --- Typography --- */
h1, h2 {
  font-family: var(--font-display);
  line-height: 1.1;
  font-weight: 700;
  text-wrap: balance;
  color: var(--primary-dark);
  letter-spacing: -0.03em;
}

h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
  color: var(--primary-dark);
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); letter-spacing: -0.03em; font-weight: 600; }

.gradient-text {
  background: linear-gradient(135deg,
    oklch(1 0 0) 0%,
    oklch(0.90 0.05 240) 45%,
    oklch(0.75 0.14 230) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

@media (prefers-color-scheme: dark) {
  .gradient-text {
    background: linear-gradient(135deg,
      oklch(0.95 0.01 255) 0%,
      oklch(0.80 0.12 240) 50%,
      oklch(0.70 0.14 245) 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}
h2 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.025em; font-weight: 600; }
h3 { font-size: clamp(1.125rem, 1.8vw, 1.35rem); letter-spacing: -0.01em; }
h4 { font-size: 1rem; letter-spacing: -0.005em; }

p { text-wrap: pretty; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;

  &::before,
  &::after {
    content: '';
    height: 1px;
    width: 24px;
    background: currentColor;
    opacity: 0.4;
  }
}

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 62ch;
}

/* --- Sections --- */
section {
  padding: clamp(4rem, 8vw, 7rem) 0;
  position: relative;
}

section.tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }

.section-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header .lead {
  margin-inline: auto;
  margin-top: 1rem;
}

/* ============================================
   Header / Navigation
   ============================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-height);
  background: linear-gradient(90deg,
    oklch(0.88 0.07 235) 0%,
    oklch(0.72 0.11 240) 35%,
    oklch(0.45 0.12 250) 70%,
    oklch(0.22 0.07 255) 100%);
  border-bottom: none;
  transition: box-shadow var(--transition);

  &.scrolled {
    box-shadow: 0 4px 20px oklch(0.14 0.04 255 / 0.35);
  }
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
  position: relative;
}

.nav-menu {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: oklch(0.98 0.005 250);
  text-shadow: 0 1px 3px oklch(0.14 0.04 255 / 0.4);

  & b {
    font-weight: 800;
    color: oklch(0.85 0.14 235);
    margin-left: 1px;
  }
}

@keyframes logo-shimmer {
  0%, 100% { background-position: 200% 0; opacity: 0; }
  50%      { background-position: 200% 0; opacity: 0; }
  60%      { opacity: 1; }
  90%      { background-position: -100% 0; opacity: 1; }
  95%      { opacity: 0; }
}

@keyframes ng-reveal {
  0%, 55%   { mask-size: 100% 100%; -webkit-mask-size: 100% 100%; }
  62%, 90%  { mask-size: 220% 100%; -webkit-mask-size: 220% 100%; }
  95%, 100% { mask-size: 100% 100%; -webkit-mask-size: 100% 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo::after { animation: none; opacity: 0; }
  .hero-logo img, .hero-logo svg {
    animation: none;
    mask-image: none;
    -webkit-mask-image: none;
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;

  & a {
    font-size: 0.95rem;
    font-weight: 500;
    color: oklch(0.98 0.005 250);
    text-shadow: 0 1px 2px oklch(0.14 0.04 255 / 0.5);
    transition: color var(--transition);
    position: relative;

    &:hover { color: oklch(0.85 0.14 235); }
    &.active { color: oklch(0.85 0.14 235); }

    &::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: -6px;
      height: 2px;
      width: 0;
      background: oklch(0.85 0.14 235);
      transition: width var(--transition);
    }

    &:hover::after,
    &.active::after { width: 100%; }
  }
}

.nav-cta.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.20rem;
  font-size: 0.80rem;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);

  & span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary-dark);
    position: relative;
    transition: var(--transition);

    &::before,
    &::after {
      content: '';
      position: absolute;
      left: 0;
      width: 100%;
      height: 2px;
      background: var(--primary-dark);
      transition: var(--transition);
    }
    &::before { top: -7px; }
    &::after { top: 7px; }
  }
}

@media (max-width: 860px) {
  .nav-menu { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; z-index: 110; position: relative; }

  body.nav-open {
    overflow: hidden;

    & .nav-menu {
      display: flex !important;
      position: fixed !important;
      inset: var(--header-height) 0 0 0 !important;
      left: 0 !important;
      top: var(--header-height) !important;
      transform: none !important;
      flex-direction: column;
      background: linear-gradient(180deg,
        oklch(0.14 0.03 255) 0%,
        oklch(0.10 0.02 255) 100%);
      padding: 2rem 1.75rem;
      gap: 0.25rem;
      align-items: stretch;
      z-index: 99;
      overflow-y: auto;

      & li { list-style: none; }

      & a {
        display: block;
        font-size: 1.25rem;
        font-weight: 600;
        color: oklch(0.96 0.02 240);
        padding: 1.1rem 0.25rem;
        border-bottom: 1px solid oklch(0.26 0.04 255 / 0.6);
        text-shadow: none;

        &::after { display: none; }
      }
    }

    & .nav-toggle span {
      background: transparent;
      &::before { top: 0; transform: rotate(45deg); }
      &::after { top: 0; transform: rotate(-45deg); }
    }
  }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap;
  cursor: pointer;

  &:hover { transform: translateY(-1px); }
  &:active { transform: translateY(0); }
}

.btn-primary {
  background: linear-gradient(135deg, oklch(0.78 0.15 230) 0%, oklch(0.72 0.16 235) 100%);
  color: oklch(0.18 0.05 255);
  font-weight: 700;
  box-shadow: 0 4px 14px oklch(0.72 0.16 235 / 0.35);

  &:hover {
    background: linear-gradient(135deg, oklch(0.82 0.14 228) 0%, oklch(0.76 0.15 233) 100%);
    box-shadow: 0 8px 24px oklch(0.72 0.16 235 / 0.5);
  }
}

.btn-ghost {
  color: var(--primary-dark);
  border: 1px solid var(--border-strong);
  background: var(--surface);

  &:hover { background: var(--bg-alt); border-color: var(--primary-light); color: var(--primary); }
}

.btn-light {
  background: oklch(1 0 0 / 0.12);
  color: var(--text-light);
  border: 1px solid oklch(1 0 0 / 0.2);
  backdrop-filter: blur(12px);

  &:hover { background: oklch(1 0 0 / 0.18); }
}

.btn-arrow {
  &::after {
    content: '→';
    transition: transform var(--transition);
    font-size: 1.05em;
  }
  &:hover::after { transform: translateX(3px); }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding-top: calc(var(--header-height) + clamp(3rem, 7vw, 6rem));
  padding-bottom: clamp(4rem, 8vw, 7rem);

  @media (max-width: 768px) {
    padding-top: calc(var(--header-height) + 1rem);
  }
  background: linear-gradient(180deg, oklch(0.12 0.02 255) 0%, oklch(0.08 0.015 255) 100%);
  color: var(--text-light);
  text-align: center;
  overflow: hidden;
  position: relative;

  &::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 40% 60% at 10% 100%, oklch(0.55 0.15 245 / 0.20), transparent 60%),
      radial-gradient(ellipse 40% 60% at 90% 0%, oklch(0.65 0.18 230 / 0.13), transparent 60%);
    pointer-events: none;
  }

  & > * { position: relative; }

  & h1 { color: var(--text-light); }
  & .hero-tagline,
  & .hero-intro { color: oklch(0.88 0.02 255); }

  & .usp-item {
    border-top-color: oklch(1 0 0 / 0.18);
  }
  & .usp-item h3 { color: var(--text-light); }
  & .usp-item p { color: oklch(0.85 0.02 255); }
}

.hero-logo {
  display: inline-flex;
  align-items: center;
  position: relative;
  isolation: isolate;
  margin-top: -3cm;
  margin-bottom: 2rem;
  line-height: 0;

  @media (max-width: 860px) {
    margin-top: -1rem;
    margin-bottom: -1.25rem;
  }

  & img, & svg {
    height: clamp(242px, 37.4vw, 374px);
    width: auto;
    display: block;
    position: relative;
    z-index: 2;
    transform: translateZ(0);
    /* Soft mask hides "NG" with a feathered edge — no visible line */
    mask-image: linear-gradient(90deg, black 0%, black 77%, transparent 80%);
    -webkit-mask-image: linear-gradient(90deg, black 0%, black 77%, transparent 80%);
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-size: 100% 100%;
    -webkit-mask-size: 100% 100%;
    animation: ng-reveal 6s ease-in-out infinite;
  }

  /* Shimmer sweep masked to logo silhouette */
  &::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: clamp(242px, 37.4vw, 374px);
    aspect-ratio: 841.89 / 595.28;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(115deg,
      transparent 42%,
      oklch(1 0 0 / 0.6) 49%,
      oklch(0.90 0.12 235 / 0.8) 50%,
      oklch(1 0 0 / 0.6) 51%,
      transparent 58%);
    background-size: 300% 100%;
    mix-blend-mode: screen;
    -webkit-mask-image: url("img/TemproNG.svg");
    mask-image: url("img/TemproNG.svg");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    animation: logo-shimmer 6s ease-in-out infinite;
    will-change: background-position, opacity;
  }
}

.hero h1 {
  margin-top: -2cm;
  margin-bottom: 1.5rem;

  @media (max-width: 860px) {
    margin-top: -1rem;
  }
}

.hero-tagline {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 auto 2.5rem;
  line-height: 1.55;
}

.hero-marquee {
  position: relative;
  max-width: 100%;
  width: 100%;
  overflow: hidden;
  padding: 1rem 0;
  margin: 0 auto 3rem;
  display: flex;
  gap: 0;
  mask-image: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 10%, black 90%, transparent 100%);
  border-top: 1px solid oklch(0.25 0.05 245 / 0.55);
  border-bottom: 1px solid oklch(0.25 0.05 245 / 0.55);
}

.hero-marquee-track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 1.5rem;
  padding-right: 1.5rem;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  animation: marquee-scroll 48s linear infinite;
  will-change: transform;

  & .dot {
    color: oklch(0.78 0.15 230);
    opacity: 0.7;
  }
  & span:not(.dot) {
    color: oklch(0.94 0.02 240);
  }
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-marquee-track { animation: none; }
}

.hero-marquee:hover .hero-marquee-track { animation-play-state: paused; }

.hero-intro {
  max-width: 62ch;
  margin: 0 auto 4rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* USP columns under hero */
.usp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
  padding: 0 1rem;
}

.usp-item {
  border-top: 2px solid var(--border-strong);
  padding-top: 1.5rem;

  & h3 { margin-bottom: 0.5rem; }
  & p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;

  & .btn-primary {
    background: linear-gradient(135deg, oklch(0.78 0.15 230) 0%, oklch(0.72 0.16 235) 100%);
    color: oklch(0.12 0.03 255);
    font-weight: 700;
    box-shadow: 0 6px 24px oklch(0.72 0.16 235 / 0.35);

    &:hover {
      background: linear-gradient(135deg, oklch(0.82 0.14 228) 0%, oklch(0.76 0.15 233) 100%);
      box-shadow: 0 10px 32px oklch(0.72 0.16 235 / 0.5);
    }
  }

  & .btn-ghost {
    background: transparent;
    border: 1.5px solid oklch(0.78 0.15 230);
    color: oklch(0.82 0.14 230);
    backdrop-filter: none;

    &:hover {
      background: oklch(0.78 0.15 230 / 0.12);
      border-color: oklch(0.85 0.14 230);
      color: oklch(0.92 0.12 225);
    }
  }
}

/* ============================================
   KI Section (dark)
   ============================================ */
.section-dark {
  background:
    radial-gradient(ellipse 50% 55% at 85% 35%, oklch(0.42 0.10 240 / 0.22), transparent 70%),
    linear-gradient(180deg, oklch(0.24 0.06 255) 0%, oklch(0.30 0.07 250) 100%);
  color: var(--text-light);
  position: relative;
  overflow: hidden;

  & h2 { color: var(--text-light); font-family: var(--font-display); }
  & .eyebrow { color: var(--accent-2); }
  & .lead { color: var(--text-light-muted); }

  &::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(circle at 20% 80%, oklch(1 0 0 / 0.04) 1px, transparent 1px),
      radial-gradient(circle at 60% 20%, oklch(1 0 0 / 0.05) 1px, transparent 1px);
    background-size: 40px 40px, 60px 60px;
    pointer-events: none;
    opacity: 0.7;
  }
  & > * { position: relative; }
}

.ki-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
  margin-top: clamp(2rem, 4vw, 3.5rem);
  max-width: 900px;
  margin-inline: auto;
}

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

.ki-item {
  & h3 {
    color: var(--text-light);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;

    &::before {
      content: '→';
      color: var(--accent-2);
      font-weight: 500;
    }
  }
  & p {
    color: var(--text-light-muted);
    padding-left: 1.5rem;
    font-size: 0.98rem;
  }
}

/* ============================================
   Self Service (two column cards)
   ============================================ */
.section-alt { background: var(--bg-alt); }

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.portal-card {
  --portal-accent: oklch(0.78 0.15 230);
  --portal-accent-soft: oklch(0.78 0.15 230 / 0.1);
  --portal-accent-border: oklch(0.78 0.15 230 / 0.25);

  position: relative;
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, oklch(0.78 0.15 230 / 0.10), transparent 65%),
    linear-gradient(170deg, oklch(0.17 0.03 255) 0%, oklch(0.11 0.02 255) 100%);
  border: 1px solid oklch(0.28 0.04 255);
  border-radius: 20px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2vw, 1.75rem);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);

  &::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--portal-accent), transparent);
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  }

  &:hover,
  &.is-active {
    border-color: var(--portal-accent);
    box-shadow: 0 24px 60px oklch(0.05 0.02 255 / 0.4);
    &::after { width: 100%; }
  }

  & h3 {
    margin: 0.5rem 0 0 0;
    color: oklch(0.98 0.015 240);
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.1;
  }
}

.portal-card-alt {
  --portal-accent: oklch(0.78 0.14 160);
  --portal-accent-soft: oklch(0.78 0.14 160 / 0.1);
  --portal-accent-border: oklch(0.78 0.14 160 / 0.3);
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, oklch(0.78 0.14 160 / 0.10), transparent 65%),
    linear-gradient(170deg, oklch(0.17 0.03 255) 0%, oklch(0.11 0.02 255) 100%);
}

.portal-head { position: relative; }

.portal-tagline {
  margin: 0.75rem 0 0;
  color: oklch(0.75 0.03 245);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 42ch;
}

.portal-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--portal-accent);
  background: var(--portal-accent-soft);
  border: 1px solid var(--portal-accent-border);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}

.portal-chip-alt {
  color: oklch(0.78 0.14 160);
  background: oklch(0.78 0.14 160 / 0.10);
  border-color: oklch(0.78 0.14 160 / 0.3);
}

.portal-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 420px) {
  .portal-tiles { grid-template-columns: 1fr; }
}

.portal-tile {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  background: oklch(0.20 0.03 255 / 0.5);
  border: 1px solid oklch(0.24 0.035 255);
  border-radius: 12px;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  position: relative;

  & svg {
    width: 24px;
    height: 24px;
    color: var(--portal-accent);
    flex-shrink: 0;
  }

  &:hover,
  &.is-active {
    background: oklch(0.22 0.035 255 / 0.7);
    border-color: var(--portal-accent);
  }
}

.portal-tile-title {
  font-weight: 600;
  font-size: 0.98rem;
  color: oklch(0.96 0.02 240);
  letter-spacing: -0.01em;
}

.portal-tile-desc {
  font-size: 0.82rem;
  color: oklch(0.68 0.03 245);
  line-height: 1.4;
}

/* ============================================
   Module — 3×2 Grid (sauber, ruhig)
   ============================================ */
.module-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.module-card {
  position: relative;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, oklch(0.72 0.16 235 / 0.08), transparent 65%),
    linear-gradient(170deg, oklch(0.17 0.03 255) 0%, oklch(0.11 0.02 255) 100%);
  border: 1px solid oklch(0.26 0.04 255 / 0.8);
  border-radius: 16px;
  padding: clamp(1.5rem, 2vw, 1.85rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 180px;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease,
              box-shadow 0.35s ease;

  &::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 50%, oklch(0.78 0.15 230 / 0.08) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, oklch(0.72 0.16 235), oklch(0.85 0.12 225));
    box-shadow: 0 0 14px oklch(0.78 0.15 230 / 0.5);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  &:hover,
  &.is-active {
    border-color: oklch(0.50 0.12 240);
    box-shadow: 0 16px 40px oklch(0.05 0.02 255 / 0.35);

    &::before { opacity: 1; }
    &::after  { width: 60%; }

    & .module-tag { color: oklch(0.88 0.13 230); }
  }

  & h3 {
    margin: 0;
    color: oklch(0.96 0.025 240);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.15rem, 1.6vw, 1.4rem);
    letter-spacing: -0.02em;
    line-height: 1.18;
  }

  & p {
    color: oklch(0.78 0.03 245);
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0;
  }
}

.module-card-hero {
  background:
    radial-gradient(ellipse 90% 100% at 0% 100%, oklch(0.72 0.16 235 / 0.18), transparent 60%),
    radial-gradient(ellipse 70% 90% at 100% 0%, oklch(0.55 0.14 245 / 0.15), transparent 60%),
    linear-gradient(155deg, oklch(0.10 0.02 255) 0%, oklch(0.05 0.015 255) 100%);
  border-color: oklch(0.35 0.08 240);
  color: oklch(0.98 0.02 240);
  justify-content: flex-end;
  min-height: 100%;

  & h3 {
    color: oklch(0.98 0.02 240);
    font-size: clamp(1.25rem, 1.8vw, 1.5rem);
    letter-spacing: -0.025em;
  }
  & p {
    color: oklch(0.85 0.03 245);
    font-size: 0.95rem;
  }
  & .module-tag {
    color: oklch(0.82 0.13 230);
    font-size: 0.72rem;
  }
  &::after {
    height: 4px;
    width: 45%;
    background: linear-gradient(90deg, oklch(0.78 0.15 230), oklch(0.92 0.08 225));
    box-shadow: 0 0 22px oklch(0.78 0.15 230 / 0.7);
  }
  &:hover {
    border-color: oklch(0.55 0.15 235);
    box-shadow: 0 28px 70px oklch(0.02 0.01 255 / 0.6);
    & .module-tag { color: oklch(0.94 0.1 228); }
    &::after { width: 100%; }
  }
}

.module-card-tall {
  min-height: 100%;
}

.module-card-wide {
  min-height: 160px;
}

.module-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: oklch(0.65 0.10 235);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  transition: color 0.3s ease;
}

@media (max-width: 960px) {
  .module-bento { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .module-bento { grid-template-columns: 1fr; }
}

/* ============================================
   Warum TemproNG (Table)
   ============================================ */
/* ============================================
   Warum TemproNG — Icon Feature Grid (4x2)
   ============================================ */
.why-grid {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 960px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.why-feature {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  background:
    radial-gradient(ellipse 80% 100% at 100% 0%, oklch(0.72 0.16 235 / 0.08), transparent 60%),
    linear-gradient(170deg, oklch(0.16 0.028 255) 0%, oklch(0.10 0.02 255) 100%);
  border: 1px solid oklch(0.26 0.04 255);
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease,
              box-shadow 0.35s ease;

  &::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, oklch(0.78 0.15 230), oklch(0.88 0.1 225));
    box-shadow: 0 0 10px oklch(0.78 0.15 230 / 0.55);
    transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  }

  &:hover,
  &.is-active {
    border-color: oklch(0.78 0.15 230);
    box-shadow:
      0 18px 46px oklch(0.05 0.02 255 / 0.45),
      0 0 60px oklch(0.78 0.15 230 / 0.28),
      inset 0 0 40px oklch(0.78 0.15 230 / 0.08);

    &::after { width: 100%; height: 3px; box-shadow: 0 0 18px oklch(0.78 0.15 230 / 0.8); }

    & .why-icon {
      background: oklch(0.78 0.15 230 / 0.25);
      border-color: oklch(0.78 0.15 230);
      color: oklch(0.95 0.1 228);
      box-shadow: 0 0 20px oklch(0.78 0.15 230 / 0.4);
    }

    & .why-feature-problem {
      color: oklch(0.88 0.03 245);
      & span {
        color: oklch(0.82 0.17 232);
        text-shadow:
          0 0 14px oklch(0.78 0.15 230 / 0.85),
          0 0 32px oklch(0.78 0.15 230 / 0.45);
      }
    }

    & .why-feature-title {
      text-shadow: 0 0 18px oklch(0.78 0.15 230 / 0.4);
    }
  }
}

.why-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: oklch(0.22 0.035 255);
  border: 1px solid oklch(0.30 0.05 245);
  color: oklch(0.78 0.15 230);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;

  & svg {
    width: 22px;
    height: 22px;
  }
}

.why-feature-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  color: oklch(0.96 0.025 240);
  letter-spacing: -0.02em;
  line-height: 1.2;
  transition: text-shadow 0.3s ease;
}

.why-feature-desc {
  margin: 0;
  color: oklch(0.72 0.03 245);
  font-size: 0.9rem;
  line-height: 1.5;
}

.why-feature-problem {
  margin: 0 0 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid oklch(0.26 0.04 245 / 0.7);
  color: oklch(0.72 0.025 245);
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: color 0.3s ease, text-shadow 0.3s ease;

  & span {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 500;
    color: oklch(0.78 0.15 230);
    letter-spacing: 0.26em;
    text-transform: uppercase;
    line-height: 1;
    height: 1em;
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.3s ease,
      visibility 0.3s ease,
      color 0.3s ease,
      text-shadow 0.3s ease;
  }
}

.why-feature:hover .why-feature-problem span,
.why-feature.is-active .why-feature-problem span {
  opacity: 1;
  visibility: visible;
}


.why-audience {
  margin-top: 3rem;
  text-align: center;
  max-width: 70ch;
  margin-inline: auto;

  & .eyebrow { display: block; }
  & p {
    color: var(--text-muted);
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    line-height: 1.6;
  }
}

/* ============================================
   CTA / Demo
   ============================================ */
.cta {
  text-align: center;
  background:
    radial-gradient(ellipse 55% 50% at 50% 0%, oklch(0.72 0.16 235 / 0.15), transparent 65%),
    radial-gradient(ellipse 40% 60% at 90% 100%, oklch(0.55 0.15 250 / 0.10), transparent 70%),
    linear-gradient(180deg, oklch(0.12 0.02 255) 0%, oklch(0.08 0.015 255) 100%);
  color: oklch(0.96 0.02 240);
  position: relative;
  overflow: hidden;

  &::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      radial-gradient(circle at 25% 25%, oklch(1 0 0 / 0.04) 1px, transparent 1px),
      radial-gradient(circle at 75% 75%, oklch(1 0 0 / 0.03) 1px, transparent 1px);
    background-size: 50px 50px, 70px 70px;
    pointer-events: none;
    opacity: 0.5;
  }

  & > * { position: relative; }

  & h2 {
    margin-bottom: 1rem;
    color: oklch(0.98 0.015 240);
  }
  & .lead {
    margin: 0 auto 2.5rem;
    color: oklch(0.82 0.03 245);
  }
}

/* Form */
.form {
  display: grid;
  gap: 1rem;
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.form-field {
  display: grid;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.cta .form-field label {
  color: oklch(0.88 0.025 245);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.form-field input,
.form-field textarea,
.form-field select {
  font: inherit;
  padding: 0.95rem 1.1rem;
  border: 1px solid oklch(0.30 0.05 245);
  border-radius: var(--radius-sm);
  background: oklch(0.16 0.025 255 / 0.7);
  color: oklch(0.96 0.02 240);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);

  &::placeholder { color: oklch(0.55 0.04 245); }

  &:hover {
    background: oklch(0.18 0.03 255 / 0.8);
    border-color: oklch(0.40 0.08 240);
  }

  &:focus {
    outline: none;
    border-color: oklch(0.78 0.15 230);
    background: oklch(0.18 0.03 255 / 0.9);
    box-shadow: 0 0 0 3px oklch(0.78 0.15 230 / 0.2);
  }
}

.cta .form-actions .btn-primary {
  padding: 1rem 2rem;
  font-size: 0.95rem;
}

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

.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.5rem;
}

.form-status {
  text-align: center;
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  display: none;

  &.show { display: block; }
  &.success { background: oklch(0.95 0.05 150); color: oklch(0.35 0.12 150); }
  &.error { background: oklch(0.95 0.05 25); color: oklch(0.45 0.15 25); }
}

.cta-contact {
  margin-top: 2rem;
  font-size: 1.15rem;
  color: oklch(0.88 0.12 230);
  font-weight: 600;

  & a { transition: color var(--transition); }
  & a:hover { color: oklch(0.94 0.1 228); }
}

.cta-contact-small {
  margin-top: 0.5rem;
  color: oklch(0.70 0.03 245);
  font-size: 0.9rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;

  & a:hover { color: oklch(0.88 0.12 230); }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-light-muted);
  padding: 3rem 0 2rem;

  & a:hover { color: var(--text-light); }
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;

  & h4 {
    color: var(--text-light);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.6rem;

    &::before {
      content: '';
      width: 16px;
      height: 1px;
      background: oklch(0.78 0.15 230 / 0.6);
    }
  }

  & ul { display: grid; gap: 0.6rem; }
  & a { font-size: 0.95rem; transition: color var(--transition); }
}

@media (max-width: 680px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-logo {
  --footer-logo-h: 166px;

  display: inline-flex;
  align-items: center;
  position: relative;
  isolation: isolate;
  margin-bottom: 1.25rem;
  line-height: 0;

  & img, & svg {
    height: var(--footer-logo-h);
    width: auto;
    display: block;
    position: relative;
    z-index: 2;
    margin-block: -11px;
    transform: translateZ(0);
    /* Hide NG with soft feathered edge, reveal during shimmer */
    mask-image: linear-gradient(90deg, black 0%, black 77%, transparent 80%);
    -webkit-mask-image: linear-gradient(90deg, black 0%, black 77%, transparent 80%);
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-size: 100% 100%;
    -webkit-mask-size: 100% 100%;
    animation: ng-reveal 6s ease-in-out infinite;
  }

  /* Shimmer sweep masked to logo silhouette */
  &::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: var(--footer-logo-h);
    aspect-ratio: 841.89 / 595.28;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(115deg,
      transparent 42%,
      oklch(1 0 0 / 0.6) 49%,
      oklch(0.90 0.12 235 / 0.8) 50%,
      oklch(1 0 0 / 0.6) 51%,
      transparent 58%);
    background-size: 300% 100%;
    mix-blend-mode: screen;
    -webkit-mask-image: url("img/TemproNG.svg");
    mask-image: url("img/TemproNG.svg");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    animation: logo-shimmer 6s ease-in-out infinite;
    will-change: background-position, opacity;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-logo::after { animation: none; opacity: 0; }
  .footer-logo img, .footer-logo svg {
    animation: none;
    mask-image: none;
    -webkit-mask-image: none;
  }
}

/* Explicit override: force 166px (was 144) — defensive against caching/specificity */
.site-footer .footer-brand .footer-logo img,
.site-footer .footer-brand .footer-logo svg {
  height: 166px !important;
  width: auto !important;
}

.footer-brand p {
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 38ch;
}

.footer-bottom {
  border-top: 1px solid oklch(1 0 0 / 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light-muted);
}

/* ============================================
   Scroll-to-Top
   ============================================ */
.scroll-top {
  position: fixed;
  right: clamp(1rem, 2.5vw, 2rem);
  bottom: clamp(1rem, 2.5vw, 2rem);
  z-index: 90;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, oklch(0.78 0.15 230) 0%, oklch(0.72 0.16 235) 100%);
  color: oklch(0.12 0.03 255);
  border: 1px solid oklch(0.85 0.12 225 / 0.6);
  box-shadow:
    0 8px 24px oklch(0.72 0.16 235 / 0.35),
    0 0 0 1px oklch(0.78 0.15 230 / 0.2),
    inset 0 1px 0 oklch(1 0 0 / 0.2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.92);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease;

  & svg { width: 22px; height: 22px; }

  &.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }

  &:hover {
    box-shadow:
      0 12px 32px oklch(0.72 0.16 235 / 0.55),
      0 0 0 1px oklch(0.78 0.15 230 / 0.4),
      inset 0 1px 0 oklch(1 0 0 / 0.3);
    transform: translateY(-2px) scale(1.03);
  }

  &:active { transform: translateY(0) scale(0.98); }
}

/* ============================================
   Scroll animations (with fallback)
   Content is ALWAYS visible by default — animation is enhancement.
   This prevents empty sections in restricted environments
   (Citrix, enterprise GPO with prefers-reduced-motion enforced).
   ============================================ */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.in-view {
    opacity: 1;
    transform: translateY(0);
  }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal-fade linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
    @keyframes reveal-fade {
      from { opacity: 0; transform: translateY(30px); }
      to   { opacity: 1; transform: translateY(0); }
    }
  }
}

/* ============================================
   Dark Mode
   ============================================ */
/* Dark theme is forced — color-scheme switching removed for cross-browser consistency */
