/* =====================================================================
   buildIt sample projects: shared styles
   Same look as the main buildIt site. Each demo page adds its own styles.
   ===================================================================== */
:root {
  --rgb: 79,108,255;
  --bg: #fff; --surface: #fff; --ink: #16266b; --muted: #5a6a94; --line: #dfe5f8;
  --blue: #4f6cff; --onblue: #fff; --sun: #b9c6ff; --dark: #4663f2;
  --b1: #7f98ff; --b2: #4663f2; --bd1: #6f8aff; --bd2: #3d58ee;
  --fh: "Bricolage Grotesque", "IBM Plex Sans", system-ui, sans-serif;
  --fb: "IBM Plex Sans", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); overflow-x: hidden; font: 400 17px/1.6 var(--fb); }
h1, h2, h3 { font-family: var(--fh); line-height: 1.05; margin: 0; letter-spacing: -.025em; }
h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; }
a { color: inherit; }
button { font-family: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
::selection { background: var(--blue); color: var(--onblue); }

/* "This is a sample" bar */
.demo-bar { position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 22px; font-size: 14px; color: #fff; background: linear-gradient(90deg, var(--bd1), var(--bd2)); }
.demo-bar::before { content: "DEMO"; flex: none; font: 800 12px var(--fh); letter-spacing: .14em; padding: 4px 12px; border-radius: 99px; background: #fff; color: var(--bd2); }
.demo-bar span { opacity: .95; flex: 1; }
body::after { content: "Demo site · built by buildIt"; position: fixed; left: 14px; bottom: 14px; z-index: 90; pointer-events: none; font: 500 12.5px var(--fb); padding: 6px 14px; border-radius: 99px; color: #fff; background: linear-gradient(90deg, var(--bd1), var(--bd2)); box-shadow: 0 10px 24px -12px rgba(10,20,80,.7); opacity: .92; }
.demo-bar a { text-decoration: none; font-weight: 500; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4); padding: 4px 14px; border-radius: 99px; white-space: nowrap; transition: background .2s; }
.demo-bar a:hover { background: rgba(255,255,255,.3); }
.demo-bar .r { display: flex; gap: 8px; }

/* buttons */
.btn { position: relative; overflow: hidden; isolation: isolate; display: inline-block; background: var(--blue); color: var(--onblue); padding: 13px 24px; border-radius: 12px; font: 500 16px var(--fb); text-decoration: none; border: 0; cursor: pointer; transition: transform .15s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -8px var(--blue); }
.btn:active { transform: scale(.97); }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%); transform: translateX(-130%); }
.btn:hover::after { transform: translateX(130%); transition: transform .75s ease; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.white { background: #fff; color: var(--bd2); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* cards, chips */
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: 0 1px 2px rgba(20,33,61,.04), 0 18px 40px -26px rgba(var(--rgb),.45); transition: transform .2s, border-color .2s, box-shadow .2s; }
.card:hover { transform: translateY(-5px); border-color: var(--blue); box-shadow: 0 26px 50px -24px rgba(var(--rgb),.6); }
.ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 16px; color: #fff; background: linear-gradient(135deg, var(--b1), var(--b2)); box-shadow: 0 12px 22px -10px var(--b2); transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.card:hover .ico { transform: rotate(-9deg) scale(1.12); }
.ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hl-word { display: inline-block; background: var(--sun); color: #14213d; padding: 0 .14em; border-radius: .16em; transform: rotate(-1.5deg); }
.lead { color: var(--muted); font-size: 19px; max-width: 34em; }
.center { text-align: center; } .center .lead { margin-inline: auto; }

/* page background + progress bar */
#fx-bar { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 200; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--b1), var(--blue), var(--sun)); pointer-events: none; }
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; }
.aurora i:nth-child(1) { width: 52vw; height: 52vw; left: -14vw; top: -16vw; background: radial-gradient(circle, color-mix(in srgb, var(--b1) 75%, transparent), transparent 68%); animation: d1 19s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 44vw; height: 44vw; right: -12vw; top: 18vh; background: radial-gradient(circle, color-mix(in srgb, var(--sun) 80%, transparent), transparent 68%); animation: d2 23s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 40vw; height: 40vw; left: 22vw; bottom: -20vw; background: radial-gradient(circle, color-mix(in srgb, var(--b2) 50%, transparent), transparent 68%); animation: d3 27s ease-in-out infinite alternate; }
@keyframes d1 { to { transform: translate(14vw, 12vw) scale(1.18); } }
@keyframes d2 { to { transform: translate(-16vw, 10vw) scale(.88); } }
@keyframes d3 { to { transform: translate(-10vw, -12vw) scale(1.2); } }

/* scroll reveal + hero entrance */
.rv { opacity: 0; }
.rv.in { animation: reveal .9s cubic-bezier(.2,.7,.2,1) var(--rd, 0s) both; }
@keyframes reveal { from { opacity: 0; translate: 0 40px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }
.enter { animation: reveal .9s cubic-bezier(.2,.7,.2,1) var(--rd, 0s) both; }
@keyframes float { 50% { transform: translateY(-9px); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes shimmer { 0% { background-position: 160% 0, 0 0; } 55%, 100% { background-position: -60% 0, 0 0; } }
.shim { background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.7) 50%, transparent 65%) 160% 0 / 250% 100% no-repeat, var(--sun); animation: shimmer 3.8s ease-in-out 1.5s infinite; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 300; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 14px; font-size: 15px; font-weight: 500; box-shadow: 0 20px 40px -16px rgba(10,20,80,.6); transition: transform .3s cubic-bezier(.3,1.4,.5,1), opacity .25s; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 600px) { .demo-bar span { display: none; } .demo-bar { justify-content: space-between; } body::after { display: none; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .rv { opacity: 1; }
  html { scroll-behavior: auto; }
}
