:root {
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
}

@media (min-width: 768px) {
  .footer-inner > div:first-child { grid-column: 1 / span 3; }
  .footer-inner ul { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 24px; }
  .footer-inner ul > li { margin: 0; }
}
@media (min-width: 360px) and (max-width: 767px) {
  .footer-inner > div:last-child { grid-row: 1; justify-content: flex-end; }
}

.site-header {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  min-height: 62px;
  padding: 8px 0;
  isolation: isolate;
  border: 1px solid transparent;
  border-bottom-color: #ffffff15;
  transition: background-color 260ms, border-color 260ms, border-radius 320ms, padding 320ms var(--motion-ease), box-shadow 260ms;
}
.site-header.is-docked {
  padding: 8px 0;
  border-radius: 17px;
  border-color: #ffffff24;
  background: #101010ea;
  backdrop-filter: blur(16px);
  box-shadow: 0 6px 28px #0005;
}
.site-header::after {
  content: '';
  position: absolute;
  inset: auto 16px -1px;
  height: 2px;
  pointer-events: none;
  border-radius: 2px;
  background: linear-gradient(90deg, #be4623, #ff915e);
  transform: scaleX(var(--read-progress, 0));
  transform-origin: left;
}
.section-flight {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
@media (max-width: 650px) {
  .site-header { min-height: 50px; padding-block: 4px; }
  .site-header.is-docked { padding: 4px 0; border-radius: 14px; }
}
@media (prefers-reduced-motion: no-preference) {
  .site-header { animation: header-arrival 600ms var(--motion-ease) backwards; }
  .brand-star { transition: transform 480ms var(--motion-ease); }
  .is-docked .brand-star { transform: rotate(90deg); }
  @keyframes header-arrival { from { opacity: 0; translate: 0 -12px; } }
  .hero .idea-visual { translate: 0 calc(var(--leave, 0) * 22px); }
  .how .video-stage { translate: 0 calc(var(--enter, 0) * 26px); }
  .how .steps { translate: 0 calc(var(--enter, 0) * 46px); }
  .community .reviews-viewport { translate: 0 calc(var(--enter, 0) * 34px); }
  .faq .faq-list { translate: 0 calc(var(--enter, 0) * 24px); }
  .final-cta .final-mark { translate: 0 calc(var(--enter, 0) * -24px); }
  @media (min-width: 820px) {
    .how .video-stage { translate: 0 calc(var(--enter, 0) * 18px); }
    .how .steps { translate: 0 calc(var(--enter, 0) * 36px); }
    .features .feature-card:nth-child(odd) { translate: 0 calc(var(--enter, 0) * 30px); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .section-flight { display: none; }
}

.hero #starfield {
  mask-image:
    linear-gradient(90deg, transparent, #0007 12%, #000 49%, #000 95%, transparent),
    linear-gradient(180deg, transparent, #000 15%, #000 76%, transparent 99%);
  mask-composite: intersect;
}

.idea-visual {
  isolation: isolate;
  background: linear-gradient(155deg, #242220, #1a1918 72%);
}

.hero.container { padding-block: clamp(112px, 16vh, 170px) clamp(66px, 9vh, 108px); }
.hero .hero-content { position: relative; isolation: isolate; text-align: left; }
.hero h1 {
  font-size: clamp(48px, 5.3vw, 82px);
  font-weight: 600;
  line-height: .99;
  letter-spacing: -.047em;
}
.hero h1 span { display: block; width: fit-content; }
.hero h1 span:last-child {
  color: #ffc398;
  background: linear-gradient(100deg, #ffe1c4 5%, #ffb477 56%, #ff8959);
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .hero-description {
  max-width: 410px;
  margin: 21px 0 22px;
  color: #d6cec9;
  font-size: clamp(16px, 1.44vw, 20px);
  line-height: 1.4;
  text-wrap: pretty;
}

.hero .idea-form {
  display: grid;
  gap: 9px;
  height: auto;
  min-height: 152px;
  width: min(620px, 100%);
  margin: 30px 0 0;
  padding: 17px 20px;
  background: linear-gradient(117deg, #211e1cf2, #121111f5 85%);
  border-color: #ceb69f38;
  box-shadow: inset 0 1px #ffe3c50d, 0 16px 54px #0007;
  transition: border-color .25s, box-shadow .25s;
  user-select: auto;
}
.hero .idea-form:focus-within { border-color: #e5a47799; box-shadow: 0 0 0 3px #ffb7820d; }
.idea-form label { font-size: 14px; color: #e8e4e0; font-weight: 500; }
.idea-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 4px 0;
  color: #fff;
  background: transparent;
  border: 0;
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}
.idea-form textarea::placeholder { color: #ada7a3; }
.idea-form textarea:focus-visible { outline: 1px solid #ffa278; outline-offset: 3px; border-radius: 4px; }
.idea-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #ffffff13; padding-top: 12px; }
.idea-actions p, .idea-manual { margin: 0; color: #c2bab5; font-size: 14px; line-height: 1.35; }
.idea-submit {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 0;
  border-radius: 18px;
  background: var(--accent);
  color: #1b100b;
  font-weight: 600;
}
.idea-submit:disabled { opacity: .65; cursor: wait; }
.idea-manual:has(a[hidden]) { display: none; }
.idea-manual a { color: #ffb18d; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) {
  .hero.container { padding-block: 106px 55px; min-height: min(740px, 100svh); }
  .hero h1 { font-size: clamp(34px, 9.6vw, 49px); }
  .hero .hero-description { max-width: 31ch; margin-block: 16px 19px; }
  .hero .idea-form { margin-top: 23px; padding: 14px 16px; }
  .idea-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .idea-submit { min-height: 44px; }
}

.idea-visual::before,
.idea-visual::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.idea-visual::before {
  inset: -1px;
  z-index: 1;
  border: 1px solid transparent;
  background: linear-gradient(108deg, transparent 33%, #ff653625 44%, #ffb17cbf 50%, transparent 63%) border-box;
  background-size: 300% 100%;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
}

.idea-visual::after {
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 91% 105%, #ff66372a, transparent 65%);
  opacity: 0;
}

.idea-example {
  color: #fff2e8;
  line-height: 1.5;
}

.is-typing .idea-example::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-inline-start: 3px;
  vertical-align: -.13em;
  background: var(--accent);
  animation: idea-caret 720ms step-end infinite;
}

.video-progress {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6637, #ffb17c);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
  transition: transform 230ms linear;
  pointer-events: none;
}

.final-mark {
  position: relative;
  flex: none;
  margin-bottom: 32px;
}

.final-mark .final-star {
  display: block;
  margin: 0;
}

.final-mark::before,
.final-mark::after {
  content: '';
  position: absolute;
  inset: -18px;
  border: 1px solid #ff986455;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-content > h1,
  .hero-description,
  .hero-content > .cta,
  .idea-visual {
    animation: rise-in 740ms var(--motion-ease) backwards;
  }

  .hero-description { animation-delay: 90ms; }
  .hero-content > .cta { animation-delay: 170ms; }
  .idea-visual { animation-delay: 250ms; }

  .idea-visual::before {
    animation: edge-light 1650ms 500ms ease-out both;
  }

  .idea-written::after {
    animation: panel-light 1050ms var(--motion-ease);
  }

  .idea-written .idea-send {
    animation: send-pop 650ms var(--motion-ease);
  }

  .feature-card.revealed,
  .motion-label.revealed,
  .wipe-title.revealed {
    animation: rise-in 680ms var(--motion-ease) var(--reveal-delay, 0ms) backwards;
  }

  .feature-card:focus-within {
    animation: none;
  }

  .final-cta.in-view .final-mark {
    animation: mark-arrival 950ms var(--motion-ease) both;
  }

  .final-cta.in-view .final-mark::before {
    animation: launch-ring 1550ms 180ms var(--motion-ease) both;
  }

  .final-cta.in-view .final-mark::after {
    animation: launch-ring 1550ms 340ms var(--motion-ease) both;
  }

  .final-cta.in-view h2,
  .final-cta.in-view p,
  .final-cta.in-view .cta {
    animation: rise-in 680ms var(--motion-ease) backwards;
  }

  .final-cta.in-view h2 { animation-delay: 110ms; }
  .final-cta.in-view p { animation-delay: 185ms; }
  .final-cta.in-view .cta { animation-delay: 250ms; }
  .hero-content > .cta:focus-visible,
  .final-cta.in-view .cta:focus-visible { animation: none; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .feature-card::after {
    content: '';
    position: absolute;
    z-index: 9;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(260px circle at var(--light-x, 50%) var(--light-y, 50%), #ffc09916, transparent 82%);
    box-shadow: inset 0 0 0 1px #ffc09924;
    opacity: 0;
    transition: opacity 280ms ease;
  }

  .feature-card:hover::after { opacity: 1; }

  .cta {
    transition: background 220ms ease, transform 220ms var(--motion-ease), box-shadow 320ms ease;
  }

  .cta:hover {
    box-shadow: 0 5px 28px #ff663743;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-progress { display: none; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(17px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes edge-light {
  0% { opacity: 0; background-position: 100% 0; }
  15%, 70% { opacity: 1; }
  100% { opacity: 0; background-position: 0 0; }
}

@keyframes idea-caret {
  50% { opacity: 0; }
}

@keyframes panel-light {
  30% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes send-pop {
  35% { transform: scale(1.14); box-shadow: 0 0 20px #ff66376e; }
}

@keyframes mark-arrival {
  from { opacity: .3; transform: translateY(18px) scale(.85) rotate(-12deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes launch-ring {
  0% { opacity: 0; transform: scale(.78); }
  24% { opacity: .9; }
  100% { opacity: 0; transform: scale(2.35); }
}
