:root {
	--ink: #121615; --muted: #5F6563; --text: #555B59; --line: #ECECE7; --paper: #FAFAF8;
	--teal: #137A78; --teal-dark: #0D5654; --teal-tint: #E3F2F1; --red: #ED1C24;
	--eo: cubic-bezier(0.23, 1, 0.32, 1); --eio: cubic-bezier(0.77, 0, 0.175, 1);
	--mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--ink); font-family: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.cs { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; padding: 0 clamp(20px, 4vw, 56px); }
.cs-blob { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; animation: drift 16s ease-in-out infinite; }
.cs-blob--1 { width: 460px; height: 460px; left: -120px; bottom: -120px; background: #F6D3C2; opacity: 0.55; }
.cs-blob--2 { width: 420px; height: 420px; right: 8%; top: -140px; background: #C9EADF; opacity: 0.6; animation-duration: 19s; animation-delay: -6s; }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, -20px) scale(1.08); } }

.cs-top { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; animation: rise 800ms var(--eo) both; }
.cs-logo { display: inline-flex; align-items: center; gap: 10px; }
.cs-logo-drop { width: 22px; height: 28px; }
.cs-logo-word { font-weight: 500; font-size: 18px; letter-spacing: -0.035em; }
.cs-logo-tag { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid #E2E2DC; border-radius: 999px; padding: 2px 8px; }
.cs-status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal-dark); background: rgba(255, 255, 255, 0.8); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; }
.cs-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(19, 122, 120, 0.5); animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(19, 122, 120, 0.45); } 80%, 100% { box-shadow: 0 0 0 10px rgba(19, 122, 120, 0); } }

.cs-main { position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: center; max-width: 1200px; width: 100%; margin: 0 auto; padding: 24px 0 40px; }
.cs-art { display: flex; justify-content: center; }
.cs-drop { width: min(380px, 80%); height: auto; overflow: visible; animation: floaty 9s ease-in-out 1.6s infinite; filter: drop-shadow(0 40px 50px rgba(19, 122, 120, 0.18)); }
.cs-drop rect { transform-box: fill-box; transform-origin: center; animation: grow 1100ms var(--eo) both, shimmer 6s ease-in-out 2s infinite; }
.cs-drop rect:nth-child(1) { animation-delay: 200ms, 2s; } .cs-drop rect:nth-child(2) { animation-delay: 260ms, 2.12s; } .cs-drop rect:nth-child(3) { animation-delay: 320ms, 2.24s; }
.cs-drop rect:nth-child(4) { animation-delay: 380ms, 2.36s; } .cs-drop rect:nth-child(5) { animation-delay: 440ms, 2.48s; } .cs-drop rect:nth-child(6) { animation-delay: 500ms, 2.6s; }
.cs-drop rect:nth-child(7) { animation-delay: 560ms, 2.72s; } .cs-drop rect:nth-child(8) { animation-delay: 620ms, 2.84s; } .cs-drop rect:nth-child(9) { animation-delay: 680ms, 2.96s; }
.cs-drop rect:nth-child(10) { animation-delay: 740ms, 3.08s; } .cs-drop rect:nth-child(11) { animation-delay: 800ms, 3.2s; } .cs-drop rect:nth-child(12) { animation-delay: 860ms, 3.32s; } .cs-drop rect:nth-child(13) { animation-delay: 920ms, 3.44s; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes shimmer { 0%, 70%, 100% { opacity: 1; } 80% { opacity: 0.55; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.cs-text { display: flex; flex-direction: column; gap: 22px; }
.cs-text > * { margin: 0; }
.cs-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); animation: rise 900ms var(--eo) 200ms both; }
.cs-title { font-weight: 600; font-size: clamp(40px, 6vw, 80px); line-height: 1; letter-spacing: -0.05em; max-width: 11em; animation: rise 900ms var(--eo) 280ms both; }
.cs-lead { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; color: var(--text); max-width: 34em; animation: rise 900ms var(--eo) 360ms both; }
.cs-contacts { display: flex; flex-wrap: wrap; gap: 10px; animation: rise 900ms var(--eo) 440ms both; }
.cs-btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 12px; background: var(--teal); color: #fff; text-decoration: none; font-weight: 500; box-shadow: 0 8px 20px -10px rgba(19, 122, 120, 0.6); transition: transform 160ms var(--eo), background-color 200ms ease; }
.cs-btn:hover { background: var(--teal-dark); }
.cs-btn:active { transform: scale(0.97); }
.cs-btn--ghost { background: #fff; color: var(--ink); border: 1px solid #E2E2DC; box-shadow: none; }
.cs-btn--ghost:hover { background: #fff; border-color: var(--ink); }

.cs-code { margin-top: 18px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; animation: rise 900ms var(--eo) 520ms both; max-width: 420px; }
.cs-code-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.cs-code-row { display: flex; gap: 10px; align-items: center; }
.cs-cells { position: relative; }
.cs-code-input { font: 500 24px/1 var(--mono); width: calc(var(--n) * 56px + (var(--n) - 1) * 10px); height: 64px; padding: 0 16px; letter-spacing: 0.4em; border-radius: 14px; border: 1px solid #E2E2DC; background: #fff; color: var(--ink); }
.cs-code-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(19, 122, 120, 0.14); }
.cs-cells-bg { display: none; }
.cs-go { width: 64px; height: 64px; flex: none; border-radius: 14px; border: 0; background: var(--ink); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform 160ms var(--eo), background-color 200ms ease; }
.cs-go:hover { background: #2A3230; }
.cs-go:active { transform: scale(0.95); }
.cs-code-msg { min-height: 1.4em; margin: 0; font-size: 14px; color: #B71C1C; }

/* JS version: one cell per character. */
.cs-js .cs-cells-bg { display: flex; gap: 10px; position: absolute; inset: 0; pointer-events: none; }
.cs-js .cs-cells-bg i {
	width: 56px; height: 64px; border-radius: 14px; border: 1px solid #E2E2DC; background: #fff;
	display: flex; align-items: center; justify-content: center; font: 500 26px/1 var(--mono); font-style: normal; color: var(--ink);
	transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms var(--eo), background-color 200ms ease;
}
.cs-js .cs-cells-bg i.is-filled { transform: translateY(-2px); }
.cs-js .cs-cells-bg i.is-active { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(19, 122, 120, 0.14); }
.cs-js .cs-cells-bg i.is-active::after { content: ""; width: 2px; height: 26px; background: var(--teal); animation: caret 1s steps(1) infinite; }
.cs-js .cs-code-input { color: transparent; caret-color: transparent; background: transparent; border-color: transparent; position: relative; z-index: 1; letter-spacing: 0; }
.cs-js .cs-code-input:focus { box-shadow: none; }
.cs-js .cs-code-input::selection { background: transparent; }
@keyframes caret { 50% { opacity: 0; } }
.cs-code.is-error .cs-cells-bg i { border-color: #E9A5A5; }
.cs-code.is-shake .cs-cells { animation: shake 420ms var(--eio); }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.cs-code.is-sending .cs-cells-bg i { background: var(--teal); border-color: var(--teal); color: #fff; }
.cs-code.is-sending .cs-cells-bg i:nth-child(2) { transition-delay: 60ms; } .cs-code.is-sending .cs-cells-bg i:nth-child(3) { transition-delay: 120ms; } .cs-code.is-sending .cs-cells-bg i:nth-child(4) { transition-delay: 180ms; }
.cs-code.is-sending .cs-go { background: var(--teal); }

.cs-foot { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.cs-foot-strip { display: flex; align-items: center; gap: 3px; }
.cs-foot-strip i { display: block; height: 8px; background: var(--teal); border-radius: 1px; }
.cs-foot-strip i:nth-child(1) { width: 2px; } .cs-foot-strip i:nth-child(2) { width: 3px; } .cs-foot-strip i:nth-child(3) { width: 4px; } .cs-foot-strip i:nth-child(4) { width: 5px; }
.cs-foot-strip i:nth-child(5) { width: 6px; } .cs-foot-strip i:nth-child(6) { width: 7px; } .cs-foot-strip i:nth-child(7) { width: 8px; } .cs-foot-strip i:nth-child(8) { width: 9px; }
.cs-foot-strip i:nth-child(9) { width: 10px; background: var(--red); } .cs-foot-strip i:nth-child(10) { width: 11px; } .cs-foot-strip i:nth-child(11) { width: 12px; } .cs-foot-strip i:nth-child(12) { width: 13px; } .cs-foot-strip i:nth-child(13) { width: 14px; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

@media (max-width: 860px) {
	.cs-main { grid-template-columns: 1fr; gap: 20px; padding-top: 8px; }
	.cs-drop { width: 150px; }
	.cs-art { justify-content: flex-start; }
}
@media (max-width: 480px) {
	.cs-logo-tag { display: none; }
	.cs-status { font-size: 11px; padding: 6px 10px; }
	.cs-js .cs-cells-bg i { width: 52px; height: 60px; }
	.cs-code-input, .cs-go { height: 60px; }
	.cs-go { width: 60px; }
	.cs-code-input { width: calc(var(--n) * 52px + (var(--n) - 1) * 10px); }
	.cs-foot { flex-direction: column-reverse; align-items: flex-start; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
