/* aycode.app feature pages: one calm column of type, one picture, hairlines instead of cards.
   Motion is scroll-driven CSS only (animation-timeline), so the pages need no script and stay still where it is
   not supported or reduce motion is on. */

.feat-nav { display: flex; gap: 4px; margin-left: 6px; }
.feat-nav a { padding: 7px 10px; border-radius: 9px; color: var(--muted); font-size: 0.9rem; text-decoration: none; transition: color 0.2s ease, background 0.2s ease; }
.feat-nav a:hover { color: var(--ink); background: var(--panel); }
.feat .docs-top .top__tools { margin-left: auto; }

.feat-main { max-width: 1120px; margin-inline: auto; padding: 36px clamp(20px, 4.5vw, 56px) 40px; }

.feat-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--faint); font-size: 0.86rem; }
.feat-crumbs a { color: var(--muted); text-decoration: none; }
.feat-crumbs a:hover { color: var(--ink); }
.feat-crumbs [aria-current] { color: var(--ink-2); }

/* hero: the page's one big statement */
.feat-hero { max-width: 860px; margin-top: 44px; }
.feat-hero__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--accent-ink); font: 600 0.8rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.feat-hero__os { padding: 5px 9px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); letter-spacing: 0.02em; text-transform: none; font-weight: 500; }
.feat-hero h1 { margin-top: 18px; font: 760 clamp(2.4rem, 1.4rem + 3.6vw, 4.1rem)/1.02 var(--font-display); letter-spacing: -0.04em; text-wrap: balance; color: var(--ink); }
.feat-hero__lead { margin-top: 22px; max-width: 700px; color: var(--muted); font-size: clamp(1.06rem, 1rem + 0.3vw, 1.22rem); line-height: 1.65; text-wrap: pretty; }
.feat-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.feat-hero kbd, .feat-points kbd { font-size: 0.82em; }

/* the picture: a screenshot in a window frame, or a drawing */
.feat-picture { position: relative; margin-top: 56px; }
.feat-picture::before { content: ""; position: absolute; inset: 12% 8% -4%; z-index: -1; border-radius: 40px; background: radial-gradient(60% 60% at 50% 40%, var(--accent-glow), transparent 70%); filter: blur(30px); opacity: 0.55; }
.feat-shot { margin: 0; }
.feat-shot__frame { overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--line-2); background: var(--panel); box-shadow: 0 40px 90px -40px rgb(0 0 0 / 0.55); }
.feat-shot img { display: block; width: 100%; height: auto; }

/* key points: four short lines on hairlines, numbered like the reel on the start page */
.feat-points { margin-top: 64px; border-top: 1px solid var(--line); }
.feat-points ul { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; counter-reset: point; }
.feat-points li { counter-increment: point; padding: 22px 22px 6px 0; color: var(--ink-2); font-size: 0.98rem; line-height: 1.5; }
.feat-points li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.feat-points li::before { content: counter(point, decimal-leading-zero); display: block; margin-bottom: 10px; color: var(--faint); font: 500 0.78rem/1 var(--font-mono); }

/* body: the docs typography in one column */
.feat-body { margin-top: 24px; }
.feat-body.doc { max-width: 760px; margin-inline: 0; }
.feat-section h2, .feat-faq h2 { margin-top: 64px; }
.feat-faq details { border-bottom: 1px solid var(--line); }
.feat-faq details:first-of-type { margin-top: 18px; border-top: 1px solid var(--line); }
.feat-faq summary { position: relative; padding: 18px 40px 18px 0; color: var(--ink); font-weight: 600; font-size: 1.04rem; line-height: 1.45; cursor: pointer; list-style: none; }
.feat-faq summary::-webkit-details-marker { display: none; }
.feat-faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform 0.25s var(--ease); }
.feat-faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.feat-faq details p { margin: 0 0 20px; }
.feat-faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

/* neighbours */
.feat-related { margin-top: 88px; }
.feat-related h2 { color: var(--muted); font: 600 0.8rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.feat-related ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 18px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.feat-related li + li { border-left: 1px solid var(--line); }
.feat-related a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 22px 22px 22px 0; color: inherit; text-decoration: none; }
.feat-related li + li a { padding-left: 22px; }
.feat-related b { color: var(--ink); font: 650 1.05rem/1.3 var(--font-display); transition: color 0.2s ease; }
.feat-related span { color: var(--muted); font-size: 0.94rem; line-height: 1.5; }
.feat-related a:hover b { color: var(--accent-ink); }

/* overview: a numbered index, one row per feature */
.feat-index { margin: 56px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.feat-index li { border-bottom: 1px solid var(--line); }
.feat-index a { display: grid; grid-template-columns: 56px 1fr auto 28px; align-items: center; gap: 18px; padding: 24px 4px; color: inherit; text-decoration: none; transition: background 0.25s ease, padding 0.35s var(--ease); }
.feat-index__num { color: var(--faint); font: 500 0.82rem/1 var(--font-mono); }
.feat-index__text { display: flex; flex-direction: column; gap: 6px; }
.feat-index__text b { font: 700 clamp(1.25rem, 1rem + 1vw, 1.7rem)/1.15 var(--font-display); letter-spacing: -0.02em; color: var(--ink); }
.feat-index__text span { color: var(--muted); }
.feat-index__os { color: var(--faint); font: 500 0.78rem/1.3 var(--font-mono); text-align: right; }
.feat-index__go { color: var(--faint); font-size: 1.2rem; transition: transform 0.35s var(--ease), color 0.2s ease; }
.feat-index a:hover { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); padding-left: 14px; }
.feat-index a:hover .feat-index__go { color: var(--accent-ink); transform: translateX(4px); }

/* closing call */
.feat-end { margin-top: 110px; padding: 56px 0 24px; border-top: 1px solid var(--line); text-align: center; }
.feat-end h2 { font: 750 clamp(1.8rem, 1.3rem + 2vw, 2.7rem)/1.1 var(--font-display); letter-spacing: -0.035em; }
.feat-end p { margin-top: 12px; color: var(--muted); }
.feat-end__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

/* drawings */
.fart { display: grid; place-items: center; padding: clamp(28px, 6vw, 72px) 16px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 10%, var(--panel)), var(--bg) 70%); overflow: hidden; }
.fart .mark img { width: 20px; height: 20px; }

.fq { width: min(640px, 100%); border-radius: 22px; border: 1px solid rgb(255 255 255 / 0.16); background: color-mix(in srgb, var(--panel) 62%, transparent); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); box-shadow: 0 1px 0 rgb(255 255 255 / 0.12) inset, 0 40px 80px -30px rgb(0 0 0 / 0.6); }
.fq__field { position: relative; display: flex; align-items: center; gap: 14px; padding: 20px 20px 18px; border-bottom: 1px solid var(--line); }
.fq__field::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-bar), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: fq-run 3.2s var(--ease) infinite; }
.fq__text { flex: 1; color: var(--muted); font-size: clamp(1rem, 0.9rem + 0.6vw, 1.3rem); }
.fq__send { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--panel-2); color: var(--muted); }
.fq__answer { padding: 18px 20px; }
.fq__answer b { color: var(--ink); }
.fq__answer p { margin-top: 6px; color: var(--ink-2); line-height: 1.6; }
.fq__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 0.86rem; }
.fq__chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 9px; background: var(--panel-2); color: var(--ink-2); }
.fq__keys { display: flex; gap: 10px; margin-left: auto; color: var(--muted); }
.fq__go { padding: 5px 10px; border-radius: 10px; background: var(--accent); color: #fff; }
.fq__go kbd { background: rgb(255 255 255 / 0.18); color: #fff; border-color: transparent; }
@keyframes fq-run { from { background-position: -40% 0; } to { background-position: 140% 0; } }

.fi { width: min(480px, 100%); padding: 18px 16px 16px; border-radius: 0 0 34px 34px; background: #000; color: #f4f1fb; box-shadow: 0 30px 70px -30px rgb(0 0 0 / 0.7); }
.fi__head { padding: 0 6px 12px; font-weight: 650; font-size: 0.95rem; }
.fi__list { margin: 0; padding: 0; list-style: none; }
.fi__list li { display: grid; grid-template-columns: 14px 1fr 18px; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; }
.fi__list li.is-wait { background: rgb(255 255 255 / 0.07); }
.fi__list span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fi__list b { font-size: 0.94rem; }
.fi__list small { color: #a6a3b0; font-size: 0.8rem; }
.fi__dot { width: 10px; height: 10px; border-radius: 50%; }
.fi__dot--run { border: 2px solid #8b5cf6; border-right-color: transparent; animation: fi-spin 1.1s linear infinite; }
.fi__dot--wait { background: #d9a441; }
.fi__limits { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; padding: 12px 8px 0; border-top: 1px solid rgb(255 255 255 / 0.1); }
.fi__limits span { display: flex; flex-direction: column; gap: 6px; }
.fi__limits small { color: #a6a3b0; font: 500 0.74rem/1 var(--font-mono); }
.fi__bar { height: 4px; border-radius: 4px; background: rgb(255 255 255 / 0.12); position: relative; overflow: hidden; }
.fi__bar::after { content: ""; position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: #a78bfa; }
.fi__bar--a::after { width: 64%; }
.fi__bar--b::after { width: 31%; }
@keyframes fi-spin { to { transform: rotate(360deg); } }

.ft { width: min(560px, 100%); display: grid; gap: 14px; }
.ft__people { display: flex; }
.ft__who { display: grid; place-items: center; width: 36px; height: 36px; margin-right: -8px; border-radius: 50%; border: 2px solid var(--bg); color: #fff; font-weight: 700; font-size: 0.86rem; }
.ft__who--a { background: #8b5cf6; } .ft__who--b { background: #0ea5a4; } .ft__who--c { background: #d97706; }
.ft__roles { display: flex; gap: 6px; margin: 0; padding: 4px; list-style: none; width: fit-content; border-radius: 12px; background: var(--panel-2); font-size: 0.86rem; }
.ft__roles li { padding: 6px 12px; border-radius: 9px; color: var(--muted); }
.ft__roles li.is-on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); }
.ft__code { position: relative; display: grid; gap: 10px; padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.ft__code .hl { background: var(--accent-soft); outline: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.ft__cur { position: absolute; right: 22%; top: 34%; padding: 2px 7px; border-radius: 6px 6px 6px 0; background: #8b5cf6; color: #fff; font: 600 0.72rem/1.3 var(--font-mono); }
.ft__msg { justify-self: end; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--panel-2); color: var(--ink-2); font-size: 0.92rem; }
.ft__msg b { margin-right: 8px; color: var(--ink); }

.fart--phone { grid-template-columns: auto auto; gap: clamp(20px, 5vw, 56px); align-items: end; justify-content: center; }
.fp { position: relative; width: 230px; height: 400px; padding: 52px 14px 14px; border-radius: 42px; border: 1px solid var(--line-2); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, #121216), #0d0d10 70%); box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.7); }
.fp__island { position: absolute; top: 14px; left: 50%; width: 82px; height: 24px; border-radius: 99px; background: #000; transform: translateX(-50%); }
.fp__note { display: flex; gap: 10px; padding: 12px; border-radius: 18px; background: rgb(255 255 255 / 0.12); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; }
.fp__note img { border-radius: 6px; }
.fp__note span { display: flex; flex-direction: column; gap: 3px; }
.fp__note b { font-size: 0.86rem; }
.fp__note small { color: rgb(255 255 255 / 0.7); font-size: 0.76rem; }
.fp__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.fp__btns span { padding: 10px; border-radius: 14px; background: rgb(255 255 255 / 0.1); color: #fff; font-size: 0.82rem; font-weight: 600; text-align: center; }
.fp__btns .is-yes { background: #8b5cf6; }
.fw { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 120px; height: 142px; border-radius: 34px; border: 6px solid #26262a; background: #000; color: #fff; box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.7); }
.fw__time { color: #a6a3b0; font: 500 0.72rem/1 var(--font-mono); }
.fw b { font: 750 2.4rem/1 var(--font-display); color: #d9a441; }
.fw small { color: #a6a3b0; font-size: 0.74rem; }

.fm { width: min(520px, 100%); margin: 0; padding: 44px 24px 24px; position: relative; border-radius: 16px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); font: 500 clamp(0.82rem, 0.75rem + 0.3vw, 0.98rem)/1.7 var(--font-mono); white-space: pre; overflow-x: auto; box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.55); }
.fm__file { position: absolute; top: 12px; left: 18px; color: var(--faint); font-size: 0.78rem; }
.fm i { font-style: normal; color: var(--accent-ink); }
.fm s { text-decoration: none; color: color-mix(in srgb, #34d399 70%, var(--ink)); }

/* motion: things settle in as they scroll into view, nothing else moves on its own */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .feat-picture > *, .feat-points li, .feat-section, .feat-faq, .feat-related li, .feat-index li {
      animation: feat-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
    .feat-picture > * { animation-name: feat-rise; animation-range: entry 0% cover 35%; }
  }
}
@keyframes feat-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes feat-rise { from { opacity: 0.2; transform: perspective(1400px) rotateX(14deg) translateY(40px) scale(0.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .fq__field::after, .fi__dot--run { animation: none; }
}

@media (max-width: 900px) {
  .feat-nav { display: none; }
  .feat-points ul { grid-template-columns: 1fr 1fr; }
  .feat-points li:nth-child(3) { padding-left: 0; border-left: 0; }
  .feat-points li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .feat-related ul { grid-template-columns: 1fr; }
  .feat-related li + li { border-left: 0; border-top: 1px solid var(--line); }
  .feat-related li + li a { padding-left: 0; }
  .feat-index a { grid-template-columns: 40px 1fr 20px; }
  .feat-index__os { display: none; }
}
@media (max-width: 560px) {
  .feat-points ul { grid-template-columns: 1fr; }
  .feat-points li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .fart--phone { grid-template-columns: 1fr; justify-items: center; }
  .fw { display: none; }
  .fq__keys { margin-left: 0; }
}
