/* Version 3, "Ribbons": after Ramotion's Clearbit case study on Dribbble. Fanned lavender and blue blades behind one
   large light page; dark navy type; the hero video swings in 3D before it lands. */
:root {
  --ink: #12164f; --text: #2c3166; --muted: #6a6f99; --line: #e3e4f4; --blue: #2531d9; --blue-2: #3a46f0; --soft: #f0f0fd;
  --font: "Avenir Next", "Avenir", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { margin: 0; min-height: 100vh; color: var(--text); font: 500 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background: linear-gradient(160deg, #e6e5fd 0%, #cfd1fb 45%, #b9bdf7 100%); }
h1, h2, h3, p, ol, dl, dd { margin: 0; }
a { color: inherit; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 56px; z-index: 50; background: #fff; color: #000; padding: 10px 14px; border-radius: 8px; }

/* the fan */
.fan { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.fan-l, .fan-r { position: absolute; width: 0; height: 0; }
.fan-l { left: -2vw; bottom: -10vh; } .fan-r { right: 6vw; top: -6vh; }
.fan i { position: absolute; width: clamp(90px, 10vw, 170px); height: 125vh; border-radius: 999px; margin-left: calc(clamp(90px, 10vw, 170px) / -2);
  background: linear-gradient(100deg, #3644e6 0%, #6f7bff 24%, #b9bdff 52%, #ecebff 78%, #ffffff 100%);
  box-shadow: -18px 0 46px -16px rgba(32,36,150,.45), inset 2px 0 0 rgba(255,255,255,.6);
  animation: sway 16s ease-in-out infinite alternate; }
.fan-l i { bottom: 0; transform-origin: 50% 100%; transform: rotate(var(--r)); }
.fan-r i { top: 0; transform-origin: 50% 0; transform: rotate(var(--r)); animation-delay: -6s; }
.fan i:nth-child(odd) { animation-duration: 19s; }
@keyframes sway { from { transform: rotate(calc(var(--r) - 2.5deg)); } to { transform: rotate(calc(var(--r) + 2.5deg)); } }

/* the page sits in one large light frame */
.frame { position: relative; z-index: 1; width: min(1240px, calc(100% - 2 * clamp(10px, 11vw, 220px))); margin: clamp(10px, 5vw, 80px) auto;
  border-radius: clamp(20px, 3vw, 40px); background: rgba(248,248,255,.95); border: 1px solid #fff;
  box-shadow: 0 50px 120px -50px rgba(30,34,140,.55), 0 0 0 8px rgba(255,255,255,.28); overflow: hidden; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px clamp(18px, 4vw, 52px); }
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.mark i { width: 26px; height: 26px; border-radius: 7px; position: relative; background: linear-gradient(135deg, #5a8cff 0 50%, #2531d9 50% 100%); }
.mark i::after { content: ""; position: absolute; left: 10px; top: 7px; border-left: 9px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.links { display: flex; gap: 26px; font-size: 15px; font-weight: 600; color: var(--ink); }
.links a { text-decoration: none; } .links a:hover { color: var(--blue); }
.btn { display: inline-block; padding: 14px 26px; border-radius: 9px; background: linear-gradient(180deg, #3a46f0, #1d26b8); color: #fff; text-decoration: none;
  font-weight: 600; box-shadow: 0 10px 24px -10px rgba(29,38,184,.7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn:hover { background: linear-gradient(180deg, #4955ff, #2531d9); }
.btn-sm { padding: 10px 16px; font-size: 15px; white-space: nowrap; }
.mark { white-space: nowrap; }

/* hero */
.hero { padding: clamp(30px, 5vw, 70px) clamp(18px, 4vw, 52px) clamp(40px, 6vw, 80px); }
.hero-copy { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(20px, 4vw, 60px); align-items: end; }
.hero h1 { color: var(--ink); font-size: clamp(36px, 4.5vw, 66px); line-height: 1.03; letter-spacing: -.035em; font-weight: 700; }
.hero h1 span { color: var(--blue); }
.hero-side p { font-size: clamp(16px, 1.4vw, 19px); color: var(--text); max-width: 26em; }
.hero-side .btn { margin-top: 22px; }
.text-link { margin-left: 18px; font-size: 15px; font-weight: 600; color: var(--blue); }

.stage { margin-top: clamp(36px, 5vw, 64px); perspective: 1100px; perspective-origin: 50% 30%; }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: clamp(12px, 1.8vw, 22px); overflow: hidden; background: #fff; transform-origin: 50% 60%;
  box-shadow: 0 0 0 1px var(--line), 0 50px 90px -40px rgba(30,34,140,.55); }
.screen video { display: block; width: 100%; height: 100%; object-fit: cover; }
.js-tilt .stage .screen { transform: translateY(14%) rotateX(58deg) rotateZ(-12deg) scale(.82); }
.stage.play .screen { animation: tilt-seq 8.5s .2s both; }
@keyframes tilt-seq {
  0%   { transform: translateY(14%) rotateX(58deg) rotateZ(-12deg) scale(.82); animation-timing-function: cubic-bezier(.3,0,.2,1); }
  15%  { transform: translateY(2%) rotateX(34deg) rotateY(-24deg) rotateZ(10deg) scale(.86); animation-timing-function: cubic-bezier(.6,0,.3,1); }
  33%  { transform: rotateX(20deg) rotateY(22deg) rotateZ(-6deg) scale(.9); animation-timing-function: cubic-bezier(.6,0,.3,1); }
  51%  { transform: translateY(6%) rotateX(56deg) rotateZ(-8deg) scale(.86); animation-timing-function: cubic-bezier(.6,0,.3,1); }
  69%  { transform: rotateX(-12deg) rotateY(-16deg) rotateZ(4deg) scale(.92); animation-timing-function: cubic-bezier(.6,0,.3,1); }
  85%  { transform: rotateX(9deg) rotateY(9deg) rotateZ(-2deg) scale(.97); animation-timing-function: cubic-bezier(.5,0,.2,1); }
  100% { transform: none; }
}

/* cards that come in tilted back and stand up */
[data-tilt-in] { transition: transform 1s cubic-bezier(.2,.8,.2,1), opacity .7s ease; transform-origin: 50% 100%; }
.js-tilt [data-tilt-in] { opacity: 0; transform: perspective(1200px) rotateX(28deg) translateY(50px); }
.js-tilt [data-tilt-in].in { opacity: 1; transform: none; }

/* the five kinds */
.kinds { padding: clamp(40px, 6vw, 80px) clamp(18px, 4vw, 52px); background: #fff; border-top: 1px solid var(--line); }
.head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(26px, 4vw, 44px); }
.head h2, .prices h2, .end h2 { color: var(--ink); font-size: clamp(30px, 4vw, 54px); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; }
.head p { color: var(--muted); }
.grid { display: grid; grid-template-columns: 1fr 1fr 0.8fr; gap: 18px; }
.kind { border-radius: 22px; background: var(--soft); border: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; }
.kind-wide { grid-column: span 2; }
.kind-phone { grid-row: span 2; grid-column: 3; grid-row-start: 1; }
.kind:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 24px; }
.clip { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 14px 30px -20px rgba(30,34,140,.5); }
.kind-phone .clip { aspect-ratio: 9 / 16; }
.clip video { display: block; width: 100%; height: 100%; object-fit: cover; }
.txt { padding: 16px 8px 8px; }
.txt h3 { color: var(--ink); font-size: 23px; letter-spacing: -.015em; font-weight: 700; }
.txt p { margin-top: 4px; color: var(--muted); }
.txt .price { margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 14px; width: fit-content; }
.txt .price b { display: block; color: var(--blue); font-size: 17px; }

/* how it works */
.how { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(20px, 4vw, 60px); align-items: center; padding: clamp(50px, 7vw, 100px) clamp(18px, 4vw, 52px); }
.how-card { padding: clamp(26px, 3vw, 40px); border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: 0 30px 60px -40px rgba(30,34,140,.45); }
.badge { display: block; width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, #5a8cff 0 50%, #2531d9 50% 100%); position: relative; }
.badge i { position: absolute; left: 19px; top: 14px; border-left: 14px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.small { margin-top: 22px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.how-card h2 { margin-top: 8px; color: var(--ink); font-size: clamp(30px, 3.4vw, 46px); line-height: 1.06; letter-spacing: -.03em; font-weight: 700; }
.how-card > p:last-child { margin-top: 12px; color: var(--muted); }
.how ol { list-style: none; padding: 0; display: grid; gap: 12px; }
.how li { display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; padding: 20px 22px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.how li b { grid-row: span 2; color: var(--blue); font-size: 22px; font-weight: 700; }
.how li h3 { color: var(--ink); font-size: 20px; font-weight: 700; }
.how li p { color: var(--muted); }

/* prices */
.prices { padding: clamp(40px, 6vw, 80px) clamp(18px, 4vw, 52px); background: #fff; border-top: 1px solid var(--line); }
.price-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(20px, 4vw, 50px); margin-top: 28px; align-items: start; }
.prices dl div { display: flex; justify-content: space-between; gap: 20px; padding: 18px 2px; border-bottom: 1px solid var(--line); }
.prices dl div:first-child { border-top: 1px solid var(--line); }
.prices dt { color: var(--ink); font-weight: 700; } .prices dd { color: var(--muted); text-align: right; }
.current { padding: clamp(26px, 3vw, 38px); border-radius: 22px; color: #fff; background: linear-gradient(150deg, #4a56ff 0%, #2531d9 55%, #1a209e 100%);
  box-shadow: 0 30px 60px -30px rgba(29,38,184,.7); }
.current .small { margin-top: 0; color: rgba(255,255,255,.8); }
.current h3 { margin-top: 10px; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
.current .big { margin-top: 22px; font-size: 22px; font-weight: 700; }

.end { padding: clamp(60px, 9vw, 120px) 20px; text-align: center; }
.end h2 { max-width: 14ch; margin: 0 auto 28px; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px clamp(18px, 4vw, 52px) 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }

/* video buttons (videos.js) */
.vctl { position: absolute; right: 10px; top: 10px; z-index: 2; display: flex; gap: 8px; }
.vctl button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 999px; background: rgba(18,22,79,.6); color: #fff; cursor: pointer; }
.vctl button:hover { background: rgba(18,22,79,.9); }
.screen .vctl { top: auto; bottom: 14px; right: 14px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

@media (max-width: 900px) {
  .links { display: none; }
  .hero-copy, .how, .price-cols { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .kind-wide, .kind-phone, .kind:last-child { grid-column: auto; grid-row: auto; }
  .kind:last-child { display: flex; }
  .kind-phone .clip { width: min(260px, 80%); margin: 0 auto; }
  .prices dl div { flex-direction: column; gap: 2px; } .prices dd { text-align: left; }
  .fan i { opacity: .9; }
  .frame { width: calc(100% - 24px); margin: 12px auto; }
  .top { padding: 16px 16px; }
  .text-link { display: inline-block; margin: 16px 0 0; }
  .hero-side .btn { display: block; text-align: center; }
}
@media (max-width: 420px) { .btn-sm { padding: 9px 12px; font-size: 14px; } .mark { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
