/* ProAct Agency layout stabilization – 2026-07 */

html {
  scroll-padding-top: 108px;
}

body {
  position: relative;
  isolation: isolate;
}

::selection {
  color: #05030a;
  background: var(--lime);
}

/* Keep the video inside the page stacking context instead of behind the body. */
.ambient-video {
  z-index: 0;
}

.ambient-video video {
  min-width: 100%;
  min-height: 100%;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 2;
}

.site-header {
  position: fixed;
  z-index: 100;
}

.cursor-aura {
  z-index: 1;
}

main {
  overflow: clip;
}

section[id] {
  scroll-margin-top: 108px;
}

.skip-link {
  top: 12px;
  left: 12px;
  transform: translateY(calc(-100% - 24px));
}

.skip-link:focus-visible {
  transform: none;
}

/* Header */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: rgba(5, 3, 10, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(24px);
  transition: opacity .25s ease;
}

.site-header.scrolled::before {
  opacity: 1;
}

.site-header.scrolled {
  background: transparent;
  border-color: transparent;
  backdrop-filter: none;
}

/* Hero: stable two-column composition without overlapping elements. */
.hero {
  min-height: 100svh;
  padding: 122px 0 44px;
}

.hero-shell {
  min-height: calc(100svh - 166px);
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  grid-template-rows: auto 1fr auto;
  column-gap: clamp(36px, 5vw, 78px);
  row-gap: 28px;
}

.hero-copy {
  min-width: 0;
  align-self: center;
  padding: 34px 0;
}

.hero h1 {
  max-width: 880px;
  font-size: clamp(4rem, 7.3vw, 7.5rem);
  line-height: .89;
  letter-spacing: -.068em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.gradient-word {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.hero-lead {
  max-width: 680px;
}

.hero-orbit {
  position: relative;
  inset: auto;
  width: min(31vw, 440px);
  aspect-ratio: 1;
  justify-self: end;
  align-self: center;
  opacity: .78;
}

.hero-bottom {
  min-width: 0;
}

/* Make the moving background visible without reducing readability. */
.intro-section {
  background: linear-gradient(180deg, rgba(5, 3, 10, .74), rgba(7, 4, 12, .88));
  backdrop-filter: blur(2px);
}

.services-section,
.pulse-section {
  background: rgba(5, 3, 10, .86);
}

.projects-section {
  background: linear-gradient(180deg, rgba(5, 3, 10, .87), rgba(8, 5, 14, .84));
}

.process-section {
  background: rgba(7, 4, 12, .87);
}

.contact-section {
  background: rgba(5, 3, 10, .84);
}

.section {
  padding: clamp(92px, 9vw, 132px) 0;
}

.section-bar {
  align-items: start;
}

.section-bar h2,
.intro-copy h2,
.process-heading h2,
.contact-copy h2,
.pulse-copy h2 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

/* Services: tags and arrow stay in their own column. */
.service-card {
  grid-template-columns: 120px minmax(0, 1fr) minmax(210px, .56fr);
  gap: 34px;
}

.service-copy,
.service-side {
  min-width: 0;
}

.service-card h3 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.service-side {
  grid-column: auto;
}

.tag-list {
  grid-column: auto;
}

/* Keep anchor headings clear of the fixed navigation. */
#impact,
#services,
#projects,
#process,
#contact {
  scroll-margin-top: 96px;
}

/* Tablet */
@media (max-width: 1120px) {
  .hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(280px, .54fr);
  }

  .hero h1 {
    font-size: clamp(3.7rem, 7.8vw, 6.6rem);
  }

  .hero-orbit {
    width: min(34vw, 360px);
  }

  .service-card {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
  }

  .service-top {
    grid-row: 1 / 3;
  }

  .service-side {
    grid-column: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
  }

  .tag-list {
    justify-content: flex-start;
  }
}

/* Mobile navigation and hero become a clean single flow. */
@media (max-width: 880px) {
  html {
    scroll-padding-top: 86px;
  }

  section[id],
  #impact,
  #services,
  #projects,
  #process,
  #contact {
    scroll-margin-top: 86px;
  }

  .primary-nav {
    inset: 84px 16px auto;
    max-height: calc(100svh - 104px);
    overflow-y: auto;
  }

  .hero {
    min-height: auto;
    padding: 104px 0 52px;
  }

  .hero-shell {
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 32px;
  }

  .hero-meta {
    grid-column: 1;
  }

  .hero-copy {
    padding: 10px 0 0;
  }

  .hero h1 {
    max-width: 12ch;
    font-size: clamp(3.1rem, 11.7vw, 5.4rem);
    line-height: .91;
  }

  .hero-orbit {
    position: relative;
    inset: auto;
    grid-column: 1;
    width: min(68vw, 320px);
    justify-self: center;
    margin: 8px auto 0;
    opacity: .58;
  }

  .hero-bottom {
    display: none;
  }

  .section-bar {
    gap: 28px;
  }

  .service-card {
    min-height: 0;
  }
}

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

  .brand {
    width: 146px;
  }

  .hero {
    padding-top: 92px;
  }

  .hero-meta {
    gap: 12px;
    align-items: center;
  }

  .live-status {
    max-width: calc(100% - 54px);
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.42rem, 10.4vw, 3.15rem);
    line-height: .94;
    letter-spacing: -.058em;
  }

  .hero-lead {
    font-size: .98rem;
  }

  .hero-actions {
    margin-top: 28px;
  }

  .hero-orbit {
    width: min(72vw, 270px);
    margin-top: 2px;
    opacity: .52;
  }

  .section {
    padding: 82px 0;
  }

  .section-bar h2,
  .intro-copy h2,
  .process-heading h2,
  .contact-copy h2,
  .pulse-copy h2 {
    font-size: clamp(2.4rem, 11.5vw, 3.45rem);
    line-height: .98;
  }

  .section-bar h2 br,
  .process-heading h2 br,
  .pulse-copy h2 br {
    display: none;
  }

  .service-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    min-height: 0;
    padding: 22px;
  }

  .service-top {
    grid-row: auto;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    padding: 0 0 18px;
    margin: 0 0 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .service-top > span:first-child {
    font-size: 2.25rem;
  }

  .service-icon {
    width: 44px;
    height: 44px;
  }

  .service-card h3 {
    max-width: none;
    padding-right: 0;
    font-size: clamp(1.9rem, 8.4vw, 2.35rem);
    line-height: 1;
    overflow-wrap: anywhere;
  }

  .service-card p {
    margin-top: 16px;
  }

  .service-side {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    margin-top: 24px;
  }

  .tag-list {
    margin: 0;
  }

  .service-arrow {
    position: static;
    width: 44px;
    height: 44px;
    align-self: flex-end;
  }

  .pulse-card {
    min-height: 0;
  }

  .pulse-visual {
    width: 100%;
    min-height: 250px;
    transform: scale(.74);
    transform-origin: center;
  }

  .project-card,
  .project-card:nth-child(1) {
    min-height: 420px;
  }

  .project-card h3 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .contact-section {
    padding: 82px 0;
  }

  .location-line {
    flex-direction: column;
    gap: 6px;
  }

  .legal-hero h1 {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }
}

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

  .button {
    gap: 18px;
    padding-left: 20px;
  }

  .service-card h3 {
    font-size: 1.8rem;
  }
}

/* Long German hero words must fit the desktop text column without clipping. */
@media (min-width: 881px) {
  .hero h1 {
    font-size: clamp(3.8rem, 6.05vw, 6.7rem);
  }
}

/* Background video visibility correction – 2026-07-26 */
.ambient-video {
  background: #05030a;
}

.ambient-video video {
  display: block !important;
  opacity: .92;
  filter: saturate(1.28) contrast(1.12) brightness(1.08);
}

.video-wash {
  background:
    linear-gradient(180deg, rgba(5,3,10,.02) 0%, rgba(5,3,10,.14) 48%, rgba(5,3,10,.58) 100%),
    radial-gradient(circle at 50% 18%, transparent 0, rgba(5,3,10,.06) 48%, rgba(5,3,10,.42) 100%);
}

@media (max-width: 700px) {
  .ambient-video video {
    opacity: .82;
    filter: saturate(1.22) contrast(1.1) brightness(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-video video {
    display: block !important;
  }
}


/* Hero headline legibility correction – 2026-07-26 */
.hero h1 {
  overflow: visible;
  padding-bottom: .12em;
}

.gradient-word {
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow: visible;
  padding: .035em .12em .12em .015em;
  margin: .015em 0 -.08em;
  line-height: 1.02;
  letter-spacing: -.052em;
  color: #ff73d0;
  background-image: linear-gradient(92deg, #fff 0%, #ff8bd8 15%, #ff35b8 42%, #b884ff 68%, #50e7ff 100%);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .35px rgba(255,255,255,.18);
  filter: drop-shadow(0 0 18px rgba(255,53,184,.28)) drop-shadow(0 12px 42px rgba(80,231,255,.12));
}

.gradient-punctuation {
  display: inline-block;
  margin-left: .025em;
  color: #7cecff;
  -webkit-text-fill-color: #7cecff;
  -webkit-text-stroke: 0;
  text-shadow: 0 0 18px rgba(80,231,255,.72);
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .gradient-word {
    color: #ff73d0;
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}

@media (min-width: 881px) {
  .gradient-word {
    font-size: .9em;
  }
}

@media (max-width: 880px) {
  .gradient-word {
    font-size: .94em;
    padding-right: .08em;
  }
}

/* ================================================================
   Cross-browser visibility and form correction – 2026-07-26 v6
   ================================================================ */

/* Content must remain usable even if JavaScript, an observer or an
   animation is blocked. JavaScript adds .js and then enables the
   reveal effect progressively. */
.reveal {
  opacity: 1;
  transform: none;
}

html.js .reveal:not(.visible) {
  opacity: 0;
  transform: translateY(20px);
}

html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* The highlighted word receives its own safe desktop size. This avoids
   the final letters being pushed underneath the orbit or clipped by the
   page viewport in narrower desktop browser windows. */
.gradient-word {
  display: block;
  width: max-content;
  max-width: none;
  white-space: nowrap;
  font-size: clamp(2.8rem, 4.25vw, 4.65rem);
  line-height: 1.05;
  letter-spacing: -.055em;
  margin-top: .06em;
  padding: .02em .12em .12em .015em;
  color: #ff78d1;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: #ff78d1;
  -webkit-text-stroke: .25px rgba(255, 255, 255, .28);
  text-shadow:
    0 0 12px rgba(255, 53, 184, .56),
    0 0 34px rgba(154, 99, 255, .34),
    3px 4px 0 rgba(80, 231, 255, .13);
  filter: none;
}

.gradient-punctuation {
  color: #7cecff;
  -webkit-text-fill-color: #7cecff;
}

/* The contact panel may be taller than the visible viewport. A tiny
   observer threshold and these layout safeguards keep it visible and
   clickable in all Chromium-based browsers, including Opera GX. */
.contact-grid,
.contact-panel,
.contact-panel form,
.field {
  min-width: 0;
}

.contact-panel {
  position: relative;
  z-index: 3;
  background: rgba(15, 9, 24, .92);
  border-color: rgba(255, 255, 255, .22);
}

/* Explicit native select colours are required on Windows/Opera GX.
   color-scheme alone can produce a white list with white option text. */
.field select {
  appearance: none;
  -webkit-appearance: none;
  color: #f9f7ff;
  background-color: #171020;
  background-image:
    linear-gradient(45deg, transparent 50%, #ddff4f 50%),
    linear-gradient(135deg, #ddff4f 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 23px,
    calc(100% - 14px) 23px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 46px;
  color-scheme: dark;
  cursor: pointer;
}

.field select:hover {
  border-color: rgba(255, 255, 255, .34);
  background-color: #1c1328;
}

.field select option,
.field select optgroup {
  color: #f9f7ff !important;
  background-color: #171020 !important;
}

.field select option:checked {
  color: #09050e !important;
  background-color: #ddff4f !important;
}

.field input,
.field textarea {
  color: #f9f7ff;
  background-color: rgba(255, 255, 255, .075);
}

.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f9f7ff;
  box-shadow: 0 0 0 1000px #171020 inset;
  caret-color: #f9f7ff;
}

.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible,
.button:focus-visible,
.nav-toggle:focus-visible,
.video-toggle:focus-visible,
a:focus-visible {
  outline: 2px solid #ddff4f;
  outline-offset: 3px;
}

.submit-button:disabled {
  opacity: .58;
  cursor: wait;
  transform: none;
}

@media (max-width: 1100px) and (min-width: 881px) {
  .hero-shell {
    grid-template-columns: minmax(0, 1fr) minmax(270px, .48fr);
  }

  .gradient-word {
    font-size: clamp(2.65rem, 5.25vw, 3.75rem);
  }
}

@media (max-width: 880px) {
  .gradient-word {
    width: auto;
    max-width: 100%;
    white-space: normal;
    font-size: .82em;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .contact-copy {
    position: relative;
    top: auto;
  }
}

@media (max-width: 560px) {
  .gradient-word {
    font-size: .75em;
    letter-spacing: -.045em;
  }

  .field select {
    font-size: 16px;
  }
}

/* Long German service names must not run underneath the tag column. */
@media (min-width: 1121px) {
  .service-card h3 {
    font-size: clamp(2.3rem, 3.35vw, 3.55rem);
    line-height: .96;
  }
}
