/* * Mobile-first: a single centered column of trail stops, each with its label * stacked on top of the card, over a straight-ish dashed thread running down * the center (the "trail"). At the `md` breakpoint (46em) it becomes a two- * column layout with the stops flanking the dashed line, alternating sides. * * The dashed thread reuses the connective "stitching" language from * OrbitalHero, but in tangerine and gently waving to match the design mock. */ .trail { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3.5rem; width: 100%; max-width: 400px; margin: 0 auto; padding-top: 1.5rem; /* How much of the line is drawn (0–1); set on scroll by KnowledgeTrail.tsx. */ --trail-progress: 0; } /* * The central dashed wave. Rendered as a repeating SVG tile so it is * height-independent (the section grows with its content) and stays crisp. * The tile is one gentle full wave over 340px, so the ~1470px trail shows only * ~4 waves. The dash pattern (9.48 + 8 = 17.48) divides the ~349.5px tile path * length into exactly 20 cycles, so dashes flow seamlessly across tiles. */ .line { position: absolute; /* Extend up past the trail's top edge so the dashed line visually connects to the bottom of the browser tabs sitting just above this section. */ top: -2.25rem; bottom: 0; left: 50%; width: 60px; transform: translateX(-50%); z-index: 0; pointer-events: none; background-repeat: repeat-y; background-position: center top; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='340' viewBox='0 0 60 340' fill='none'%3E%3Cpath d='M30 0 C52 39 52 131 30 170 C8 209 8 301 30 340' stroke='%23ff6400' stroke-width='2.5' stroke-linecap='round' stroke-dasharray='9.48 8'/%3E%3C/svg%3E"); } .stop { position: relative; z-index: 1; display: flex; flex-direction: column; /* Centers the label + component blocks over one another so the label sits centered above its component. Card content keeps its own text alignment. */ align-items: center; gap: 0.75rem; width: 100%; transform: rotate(var(--tilt, 0deg)); } .label { position: relative; display: inline-block; max-width: 320px; line-height: 1.25; text-align: center; padding: 0.4rem 1rem; isolation: isolate; } /* In the mobile layout the stops are one centered column and the dashed line runs straight down the middle, behind each label. The halo masks it with `--mantine-color-body`, so the line reads as broken rather than crossed out. Switched off with the two-column layout below. */ .label::before { content: ''; position: absolute; inset: -0.15rem -0.25rem; z-index: -1; border-radius: 999px; background: radial-gradient( 62% 60% at 50% 50%, var(--mantine-color-body) 46%, color-mix(in srgb, var(--mantine-color-body) 60%, transparent) 72%, transparent 100% ); } .stopCard { width: 100%; max-width: 340px; } /* Give each stop (label + preview card) a slight, alternating tilt so the trail feels hand-placed rather than rigidly aligned. The final URL card is intentionally left upright. The angle is held in `--tilt` (consumed by `.stop` above) rather than applied directly, so the scroll reveal below can add its own translate without clobbering the rotation. */ .stop[data-index='1'] { --tilt: -1deg; } .stop[data-index='2'] { --tilt: 0.75deg; } .stop[data-index='3'] { --tilt: -0.75deg; } .stop[data-index='4'] { --tilt: 1deg; } .finalCard { position: relative; z-index: 1; width: 100%; max-width: 460px; margin: calc(9rem) auto 0 auto; } /* Closing caption — lives outside `.trail` so the dashed line ends at the card above it rather than running behind the text. */ .finalCaption { margin: 1.25rem auto 0 auto; max-width: 460px; } /* ---- Two-column trail (desktop) ---- */ @media (min-width: 46em) { /* The stops sit in two columns clear of the center line, so the label halo has nothing to mask and only punches a hole in the tree shadows behind it. */ .label::before { content: none; } .trail { display: grid; grid-template-columns: 1fr 1fr; column-gap: 5rem; row-gap: 3rem; align-items: center; max-width: 940px; /* Keep the same breathing room above the first stop as the mobile layout, so it isn't tight against the browser tabs above. */ padding-top: 1.5rem; } /* Slightly stronger tilt on desktop (still capped at 2deg); mobile keeps a subtler version via the base rules above. */ .stop[data-index='1'] { grid-column: 1; grid-row: 1; --tilt: -2deg; } .stop[data-index='2'] { grid-column: 2; grid-row: 2; --tilt: 1.5deg; } .stop[data-index='3'] { grid-column: 1; grid-row: 3; --tilt: -1.5deg; } .stop[data-index='4'] { grid-column: 2; grid-row: 4; --tilt: 2deg; } .finalCard { grid-column: 1 / -1; justify-self: center; } /* Each stop (label + component) is centered within its half so the label sits centered over its component, matching the design mock. `.left` / `.right` only pick the column (set above via data-index). */ } /* ---- Scroll-driven reveal ---- Gated on `data-animate`, set on mount, so no-JS and reduced-motion get the trail fully drawn. The 90px gradient tail softens the line's leading edge. */ .trail[data-animate='true'] .line { -webkit-mask-image: linear-gradient( to bottom, #000 calc(var(--trail-progress) * 100%), transparent calc(var(--trail-progress) * 100% + 90px) ); mask-image: linear-gradient( to bottom, #000 calc(var(--trail-progress) * 100%), transparent calc(var(--trail-progress) * 100% + 90px) ); } /* Stops start slightly low and transparent, then settle as they scroll in. `--tilt` is preserved so the hand-placed rotation survives the animation. */ .trail[data-animate='true'] .stop, .trail[data-animate='true'] .finalCard { opacity: 0; transform: translateY(20px) rotate(var(--tilt, 0deg)); transition: opacity 550ms ease, transform 550ms cubic-bezier(0.22, 1, 0.36, 1); } .trail[data-animate='true'] .stop[data-revealed='true'], .trail[data-animate='true'] .finalCard[data-revealed='true'] { opacity: 1; transform: translateY(0) rotate(var(--tilt, 0deg)); } @media (prefers-reduced-motion: reduce) { .trail[data-animate='true'] .line { -webkit-mask-image: none; mask-image: none; } .trail[data-animate='true'] .stop, .trail[data-animate='true'] .finalCard { opacity: 1; transform: rotate(var(--tilt, 0deg)); transition: none; } }