:root {
  --bg: #05070b;
  --bg-soft: #0b1018;
  --panel: rgba(14, 20, 30, 0.76);
  --panel-solid: #101720;
  --text: #f4f7fb;
  --muted: #9aa8b7;
  --line: rgba(255, 255, 255, 0.11);
  --accent: #00e5ff;
  --accent-2: #8f5cff;
  --danger: #ff4d8d;
  --radius: 8px;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.46);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 229, 255, 0.15), transparent 26rem),
    radial-gradient(circle at 85% 22%, rgba(143, 92, 255, 0.14), transparent 28rem),
    linear-gradient(180deg, #05070b 0%, #070a10 48%, #05070b 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

.cursor-glow {
  position: fixed;
  z-index: 0;
  width: 22rem;
  aspect-ratio: 1;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.17), transparent 68%);
  filter: blur(18px);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 220ms ease;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 24px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 26px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 7, 11, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  /* Clean container for the new glass logo - no extra bg to let the icon shine */
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

nav {
  display: flex;
  width: 100%;
  gap: 4px;
  overflow-x: auto;
  padding-top: 2px;
  scrollbar-width: none;
}

nav::-webkit-scrollbar {
  display: none;
}

nav a {
  flex: 0 0 auto;
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 180ms ease, background 180ms ease;
}

nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.hero {
  display: grid;
  gap: 18px;
  align-items: center;
  min-height: auto;
  padding: 8px 0 30px;
}

.hero > *,
.compact-grid > *,
.service-grid > *,
.project-showcase > *,
.portal-layout > *,
.contact-form > * {
  min-width: 0;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.lead,
.eyebrow {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(2.18rem, 10.2vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.85rem, 8vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.28rem;
}

.lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.62;
}

.hero-actions {
  display: grid;
  gap: 10px;
  margin: 20px 0 16px;
}

.button {
  --shine-x: -120%;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 20px;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  transition: border-color 180ms ease, transform 180ms ease, filter 180ms ease;
}

.hero-actions .button-primary::before,
.form-submit::before,
.portal-submit::before,
.budget-submit::before {
  animation: touch-shimmer 4.8s ease-in-out infinite;
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

.button::before,
.button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

.button::before {
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.18) 44%, transparent 58%);
  transform: translateX(var(--shine-x)) skewX(-18deg);
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.button::after {
  opacity: 0;
  transition: opacity 220ms ease;
}

.button i {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 220ms ease;
}

.button:hover {
  border-color: rgba(0, 229, 255, 0.5);
}

.button:hover::before {
  --shine-x: 120%;
}

.button:hover i {
  transform: translateX(5px) rotate(45deg);
}

.button-primary {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.92), rgba(143, 92, 255, 0.96));
  box-shadow: 0 16px 38px rgba(0, 229, 255, 0.18);
}

.button-primary::after {
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.42), transparent 30%);
}

.button-primary:hover::after {
  opacity: 1;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.05);
}

.button.is-loading {
  pointer-events: none;
  filter: saturate(1.24);
}

.button.is-loading span,
.button.is-loading i {
  opacity: 0;
}

.button.is-loading::after {
  opacity: 1;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent),
    linear-gradient(135deg, rgba(0, 229, 255, 0.35), rgba(143, 92, 255, 0.35));
  animation: loading-blur 900ms linear infinite;
}

.form-submit.is-loading,
.form-submit.is-success {
  min-height: 56px;
}

.form-submit.is-loading::before {
  z-index: 0;
  inset: 8px auto 8px 50%;
  width: 40px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-right-color: var(--accent);
  border-radius: 999px;
  background: transparent;
  transform: translateX(-50%);
  animation: submit-spin 760ms linear infinite;
}

.form-submit.is-loading::after {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.24), transparent 24%),
    linear-gradient(120deg, rgba(0, 229, 255, 0.18), rgba(143, 92, 255, 0.24), rgba(0, 229, 255, 0.18));
  animation: submit-scan 1.15s ease-in-out infinite;
}

.form-submit.is-success {
  border: 1px solid rgba(0, 229, 255, 0.64);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.98), rgba(72, 255, 187, 0.82));
  box-shadow:
    0 0 0 5px rgba(0, 229, 255, 0.1),
    0 18px 48px rgba(0, 229, 255, 0.22);
}

.form-submit.is-success span {
  opacity: 1;
}

.form-submit.is-success i {
  width: 14px;
  height: 8px;
  opacity: 1;
  border-top: 0;
  border-right: 0;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(-45deg);
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.proof-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.82rem;
  text-align: center;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(5, 7, 11, 0.04), rgba(5, 7, 11, 0.25)),
    var(--panel-solid);
  box-shadow: var(--shadow);
  animation: mobile-float 7s ease-in-out infinite;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 11, 0.16), transparent 42%),
    radial-gradient(circle at 72% 20%, rgba(0, 229, 255, 0.2), transparent 34%);
  pointer-events: none;
}

.hero-visual picture,
.hero-visual img {
  display: block;
  width: 100%;
}

.hero-visual img {
  height: clamp(205px, 56vw, 320px);
  min-height: 0;
  object-fit: cover;
}

.signal-card {
  position: absolute;
  z-index: 2;
  max-width: 158px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(5, 7, 11, 0.74);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

.signal-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.signal-card strong {
  font-size: 0.82rem;
}

.signal-card-top {
  top: 10px;
  left: 10px;
}

.signal-card-bottom {
  right: 10px;
  bottom: 10px;
}

.section {
  padding: 42px 0;
}

.section-intro {
  max-width: 780px;
  margin-bottom: 18px;
}

.compact-grid {
  display: grid;
  gap: 20px;
}

.project-panel,
.project-card,
.service-card,
.process-band,
.portal-login,
.status-preview,
.contact-form,
.portal-hero-panel,
.dashboard-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  box-shadow: var(--shadow);
}

.project-panel {
  display: grid;
  gap: 24px;
  padding: 22px;
  transform-style: preserve-3d;
}

.panel-kicker {
  margin-bottom: 10px;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-panel p,
.project-card p,
.service-card p,
.process-band p,
.portal-login p,
.form-note {
  color: var(--muted);
  line-height: 1.65;
}

.project-showcase {
  display: grid;
  gap: 12px;
}

.project-card {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 18px;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
  transform-style: preserve-3d;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 18% 8%, rgba(0, 229, 255, 0.22), transparent 34%);
  opacity: 0.85;
}

.project-card > * {
  position: relative;
  z-index: 1;
}

.project-orbit {
  position: absolute;
  right: -58px;
  top: -58px;
  width: 154px;
  aspect-ratio: 1;
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 999px;
  box-shadow:
    inset 0 0 38px rgba(0, 229, 255, 0.12),
    0 0 60px rgba(143, 92, 255, 0.14);
  animation: orbit-drift 16s ease-in-out infinite;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.82rem;
}

.project-link {
  width: 100%;
}

.project-card-empty {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 14px);
}

.empty-lines {
  display: grid;
  gap: 10px;
}

.empty-lines span {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.34), rgba(255, 255, 255, 0.06));
}

.empty-lines span:nth-child(2) {
  width: 72%;
}

.empty-lines span:nth-child(3) {
  width: 46%;
}

.metric-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.metric-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.metric-list span {
  color: var(--accent);
  font-weight: 800;
}

.service-grid {
  display: grid;
  gap: 12px;
}

.service-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  transform-style: preserve-3d;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: auto 16px 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  transform: translateX(-120%);
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover::before {
  transform: translateX(120%);
}

.service-card span {
  display: inline-flex;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 229, 255, 0.32);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
}

.process-band {
  display: grid;
  gap: 18px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(143, 92, 255, 0.08)),
    rgba(255, 255, 255, 0.04);
  transform-style: preserve-3d;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.portal-layout {
  display: grid;
  gap: 12px;
  width: 100%;
}

.portal-login,
.status-preview {
  padding: 18px;
}

.portal-login {
  display: grid;
  gap: 14px;
  transform-style: preserve-3d;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.portal-submit {
  width: 100%;
  border: 0;
}

.portal-message {
  min-height: 22px;
  margin-bottom: 0;
  font-size: 0.88rem;
}

.contact-message {
  min-height: 22px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.portal-message.is-error {
  color: var(--danger);
}

.portal-message.is-success,
.contact-message.is-success {
  color: var(--accent);
}

.contact-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.contact-message.is-error {
  color: var(--danger);
}

.status-preview {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 12%, rgba(143, 92, 255, 0.22), transparent 26rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
}

.status-header {
  display: grid;
  align-items: start;
  gap: 6px;
  margin-bottom: 22px;
}

.status-header span,
.next-action span {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-header strong {
  display: block;
  max-width: none;
  text-align: left;
}

.status-steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-steps li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
}

.status-steps li > span {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.status-steps li > span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 22px;
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.12);
}

.status-steps li:last-child > span::after {
  display: none;
}

.status-steps .is-done > span,
.status-steps .is-active > span {
  border-color: rgba(0, 229, 255, 0.82);
  background: var(--accent);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.42);
}

.status-steps .is-active > span {
  animation: status-glow 4.8s ease-in-out infinite;
}

.status-steps small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.next-action {
  margin-top: 24px;
  border: 1px solid rgba(0, 229, 255, 0.26);
  border-radius: 7px;
  padding: 14px;
  background: rgba(0, 229, 255, 0.08);
}

.next-action strong {
  display: block;
  margin-top: 6px;
}

.contact-section {
  padding-bottom: 70px;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  padding: 14px 13px;
  background: rgba(5, 7, 11, 0.76);
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(0, 229, 255, 0.58);
  background: rgba(5, 7, 11, 0.92);
  box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.1);
}

.form-submit {
  width: 100%;
  border: 0;
}

.form-note {
  margin-bottom: 0;
  font-size: 0.88rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  filter: blur(10px);
  transition:
    opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 700ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

@keyframes loading-blur {
  0% {
    transform: translateX(-100%);
    filter: blur(9px);
  }
  100% {
    transform: translateX(100%);
    filter: blur(9px);
  }
}

@keyframes submit-spin {
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

@keyframes submit-scan {
  0%,
  100% {
    opacity: 0.45;
    transform: translateX(-18%);
  }
  50% {
    opacity: 1;
    transform: translateX(18%);
  }
}

@keyframes orbit-drift {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.58;
  }
  50% {
    transform: scale(1.025) rotate(8deg);
    opacity: 0.78;
  }
}

@keyframes status-glow {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.32);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.56);
  }
}

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

@keyframes touch-shimmer {
  0%,
  58%,
  100% {
    transform: translateX(-120%) skewX(-18deg);
  }
  72% {
    transform: translateX(120%) skewX(-18deg);
  }
}

@media (max-width: 420px) {
  .brand span:last-child {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .signal-card {
    max-width: 142px;
  }

  .signal-card strong {
    font-size: 0.8rem;
  }

  .tag-list li,
  .proof-strip span {
    font-size: 0.78rem;
  }
}

@media (min-width: 560px) {
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .button {
    width: auto;
  }

  .proof-strip {
    display: flex;
    flex-wrap: wrap;
  }

  .proof-strip span {
    text-align: left;
  }

  .project-link {
    width: auto;
    justify-self: start;
  }

  .status-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
  }

  .status-header strong {
    max-width: 190px;
    text-align: right;
  }
}

@media (min-width: 720px) {
  .page-shell {
    width: min(var(--max), calc(100% - 48px));
  }

  .site-header {
    flex-wrap: nowrap;
    gap: 14px;
    margin: 12px 0 34px;
    padding: 10px;
  }

  nav {
    width: auto;
    overflow: visible;
    padding-top: 0;
  }

  .hero {
    grid-template-columns: minmax(0, 0.94fr) minmax(320px, 1.06fr);
    gap: 30px;
    min-height: calc(100svh - 94px);
    padding: 4px 0 38px;
  }

  h1 {
    font-size: clamp(3rem, 5.4vw, 4.35rem);
    line-height: 0.96;
  }

  .hero-actions .button-primary::before,
  .form-submit::before,
  .portal-submit::before,
  .budget-submit::before {
    animation: none;
  }

  .lead {
    font-size: 1.06rem;
    line-height: 1.7;
  }

  .hero-visual img {
    height: auto;
    min-height: 360px;
  }

  .signal-card {
    max-width: 210px;
    padding: 13px;
  }

  .signal-card-top {
    top: 14px;
    left: 14px;
  }

  .signal-card-bottom {
    right: 14px;
    bottom: 14px;
  }

  .project-panel,
  .process-band {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding: 30px;
  }

  .project-showcase,
  .portal-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .portal-layout {
    grid-template-columns: 1fr;
  }

  .portal-login {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .portal-login > div,
  .portal-login .portal-submit,
  .portal-login .portal-message {
    grid-column: 1 / -1;
  }

  .project-card,
  .portal-login,
  .status-preview {
    padding: 30px;
  }

  .project-card {
    min-height: 330px;
  }

  .portal-hero-panel {
    grid-template-columns: minmax(0, 0.92fr) minmax(300px, 1.08fr);
    align-items: stretch;
    padding: 24px;
  }

  .portal-hero-media {
    min-height: 340px;
  }

  .portal-hero-media img {
    min-height: 340px;
  }

  .project-orbit {
    right: -46px;
    top: -46px;
    width: 178px;
  }

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

  .contact-form {
    grid-template-columns: repeat(2, 1fr);
    padding: 24px;
  }

  .full,
  .form-submit,
  .contact-message,
  .form-note {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1040px) {
  h1 {
    font-size: clamp(4.35rem, 5.6vw, 5.35rem);
    line-height: 0.94;
  }

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

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

  .cursor-glow {
    display: none;
  }

  .form-submit.is-loading::before {
    animation: submit-spin 760ms linear infinite !important;
  }

  .form-submit.is-loading::after {
    animation: submit-scan 1.15s ease-in-out infinite !important;
  }

  .page-transition.is-active::before {
    animation: transition-glow-breathe 3.6s ease-in-out infinite !important;
  }

  .page-transition.is-active::after {
    animation: transition-glow-breathe 4.2s ease-in-out infinite reverse !important;
  }

  .page-transition.is-active .page-transition-core {
    animation: transition-core-focus 1.4s cubic-bezier(0.16, 1, 0.3, 1) both !important;
  }

  .page-transition.is-active .page-transition-core::before {
    animation: transition-scan 1.35s ease-in-out infinite !important;
  }

  .page-transition.is-active .page-transition-ring {
    animation: submit-spin 820ms linear infinite !important;
  }
}

/* ===== Seitenuebergang: Login -> Kundenportal (Blur + Ladeanimation) ===== */

.page-shell {
  transition: filter 480ms ease, opacity 480ms ease;
}

body.is-transitioning .page-shell {
  filter: blur(16px);
  opacity: 0.35;
  pointer-events: none;
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, rgba(0, 229, 255, 0.16), transparent 30rem),
    radial-gradient(circle at 70% 70%, rgba(143, 92, 255, 0.14), transparent 30rem),
    rgba(5, 7, 11, 0.72);
  backdrop-filter: blur(0px);
  transition: opacity 480ms ease, backdrop-filter 480ms ease;
}

.page-transition::before,
.page-transition::after {
  content: "";
  position: absolute;
  width: min(56vw, 560px);
  aspect-ratio: 1;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 420ms ease;
}

.page-transition::before {
  left: -12vw;
  top: 14vh;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.24), transparent 66%);
  animation: transition-glow-breathe 3.6s ease-in-out infinite;
}

.page-transition::after {
  right: -14vw;
  bottom: 10vh;
  background: radial-gradient(circle, rgba(143, 92, 255, 0.26), transparent 68%);
  animation: transition-glow-breathe 4.2s ease-in-out infinite reverse;
}

.page-transition.is-active {
  opacity: 1;
  pointer-events: all;
  backdrop-filter: blur(22px) saturate(140%);
}

.page-transition.is-active::before,
.page-transition.is-active::after {
  opacity: 1;
}

.page-transition-core {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 16px;
  min-width: min(86vw, 360px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 26px;
  overflow: hidden;
  background: rgba(5, 7, 11, 0.58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  text-align: center;
  animation: transition-core-focus 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-transition-core::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0 35%, rgba(255, 255, 255, 0.15) 46%, transparent 57%);
  transform: translateX(-110%) skewX(-16deg);
  animation: transition-scan 1.35s ease-in-out infinite;
}

.page-transition-core > * {
  position: relative;
  z-index: 1;
}

.page-transition-ring {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--accent);
  border-right-color: var(--accent-2);
  animation: submit-spin 820ms linear infinite;
}

.page-transition-label {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.page-transition-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

@keyframes transition-glow-breathe {
  0%,
  100% {
    transform: scale(0.98);
    opacity: 0.42;
  }

  50% {
    transform: scale(1.06);
    opacity: 0.72;
  }
}

@keyframes transition-scan {
  0%,
  40% {
    transform: translateX(-115%) skewX(-16deg);
  }

  100% {
    transform: translateX(115%) skewX(-16deg);
  }
}

@keyframes transition-core-focus {
  0% {
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    border-color: rgba(255, 255, 255, 0.08);
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    border-color: rgba(0, 229, 255, 0.32);
  }
}

/* ===== Kundenportal-Dashboard (portal.html) ===== */

.portal-page {
  min-height: 100vh;
}

.portal-page .site-header {
  margin-bottom: 26px;
}

.portal-dashboard {
  display: grid;
  gap: 20px;
  padding: 30px 0 70px;
}

.portal-hero-panel {
  position: relative;
  display: grid;
  gap: 22px;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 229, 255, 0.2), transparent 22rem),
    radial-gradient(circle at 86% 30%, rgba(143, 92, 255, 0.2), transparent 24rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.026));
}

.portal-hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 36%, rgba(255, 255, 255, 0.11) 44%, transparent 52%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 18px);
  opacity: 0.62;
  transform: translateX(-30%);
  animation: portal-sheen 8s ease-in-out infinite;
}

.portal-hero-panel > * {
  position: relative;
  z-index: 1;
}

.portal-hero-copy {
  display: grid;
  align-content: center;
  gap: 14px;
}

.portal-hero-copy .eyebrow {
  color: var(--accent-2);
}

.portal-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.3rem, 9vw, 4rem);
  line-height: 0.98;
}

.portal-hero-copy p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.7;
}

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

.portal-phase-pill {
  display: inline-flex;
  align-items: center;
  min-height: 39px;
  border: 1px solid rgba(0, 229, 255, 0.34);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--accent);
  background: rgba(0, 229, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-hero-media {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 35%, rgba(0, 229, 255, 0.16), transparent 18rem),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.portal-hero-media picture,
.portal-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
}

.portal-hero-media img {
  min-height: 260px;
  object-fit: cover;
  opacity: 0.9;
  filter: saturate(112%) contrast(108%);
}

.portal-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 35%, rgba(5, 7, 11, 0.58)),
    radial-gradient(circle at 18% 18%, rgba(0, 229, 255, 0.18), transparent 16rem);
}

.portal-hero-media figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  display: grid;
  gap: 2px;
  min-width: 136px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 7px;
  padding: 12px;
  background: rgba(5, 7, 11, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}

.portal-hero-media figcaption span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-hero-media figcaption strong {
  color: var(--text);
  font-size: 1.7rem;
}

.dashboard-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 860px) {
  .dashboard-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

.dashboard-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 229, 255, 0.08), transparent 18rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  box-shadow: var(--shadow);
}

.budget-panel {
  display: grid;
  gap: 18px;
}

.budget-figures {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.budget-figures strong {
  font-size: 1.5rem;
}

.budget-figures span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.budget-bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.budget-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 26px rgba(0, 229, 255, 0.34);
  transition: width 420ms ease;
}

.budget-bar-fill.is-over {
  background: linear-gradient(90deg, var(--danger), var(--accent-2));
}

.budget-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

.budget-stepper {
  display: grid;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.budget-stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.budget-stepper-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.budget-step-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.budget-step-btn:hover {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.1);
  transform: translateY(-1px);
}

.budget-step-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.budget-pending {
  font-size: 0.92rem;
}

.budget-pending strong {
  color: var(--accent);
}

.budget-submit {
  width: 100%;
  border: 0;
}

.budget-message {
  min-height: 20px;
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.budget-message.is-error {
  color: var(--danger);
}

.budget-message.is-success {
  color: var(--accent);
}

.dashboard-logout {
  justify-self: start;
  min-height: 39px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.dashboard-logout:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.portal-empty-state {
  display: grid;
  gap: 10px;
  padding: 30px 0;
  text-align: center;
  color: var(--muted);
}

/* ===== Client Portal V2: bewusst getrennt vom alten Dashboard-Look ===== */

.portal-submit.is-loading span {
  opacity: 1;
}

.portal-submit.is-loading i {
  opacity: 0;
}

.portal-submit.is-loading::before {
  content: "";
  position: absolute;
  right: 18px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  animation: submit-spin 760ms linear infinite;
}

.page-transition::before,
.page-transition::after,
.page-transition-core::before {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  animation: none !important;
}

.page-transition {
  background: rgba(5, 7, 11, 0.74);
}

.page-transition.is-active {
  backdrop-filter: blur(18px) saturate(130%);
}

.page-transition-core {
  gap: 14px;
  border-radius: 8px;
  background: rgba(7, 10, 16, 0.82);
  animation: none !important;
  transform: none !important;
}

.page-transition-ring {
  width: 44px;
  height: 44px;
  border-width: 2px;
  animation: submit-spin 900ms linear infinite !important;
}

.page-transition-label {
  font-size: 0.9rem;
}

.page-transition-sub {
  max-width: 260px;
  line-height: 1.45;
}

.client-portal-v2 {
  position: relative;
  display: grid;
  gap: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 20px;
  background:
    radial-gradient(circle at 20% 12%, rgba(0, 229, 255, 0.16), transparent 22rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.078), rgba(255, 255, 255, 0.028));
  box-shadow: var(--shadow);
}

.cp-hero-copy {
  display: grid;
  align-content: center;
  gap: 14px;
}

.cp-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.25rem, 8vw, 4rem);
  line-height: 0.98;
}

.cp-hero-copy p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.7;
}

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

.cp-state-pill,
.cp-logout {
  min-height: 40px;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.cp-state-pill {
  border: 1px solid rgba(0, 229, 255, 0.34);
  color: var(--accent);
  background: rgba(0, 229, 255, 0.08);
}

.cp-logout {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.cp-logout:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.cp-visual {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.cp-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  opacity: 0.94;
}

.cp-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(5, 7, 11, 0.62));
}

.cp-visual figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 1;
  min-width: 134px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 8px;
  padding: 12px;
  background: rgba(5, 7, 11, 0.74);
  backdrop-filter: blur(16px);
}

.cp-visual figcaption span,
.cp-card-head span,
.cp-next span {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.cp-visual figcaption strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 1.7rem;
}

.cp-grid {
  display: grid;
  gap: 18px;
}

.cp-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 20px;
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 229, 255, 0.08), transparent 18rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  box-shadow: var(--shadow);
}

.cp-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.cp-card-head strong {
  text-align: right;
}

.cp-timeline {
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-timeline li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
}

.cp-timeline li > span {
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.cp-timeline li > span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 22px;
  width: 1px;
  height: 27px;
  background: rgba(255, 255, 255, 0.12);
}

.cp-timeline li:last-child > span::after {
  display: none;
}

.cp-timeline .is-done > span,
.cp-timeline .is-active > span {
  border-color: rgba(0, 229, 255, 0.82);
  background: var(--accent);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.36);
}

.cp-timeline small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.cp-next {
  margin-top: 24px;
  border: 1px solid rgba(0, 229, 255, 0.24);
  border-radius: 8px;
  padding: 14px;
  background: rgba(0, 229, 255, 0.075);
}

.cp-next strong {
  display: block;
  margin-top: 6px;
}

.cp-budget-card {
  display: grid;
  gap: 18px;
}

@media (min-width: 760px) {
  .client-portal-v2 {
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
    align-items: stretch;
    padding: 24px;
  }

  .cp-visual,
  .cp-visual img {
    min-height: 330px;
  }
}

@media (min-width: 880px) {
  .cp-grid {
    grid-template-columns: 1.08fr 0.92fr;
    align-items: start;
  }

  /* Status links (spannt über zwei Zeilen), Budget + Dokumente rechts untereinander angedockt */
  .cp-status-card {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .cp-budget-card {
    grid-column: 2;
    grid-row: 1;
  }

  .cp-documents-card {
    grid-column: 2;
    grid-row: 2;
  }
}

@keyframes portal-sheen {
  0%,
  62%,
  100% {
    transform: translateX(-38%);
    opacity: 0.35;
  }

  76% {
    transform: translateX(32%);
    opacity: 0.72;
  }
}

/* ===== Portal V13: feste Loader-Geometrie + deutlich neues Kundenportal ===== */

.portal-submit.is-loading::before,
.page-transition-ring,
.budget-submit.is-loading::before {
  animation-name: portal-spin-fixed !important;
  translate: none !important;
  transform-origin: 50% 50% !important;
}

.page-transition-ring {
  display: block;
  position: relative !important;
  left: auto !important;
  right: auto !important;
  margin: 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  transform-origin: 50% 50%;
  animation: none !important;
  transform: none !important;
  will-change: transform;
}

.page-transition-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-right-color: rgba(143, 92, 255, 0.9);
  border-radius: inherit;
  animation: portal-spin-fixed 900ms linear infinite !important;
  transform-origin: 50% 50%;
}

.page-transition-core {
  width: min(320px, calc(100vw - 42px));
  justify-items: center;
  text-align: center;
  transform: none !important;
  translate: none !important;
}

.client-portal-v2 {
  gap: 18px;
  border-radius: 8px;
  padding: clamp(20px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(143, 92, 255, 0.08) 42%, rgba(255, 255, 255, 0.03)),
    rgba(7, 10, 16, 0.82);
}

.client-portal-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.9), transparent 70%);
}

.client-portal-v2 > * {
  position: relative;
  z-index: 1;
}

.cp-hero-copy h1 {
  max-width: 760px;
  font-size: clamp(2.35rem, 7vw, 5rem);
}

.cp-command-panel {
  display: grid;
  gap: 18px;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 18px;
  background:
    radial-gradient(circle at 30% 18%, rgba(0, 229, 255, 0.18), transparent 15rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.cp-progress-orbit {
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(220px, 64vw);
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    conic-gradient(var(--accent) 0 var(--progress), rgba(255, 255, 255, 0.08) var(--progress) 360deg);
  box-shadow: 0 0 42px rgba(0, 229, 255, 0.16);
}

.cp-progress-orbit::before {
  content: "";
  position: absolute;
  width: calc(min(220px, 64vw) - 28px);
  aspect-ratio: 1;
  border-radius: inherit;
  background: rgba(5, 7, 11, 0.88);
}

.cp-progress-orbit span {
  position: relative;
  color: var(--text);
  font-size: clamp(2.1rem, 10vw, 3.6rem);
  font-weight: 900;
  letter-spacing: 0;
}

.cp-command-meta {
  display: grid;
  gap: 4px;
  text-align: center;
}

.cp-command-meta span,
.cp-mini-stats span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cp-command-meta strong {
  color: var(--accent);
  font-size: 1.28rem;
}

.cp-command-meta small {
  color: var(--muted);
}

.cp-mini-stats {
  display: grid;
  gap: 8px;
}

.cp-mini-stats span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 10px;
}

.cp-mini-stats strong {
  color: var(--text);
}

.cp-grid {
  gap: 18px;
}

.cp-card {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(8, 11, 18, 0.82);
}

.cp-status-card {
  overflow: hidden;
}

.cp-timeline {
  gap: 10px;
}

.cp-timeline li {
  grid-template-columns: 34px 1fr;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.cp-timeline li > span {
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.cp-timeline li > span::after {
  display: none;
}

.cp-timeline .is-done {
  border-color: rgba(0, 229, 255, 0.22);
}

.cp-timeline .is-done > span::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 7px;
  height: 11px;
  border: solid #051015;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cp-budget-card {
  align-content: start;
}

@media (min-width: 760px) {
  .client-portal-v2 {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.58fr);
  }
}

@media (min-width: 980px) {
  .cp-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  }
}

@keyframes portal-spin-fixed {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Portal V14: kompakter, sauberere Controls, Landingpage-naeher ===== */

.portal-page .site-header {
  margin-bottom: 10px;
}

.portal-page .page-shell {
  width: min(var(--max), calc(100% - 24px));
}

.portal-dashboard {
  gap: 16px;
  padding: 4px 0 56px;
}

.client-portal-v2 {
  padding: clamp(18px, 3vw, 28px);
}

.cp-card {
  padding: clamp(18px, 2.4vw, 24px);
}

.cp-card-head {
  margin-bottom: 16px;
}

.cp-card-head span,
.cp-next span,
.cp-budget-card .panel-kicker,
.budget-stepper .panel-kicker {
  color: var(--accent);
  letter-spacing: 0.01em;
}

.cp-timeline {
  gap: 12px;
}

.cp-timeline li {
  min-height: 76px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  padding: 14px 15px;
}

.cp-timeline li > span {
  align-self: center;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 0;
}

.cp-timeline .is-done > span::before {
  left: 50%;
  top: 47%;
  width: 8px;
  height: 13px;
  transform: translate(-50%, -50%) rotate(45deg);
}

.cp-timeline li div {
  min-width: 0;
}

.budget-stepper {
  gap: 14px;
  padding-top: 16px;
}

.budget-stepper-row {
  align-items: center;
}

.budget-stepper-controls {
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.045);
}

.budget-step-btn {
  position: relative;
  overflow: hidden;
  width: 42px;
  height: 42px;
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035));
  color: transparent;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.budget-step-btn::before,
.budget-step-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transform: translate(-50%, -50%);
}

.budget-step-btn[aria-label="Mehr"]::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.budget-step-btn:hover:not(:disabled) {
  border-color: rgba(0, 229, 255, 0.58);
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(0, 229, 255, 0.24), rgba(143, 92, 255, 0.18));
  box-shadow: 0 12px 28px rgba(0, 229, 255, 0.16);
  transform: translateY(-2px);
}

.budget-step-btn:disabled {
  opacity: 0.32;
}

.budget-pending {
  min-width: 96px;
  color: var(--text);
  font-weight: 850;
  text-align: center;
}

#newTotalLabel {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: right;
}

.budget-submit.button {
  min-height: 54px;
  justify-content: center;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.92), rgba(143, 92, 255, 0.96));
  box-shadow: 0 16px 38px rgba(0, 229, 255, 0.18);
}

.budget-submit.button::before {
  animation: touch-shimmer 4.8s ease-in-out infinite !important;
}

.budget-submit.button:disabled {
  opacity: 0.78;
  filter: saturate(0.9);
  cursor: not-allowed;
}

.budget-submit.button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(0, 229, 255, 0.24);
}

/* Portal V17: Projektdateien im Kundenportal */

.cp-documents-card {
  align-content: start;
}

.document-list {
  display: grid;
  gap: 12px;
}

.document-link {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 12%, rgba(0, 229, 255, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.028));
  color: var(--text);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.document-link::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  /* Breiterer, weicherer Shine für sauberen Sweep ohne Cut am rechten Rand */
  background: linear-gradient(115deg, transparent 15%, rgba(255, 255, 255, 0.22) 48%, transparent 82%);
  transform: translateX(-120%);
  transition: opacity 180ms ease, transform 620ms cubic-bezier(0.23, 1, 0.32, 1);
}

.document-link > * {
  position: relative;
  z-index: 1;
}

.document-link:hover {
  border-color: rgba(0, 229, 255, 0.42);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(0, 229, 255, 0.12);
  transform: translateY(-2px);
}

.document-link:hover::before {
  opacity: 1;
  transform: translateX(120%);
}

.document-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.9), rgba(143, 92, 255, 0.92));
  color: #041016;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.05em;
}

.document-link strong,
.document-link small {
  display: block;
}

.document-link strong {
  margin-bottom: 4px;
  font-size: 1rem;
}

.document-link small {
  color: var(--muted);
  line-height: 1.45;
}

.document-link i {
  justify-self: end;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(0, 229, 255, 0.26);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* Perfekt zentrierter Chevron im Kreis – ästhetisch und mittig auf allen Breakpoints */
.document-link i::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transform: rotate(45deg);
}

/* Subtile Pfeil-Bewegung beim Hover für besseres Feedback (auch auf Mobile sichtbar) */
.document-link:hover i {
  transform: translateX(3px);
}

/* grid-column rules for documents now handled in 880px media query for consistent right-column docking under Budget */

@media (min-width: 760px) {
  .portal-page .page-shell {
    width: min(var(--max), calc(100% - 44px));
  }

  .portal-dashboard {
    padding-top: 0;
  }
}

@media (max-width: 620px) {
  .portal-page .site-header {
    margin-bottom: 8px;
  }

  .portal-dashboard {
    padding-top: 0;
  }

  .budget-stepper-row,
  #newTotalLabel {
    text-align: left;
  }

  .budget-stepper-controls {
    width: 100%;
    justify-content: space-between;
  }
}

/* Portal V14 Desktop-Kompaktmodus: Dashboard soll sofort sichtbar sein */

@media (min-width: 760px) {
  .client-portal-v2 {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: center;
    gap: 14px;
    padding: 16px;
  }

  .cp-hero-copy {
    gap: 8px;
  }

  .cp-hero-copy h1 {
    max-width: 620px;
    font-size: clamp(1.85rem, 3vw, 2.35rem);
    line-height: 1.04;
  }

  .cp-hero-copy p {
    display: none;
  }

  .cp-command-panel {
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
  }

  .cp-progress-orbit {
    width: 76px;
  }

  .cp-progress-orbit::before {
    width: 60px;
  }

  .cp-progress-orbit span {
    font-size: 1.18rem;
  }

  .cp-command-meta {
    text-align: left;
  }

  .cp-mini-stats {
    display: none;
  }

  .cp-grid {
    margin-top: 0;
  }
}

/* Portal V14 final: oberer Statusbereich bleibt auf allen Groessen kompakt */

.client-portal-v2 {
  align-items: center;
}

.cp-hero-copy {
  gap: 8px;
}

.cp-hero-copy h1 {
  font-size: clamp(1.85rem, 8vw, 2.35rem);
  line-height: 1.04;
}

.cp-hero-copy p {
  display: none;
}

.cp-command-panel {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.cp-progress-orbit {
  width: 76px;
}

.cp-progress-orbit::before {
  width: 60px;
}

.cp-progress-orbit span {
  font-size: 1.18rem;
}

.cp-command-meta {
  text-align: left;
}

.cp-mini-stats {
  display: none;
}

/* Portal V15: Direkt mit dem relevanten Dashboard starten */

.portal-page .client-portal-v2 {
  display: none;
}

.portal-page .portal-dashboard {
  padding-top: 0;
}

.cp-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.cp-head-actions .cp-logout {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.72rem;
}

@media (max-width: 620px) {
  .cp-card-head {
    align-items: flex-start;
  }

  .cp-head-actions {
    display: grid;
    justify-items: end;
    gap: 8px;
  }
}

/* Landingpage V16: dezenter 3D-Effekt beim mobilen Vorbeiscrollen */

@media (pointer: coarse), (max-width: 760px) {
  .project-card,
  .service-card,
  .process-band,
  .portal-login,
  .contact-form {
    transform:
      perspective(900px)
      translateY(var(--scroll-rise, 0px))
      rotateX(var(--scroll-tilt, 0deg)) !important;
    transform-origin: 50% 50%;
    will-change: transform;
  }

  .project-card.is-scroll-tilting,
  .service-card.is-scroll-tilting,
  .process-band.is-scroll-tilting,
  .portal-login.is-scroll-tilting,
  .contact-form.is-scroll-tilting {
    border-color: rgba(0, 229, 255, 0.22);
    box-shadow:
      0 20px 58px rgba(0, 0, 0, 0.36),
      0 0 26px rgba(0, 229, 255, 0.08);
  }
}
