/* The home page, on top of site.css. The live demo adopts this sheet into
   its shadow root, so the .demo rules apply there too. */

/* Full-bleed pieces, such as the hero glow, reach the viewport's
   edges without making the page scroll sideways. */
body { overflow-x: clip; }

.yellow { --accent: var(--yellow); }
.pink { --accent: var(--pink); }
.mint { --accent: var(--mint); }

.desktop-break { display: inline; }

.section-head { max-width: 760px; margin: 0 0 44px; }
.section-head h2,
.live-copy h2,
.generate-copy h2,
.closing h2 { font-family: Manrope, sans-serif; font-weight: 800; font-size: clamp(34px, 4.4vw, 50px); line-height: 1.1; letter-spacing: -1.8px; margin: 16px 0 0; }
.section-head p { color: var(--muted); font-size: 16px; line-height: 1.8; margin: 16px 0 0; }
.section-head p a { color: var(--yellow); text-decoration: underline; text-underline-offset: 4px; }
.live-copy h2 em,
.generate-copy h2 em,
.closing h2 em { color: var(--pink); font-style: normal; }

/* -- Hero --------------------------------------------------------------- */

.hero { padding: 56px 0 72px; text-align: center; position: relative; }
.hero > * { position: relative; }
.hero .hero-glow {
  position: absolute; top: -112px; bottom: -120px; left: 50%; width: 100vw; transform: translateX(-50%);
  pointer-events: none; z-index: -1;
  background:
    radial-gradient(38% 42% at 18% 30%, rgba(255, 207, 88, .16), transparent 70%),
    radial-gradient(34% 40% at 84% 38%, rgba(244, 180, 223, .15), transparent 70%),
    radial-gradient(40% 36% at 50% 100%, rgba(159, 226, 205, .12), transparent 70%);
}
.hero .hero-glow::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(247, 246, 240, .09) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(60% 55% at 50% 40%, #000 20%, transparent 75%);
}


.hero-brand { width: 320px; margin: 34px auto 10px; transform: rotate(-4deg); animation: bob 6s ease-in-out infinite; }
.hero-brand > img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
.handwritten { position: absolute; left: calc(100% + 14px); top: 82%; width: 168px; font-size: 14px; font-style: italic; transform: rotate(7deg); color: var(--muted); text-align: left; }
.handwritten::before { content: '↖'; position: absolute; left: -22px; top: 0; color: var(--yellow); font-size: 24px; font-style: normal; }

.hero h1 { font-family: Manrope, sans-serif; font-size: clamp(56px, 8vw, 104px); line-height: 1.02; letter-spacing: -.055em; margin: 18px 0 44px; font-weight: 800; }
.hero h1 > span { color: var(--yellow); position: relative; white-space: nowrap; }
.hero h1 > span::after {
  content: ''; position: absolute; left: 2%; right: 2%; bottom: -.12em; height: .2em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 Q 25 2 50 7 T 100 6 T 150 7 T 198 5' fill='none' stroke='%23f4b4df' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.hero-description { font-size: 18px; line-height: 1.75; color: var(--muted); margin: 0 auto; max-width: 620px; text-wrap: balance; }
.hero-description a { color: var(--pink); text-decoration: underline; text-underline-offset: 4px; }
.hero-command { max-width: 560px; margin: 36px auto 30px; border-color: var(--yellow); text-align: left; box-shadow: 0 0 0 5px rgba(255, 207, 88, .08), 0 20px 40px -20px rgba(255, 207, 88, .35); }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 0 0 26px; }
.hero-spark { position: absolute; font-variant-emoji: text; font-family: 'DM Sans', sans-serif; color: var(--yellow); line-height: 1; pointer-events: none; animation: twinkle 5s ease-in-out infinite; }
.spark-one { top: 240px; left: 7%; font-size: 64px; }
.spark-two { top: 380px; right: 8%; font-size: 42px; color: var(--pink); animation-delay: -1.6s; }
.spark-three { top: 110px; right: 18%; font-size: 26px; color: var(--mint); animation-delay: -3.2s; }

@keyframes bob { 50% { transform: rotate(-2.5deg) translateY(-8px); } }
@keyframes twinkle { 50% { transform: rotate(25deg) scale(.82); opacity: .7; } }

/* -- Code window -------------------------------------------------------- */

.showcase { padding: 8px 0 96px; }
.window { position: relative; max-width: 1100px; margin: 0 auto; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--bg-deep); overflow: hidden; box-shadow: 10px 12px 0 #16233d, 0 40px 90px -30px rgba(0, 0, 0, .7); }
.tab-input { position: absolute; opacity: 0; pointer-events: none; }
.window-bar { display: flex; align-items: center; gap: 22px; padding: 12px 16px; border-bottom: 1px solid #28354c; background: rgba(20, 34, 62, .6); }
.window-dots { display: flex; gap: 6px; flex-shrink: 0; }
.window-dots i { height: 10px; width: 10px; border-radius: 50%; background: #596880; }
.window-dots i:first-child { background: #ed9a9b; }
.window-dots i:nth-child(2) { background: #e9c46d; }
.window-dots i:last-child { background: #8dbda4; }
.window-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 8px 15px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .18s, color .18s; }
.tab:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
#tab-route:checked ~ .window-bar .tab-route,
#tab-live:checked ~ .window-bar .tab-live,
#tab-database:checked ~ .window-bar .tab-database,
#tab-test:checked ~ .window-bar .tab-test { background: var(--yellow); color: var(--bg); }
#tab-route:focus-visible ~ .window-bar .tab-route,
#tab-live:focus-visible ~ .window-bar .tab-live,
#tab-database:focus-visible ~ .window-bar .tab-database,
#tab-test:focus-visible ~ .window-bar .tab-test { outline: 3px solid var(--pink); outline-offset: 2px; }
.panel { display: none; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); min-height: 420px; }
#tab-route:checked ~ .panels .panel-route,
#tab-live:checked ~ .panels .panel-live,
#tab-database:checked ~ .panels .panel-database,
#tab-test:checked ~ .panels .panel-test { display: grid; animation: rise .35s ease-out; }
.panel-code { border-right: 1px solid #28354c; min-width: 0; }
.panel-file { display: block; padding: 14px 24px 0; font: 12px ui-monospace, monospace; color: var(--faint); }
.panel-code pre { padding: 14px 24px 28px; font-size: 14px; }
.panel-copy { padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(160deg, rgba(255, 207, 88, .05), transparent 55%); }
.panel-copy h2 { font-family: Manrope, sans-serif; font-size: 28px; letter-spacing: -.8px; line-height: 1.2; margin: 0 0 20px; }
.panel-copy ul { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.panel-copy li { display: flex; gap: 12px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.panel-copy li b { color: var(--mint); font-weight: 400; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* -- Marquee ------------------------------------------------------------ */



/* -- Live demo ---------------------------------------------------------- */

.live { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; padding: 130px 0 110px; }
.live-copy p { color: var(--muted); font-size: 16px; line-height: 1.85; margin: 20px 0 26px; max-width: 480px; }
.live-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; padding: 0; }
.live-steps li { display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 7px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; color: #d5dcea; }
.live-steps b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--mint); color: var(--bg); font-size: 12px; }
.live-stage { position: relative; padding: 38px 30px 30px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); box-shadow: -10px 12px 0 #16233d; }
.live-stage::before { content: ''; position: absolute; inset: -12px; border: 1.5px dashed rgba(255, 207, 88, .35); border-radius: 24px; pointer-events: none; }
.live-badge { position: absolute; top: -14px; left: 24px; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--mint); color: var(--mint); font-size: 12px; font-weight: 600; }
.live-fallback { color: var(--muted); margin: 0; }

/* Inside the live component's shadow root. */
.demo { display: flex; flex-direction: column; gap: 18px; color: var(--text); font-family: 'DM Sans', sans-serif; }
.demo-screen { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 170px; padding: 26px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-deep); text-align: center; }
.demo-greeting { margin: 0; font-family: Manrope, sans-serif; font-weight: 800; font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -1px; line-height: 1.15; color: var(--yellow); overflow-wrap: anywhere; }
.demo-hands { display: block; min-height: 1.3em; font-size: 22px; letter-spacing: 2px; margin-top: 6px; }
.demo-waves { margin: 0; color: var(--muted); font-size: 13px; }
.demo-field { display: flex; flex-direction: column; gap: 8px; }
.demo-field span { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.demo-field input { width: 100%; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--bg-deep); color: var(--text); font: 16px 'DM Sans', sans-serif; }
.demo-field input::placeholder { color: var(--faint); }
.demo-field input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 207, 88, .15); }
.demo-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-choices button { padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; transition: all .15s; }
.demo-choices button:hover { color: var(--text); border-color: var(--pink); }
.demo-choices button[aria-pressed="true"] { background: var(--pink); border-color: var(--pink); color: var(--bg); font-weight: 700; }
.demo-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.demo-wave { padding: 11px 18px; border: 0; border-radius: 8px; background: var(--yellow); color: var(--bg); font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 3px 0 var(--yellow-deep); transition: transform .15s; }
.demo-wave:hover { transform: translateY(-2px); }
.demo-wave:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--yellow-deep); }
.demo-count { display: inline-flex; align-items: center; gap: 6px; font: 12px ui-monospace, monospace; color: var(--muted); }

/* -- Features ----------------------------------------------------------- */

.features { padding: 40px 0 110px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: transform .2s, border-color .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 6px 8px 0 color-mix(in srgb, var(--accent) 22%, transparent); }
.feature-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.feature-icon { width: 42px; height: 42px; border: 1px solid var(--accent); border-radius: 11px; display: grid; place-items: center; font-size: 22px; color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.feature-number { font: 11px ui-monospace, monospace; letter-spacing: .09em; color: #9eacc3; text-transform: uppercase; }
.feature h3 { font-family: Manrope, sans-serif; font-size: 21px; letter-spacing: -.6px; margin: 0 0 12px; }
.feature p { font-size: 14px; color: var(--muted); line-height: 1.8; margin: 0 0 24px; flex: 1; }
.feature-chip { align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px ui-monospace, monospace; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-deep); color: var(--accent); }

/* -- Generators --------------------------------------------------------- */

.generate { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 72px; align-items: center; padding: 30px 0 120px; }
.terminal { border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--bg-deep); transform: rotate(-1deg); box-shadow: 10px 12px 0 #16233d; }
.terminal-bar { padding: 13px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #28354c; color: #a7b5cc; font: 11px ui-monospace, monospace; }
.terminal pre { padding: 22px 24px 26px; font-size: 13px; line-height: 1.8; }
.generate-copy p { color: var(--muted); font-size: 16px; line-height: 1.85; margin: 20px 0; }
.generate-list { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 15px; }
.generate-list code { font: 13px ui-monospace, monospace; color: var(--yellow); padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-deep); }

/* -- Explore ------------------------------------------------------------ */

.explore { padding: 20px 0 110px; }
.explore-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.explore-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 14px; overflow: hidden; background: var(--surface); transition: transform .2s, box-shadow .2s; }
.explore-card:hover { transform: translateY(-5px); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--accent) 45%, transparent); }
.explore-card:hover h3 { color: var(--accent); }
.explore-art { height: 170px; display: grid; place-items: center; background: var(--bg-deep); border-bottom: 1px solid var(--line); overflow: hidden; }
.explore-count { margin: 22px 26px 0; font: 11px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.explore-card h3 { font-family: Manrope, sans-serif; font-size: 24px; letter-spacing: -.7px; margin: 8px 26px 10px; transition: color .2s; }
.explore-card p { margin: 0 26px 28px; color: var(--muted); font-size: 14px; line-height: 1.75; }

.art-docs { display: flex; gap: 14px; width: 220px; }
.art-docs-nav { display: flex; flex-direction: column; gap: 9px; width: 56px; padding-top: 4px; }
.art-docs-nav i { height: 6px; border-radius: 3px; background: var(--line-strong); }
.art-docs-nav i:nth-child(2) { background: var(--yellow); width: 80%; }
.art-docs-page { flex: 1; display: flex; flex-direction: column; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.art-docs-page b { height: 10px; width: 70%; border-radius: 3px; background: var(--text); }
.art-docs-page i { height: 5px; border-radius: 3px; background: var(--line-strong); }
.art-docs-page i:nth-child(3) { width: 85%; }
.art-docs-page span { height: 26px; border-radius: 5px; background: #0b162b; border: 1px solid var(--line); background-image: linear-gradient(90deg, var(--pink) 18%, transparent 18% 24%, var(--mint) 24% 50%, transparent 50%); background-size: 80% 4px; background-repeat: no-repeat; background-position: 10px center; }

.art-components { display: grid; grid-template-columns: repeat(3, auto); gap: 14px 16px; align-items: center; justify-items: center; }
.art-button { padding: 7px 14px; border-radius: 7px; background: var(--pink); color: var(--bg); font-size: 12px; font-weight: 700; }
.art-switch { width: 38px; height: 22px; border-radius: 999px; background: var(--mint); position: relative; }
.art-switch i { position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); }
.art-badge { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--yellow); color: var(--yellow); font-size: 11px; font-weight: 700; }
.art-input { width: 74px; height: 26px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); }
.art-check { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--yellow); color: var(--bg); font-size: 13px; font-weight: 800; }
.art-slider { width: 74px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--pink) 60%, var(--line-strong) 60%); position: relative; }
.art-slider i { position: absolute; left: 60%; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--text); transform: translate(-50%, -50%); }

.art-theme { display: flex; }
.art-theme i { width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--bg-deep); margin-left: -14px; transition: transform .25s; }
.art-theme i:first-child { margin-left: 0; }
.explore-card:hover .art-theme i:nth-child(odd) { transform: translateY(-8px); }
.explore-card:hover .art-theme i:nth-child(even) { transform: translateY(8px); }

/* -- Getting started ---------------------------------------------------- */

.start { padding: 20px 0 110px; }
.start .section-head { margin-inline: auto; text-align: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 26px 22px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.step-number { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); color: var(--bg); font-family: Manrope, sans-serif; font-weight: 800; }
.step h3 { font-family: Manrope, sans-serif; font-size: 19px; letter-spacing: -.4px; margin: 16px 0 16px; }
.step-command { padding: 8px 8px 8px 14px; }
.step-command code { font-size: 12px; }

/* -- Closing ------------------------------------------------------------ */

.closing { position: relative; margin: 0 0 80px; padding: 90px 32px; text-align: center; border: 1px solid var(--line-strong); border-radius: 24px; overflow: hidden; background:
  radial-gradient(50% 80% at 50% 0%, rgba(255, 207, 88, .16), transparent 70%),
  radial-gradient(40% 60% at 100% 100%, rgba(244, 180, 223, .14), transparent 70%),
  radial-gradient(40% 60% at 0% 100%, rgba(159, 226, 205, .12), transparent 70%),
  var(--surface); }
.closing h2 { font-size: clamp(38px, 5.6vw, 64px); margin: 0 0 18px; }
.closing p { color: var(--muted); font-size: 16px; margin: 0 0 32px; }
.closing .hero-actions { margin: 0; }

/* -- 404 ---------------------------------------------------------------- */

.lost { text-align: center; padding: 90px 0 120px; }
.lost-code { display: block; font-family: Manrope, sans-serif; font-weight: 800; font-size: clamp(110px, 20vw, 200px); line-height: 1; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 2px var(--yellow); }
.lost h1 { font-family: Manrope, sans-serif; font-size: 40px; letter-spacing: -1.4px; margin: 10px 0 14px; }
.lost p { color: var(--muted); font-size: 16px; line-height: 1.8; margin: 0 auto 32px; max-width: 480px; }

/* -- Smaller screens ---------------------------------------------------- */

@media (max-width: 1080px) {
  .panel { grid-template-columns: 1fr; }
  .panel-code { border-right: 0; border-bottom: 1px solid #28354c; }
  .panel-copy { padding: 28px 24px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .handwritten { display: none; }
  .spark-one { left: 1%; }
  .spark-two { right: 1%; }
  .live, .generate { grid-template-columns: 1fr; gap: 48px; }
  .live { padding: 100px 0 80px; }
  .generate-copy { order: -1; }
  .explore-grid, .steps { grid-template-columns: 1fr; }
  .explore-grid { max-width: 520px; }
}

@media (max-width: 640px) {
  .desktop-break { display: none; }
  .hero { padding: 36px 0 56px; }
  .hero-brand { width: 230px; margin-top: 28px; }
  .hero h1 { font-size: 50px; letter-spacing: -2.5px; }
  .hero-description { font-size: 15px; }
  .hero-command code { font-size: 11px; }
  .spark-one { top: 170px; font-size: 30px; }
  .spark-two { top: 250px; font-size: 24px; }
  .spark-three { display: none; }
  .showcase { padding-bottom: 72px; }
  .window { box-shadow: 5px 6px 0 #16233d; }
  .window-bar { gap: 12px; padding: 10px; }
  .window-dots { display: none; }
  .tab { padding: 7px 11px; font-size: 12px; }
  .panel { min-height: 0; }
  .panel-code pre, .terminal pre { font-size: 11.5px; padding-left: 16px; padding-right: 16px; }
  .panel-file { padding-left: 16px; }
  .live { gap: 44px; }
  .live-stage { padding: 34px 18px 20px; box-shadow: -5px 6px 0 #16233d; }
  .live-stage::before { inset: -7px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature { padding: 22px; }
  .terminal { transform: none; box-shadow: 5px 6px 0 #16233d; }
  .closing { padding: 60px 18px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-brand, .hero-spark, .panel { animation: none !important; }
  .feature, .explore-card, .art-theme i { transition: none; }
}
