/* /trial: one person's journey from idea to growth. Builds on style.css tokens. */

/* the browser's smooth scrolling would bend the animation engine's measurements, so it stays off here */
html { scroll-behavior: auto !important; }

.trial { background: var(--white); color: var(--black); transition: color .6s var(--ease); }
.trial section { padding: 0; }
.j_bg { position: fixed; inset: 0; z-index: -1; background: var(--white); }
.trial.is_dark { color: var(--white); }

/* header */
.t_head { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gutter); pointer-events: none; }
.t_head a { pointer-events: auto; }
.t_logo img { height: 54px; width: auto; transition: filter .6s var(--ease); }
.t_talk { font: 500 11px/1 var(--font_sub); letter-spacing: .24em; text-transform: uppercase; text-decoration: none; color: inherit; border: 1px solid currentColor; border-radius: 999px; padding: 14px 22px; transition: background .4s var(--ease), color .4s var(--ease); }
.t_talk:hover { background: var(--black); color: var(--white); }
.trial.is_dark .t_logo img { filter: invert(1); }
.trial.is_dark .t_talk:hover { background: var(--white); color: var(--black); }

/* opening */
.j_open { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 130px var(--gutter) 110px !important; position: relative; }
.j_open_title { font: 400 clamp(40px, 6.2vw, 100px)/1.06 var(--font_display); letter-spacing: -.02em; }
.j_open_title span { display: block; }
.j_grey { color: var(--grey); }
.j_open_sub { margin-top: 28px; font: 500 clamp(14px, 1.1vw, 17px)/1.7 var(--font_sub); letter-spacing: .03em; color: var(--grey); }
.t_cue { position: absolute; bottom: 70px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; font: 500 11px/1 var(--font_sub); letter-spacing: .3em; text-transform: uppercase; color: var(--grey); }
.t_cue i { display: block; width: 1px; height: 46px; background: linear-gradient(currentColor, transparent); transform-origin: top; }
@media (prefers-reduced-motion: no-preference) { .t_cue i { animation: cue 2.2s var(--ease) infinite; } }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* journey chapters */
.j_wrap { position: relative; }
.j_thread { position: absolute; left: 0; top: 0; z-index: 0; overflow: visible; pointer-events: none; }
.j_thread path { fill: none; stroke: currentColor; stroke-width: 1.2; opacity: .3; }
.j_thread circle { fill: var(--oxblood); stroke: var(--white); stroke-width: 2.5; }
.j_sec {
  position: relative; z-index: 1; min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(40px, 7vw, 120px);
  max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter) !important;
}
.j_flip .j_scene { order: 2; }
.j_scene { display: flex; justify-content: center; }
.j_svg { display: block; width: min(100%, 500px); height: auto; overflow: visible; }
.j_copy { max-width: 480px; }
.j_flip .j_copy { justify-self: end; }
.j_kicker { font: 500 12px/1.4 var(--font_sub); letter-spacing: .26em; text-transform: uppercase; color: var(--oxblood); margin-bottom: 24px; }
.trial.is_dark .j_kicker { color: var(--grey_light); }
.j_copy h2 { font: 400 clamp(28px, 3.2vw, 46px)/1.14 var(--font_display); letter-spacing: -.01em; }
.j_text { margin-top: 22px; font-size: 16px; opacity: .85; }
.j_step { margin-top: 32px; padding-top: 20px; border-top: 1px solid currentColor; border-color: rgba(114, 114, 114, .35); font-size: 14px; opacity: .9; }
.j_step strong { display: block; margin-bottom: 6px; font: 500 11px/1.4 var(--font_sub); letter-spacing: .26em; text-transform: uppercase; }

/* finale */
.j_end { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 48px; text-align: center; padding: 120px var(--gutter) 140px !important; position: relative; z-index: 1; }
.j_end_title { font: 400 clamp(40px, 7vw, 120px)/1.04 var(--font_display); letter-spacing: -.02em; max-width: 12ch; }

/* journey bar */
.t_bar_nav { position: fixed; left: 50%; bottom: 22px; z-index: 40; width: min(620px, calc(100% - 40px)); transform: translateX(-50%); opacity: 0; transition: opacity .6s var(--ease); pointer-events: none; }
.t_bar_nav.is_shown { opacity: 1; }
.t_track { height: 1px; position: relative; background: rgba(114, 114, 114, .35); }
.t_fill { position: absolute; inset: 0; background: var(--oxblood); transform: scaleX(0); transform-origin: left; will-change: transform; }
.t_steps { display: flex; justify-content: space-between; margin-top: 12px; }
.t_steps li { font: 500 10px/1 var(--font_sub); letter-spacing: .22em; text-transform: uppercase; opacity: .45; transition: opacity .5s var(--ease); position: relative; padding-top: 6px; }
.t_steps li::before { content: ""; position: absolute; left: 50%; top: -17px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: currentColor; opacity: .5; transition: background .5s, opacity .5s, transform .5s var(--ease); }
.t_steps li:first-child::before { left: 0; margin-left: 0; }
.t_steps li:last-child::before { left: auto; right: 0; margin-left: 0; }
.t_steps li.is_on { opacity: 1; }
.t_steps li.is_on::before { background: var(--oxblood); opacity: 1; transform: scale(1.3); }

/* motion: scene parts begin hidden and the script brings them in */
.t_motion .b_glow, .t_motion .b_rays, .t_motion .p_drop, .t_motion .br_label { opacity: 0; }
.t_motion .j_copy > * { opacity: 0; }
.t_motion .j_svg, .t_motion .j_copy > * { will-change: transform, opacity; }

/* phone: scene above, words below, thread on the left edge */
@media (max-width: 820px) {
  .t_logo img { height: 44px; }
  .t_talk { padding: 12px 16px; font-size: 10px; }
  .j_open, .j_end { min-height: 100svh; }
  .j_sec { grid-template-columns: 1fr; gap: 28px; min-height: 100svh; padding: 96px 32px 110px !important; align-content: center; }
  .j_flip .j_scene { order: 0; }
  .j_flip .j_copy { justify-self: start; }
  .j_svg { width: min(78vw, 360px); }
  .j_copy h2 { font-size: clamp(24px, 6.4vw, 32px); }
  .j_text { margin-top: 14px; font-size: 15px; }
  .j_step { margin-top: 20px; padding-top: 14px; }
  .t_steps li { font-size: 8.5px; letter-spacing: .14em; }
}
