/* Global module - Authenticity Cycle */
.el-cycle {
    background: #f0f4f7;
    color: var(--el-color-navy);
}

.el-cycle-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.74fr) minmax(0, 1fr);
    gap: clamp(40px, 5vw, 96px);
}

.el-cycle-title {
    max-width: 480px;
    margin: 0 0 16px;
}

.el-cycle-text {
    max-width: 620px;
    font-size: clamp(17px, 1.05vw, 20px);
    color: var(--el-color-muted);
}

.el-cycle-text p {
    margin: 0;
}

.el-cycle-text p + p {
    margin-top: 1.1em;
}

/* Circle diagram */
.el-cycle-diagram {
    position: relative;
    width: min(100%, 520px);
    aspect-ratio: 1;
    margin: 84px 0 0;
    container-type: inline-size;
}

.el-cycle-ring {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.el-cycle-ring circle {
    fill: none;
    stroke: #8ea3b8;
    stroke-width: 0.35;
}

.el-cycle-ring .el-cycle-ring-inner {
    stroke: #b9c6d3;
    stroke-width: 0.25;
}

/* Arc from the active point to the next. JS sets --el-active and restarts the animation. */
.el-cycle-ring .el-cycle-arc {
    display: none;
    stroke: var(--el-color-orange);
    stroke-width: 0.8;
    stroke-linecap: round;
    stroke-dasharray: 0 300;
    stroke-dashoffset: calc(var(--el-active, 0) * -100);
}

.el-cycle.is-animated .el-cycle-arc {
    display: block;
}

.el-cycle.is-running .el-cycle-arc {
    animation: el-cycle-arc var(--el-cycle-time, 5s) linear forwards;
}

.el-cycle.is-paused .el-cycle-arc {
    animation-play-state: paused;
}

@keyframes el-cycle-arc {
    to {
        stroke-dasharray: 100 300;
    }
}

.el-cycle-arrow {
    fill: none;
    stroke: var(--el-color-orange);
    stroke-width: 0.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.el-cycle-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--el-font-heading);
    font-size: 6.7cqi; /* word spans ~83% of the inner circle, as in the design */
    font-style: italic;
    font-weight: 600; /* Playfair Display SemiBold Italic, as in the design */
    line-height: 1;
    white-space: nowrap;
    color: var(--el-color-heading);
}

.el-cycle-node {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16%;
    aspect-ratio: 1;
    border: 1px solid #8ea3b8;
    border-radius: 50%;
    background: #f0f4f7;
    transform: translate(-50%, -50%);
    transition: width 0.4s, background-color 0.4s, border-color 0.4s, box-shadow 0.4s, color 0.4s;
}

.el-cycle-node.is-active {
    width: 19%;
    border-color: transparent;
    background: var(--el-color-navy);
    box-shadow: 0 0 0 4px #f0f4f7, 0 0 0 6px var(--el-color-orange);
    color: var(--el-color-white);
}

/* Points on the ring (r = 40%): top, bottom right, bottom left */
.el-cycle-node-1 {
    top: 10%;
    left: 50%;
}

.el-cycle-node-2 {
    top: 70%;
    left: 84.64%;
}

.el-cycle-node-3 {
    top: 70%;
    left: 15.36%;
}

.el-cycle-node-num {
    font-family: var(--el-font-heading);
    font-size: 6.4cqi;
}

.el-cycle-node-label {
    position: absolute;
    left: 50%;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--el-color-navy);
    transform: translateX(-50%);
}

.el-cycle-node-1 .el-cycle-node-label {
    bottom: calc(100% + 14px);
}

.el-cycle-node-2 .el-cycle-node-label,
.el-cycle-node-3 .el-cycle-node-label {
    top: calc(100% + 18px);
}

/* Steps */
.el-cycle-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Each step has a grey top border. The active step gets a short orange line on it, from the left (as in the design). */
.el-cycle-step {
    --el-step-pad: 36px;
    position: relative;
    display: grid;
    grid-template-columns: 84px 1fr;
    padding-block: var(--el-step-pad);
    border-top: 2px solid #dde3e9;
    transition: opacity 0.4s;
}

.el-cycle-step:last-child {
    border-bottom: 1px solid #dde3e9;
}

.el-cycle-step::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--el-color-orange);
    transform: scaleX(0);
    transform-origin: left;
}

/* Active step: full line (no JS, reduced motion, or before the cycle starts). */
.el-cycle-step.is-active::before {
    transform: scaleX(1);
}

/* While the cycle runs, the line fills across the step in time with the orange arc on the
   circle (same duration, paused together). */
.el-cycle.is-running .el-cycle-step.is-active::before {
    animation: el-cycle-line var(--el-cycle-time, 5s) linear forwards;
}

.el-cycle.is-paused .el-cycle-step.is-active::before {
    animation-play-state: paused;
}

@keyframes el-cycle-line {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

.el-cycle.is-animated .el-cycle-step,
.el-cycle.is-animated .el-cycle-node {
    cursor: pointer;
}

.el-cycle.is-animated .el-cycle-step:not(.is-active) {
    opacity: 0.55;
}

.el-cycle-step-num {
    padding-top: 14px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #7c8b99;
    transition: color 0.4s;
}

.el-cycle-step.is-active .el-cycle-step-num {
    color: var(--el-color-orange);
}

.el-cycle-step-title {
    margin: 0;
}

.el-cycle-step-subtitle {
    margin: 4px 0 0;
    font-size: 19px;
    color: #a3adb7;
}

.el-cycle-step-text {
    margin: 20px 0 0;
    max-width: 550px;
    font-size: 19px;
    color: var(--el-color-muted);
}

.el-cycle-quote {
    margin: 56px 0 32px;
    color: var(--el-color-heading);
    font-family: var(--el-font-heading);
    font-size: clamp(24px, 1.55vw, 30px);
    line-height: 1.3;
}

/* Diagram on the right (programmes page): text and link on the left, the circle on the right.
   The block is 1316px wide at 1920, like the compare table above it. */
.el-cycle-diagram-right .el-cycle-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    max-width: 1316px;
    margin-inline: auto;
}

.el-cycle-diagram-right .el-cycle-text {
    max-width: 575px;
}

.el-cycle-diagram-right .el-cycle-quote {
    margin-top: 40px;
}

.el-cycle-diagram-right .el-cycle-intro > .el-link-arrow {
    margin-top: clamp(36px, calc(36px + 14 * (100vw - 1280px) / 640), 50px);
}

.el-cycle-diagram-right .el-cycle-quote + .el-link-arrow {
    margin-top: 0;
}

.el-cycle-diagram-right .el-cycle-diagram {
    width: min(100%, 488px);
    margin: 0 auto;
}

@media (max-width: 991px) {
    .el-cycle-grid,
    .el-cycle-diagram-right .el-cycle-grid {
        grid-template-columns: 1fr;
    }

    .el-cycle-diagram-right .el-cycle-diagram {
        width: min(100% - 40px, 400px);
        margin: 48px auto 24px;
    }

    .el-cycle-diagram {
        width: min(100% - 40px, 400px);
        margin: 72px auto 24px;
    }
}

@media (max-width: 575px) {
    .el-cycle-text,
    .el-cycle-step-subtitle,
    .el-cycle-step-text {
        font-size: 17px;
    }

    .el-cycle-node-label {
        font-size: 12px;
        letter-spacing: 0.12em;
    }

    .el-cycle-step {
        grid-template-columns: 48px 1fr;
        --el-step-pad: 28px;
    }

    .el-cycle-step-num {
        padding-top: 10px;
    }

    .el-cycle-quote {
        margin-top: 40px;
    }
}
