/* Guest homepage: the rounded festival palette, with a dedicated brand-led layout.
   References: Duolingo (hierarchy/CTA), Headspace (warmth), Brilliant (product story).
   Layout and import/compose illustrations are original to UTAMEMO. The listening
   illustration is by Pablo Stanley (Open Doodles, CC0); its source and palette adaptation
   are recorded beside the vendored SVG. */
.festival-ui .fl-landing { --fl-top-space: 16px; max-width: 1120px; padding-top: var(--fl-top-space); padding-bottom: 72px; color: var(--text-primary); }
.festival-ui .fl-landing h1, .festival-ui .fl-landing h2, .festival-ui .fl-landing h3 { text-wrap: balance; }
.festival-ui .fl-landing a { text-decoration: none; }
.festival-ui .fl-hero {
  position: relative; display: flex; flex-direction: column; overflow-x: clip; text-align: center;
  /* Include the fixed navigation in the first screen; svh keeps mobile toolbars stable. */
  min-height: calc(100vh - var(--festival-main-offset) - var(--fl-top-space) - env(safe-area-inset-top, 0px));
  min-height: calc(100svh - var(--festival-main-offset) - var(--fl-top-space) - env(safe-area-inset-top, 0px));
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
}
.festival-ui .fl-hero-copy { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: clamp(18px, 4svh, 52px); }
.festival-ui .fl-hero-controls { flex: none; }
.festival-ui .fl-eyebrow { margin: 0 0 12px; color: var(--text-secondary); font-size: 12px; font-weight: 900; letter-spacing: .14em; }
.festival-ui .fl-wordmark { display: flex; justify-content: center; margin: 0; padding: 0 0 8px; font-size: clamp(54px, 15.5vw, 170px); line-height: 1.12; letter-spacing: -.065em; font-weight: 900; color: var(--brand-color); text-shadow: none; }
.festival-ui .fl-tagline { margin: 19px 0 12px; color: var(--text-primary); font-size: clamp(26px, 3vw, 38px); font-weight: 900; line-height: 1.6; text-wrap: balance; letter-spacing: .025em; }
.festival-ui .fl-description { margin: 0 auto; max-width: 580px; color: var(--text-secondary); font-size: 15px; line-height: 1.9; text-wrap: balance; }
.festival-ui .fl-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 26px; margin-top: 27px; }
.festival-ui .fl-button { display: inline-flex; align-items: center; justify-content: center; gap: 25px; min-height: 56px; padding: 13px 27px; border: 2px solid var(--text-primary); border-radius: 18px; box-shadow: none; background: var(--action-color); color: white; font-size: 16px; font-weight: 900; line-height: 1.5; transition: transform .16s, box-shadow .16s, background-color .16s; }
.festival-ui .fl-start-arrow { flex: 0 0 20px; width: 20px; height: 20px; }
.festival-ui .fl-more { display: inline-flex; gap: 13px; align-items: center; min-height: 44px; color: var(--text-primary); font-size: 14px; font-weight: 700; }
.festival-ui .fl-login { display: inline-flex; align-items: center; min-height: 44px; margin-top: 14px; color: var(--text-secondary); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.festival-ui .fl-button:active { transform: translateY(4px); box-shadow: none; }
.festival-ui .fl-landing a:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 5px; }

.festival-ui .fl-about { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; padding: 87px 24px 82px; border-bottom: 1px solid var(--border-light); }
.festival-ui .fl-about h2 { font-size: clamp(27px, 3.1vw, 38px); line-height: 1.65; margin: 0; }
.festival-ui .fl-about h2 em { font-style: normal; color: var(--primary-dark); }
.festival-ui .fl-about > p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 2.2; }
.festival-ui .fl-how { padding: 76px 0 84px; text-align: center; }
.festival-ui .fl-how > h2 { font-size: clamp(25px, 3vw, 34px); margin: 0 0 38px; line-height: 1.65; }
.festival-ui .fl-how > h2 > span { display: inline-block; }
.festival-ui .fl-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; list-style: none; padding: 0; margin: 0; text-align: left; }
.festival-ui .fl-steps > li { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 22px; border: 2px solid var(--border-color); border-radius: 27px; background: var(--surface-elevated); }
.festival-ui .fl-steps > li:nth-child(2) { background: var(--accent-peach); }
.festival-ui .fl-steps > li:nth-child(3) { background: var(--accent-yellow); }
.festival-ui .fl-steps > li:not(:last-child)::after { content: '→'; position: absolute; z-index: 1; right: -31px; top: 120px; display: grid; place-items: center; width: 28px; height: 28px; color: var(--text-secondary); font: 17px/1 sans-serif; }
.festival-ui .fl-step-visual { display: grid; place-items: center; width: 100%; height: 184px; margin: 11px 0 17px; pointer-events: none; transition: transform .25s ease; }
.festival-ui .fl-step-art { display: block; width: 100%; max-width: 280px; height: auto; max-height: 184px; overflow: visible; }
.festival-ui .fl-step-art.fl-step-doodle { object-fit: contain; user-select: none; }
.festival-ui .fl-step-copy { width: 100%; padding: 19px 2px 3px; border-top: 1px solid var(--border-light); }
.festival-ui .fl-steps h3 { font-size: 22px; margin: 0 0 11px; line-height: 1.6; letter-spacing: 0; }
.festival-ui .fl-steps p { color: var(--text-secondary); font-size: 13px; line-height: 1.95; margin: 0; text-wrap: pretty; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .festival-ui .fl-step:hover .fl-step-visual { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: no-preference) {
  .festival-ui .fl-step--seen .fl-step-art { animation: fl-step-arrive .6s ease-out both; }
  .festival-ui .fl-step--seen:nth-child(2) .fl-step-art { animation-delay: .08s; }
  .festival-ui .fl-step--seen:nth-child(3) .fl-step-art { animation-delay: .16s; }
}
@keyframes fl-step-arrive { from { opacity: .55; transform: translateY(9px) scale(.97); } to { opacity: 1; transform: none; } }
.festival-ui .fl-finale { position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 26px; padding: 43px 48px; border: 2px solid var(--border-color); border-radius: 32px; box-shadow: none; background: var(--accent-peach); text-align: left; }
.festival-ui .fl-finale-copy { min-width: 0; }
.festival-ui .fl-finale h2 { margin: 0 0 29px; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.65; letter-spacing: .01em; }
.festival-ui .fl-finale h2 > span, .festival-ui .fl-finale h2 > em { display: inline-block; }
.festival-ui .fl-finale h2 em { font-style: normal; color: var(--primary-dark); }
.festival-ui .fl-finale-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 24px; }
.festival-ui .fl-finale .fl-button { background: var(--action-color); color: white; font-size: 14px; padding-inline: 22px; gap: 23px; }
.festival-ui .fl-plans { display: inline-flex; align-items: center; gap: 9px; width: fit-content; min-height: 44px; color: var(--text-secondary); font-size: 12px; white-space: nowrap; }
.festival-ui .fl-finale-art { display: grid; place-items: center; width: 100%; max-width: 330px; justify-self: center; pointer-events: none; }
.festival-ui .fl-finale-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.festival-ui .fl-finale-art text { font-family: var(--font-heading); }
.festival-ui .fl-finale-disc, .festival-ui .fl-finale-sleeve { transform-box: fill-box; transform-origin: center; transition: transform .4s ease; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .festival-ui .fl-finale:hover .fl-finale-disc { transform: translateX(3px) rotate(7deg); }
  .festival-ui .fl-finale:hover .fl-finale-sleeve { transform: translateY(-3px); }
}
.festival-ui .fl-landing section[id] { scroll-margin-top: 12px; }
@media (hover: hover) and (pointer: fine) {
  .festival-ui .fl-button:hover { transform: translateY(-2px); box-shadow: none; background: var(--action-hover); color: white; }
  .festival-ui .fl-finale .fl-button:hover { background: var(--action-hover); color: white; }
  .festival-ui .fl-more:hover, .festival-ui .fl-login:hover, .festival-ui .fl-plans:hover { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 5px; }
}
@media (prefers-reduced-motion: no-preference) {
  /* JS measures the original text; only the temporary, decorative letters move. */
  .festival-ui .fl-hero--letters .fl-hero-copy > :is(.fl-eyebrow, .fl-wordmark, .fl-tagline, .fl-description) {
    opacity: 0;
  }
}
.festival-ui .fl-hero-flight, .festival-ui .fl-hero-flight-line { position: absolute; inset: 0; pointer-events: none; user-select: none; }
.festival-ui .fl-hero-flight { visibility: hidden; }
.festival-ui .fl-hero-glyph { position: absolute; top: 0; left: 0; white-space: pre; line-height: 1; text-align: left; }
@media (prefers-reduced-motion: reduce) {
  .festival-ui .fl-hero-flight { display: none; }
}
@media (max-width: 991px) {
  .festival-ui .fl-about { gap: 35px; padding-inline: 0; }
  .festival-ui .fl-steps { gap: 26px; }
  .festival-ui .fl-steps > li { padding: 18px; }
  .festival-ui .fl-steps > li:not(:last-child)::after { right: -27px; width: 24px; height: 24px; top: 146px; }
  .festival-ui .fl-step-visual { height: 166px; }
  .festival-ui .fl-steps h3 { font-size: 19px; }
  .festival-ui .fl-finale { gap: 20px; padding: 34px 30px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .festival-ui .fl-finale h2 { font-size: 30px; }
}
@media (max-width: 600px) {
  .festival-ui .fl-landing { --fl-top-space: 21px; padding-bottom: 45px; }
  .festival-ui .fl-eyebrow { font-size: 10px; letter-spacing: .08em; margin-bottom: 9px; }
  .festival-ui .fl-wordmark { font-size: clamp(48px, 15.4vw, 92px); letter-spacing: -.055em; text-shadow: none; }
  .festival-ui .fl-tagline { font-size: 26px; line-height: 1.65; margin-top: 21px; }
  .festival-ui .fl-description { font-size: 13px; max-width: 290px; padding-inline: 5px; }
  .festival-ui .fl-actions { gap: 14px; margin-top: 24px; flex-direction: column; }
  .festival-ui .fl-button { font-size: 14px; min-height: 54px; padding: 12px 22px; gap: 22px; max-width: 100%; }
  .festival-ui .fl-more { font-size: 12px; min-height: 38px; }
  .festival-ui .fl-login { margin-top: 0; font-size: 11px; min-height: 38px; }
  .festival-ui .fl-about { display: block; padding: 52px 8px 44px; }
  .festival-ui .fl-about h2 { font-size: 28px; margin-bottom: 20px; }
  .festival-ui .fl-about > p { font-size: 13px; line-height: 2.1; }
  .festival-ui .fl-how { padding: 47px 0 53px; }
  .festival-ui .fl-how > h2 { font-size: 25px; margin-bottom: 27px; }
  .festival-ui .fl-steps { grid-template-columns: 1fr; gap: 33px; }
  .festival-ui .fl-steps > li { padding: 21px 24px 24px; }
  .festival-ui .fl-steps > li:not(:last-child)::after { content: '↓'; top: auto; bottom: -33px; right: calc(50% - 13px); width: 26px; height: 26px; }
  .festival-ui .fl-step-visual { height: 156px; margin: 8px 0 15px; }
  .festival-ui .fl-step-art { max-height: 156px; }
  .festival-ui .fl-step-copy { padding-top: 17px; }
  .festival-ui .fl-steps h3 { font-size: 22px; margin-bottom: 10px; }
  .festival-ui .fl-steps p { font-size: 13px; margin: 0; }
  .festival-ui .fl-finale { grid-template-columns: minmax(0, 1fr); gap: 24px; border-radius: 27px; padding: 31px 23px 23px; text-align: center; }
  .festival-ui .fl-finale h2 { font-size: 28px; margin-bottom: 24px; }
  .festival-ui .fl-finale-actions { flex-direction: column; gap: 15px; }
  .festival-ui .fl-finale .fl-button { width: 100%; max-width: 300px; justify-content: space-between; font-size: 13px; padding-inline: 17px; gap: 12px; }
  .festival-ui .fl-finale-art { max-width: 190px; margin-top: -4px; }
  .festival-ui .fl-plans { font-size: 12px; }
}
@media (max-width: 360px) {
  .festival-ui .fl-tagline { font-size: 23px; }
  .festival-ui .fl-about { padding-inline: 3px; }
  .festival-ui .fl-finale h2 { font-size: 24px; }
}
@media (max-height: 700px) {
  .festival-ui .fl-hero-copy { padding-block: 12px; }
  .festival-ui .fl-hero .fl-actions { margin-top: 16px; }
}
@media (max-height: 700px) and (min-width: 601px) {
  .festival-ui .fl-wordmark { font-size: clamp(54px, 20svh, 140px); }
}
