/* CodeSaga — styles */

:root {
  --bg: #FFFFFF;
  --ink: #0E0E14;
  --muted: #5F6170;
  --line: #ECECF3;
  --soft: #F6F6FB;
  --violet: #7C5CFF;
  --blue: #3B82F6;
  --cyan: #22C1EE;
  --grad: linear-gradient(135deg, var(--violet), var(--blue));
  --max: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; }
.links { display: flex; align-items: center; gap: 8px; }
.links a.link { padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--muted); }
.links a.link:hover { color: var(--ink); background: var(--soft); }
.links a.link.active { color: var(--ink); background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.links a.link { position: relative; transition: color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.links a.btn.active { box-shadow: 0 0 0 4px rgba(124,92,255,.28), 0 6px 20px rgba(14,14,20,.18); }
/* Land section headings just below the sticky nav */
section[id] { scroll-margin-top: 8px; }
#contact { scroll-margin-top: 96px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn-dark { background: var(--ink); color: #fff; box-shadow: 0 6px 20px rgba(14,14,20,.18); }
.btn-dark:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(14,14,20,.24); }
.btn-light { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(14,14,20,.05); }
.btn-light:hover { background: var(--soft); }
.btn-lg { height: 52px; padding: 0 28px; font-size: 16px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(#D9DAE6 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 40%, transparent 85%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 40%, transparent 85%);
}
.glow { position: absolute; z-index: -1; left: 50%; top: 360px; width: 760px; height: 560px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(124,92,255,.38), rgba(59,130,246,.22) 55%, rgba(34,193,238,0) 100%); filter: blur(20px); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--muted); box-shadow: 0 2px 10px rgba(14,14,20,.05); }
.pill { padding: 7px 16px 7px 12px; }
.pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(124,92,255,.15); }
h1 { font-size: clamp(48px, 9vw, 104px); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; margin: 28px 0 44px; }
h1 .row { display: inline-flex; align-items: center; gap: .22em; flex-wrap: wrap; justify-content: center; }
.chip { display: inline-grid; place-items: center; width: .82em; height: .82em; border-radius: .22em; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(124,92,255,.22); vertical-align: middle; }
.chip svg { width: 46%; height: 46%; }
.sub { max-width: 600px; margin: 0 auto 36px; font-size: 19px; color: var(--muted); }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }


/* Animated headline */
h1 .line { display: block; white-space: nowrap; }
.swap { display: inline-block; position: relative; text-align: left; white-space: nowrap; }
.w { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .04em; }
.swap[data-group="to"] .w { background-image: linear-gradient(135deg, var(--blue), var(--cyan)); }
.js .swap { transition: width .6s cubic-bezier(.65,0,.35,1); }
.js .swap::before { content: "\200b"; }
.js .w { position: absolute; left: 0; top: 0; opacity: 0; transform: translateY(.35em); filter: blur(10px);
  transition: opacity .55s ease, transform .6s cubic-bezier(.2,.8,.2,1), filter .55s ease; }
.js .w.on { opacity: 1; transform: none; filter: blur(0); }
.js .w.off { opacity: 0; transform: translateY(-.35em); filter: blur(10px); }
.js .swap[data-group="to"] .w { transition-delay: .12s; }
.swap:not(.ready) .w:not(.on) { display: none; }
.js .swap.ready .w { display: inline; }
@media (prefers-reduced-motion: reduce) {
  .js .swap, .js .w { transition: none !important; }
}

/* Hero visual */
.phone { position: absolute; left: 50%; bottom: -60px; transform: translateX(-50%); width: 280px; height: 560px; border-radius: 46px; background: #111; padding: 12px; box-shadow: 0 40px 80px rgba(40,30,90,.28), inset 0 0 0 2px #2a2a33; }
.screen { width: 100%; height: 100%; border-radius: 36px; background: linear-gradient(180deg, #FBFBFF, #F1F1FA); overflow: hidden; position: relative; text-align: left; padding: 48px 18px 18px; }
.island { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 88px; height: 26px; border-radius: 20px; background: #111; }
.app-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.app-top strong { font-size: 20px; letter-spacing: -.02em; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); }
.app-hero { border-radius: 20px; padding: 16px; color: #fff; background: var(--grad); margin-bottom: 12px; }
.app-hero small { opacity: .85; font-size: 12px; }
.app-hero div { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.3); margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 68%; background: #fff; border-radius: 6px; }
.app-row { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 12px; margin-bottom: 10px; box-shadow: 0 2px 10px rgba(14,14,20,.04); }
.app-row .ic { width: 36px; height: 36px; border-radius: 11px; flex: none; }
.app-row .tx { flex: 1; }
.app-row .l1 { height: 8px; width: 70%; border-radius: 4px; background: #DCDDE8; margin-bottom: 7px; }
.app-row .l2 { height: 7px; width: 45%; border-radius: 4px; background: #ECEDF4; }

.float { position: absolute; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: 0 18px 40px rgba(40,30,90,.12); text-align: left; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.float small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.float .dot { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .float { animation: bob 6s ease-in-out infinite; }
  .f2 { animation-delay: -2s; } .f3 { animation-delay: -4s; }
  @keyframes bob { 50% { transform: translateY(-8px); } }
}

/* Sections */
section { padding: 104px 0; }
.head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 14px; margin-bottom: 22px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(14,14,20,.05); font-size: 16px; font-weight: 700; color: var(--ink); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px rgba(124,92,255,.15); }
h2 { font-size: clamp(34px, 5vw, 54px); line-height: 1.08; letter-spacing: -.035em; font-weight: 800; margin: 0 0 16px; }
.head p { margin: 0; color: var(--muted); font-size: 18px; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card { position: relative; overflow: hidden; border-radius: 28px; background: var(--soft); border: 1px solid var(--line); padding: 32px; min-height: 300px; }
.card h3 { font-size: 26px; letter-spacing: -.025em; line-height: 1.15; margin: 0 0 10px; font-weight: 800; }
.card p { margin: 0; color: var(--muted); max-width: 30ch; }
.c-mobile, .c-web { min-height: 400px; }
.c-mobile { grid-column: span 3; background: linear-gradient(160deg, #F3EFFF, #EAF1FF); }
.c-web { grid-column: span 3; background: linear-gradient(160deg, #EEF5FF, #EAFBFF); }
.c-mvp { grid-column: span 2; }
.c-scale { grid-column: span 2; }
.c-design { grid-column: span 2; }
.card .icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #fff; box-shadow: 0 6px 18px rgba(14,14,20,.06); margin-bottom: 24px; }
.card .icon svg { width: 24px; height: 24px; }
.card-art { position: absolute; right: -20px; bottom: -40px; }

/* mini phones in mobile card */
.mini { position: absolute; bottom: -150px; width: 150px; height: 300px; border-radius: 28px; background: #111; padding: 7px; box-shadow: 0 20px 40px rgba(40,30,90,.22); }
.mini .s { width: 100%; height: 100%; border-radius: 22px; padding: 26px 10px 10px; }
.mini .s i { display: block; height: 46px; border-radius: 12px; margin-bottom: 8px; background: rgba(255,255,255,.75); }
.mini .s i:first-child { height: 70px; background: var(--grad); }
.mini.a { right: 150px; transform: rotate(-6deg); }
.mini.a .s { background: #F4F2FF; }
.mini.b { right: 24px; bottom: -120px; transform: rotate(5deg); }
.mini.b .s { background: #EEF6FF; }
.mini.b .s i:first-child { background: linear-gradient(135deg, var(--blue), var(--cyan)); }

/* browser in web card */
.browser { position: absolute; right: -30px; bottom: -40px; width: 340px; height: 210px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: 0 20px 40px rgba(30,60,120,.15); overflow: hidden; }
.browser .top { height: 30px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.browser .top span { width: 9px; height: 9px; border-radius: 50%; background: #E3E4EC; }
.browser .body { display: grid; grid-template-columns: 70px 1fr; height: calc(100% - 30px); }
.browser .side { background: #F7F8FC; border-right: 1px solid var(--line); padding: 12px 10px; }
.browser .side i { display: block; height: 7px; border-radius: 4px; background: #DFE2EC; margin-bottom: 10px; }
.browser .main { padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.browser .main i { height: 58px; border-radius: 10px; background: #F1F4FA; }
.browser .main i:first-child { grid-column: span 2; height: 50px; background: linear-gradient(90deg, #DCE8FF, #DDF6FD); }

.logo-img { width: 34px; height: 34px; display: block; border-radius: 9px; }
.card-title { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.card-title .icon { margin: 0; flex: none; }
.card-title h3 { margin: 0; }
.c-mvp h3, .c-scale h3, .c-design h3 { font-size: 22px; }
.mini .s { position: relative; padding-top: 34px; }
.mini .s::before { content: ""; position: absolute; left: 50%; transform: translateX(-50%); background: #111; }
.mini.a .s::before { top: 10px; width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 2px #2a2a33; }
.mini.b .s::before { top: 8px; width: 46%; height: 17px; border-radius: 999px; }
/* Process */
#process { background: linear-gradient(180deg, #fff, #F8F7FF 50%, #fff); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { border-radius: 28px; border: 1px solid var(--line); padding: 32px; background: #fff; box-shadow: 0 2px 12px rgba(14,14,20,.03); }
.step .num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad); margin-bottom: 24px; }
.step h3 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 8px; font-weight: 800; }
.step p { margin: 0; color: var(--muted); }
.steps-wrap { position: relative; }
.step-title { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.step-title .num { margin: 0; flex: none; }
.step-title h3 { margin: 0; }

/* CTA band */
.band { padding: 0 0 120px; }
.band-inner { position: relative; overflow: hidden; border-radius: 36px; background: var(--ink); color: #fff; text-align: center; padding: 88px 24px; }
.band-inner::before { content: ""; position: absolute; left: 50%; top: 100%; width: 900px; height: 500px; transform: translate(-50%, -45%); background: radial-gradient(closest-side, rgba(124,92,255,.55), rgba(59,130,246,.25) 60%, transparent); }
.band-inner > * { position: relative; }
.band h2 { color: #fff; }
.band p { color: #B7B8C7; max-width: 520px; margin: 0 auto 32px; font-size: 18px; }
.band .btn-light { border: 0; }

footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
footer a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .f1, .f2, .f3 { display: none; }
  .bento { grid-template-columns: 1fr 1fr; }
  .c-mobile, .c-web { grid-column: span 2; }
  .c-mvp, .c-scale { grid-column: span 1; }
  .c-design { grid-column: span 2; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .links a.link { display: none; }
  section { padding: 80px 0; }
  .hero { padding-top: 48px; }
  h1 { font-size: clamp(30px, 9vw, 40px); }
  .c-mvp, .c-scale, .c-design { min-height: 0; }
  .bento { grid-template-columns: 1fr; }
  .c-mobile, .c-web, .c-mvp, .c-scale, .c-design { grid-column: span 1; }
  .c-mobile, .c-web { min-height: 440px; }
  .browser { width: 300px; }
}

/* Device trio: web, Android, iPhone */
.stage { position: relative; height: 540px; margin: 64px calc(50% - 50vw) 0; overflow: hidden; }
.stage::after { content: ""; position: absolute; left: -50vw; right: -50vw; bottom: 0; height: 130px; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff); z-index: 3; pointer-events: none; }
.float { z-index: 4; }
.f1 { left: max(24px, calc(50% - 570px)); top: 60px; }
.f2 { right: max(24px, calc(50% - 570px)); top: 170px; }
.f3 { left: max(48px, calc(50% - 530px)); top: 330px; }
.devices { position: absolute; left: 50%; top: 0; width: 760px; height: 560px; transform: translateX(-50%); transform-origin: top center; }
.web { position: absolute; left: 60px; top: 0; width: 640px; height: 410px; background: #fff; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 40px 80px rgba(40,30,90,.16); overflow: hidden; text-align: left; }
.web-top { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #FAFAFD; }
.web-top > span { width: 10px; height: 10px; border-radius: 50%; background: #E3E4EC; }
.url { margin: 0 auto; transform: translateX(-24px); font-size: 11px; color: var(--muted); background: #F0F1F6; padding: 4px 48px; border-radius: 999px; }
.web-body { display: grid; grid-template-columns: 150px 1fr; height: calc(100% - 38px); }
.web-side { background: #F7F7FB; border-right: 1px solid var(--line); padding: 18px 16px; }
.web-side b { display: block; width: 28px; height: 28px; border-radius: 8px; background: var(--grad); margin-bottom: 22px; }
.web-side i { display: block; height: 8px; width: 80%; border-radius: 4px; background: #DFE1EA; margin-bottom: 15px; }
.web-side i.on { background: #C9C2FF; width: 90%; }
.web-main { padding: 20px 22px; }
.web-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.web-head small { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.web-head strong { font-size: 18px; letter-spacing: -.02em; line-height: 1.2; }
.web-btn { font-size: 11px; font-weight: 700; color: #fff; background: var(--ink); padding: 7px 12px; border-radius: 999px; }
.web-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.web-stats div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.web-stats small { display: block; font-size: 10px; color: var(--muted); margin-bottom: 6px; line-height: 1.2; }
.web-stats i { display: block; height: 10px; width: 60%; border-radius: 5px; background: #E4E6EF; }
.web-stats div:first-child i { background: var(--grad); }
.web-chart { border: 1px solid var(--line); border-radius: 12px; height: 170px; padding: 14px; display: flex; align-items: flex-end; gap: 8px; }
.web-chart span { flex: 1; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #B4C1FF, #E6EAFF); }
.web-chart span.hi { background: var(--grad); }

.dev { position: absolute; z-index: 2; background: #111; padding: 9px; box-shadow: 0 30px 60px rgba(40,30,90,.28), inset 0 0 0 2px #2a2a33; }
.dev .screen { padding: 44px 14px 14px; }
.android { left: 0; top: 130px; width: 220px; height: 450px; border-radius: 32px; }
.android .screen { border-radius: 24px; background: linear-gradient(180deg, #FBFBFF, #EEF3FF); }
.punch { position: absolute; top: 13px; left: 50%; width: 12px; height: 12px; transform: translateX(-50%); border-radius: 50%; background: #111; box-shadow: inset 0 0 0 2px #2a2a33; }
.iphone { right: 0; top: 100px; width: 232px; height: 470px; border-radius: 42px; }
.iphone .screen { border-radius: 34px; }
.iphone .island { width: 78px; height: 23px; top: 11px; }
.dev .app-top { margin-bottom: 12px; }
.dev .app-top strong { font-size: 16px; }
.dev .avatar { width: 26px; height: 26px; }
.dev .app-hero { padding: 12px 14px; border-radius: 16px; margin-bottom: 10px; }
.dev .app-hero div { font-size: 19px; }
.dev .app-hero small { font-size: 11px; }
.dev .app-row { padding: 9px; border-radius: 13px; margin-bottom: 8px; gap: 10px; }
.dev .app-row .ic { width: 30px; height: 30px; border-radius: 9px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.tiles i { height: 84px; border-radius: 18px; background: #fff; box-shadow: 0 2px 10px rgba(14,14,20,.05); }
.tiles i:first-child { background: linear-gradient(135deg, var(--blue), var(--cyan)); }
.navbar { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 44px; border-radius: 22px; background: #fff; display: flex; justify-content: space-around; align-items: center; box-shadow: 0 4px 14px rgba(14,14,20,.07); }
.navbar i { width: 18px; height: 18px; border-radius: 6px; background: #E2E4EE; }
.navbar i:first-child { background: var(--blue); }

@media (max-width: 1240px) {
  .f1 { left: 24px; } .f3 { left: 40px; } .f2 { right: 24px; }
}
@media (max-width: 900px) {
  .stage { height: 450px; }
  .devices { transform: translateX(-50%) scale(.8); }
}
@media (max-width: 640px) {
  .stage { height: 280px; margin-top: 44px; }
  .stage::after { height: 80px; }
  .devices { transform: translateX(-50%) scale(.46); }
  .glow { top: 300px; width: 460px; height: 340px; }
}
