/* shadeloom.ai */
@property --lx { syntax: '<percentage>'; inherits: false; initial-value: 32%; }
@property --ly { syntax: '<percentage>'; inherits: false; initial-value: 30%; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #07070a;
  --bg-2: #0c0c11;
  --surface: #101016;
  --line: rgba(255,255,255,0.07);
  --line-2: rgba(255,255,255,0.13);
  --ink: #f3f2f8;
  --ink-2: #a7a6b4;
  --ink-3: #6c6b7a;
  --violet: #9c8eff;
  --violet-deep: #6b57ff;
  --ember: #ff8a62;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --serif: 'Instrument Serif', ui-serif, Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1160px;
  color-scheme: dark;
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 14px; }
.skip:focus { top: 12px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px;
  font: 500 15px/1 var(--sans); white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-light { background: var(--ink); color: #0b0b10; }
.btn-light:hover { background: #fff; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.03); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(7,7,10,0.72); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 19px/1 var(--sans); letter-spacing: -0.035em; }
.brand-sm { font-size: 16px; gap: 8px; }

/* hero */
.hero { padding: 88px 0 40px; }
h1 {
  margin: 0 0 26px;
  font: 500 clamp(44px, 7.2vw, 94px)/0.98 var(--sans); letter-spacing: -0.045em;
  text-wrap: balance;
}
/* the serif half always starts its own line */
h1 em { display: block; font: italic 400 1.04em/0.98 var(--serif); letter-spacing: -0.01em; color: var(--ink-2); }
.lede { max-width: 33em; font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* the hero figure is drawn straight on the page: no frame, no background */
.viewport { position: relative; margin-top: 64px; aspect-ratio: 16 / 7; }
.viewport canvas { width: 100%; height: 100%; }

/* the woven thread: sits behind the content, under the cards and the hero figure */
main { position: relative; }
.thread { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.thread path { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.thread .t1 { stroke: rgba(156,142,255,0.6); }
.thread .t2 { stroke: rgba(255,138,98,0.5); }
.needle { fill: #ffc6ad; opacity: 0; filter: drop-shadow(0 0 6px rgba(255,138,98,0.9)); transition: opacity 0.3s; }
.hero .wrap, .section .wrap { position: relative; z-index: 1; }
.spark { opacity: 0; }
.spark.s1 { fill: #ece7ff; filter: drop-shadow(0 0 6px #9c8eff); }
.spark.s2 { fill: #ffe1d4; filter: drop-shadow(0 0 6px #ff8a62); }
.tile.stitched { border-color: rgba(156,142,255,0.5); box-shadow: 0 0 36px -12px rgba(156,142,255,0.55); }

/* each ring turns around its own vertical axis, through its top, so the thread ends stay put */
.rings { position: relative; width: 150px; aspect-ratio: 160 / 120; margin-bottom: 28px; perspective: 520px; transform-style: preserve-3d; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: transform 0.9s var(--ease), filter 0.6s; }
.ring-a { transform-origin: 38.75% 50%; }
.ring-b { transform-origin: 61.25% 50%; }
.ring-over { transition: opacity 0.25s; }
.rings.turned .ring-a { transform: rotateY(-26deg); filter: drop-shadow(0 0 10px rgba(156,142,255,0.6)); }
.rings.turned .ring-b { transform: rotateY(70deg); filter: drop-shadow(0 0 10px rgba(255,138,98,0.6)); }
.rings.turned .ring-over { opacity: 0; }

/* sections */
.section { padding: 120px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 44px; }
h2 { font: 500 clamp(34px, 4.4vw, 54px)/1.02 var(--sans); letter-spacing: -0.04em; }
.sec-head p { max-width: 22em; color: var(--ink-2); font-size: 17px; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tile { padding: 14px 14px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); transition: border-color 0.5s, box-shadow 0.5s; }
.tile:hover { border-color: var(--line-2); }
.tile h3 { margin: 20px 10px 6px; font: 500 20px/1.2 var(--sans); letter-spacing: -0.025em; }
.tile p { margin: 0 10px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.vis { position: relative; height: 172px; border-radius: 12px; overflow: hidden; background: #0a0a0f; border: 1px solid var(--line); }
.vis canvas { width: 100%; height: 100%; }

/* image: stacked layers that fan out on hover */
.vis-image .layer { position: absolute; width: 48%; height: 62%; left: 26%; top: 19%; border-radius: 10px; border: 1px solid rgba(255,255,255,0.14); transition: transform 0.6s var(--ease); }
.vis-image .l1 { background: linear-gradient(140deg, #2a2560, #6b57ff); transform: translate(-18%, 10%) rotate(-6deg); }
.vis-image .l2 { background: linear-gradient(160deg, #ffb59a, #ff7d52 60%, #b8435c); transform: translate(0, 0) rotate(1deg); }
.vis-image .l3 { background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.9) 0 7%, transparent 8%), linear-gradient(200deg, rgba(195,184,255,0.55), rgba(107,87,255,0.15)); transform: translate(18%, -10%) rotate(7deg); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tile:hover .vis-image .l1 { transform: translate(-34%, 12%) rotate(-10deg); }
.tile:hover .vis-image .l3 { transform: translate(34%, -12%) rotate(11deg); }

/* video: tracks with a moving playhead */
.vis-video { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 0 16px; }
.track { display: flex; gap: 4px; height: 26px; }
.track span { flex: 0 0 var(--w); border-radius: 6px; background: linear-gradient(180deg, #6b57ff, #4b3bc4); }
.track span.b { background: linear-gradient(180deg, #ff9a76, #e0613d); }
.track span.c { background: linear-gradient(180deg, #c3b8ff, #8f7dff); }
.track.audio { height: 18px; }
.track.audio span { background: repeating-linear-gradient(90deg, rgba(94,224,160,0.55) 0 2px, transparent 2px 4px); border: 1px solid rgba(94,224,160,0.3); }
.playhead { position: absolute; top: 12px; bottom: 12px; left: 16px; width: 2px; border-radius: 1px; background: var(--ink); box-shadow: 0 0 12px rgba(255,255,255,0.5); animation: play 6s linear infinite; }
@keyframes play { to { left: calc(100% - 18px); } }

/* animation: a curve with keyframes */
.vis-anim svg { width: 100%; height: 100%; }
.vis-anim .grid { stroke: rgba(255,255,255,0.05); fill: none; }
.vis-anim .curve { stroke: rgba(195,184,255,0.7); stroke-width: 2; fill: none; }
.vis-anim .key { fill: var(--bg-2); stroke: var(--violet); stroke-width: 1.5; }
.vis-anim .dot { fill: var(--ember); }

/* 3D and CAD: the turning mesh with a dimension line under it */
.vis-cad .dim { position: absolute; left: 30%; right: 30%; bottom: 14px; height: 9px; border: 1px solid rgba(255,255,255,0.35); border-top: 0; font: 11px/1 var(--mono); color: var(--ink-2); text-align: center; }
.vis-cad .dim span { position: relative; top: 4px; padding: 0 6px; background: #0a0a0f; }

/* materials: a sphere under a moving light, and a few material swatches */
.vis-render { display: flex; align-items: center; justify-content: center; gap: 36px; background: radial-gradient(70% 60% at 50% 40%, rgba(107,87,255,0.12), transparent 70%), #0a0a0f; }
.sphere { position: relative; z-index: 1; flex-shrink: 0; width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle at var(--lx) var(--ly), #fff 0, #e2dbff 6%, #9c8eff 24%, #4a3bbd 55%, #15112f 82%, #0c0a1c 100%); animation: light 7s ease-in-out infinite; }
.swatches { list-style: none; display: grid; gap: 10px; font: 11px/1 var(--mono); color: var(--ink-2); }
.swatches li { display: flex; align-items: center; gap: 10px; }
.swatches i { width: 26px; height: 26px; border-radius: 50%; }
.m-metal { background: radial-gradient(circle at 35% 30%, #fff 0, #d9dbe4 18%, #7d8193 48%, #2a2c36 80%), #2a2c36; }
.m-clay { background: radial-gradient(circle at 35% 30%, #ffd9c6 0, #e0855f 40%, #7a3a24 85%); }
.m-glass { background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.95) 0 8%, transparent 14%), radial-gradient(circle at 60% 70%, rgba(156,142,255,0.55), rgba(156,142,255,0.08) 70%); border: 1px solid rgba(255,255,255,0.25); }
@keyframes light { 0%, 100% { --lx: 28%; --ly: 26%; } 50% { --lx: 70%; --ly: 32%; } }

/* vector: a path being traced, with one anchor selected */
.vis-vector svg { width: 100%; height: 100%; }
.vis-vector .shape { fill: url(#vg); }
.vis-vector .trace { fill: none; stroke: #c3b8ff; stroke-width: 1.5; stroke-dasharray: 100; animation: trace 6s ease-in-out infinite; }
@keyframes trace { 0% { stroke-dashoffset: 100; } 50% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -100; } }
.vis-vector .handle { fill: none; stroke: rgba(255,255,255,0.35); stroke-width: 1; }
.vis-vector .knob { fill: var(--bg-2); stroke: rgba(255,255,255,0.65); stroke-width: 1.2; }
.vis-vector .anchor { fill: var(--bg-2); stroke: #c3b8ff; stroke-width: 1.4; }
.vis-vector .anchor.sel { fill: var(--violet); stroke: #fff; }
.vis-vector .tag { font: 11px var(--mono); fill: var(--ink-3); }

/* design: two artboards with one element selected */
.vis-design svg { width: 100%; height: 100%; }
.vis-design .board { fill: #13121b; stroke: rgba(255,255,255,0.12); }
.vis-design .ink { fill: rgba(243,242,248,0.75); }
.vis-design .ink.dim { fill: rgba(243,242,248,0.28); }
.vis-design .sel { fill: none; stroke: var(--violet); stroke-width: 1.2; }
.vis-design .grip { fill: var(--bg); stroke: var(--violet); stroke-width: 1.2; }
.vis-design .tag { font: 10px var(--mono); fill: var(--ink-3); }
.vis-design .size { fill: var(--violet); }

/* agents */
.vis-agents { height: auto; min-height: 172px; padding: 14px 16px; font: 12px/1.4 var(--mono); }
.ex-label { color: var(--ink-3); margin-bottom: 8px; }
.vis-agents ul { list-style: none; display: grid; gap: 8px; }
.vis-agents li { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,0.015); }
.vis-agents .ask { color: var(--ink); }
.vis-agents .ask::before { content: "› "; color: var(--violet); }
.vis-agents .res { flex-shrink: 0; color: #5ee0a0; }
.vis-agents .res::before { content: "✓ "; }

/* soon */
.soon { background: radial-gradient(60% 80% at 85% 0%, rgba(107,87,255,0.10), transparent 60%), radial-gradient(40% 60% at 0% 100%, rgba(255,138,98,0.06), transparent 60%); }
.soon-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.soon-lede { margin: 20px 0 30px; max-width: 26em; color: var(--ink-2); font-size: 18px; }
.note { margin-top: 14px; color: var(--ink-3); font-size: 13px; }

/* footer */
.footer { padding: 120px 0 56px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
.footer-brand p { margin-top: 18px; max-width: 22em; color: var(--ink-2); font-size: 15px; }
.footer-brand p a { color: var(--ink); }
.footer-col { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.col-h { margin-bottom: 6px; font: 12px/1 var(--mono); color: var(--ink-3); }
.footer-col a { color: var(--ink-2); transition: color 0.2s; }
.footer-col a:hover, .footer-brand p a:hover { color: var(--ink); }
.footer-bottom { margin-top: 96px; font-size: 13px; color: var(--ink-3); }

@media (max-width: 900px) {
  /* the side margins get too narrow to route the thread around the text */
  .thread { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* nine cards leave Agents alone on the last row of two, so it takes the full width */
  .tile-wide { grid-column: 1 / -1; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 14px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 56px 0 24px; }
  .lede { font-size: 17px; }
  .cta .btn { flex: 1 1 auto; justify-content: center; }
  .viewport { margin-top: 44px; aspect-ratio: 1 / 1; }
  .section { padding: 84px 0; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .vis-render { gap: 24px; }
  .footer { padding-top: 84px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { margin-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .playhead, .sphere, .vis-vector .trace { animation: none; }
  .vis-image .layer { transition: none; }
  .vis-vector .trace { stroke-dashoffset: 0; }
}
