/* ========== Requirements Engineering - PAGE-SPECIFIC LAYER ========== */
/* Depends on styles.css tokens, home.css hero/FAQ/CTA, projektphasen.css phase DNA */

/* BUG 4 FIX: Prevent any horizontal overflow on the page (mobile safety) */
@media (max-width: 767px) {
    #main-content {
        overflow-x: clip;
    }
}

/* ----- Shared section rhythm ----- */
.re-section {
    position: relative;
    padding: clamp(4rem, 10vh, 8rem) clamp(1.25rem, 5vw, 4rem);
    scroll-margin-top: var(--nav-scroll-offset);
}

/* MOBILE FIX: Ensure adequate horizontal padding on small screens */
@media (max-width: 767px) {
    .re-section {
        padding-left: clamp(1rem, 4vw, 1.5rem);
        padding-right: clamp(1rem, 4vw, 1.5rem);
    }
}

.re-section-header {
    text-align: center;
    max-width: 44rem;
    margin: 0 auto clamp(2.5rem, 5vh, 4rem);
}

.re-section-header .section-title {
    margin-bottom: 1rem;
}

.re-section-intro {
    font-size: clamp(0.95rem, 2vw, 1.08rem);
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}

/* ----- Hero modifier ----- */
.hero--re .hero-subheadline {
    max-width: 44rem;
}

.hero--re .hero-eyebrow {
    letter-spacing: 0.14em;
}

/* ----- 5.1 Präzision - Vom Wunsch zur Anforderung -----
   Not pinned: the scene is scrubbed by native scroll while it crosses the
   viewport (requirements-engineering.js), so it keeps the regular section
   rhythm instead of a full-viewport stage. */
.re-praezision {
    position: relative;
    scroll-margin-top: var(--nav-scroll-offset);
}

.re-praezision-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3.5rem, 9vh, 6rem) clamp(1.25rem, 5vw, 4rem);
}

.re-praezision-inner {
    width: 100%;
    max-width: 72rem;
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 4vh, 2.5rem);
}

.re-praezision-copy {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto;
}

.re-praezision-headlines {
    position: relative;
    min-height: clamp(5rem, 14vh, 7rem);
    margin-bottom: 1rem;
}

.re-praezision-headline {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: none;
}

.re-praezision-headline--start {
    opacity: 1;
}

.re-praezision-headline--end {
    opacity: 0;
}

.re-praezision.is-ordered .re-praezision-headline--start {
    opacity: 0;
}

.re-praezision.is-ordered .re-praezision-headline--end {
    opacity: 1;
}

.re-superkicker {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--neon-purple);
    margin-bottom: 0.5rem;
}

.re-praezision-title {
    font-size: clamp(1.5rem, 4.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0;
    color: var(--text-primary);
}

.re-praezision-sub {
    font-size: clamp(0.9rem, 2vw, 1.02rem);
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}

.re-praezision-scene {
    position: relative;
    width: 100%;
    min-height: clamp(280px, 42vh, 420px);
    border-radius: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 40px rgba(19, 4, 234, 0.12);
    overflow: hidden;
}

/* BUG 4 FIX: Additional safety for mobile to prevent any child overflow */
@media (max-width: 767px) {
    .re-praezision-scene {
        max-width: 100%;
        overflow-x: hidden;
    }
}

.re-wish-cloud {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Base state = ordered end state (no JS / reduced motion). The page script
   arms .is-animated and drives the wishes and rows inline; the blur on the
   wishes is static so scrolling only animates transform + opacity. */
.re-wish-fragment {
    position: absolute;
    left: 0;
    top: 0;
    max-width: 42%;
    padding: 0.35rem 0.65rem;
    font-size: clamp(0.78rem, 2vw, 0.92rem);
    font-style: italic;
    font-weight: 500;
    color: rgba(100, 100, 120, 0.75);
    filter: blur(8px);
    opacity: 0;
    transform-origin: center center;
    white-space: nowrap;
    transition: none;
}

.re-praezision.is-animated .re-wish-fragment {
    will-change: transform, opacity;
}

.re-requirement-list {
    position: absolute;
    inset: 0;
    list-style: none;
    margin: 0;
    padding: clamp(1rem, 3vw, 1.75rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(0.65rem, 2vh, 1rem);
    pointer-events: none;
}

.re-requirement-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: clamp(0.65rem, 1.5vw, 0.85rem) clamp(0.85rem, 2vw, 1.15rem);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(19, 4, 234, 0.1);
    transform-origin: left center;
    transition: none;
}

/* Animated mode: rows leave the flow and are placed by transform at their
   measured flow coordinates (see measureLayout in the page script). */
.re-praezision.is-animated .re-requirement-row {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    will-change: transform, opacity;
}

.re-req-label {
    font-size: clamp(0.82rem, 1.8vw, 0.95rem);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    font-style: normal;
}

.re-req-id {
    font-weight: 800;
    color: var(--neon-blue);
    letter-spacing: 0.02em;
}

.re-moscow-pill {
    flex-shrink: 0;
    padding: 0.28rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.re-moscow-pill--muss {
    background-color: var(--neon-blue);
    color: #fff;
    border: 1px solid var(--neon-blue);
    -webkit-text-fill-color: #fff;
    opacity: 1;
    transform-origin: center center;
    transition: none;
}

.re-praezision-scene .re-moscow-pill--muss {
    background-color: var(--neon-blue) !important;
    color: #fff !important;
    border-color: var(--neon-blue) !important;
    -webkit-text-fill-color: #fff !important;
}

.re-moscow-pill--soll {
    background: transparent;
    color: var(--neon-purple);
    border: 1.5px solid var(--neon-purple);
}

.re-moscow-pill--kann {
    background: var(--glass-bg);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.re-praezision.is-ordered .re-req-label {
    color: var(--text-primary) !important;
    font-style: normal !important;
}

.re-praezision.is-ordered .re-moscow-pill {
    opacity: 1 !important;
}

.re-praezision.is-ordered .re-wish-fragment {
    opacity: 0 !important;
    pointer-events: none;
}

/* ----- 5.2 Dimension cards ----- */
.re-dimension-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.25rem, 3vw, 2rem);
    max-width: 72rem;
    margin: 0 auto;
}

.re-dimension-card {
    position: relative;
    overflow: hidden;
    cursor: default;
    --mx: 50%;
    --my: 50%;
    --rx: 0deg;
    --ry: 0deg;
    opacity: 1;
    transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry));
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    box-shadow: 0 10px 36px rgba(19, 4, 234, 0.12), 0 2px 10px rgba(0, 0, 0, 0.06);
}

.re-dimension-card:hover {
    border-color: rgba(19, 4, 234, 0.45);
    box-shadow: 0 16px 56px rgba(19, 4, 234, 0.18);
    transform: perspective(800px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-4px);
}

.re-dimension-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        320px circle at var(--mx) var(--my),
        rgba(19, 4, 234, 0.12),
        transparent 55%
    );
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
    z-index: 0;
}

.re-dimension-card:hover::before,
.re-dimension-card:focus-within::before {
    opacity: 1;
}

.re-dimension-card-inner {
    position: relative;
    z-index: 1;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.re-dimension-icon {
    color: var(--neon-blue);
    flex-shrink: 0;
}

.re-icon-stroke {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
}

.re-dimension-card.is-drawn .re-icon-stroke {
    stroke-dashoffset: 0;
}

.re-dimension-title {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
    color: var(--text-primary);
}

.re-dimension-text {
    font-size: clamp(0.88rem, 1.8vw, 0.95rem);
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
    flex: 1;
}

.re-dimension-tag {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.4rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--neon-purple);
    background: rgba(129, 55, 255, 0.1);
    border: 1px solid rgba(129, 55, 255, 0.25);
}

/* ----- 5.3 Methodik stepper ----- */
.re-methodik-wrap {
    position: relative;
    max-width: 80rem;
    margin: 0 auto;
    padding-left: 2.5rem;
}

/* BUG 4 FIX: Symmetric padding on mobile to prevent horizontal overflow */
@media (max-width: 767px) {
    .re-methodik-wrap {
        padding-left: clamp(1.25rem, 5vw, 2rem);
        padding-right: clamp(1.25rem, 5vw, 2rem);
    }
}

.re-methodik-rail {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

.re-methodik-rail--vertical {
    top: 0;
    left: 0.65rem;
    width: 3px;
    height: 100%;
}

/* MOBILE FIX: Adjust rail position to align with repositioned nodes */
@media (max-width: 767px) {
    .re-methodik-rail--vertical {
        left: 1.75rem;
    }
}

.re-methodik-rail--horizontal {
    display: none;
}

.re-methodik-rail .phasen-timeline-track {
    stroke: rgba(129, 55, 255, 0.38);
    stroke-width: 2.5;
}

.re-methodik-progress--vertical {
    stroke: url(#re-methodik-gradient-v);
}

.re-methodik-progress--horizontal {
    stroke: url(#re-methodik-gradient-h);
}

.re-methodik-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vh, 2.25rem);
    position: relative;
    z-index: 1;
}

/* MOBILE FIX: Adjust for smaller node margin */
@media (max-width: 767px) {
    .re-methodik-steps {
        gap: clamp(1.25rem, 2.5vh, 1.75rem);
        padding-left: 0.75rem;
    }
}

.re-methodik-step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.re-methodik-node {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-top: 0.35rem;
    margin-left: -2.15rem;
    border-radius: 50%;
    background: rgba(248, 251, 255, 0.98);
    border: 2.5px solid rgba(129, 55, 255, 0.5);
    box-shadow:
        0 2px 10px rgba(19, 4, 234, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition:
        background 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* MOBILE FIX: Reduce negative margin so nodes don't touch screen edge */
@media (max-width: 767px) {
    .re-methodik-node {
        margin-left: -1.5rem;
    }
}

.re-methodik-num {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--neon-purple);
    transition: color 0.45s ease;
}

.re-methodik-step.is-lit .re-methodik-node {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow:
        0 0 0 5px rgba(19, 4, 234, 0.14),
        0 4px 14px rgba(129, 55, 255, 0.35);
    transform: scale(1.08);
}

.re-methodik-step.is-lit .re-methodik-num {
    color: #fff;
}

.re-methodik-card {
    flex: 1;
    padding: clamp(1.15rem, 2.5vw, 1.55rem);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 36px rgba(19, 4, 234, 0.1);
}

.re-methodik-step-title {
    font-size: clamp(0.95rem, 2vw, 1.08rem);
    font-weight: 800;
    letter-spacing: 0.03em;
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.re-methodik-step-text {
    font-size: clamp(0.86rem, 1.8vw, 0.93rem);
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}

/* ----- 5.4 Auslöser grid ----- */
.re-ausloeser-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2.5vw, 1.5rem);
    max-width: 64rem;
    margin: 0 auto;
}

.re-ausloeser-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.35rem, 3vw, 1.75rem);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 36px rgba(19, 4, 234, 0.1);
    cursor: default;
    --mx: 50%;
    --my: 50%;
    transition:
        border-color var(--transition-normal),
        box-shadow var(--transition-normal),
        transform var(--transition-normal);
}

.re-ausloeser-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        300px circle at var(--mx) var(--my),
        rgba(19, 4, 234, 0.12),
        transparent 55%
    );
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.re-ausloeser-card:hover,
.re-ausloeser-card:focus-within {
    border-color: rgba(19, 4, 234, 0.45);
    box-shadow: 0 16px 48px rgba(19, 4, 234, 0.16);
    transform: translateY(-4px);
}

.re-ausloeser-card:hover::before,
.re-ausloeser-card:focus-within::before {
    opacity: 1;
}

.re-ausloeser-card:focus-visible {
    outline: 2px solid var(--neon-purple);
    outline-offset: 3px;
}

.re-ausloeser-title {
    position: relative;
    z-index: 1;
    font-size: clamp(0.98rem, 2.1vw, 1.1rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    margin: 0 0 0.55rem;
    color: var(--text-primary);
}

.re-ausloeser-text {
    position: relative;
    z-index: 1;
    font-size: clamp(0.86rem, 1.8vw, 0.93rem);
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}

/* ----- 5.5 Ergebnis deliverable grid ----- */
.re-deliverable-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.25rem, 3vw, 2rem);
    max-width: 72rem;
    margin: 0 auto clamp(2.5rem, 5vh, 3.5rem);
}

/* BUG 4 FIX: Safety net to prevent off-center cards on mobile */
@media (max-width: 767px) {
    .re-deliverable-grid {
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
        box-sizing: border-box;
        padding-left: clamp(1rem, 4vw, 1.5rem);
        padding-right: clamp(1rem, 4vw, 1.5rem);
    }
}

.re-deliverable-card {
    padding: clamp(1.35rem, 3vw, 2rem);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 36px rgba(19, 4, 234, 0.12);
    transition:
        border-color var(--transition-normal),
        box-shadow var(--transition-normal),
        transform var(--transition-normal);
}

/* MOBILE FIX: Ensure cards have proper spacing and don't touch edges */
@media (max-width: 767px) {
    .re-deliverable-card {
        padding: clamp(1rem, 3vw, 1.5rem);
        width: 100%;
        box-sizing: border-box;
    }
}

.re-deliverable-card:hover {
    border-color: rgba(19, 4, 234, 0.5);
    box-shadow: 0 20px 52px rgba(19, 4, 234, 0.18);
    transform: translateY(-5px);
}

.re-deliverable-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(19, 4, 234, 0.12);
}

/* MOBILE FIX: Adjust header spacing */
@media (max-width: 767px) {
    .re-deliverable-header {
        gap: 0.6rem;
        margin-bottom: 0.85rem;
        padding-bottom: 0.65rem;
    }
}

.re-deliverable-icon {
    font-size: 1.35rem;
    line-height: 1;
}

/* MOBILE FIX: Reduce icon size proportionally */
@media (max-width: 767px) {
    .re-deliverable-icon {
        font-size: 1.1rem;
    }
}

.re-deliverable-title {
    font-size: clamp(1rem, 2.1vw, 1.12rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.3;
}

/* MOBILE FIX: Reduce font-size to prevent long words from overflowing */
@media (max-width: 767px) {
    .re-deliverable-title {
        font-size: 0.85rem;
        letter-spacing: 0.02em;
        line-height: 1.4;
        word-break: break-word;
        hyphens: auto;
    }
}

.re-deliverable-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.re-deliverable-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: clamp(0.86rem, 1.7vw, 0.92rem);
    line-height: 1.55;
    color: var(--text-muted);
}

.re-check-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: var(--neon-blue);
}

.re-check-stroke {
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
}

.re-deliverable-card.is-drawn .re-check-stroke {
    stroke-dashoffset: 0;
}

.re-ergebnis .re-phase-link {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* ----- 5.6 Einbettung cycle ----- */
.re-cycle-item .phase-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 0;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(19, 4, 234, 0.2), rgba(129, 55, 255, 0.2));
    color: var(--neon-purple);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.re-cycle-nav {
    max-width: 80rem;
    margin: 0 auto clamp(2.5rem, 5vh, 3.5rem);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.re-cycle-nav::-webkit-scrollbar {
    display: none;
}

.re-cycle-list {
    display: flex;
    gap: clamp(0.75rem, 2vw, 1.25rem);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    min-width: min-content;
}

.re-cycle-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    padding: clamp(1rem, 2vw, 1.35rem);
    min-width: clamp(7.5rem, 14vw, 10rem);
    border-radius: 1.25rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    opacity: 0.55;
    transition: opacity var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
    text-align: center;
}

.re-cycle-item--active {
    opacity: 1;
    border-color: rgba(19, 4, 234, 0.45);
    box-shadow: 0 10px 32px rgba(19, 4, 234, 0.16);
}

.re-cycle-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.re-cycle-link:hover .re-cycle-name,
.re-cycle-link:focus-visible .re-cycle-name {
    color: var(--neon-purple);
}

.re-cycle-name {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1.35;
    transition: color var(--transition-normal);
}

.re-cross-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2.5vw, 1.5rem);
    max-width: 64rem;
    margin: 0 auto;
}

.re-cross-link-card {
    display: block;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    text-decoration: none;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}

.re-cross-link-card:hover,
.re-cross-link-card:focus-visible {
    border-color: rgba(129, 55, 255, 0.4);
    box-shadow: 0 10px 32px rgba(19, 4, 234, 0.14);
    transform: translateY(-3px);
}

.re-cross-link-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--neon-blue);
    margin-bottom: 0.5rem;
}

.re-cross-link-text {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.re-cross-link-arrow {
    font-size: 1.1rem;
    color: var(--neon-purple);
    font-weight: 700;
}

/* ----- CTA extensions ----- */
.re-cta-box .cta-box-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.re-cta-box .cta-title {
    margin-bottom: 1rem;
    max-width: 36rem;
}

.re-cta-desc {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    line-height: 1.65;
    color: var(--text-muted);
    max-width: 36rem;
    margin: 0 auto 1.75rem;
}

.re-cta-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.re-cta-contact a {
    color: var(--neon-blue);
    font-weight: 600;
    text-decoration: none;
}

.re-cta-contact a:hover,
.re-cta-contact a:focus-visible {
    text-decoration: underline;
}

.re-cta-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(19, 4, 234, 0.12);
}

.re-cta-trust span {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

.re-cta-box .btn-large {
    padding: 1rem 2.25rem;
    font-size: 1.05rem;
}

/* ----- Tablet+ ----- */
@media (min-width: 768px) {
    .re-praezision-inner {
        flex-direction: row;
        align-items: center;
        gap: clamp(2rem, 4vw, 3.5rem);
    }

    .re-praezision-copy {
        flex: 0 0 38%;
        text-align: left;
        margin: 0;
    }

    .re-praezision-headlines {
        min-height: clamp(6rem, 12vh, 8rem);
    }

    .re-praezision-headline {
        align-items: flex-start;
    }

    .re-praezision-scene {
        flex: 1;
        min-height: clamp(320px, 48vh, 440px);
    }

    .re-dimension-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .re-ausloeser-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .re-deliverable-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* 2 + 1 on tablets: the odd last card spans the full row */
    .re-deliverable-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .re-deliverable-title {
        hyphens: auto;
        overflow-wrap: break-word;
    }

    .re-cross-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ----- Tablets: vertical stepper -----
   Five steps in one row do not fit below 1024px (the last steps were
   pushed off-screen), so tablets keep the vertical rail at a readable
   measure. */
@media (min-width: 768px) and (max-width: 1023px) {
    .re-methodik-wrap {
        max-width: 46rem;
    }
}

/* ----- Tablets: long German compounds in 3-column card titles ----- */
@media (min-width: 768px) and (max-width: 1199px) {
    .re-dimension-title {
        font-size: 0.95rem;
        letter-spacing: 0.02em;
        -webkit-hyphens: auto;
        hyphens: auto;
        overflow-wrap: break-word;
    }
}

/* ----- Desktop: horizontal stepper, 3-column deliverables ----- */
@media (min-width: 1024px) {
    .re-deliverable-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .re-deliverable-card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .re-methodik-wrap {
        padding-left: 0;
        padding-top: clamp(2.5rem, 5vh, 4rem);
    }

    .re-methodik-rail--vertical {
        display: none;
    }

    .re-methodik-rail--horizontal {
        display: none;
    }

    .re-methodik-steps {
        flex-direction: row;
        gap: clamp(0.75rem, 1.5vw, 1.25rem);
        align-items: flex-start;
    }

    .re-methodik-step {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.85rem;
    }

    .re-methodik-card {
        width: 100%;
    }

    .re-methodik-step-title,
    .re-methodik-step-text {
        hyphens: auto;
        overflow-wrap: break-word;
    }

    .re-methodik-node {
        margin-left: 0;
        margin-top: 0;
        width: 2.5rem;
        height: 2.5rem;
    }

    .re-methodik-num {
        font-size: 0.68rem;
    }
}

@media (min-width: 1200px) {
    .re-cycle-item {
        min-width: 11rem;
    }
}

@media (min-width: 1400px) {
    .re-praezision-inner {
        max-width: 80rem;
    }

    .re-dimension-grid {
        max-width: 80rem;
    }
}

@media (min-width: 1901px) {
    .re-section {
        padding-left: max(4rem, calc((100vw - 90rem) / 2));
        padding-right: max(4rem, calc((100vw - 90rem) / 2));
    }
}

/* ----- Portrait phones: headline -> scene -> copy -----
   Keeps the swapping headline and the animated scene in view together
   while the section scrolls through. */
@media (max-width: 767px) and (orientation: portrait) {
    .re-praezision-copy {
        display: contents;
    }

    .re-praezision-headlines {
        order: 1;
        width: 100%;
        max-width: 40rem;
        margin: 0 auto;
        text-align: center;
    }

    .re-praezision-scene {
        order: 2;
    }

    .re-praezision-sub {
        order: 3;
        max-width: 40rem;
        margin: 0 auto;
        text-align: center;
    }
}

/* ----- Small phones ----- */
@media (max-width: 380px) {
    .re-praezision-stage {
        padding-top: clamp(3rem, 8vh, 4.5rem);
    }

    .re-wish-fragment {
        font-size: 0.72rem;
        max-width: 48%;
    }

    .re-cycle-item {
        min-width: 6.5rem;
        padding: 0.85rem;
    }

    .re-cycle-name {
        font-size: 0.62rem;
    }

    .re-moscow-pill {
        font-size: 0.55rem;
        padding: 0.22rem 0.45rem;
    }
}

/* ----- Landscape mobile ----- */
@media (max-width: 932px) and (orientation: landscape) {
    .re-praezision-stage {
        padding-top: clamp(2.5rem, 6vh, 4rem);
        padding-bottom: clamp(2.5rem, 6vh, 4rem);
    }

    .re-praezision-inner {
        flex-direction: row;
        align-items: center;
    }

    .re-praezision-copy {
        flex: 0 0 42%;
        text-align: left;
    }

    .re-praezision-headline {
        align-items: flex-start;
    }

    .re-praezision-scene {
        /* Four requirement rows must always fit the scene */
        min-height: max(38vh, 16.5rem);
    }

    .re-section {
        padding-top: clamp(2.5rem, 6vh, 4rem);
        padding-bottom: clamp(2.5rem, 6vh, 4rem);
    }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
    .re-praezision-headline,
    .re-wish-fragment,
    .re-requirement-row,
    .re-dimension-card,
    .re-methodik-step,
    .re-methodik-node,
    .re-methodik-card,
    .re-ausloeser-card,
    .re-deliverable-card,
    .re-cycle-item,
    .re-cross-link-card {
        transition: none;
        transform: none !important;
        filter: none !important;
    }

    .re-wish-cloud {
        display: none;
    }

    .re-praezision-headline--start {
        opacity: 0;
    }

    .re-praezision-headline--end {
        opacity: 1;
    }

    .re-requirement-row {
        opacity: 1 !important;
        position: relative;
    }

    .re-requirement-list {
        position: relative;
        inset: auto;
        min-height: auto;
    }

    .re-icon-stroke,
    .re-check-stroke {
        stroke-dashoffset: 0;
    }

    .re-methodik-step {
        opacity: 1 !important;
    }

    .re-methodik-step .re-methodik-node {
        background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
        border-color: rgba(255, 255, 255, 0.35);
    }

    .re-methodik-step .re-methodik-num {
        color: #fff;
    }

    .re-methodik-step .re-methodik-card {
        opacity: 1 !important;
        transform: none !important;
    }

    .re-methodik-progress {
        stroke-dashoffset: 0 !important;
    }

    .re-cycle-item:not(.re-cycle-item--active) {
        opacity: 0.55 !important;
    }

    .re-ausloeser-card,
    .re-deliverable-card {
        opacity: 1 !important;
    }

    .re-ausloeser-card::before {
        display: none;
    }

    .cta-box::before {
        animation: none;
    }
}
