.front-grid {
  --night: #18152d;
  --panel: #211937;
  --mint: #dcf78d;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.23fr);
  margin: clamp(1.2rem, 3vw, 2.3rem) 0 clamp(2.4rem, 5vw, 4.65rem);
  background: var(--night);
  color: #fcfaf8;
  border: 1px solid #2b2345;
  border-radius: 1.15rem;
  overflow: hidden;
  min-height: 29rem;
}

.front-intro {
  align-self: center;
  padding: clamp(1.55rem, 4.7vw, 4.25rem);
}

.front-intro h1 {
  font-size: clamp(2.55rem, 5.2vw, 5.05rem);
  line-height: .99;
  letter-spacing: -.065em;
  font-weight: 790;
  margin-bottom: .38em;
}

.front-intro em { color: var(--mint); font-style: normal; }
.front-intro .lede { color: #ded9ed; max-width: 37ch; }
.front-intro .actions { gap: .6rem; margin-top: 1.6rem; }
.front-intro .button {
  border-radius: .42rem;
  border-color: var(--mint);
  color: #1f2020;
  background: var(--mint);
}
.front-intro .button:hover { background: #f2ffcb; }
.front-intro .button:focus-visible { outline-color: #fcfaf8; }
.front-intro .button.secondary { background: transparent; color: #f6f3fa; border-color: #887da3; }
.front-intro .button.secondary:hover { background: #342a4e; }

.feature {
  --feature-highlight: #dafe9d;
  --feature-glow: #7856b8;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(14rem, 1fr) auto auto;
  align-content: center;
  background: #211a36;
  border-left: 1px solid #75608f;
}
.feature[data-project="1"] { --feature-highlight: #efd0ff; --feature-glow: #815dcb; }
.feature[data-project="2"] { --feature-highlight: #aaf3ed; --feature-glow: #3b8d9d; }
.feature[data-project="3"] { --feature-highlight: #d5ff9f; --feature-glow: #5d8558; }

.feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .64rem clamp(.85rem, 2.7vw, 1.7rem);
  border-bottom: 1px solid #655576;
}
.feature-top h2 { margin: 0; font-size: .94rem; letter-spacing: 0; }
.motion-button {
  padding: .32rem .5rem;
  margin: 0 -.35rem 0 0;
  color: #e8def5;
  background: transparent;
  border: 1px solid transparent;
  border-radius: .28rem;
  font-size: .82rem;
  line-height: 1.25;
}
.motion-button:hover { border-color: #a88bbe; color: white; }
.feature-stage {
  position: relative;
  height: 100%;
  min-height: clamp(14rem, 26vw, 20rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 48% 53%, color-mix(in srgb, var(--feature-glow) 68%, transparent), transparent 68%),
    linear-gradient(145deg, #312344, #150f24);
}
.feature-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #e2d5ff24 1px, transparent 1px),
    linear-gradient(#e2d5ff24 1px, transparent 1px);
  background-size: 1.5rem 1.5rem;
  background-position: center;
  mask-image: radial-gradient(ellipse, #000 28%, transparent 85%);
  pointer-events: none;
}
.feature-stage { display: grid; align-items: center; padding: clamp(.65rem, 2.7vw, 1.5rem); }
.feature-visual { position: relative; min-width: 0; }
.demo {
  width: min(100%, 28rem);
  margin-inline: auto;
  color: #fcfaf8;
  font-size: .84rem;
  line-height: 1.25;
}
.demo-window, .demo-phone {
  border: 1px solid #aa96c47a;
  border-radius: .75rem;
  background: #191329;
  box-shadow: 0 .8rem 2rem #120b23a3;
}
.demo-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  padding: .65rem .85rem;
  border-bottom: 1px solid #aa96c453;
}
.demo-window-bar span, .demo small, .phone-footer { color: #d6cce4; font-size: .72rem; }
.demo small { display: block; margin-top: .15rem; }
.rewind-track { list-style: none; margin: 0; padding: .55rem .85rem; }
.rewind-track li {
  position: relative;
  display: grid;
  grid-template-columns: .8rem minmax(0, 1fr) 1.4rem;
  gap: .65rem;
  align-items: center;
  padding: .46rem .35rem .46rem 0;
}
.step-dot {
  height: .5rem;
  width: .5rem;
  align-self: center;
  justify-self: center;
  border-radius: 50%;
  background: #b69de3;
  box-shadow: 0 0 0 .18rem #6e57845e;
}
.rewind-track li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(50% + .32rem);
  left: .37rem;
  height: calc(100% - .63rem);
  border-left: 1px solid #ae8dcc80;
}
.rewind-track b { color: #e2cef9; font-family: ui-monospace, monospace; }
.rewind-track li:last-child strong, .rewind-track li:last-child b { color: var(--feature-highlight); }
.rewind-track li:last-child .step-dot { background: var(--feature-highlight); }

.studio-flow, .workbench-flow {
  display: grid;
  align-items: center;
  padding: .9rem .72rem;
  gap: .35rem;
}
.studio-flow { grid-template-columns: repeat(2, minmax(0,1fr) auto) minmax(0,1fr); }
.demo-connector { color: var(--feature-highlight); }
.studio-node, .workbench-flow > div > div, .workbench-source {
  padding: .54rem .45rem;
  min-width: 0;
  border: 1px solid #a896c06e;
  border-radius: .38rem;
  background: #2c2242;
}
.studio-node:nth-child(3) { background: #473562; border-color: #ad92d3; }
.studio-node > span { display: block; margin-bottom: .35rem; font-size: .72rem; color: var(--feature-highlight); }
.studio-node strong { overflow-wrap: anywhere; }

.private-demo { width: min(100%, 16.7rem); }
.demo-phone { padding: .7rem; border: 1px solid #8abbbd; border-radius: 1.15rem; background: #141e2b; }
.phone-top { display: flex; justify-content: space-between; align-items: center; gap: .3rem; padding: .15rem .25rem .52rem; }
.phone-top span { color: #abffeb; font-size: .73rem; }
.phone-user, .phone-reply { width: fit-content; max-width: 90%; margin-bottom: .5rem; padding: .48rem .58rem; border-radius: .5rem; }
.phone-user { margin-left: auto; background: #22424b; }
.phone-reply { background: #293548; }
.phone-footer { padding: .34rem .25rem 0; border-top: 1px solid #91bfc250; }

.workbench-flow { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: .6rem; }
.workbench-exports { display: grid; gap: .35rem; }
.workbench-source { padding: .65rem .55rem; border-color: #9ab5968a; background: #26372f; }
.workbench-flow > div > div { border-color: #9ab5968a; background: #25342d; }
.workbench-flow > div > div:last-child { background: #23302e; }
.sample-grid {
  display: block;
  height: 1.9rem;
  margin: .35rem 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 5px, #c7e7b775 5px 6px),
    repeating-linear-gradient(90deg, #9ab59680 0 1px, transparent 1px 24%);
}

.feature-details {
  min-height: 5.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem 1rem;
  padding: .6rem clamp(.85rem, 2.7vw, 1.7rem);
  border-top: 1px solid #655576;
}
#feature-platform { margin: 0; color: var(--feature-highlight); font-size: .79rem; font-weight: 720; }
#feature-summary { margin: 0; color: #f0eaf7; font-size: .93rem; line-height: 1.35; }
#feature-link {
  min-height: 2.55rem;
  display: inline-flex;
  align-items: center;
  gap: .43em;
  color: #fcfaf8;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 710;
}
#feature-link span { color: var(--feature-highlight); }
#feature-link:hover { text-decoration: underline; }
.feature-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #655576;
}
.feature-picker button {
  min-height: 3.07rem;
  padding: .54rem .33rem;
  color: #f5eef8;
  background: #19142c;
  border: 0;
  font-size: .86rem;
  line-height: 1.2;
  font-weight: 650;
}
.feature-picker button + button { border-left: 1px solid #655576; }
.feature-picker button:hover { background: #392c4e; }
.feature-picker button[aria-pressed="true"] { color: #1f2020; background: var(--feature-highlight); }
.feature-picker button:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }

.featured-links { margin: 0; list-style: none; padding: 1.3rem; }
.featured-links li + li { border-top: 1px solid #655576; padding-top: .7rem; }
.featured-links a { color: var(--mint); }
.featured-links p { color: #f0eaf7; font-size: .9rem; }
.home-projects > header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  margin-bottom: 1.1rem;
}
.home-projects h2 { margin: 0; }
.home-projects .card { border-top: 2px solid #a08ac7; }
.home-projects .card:nth-child(3n+2) { border-top-color: #839f51; }
.home-projects .card:nth-child(3n+3) { border-top-color: #7a9fbc; }
.home-projects .cards { border-radius: .65rem; overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .feature-picker button, .motion-button, .front-intro .button { transition: background-color .18s, color .18s, border-color .18s; }
  .feature-visual:not([hidden]) .reveal { animation: demo-reveal .45s ease-out both; }
  .feature-visual:not([hidden]) .reveal:nth-child(2),
  .feature-visual:not([hidden]) .reveal:nth-child(3),
  .feature-visual:not([hidden]) .workbench-exports .reveal:first-child { animation-delay: .15s; }
  .feature-visual:not([hidden]) .rewind-track .reveal:last-child,
  .feature-visual:not([hidden]) .studio-flow .reveal:last-child,
  .feature-visual:not([hidden]) .workbench-exports .reveal:last-child { animation-delay: .30s; }
  @keyframes demo-reveal {
    from { opacity: .15; transform: translateY(.42rem); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 55rem) {
  .front-intro { padding: 1.5rem; }
}
@media (max-width: 43rem) {
  .front-grid { grid-template-columns: 1fr; }
  .front-intro { padding: 1.35rem 1.15rem 1.55rem; }
  .front-intro h1 { font-size: clamp(2.45rem, 9vw, 3.55rem); }
  .front-intro .lede { font-size: 1rem; }
  .feature { border-left: 0; border-top: 1px solid #75608f; }
  .feature-details { min-height: 5.5rem; }
}
@media (max-width: 28rem) {
  .feature-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-picker button:nth-child(3) { border-left: 0; }
  .feature-picker button:nth-child(n+3) { border-top: 1px solid #655576; }
  #feature-summary { font-size: .87rem; }
}
