:root {
  --bg: #0b0f1a;
  --bg-soft: #121829;
  --card: #161d30;
  --line: #243049;
  --text: #e8edf7;
  --muted: #93a0ba;
  --brand: #5b8cff;
  --brand-2: #7c5cff;
  --good: #2fd089;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #1a2240 0%, var(--bg) 55%);
  color: var(--text);
  font: 16px/1.6 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .code, pre { font-family: "SF Mono", ui-monospace, Consolas, monospace; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

.banner-test {
  background: linear-gradient(90deg, #3a2a00, #2a2000);
  color: #ffd479; text-align: center; padding: 8px 12px; font-size: .85rem;
  border-bottom: 1px solid #4a3a10;
}

/* nav */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; max-width: 1120px; margin: 0 auto;
}
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); }
/* PolyCopy wordmark logo (square source, cropped to the wordmark via zoomed bg).
   mix-blend-mode:screen drops the black backdrop so only the wordmark shows. */
.brand-logo { display: inline-block; width: 150px; height: 38px; padding: 0;
  background: url('/static/shots/logo.png') center / 168px no-repeat;
  mix-blend-mode: screen; text-indent: -9999px; overflow: hidden; white-space: nowrap; }
.brand-logo:hover { text-decoration: none; }
.brand-logo-sm { width: 124px; height: 32px; background-size: 138px; }
.nav nav { display: flex; gap: 18px; align-items: center; }
.nav nav a { color: var(--muted); }
.nav nav a:hover { color: var(--text); text-decoration: none; }

/* buttons */
.btn, .btn-ghost, .btn-oauth {
  display: inline-block; padding: 10px 18px; border-radius: 10px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; transition: .15s; text-align: center;
}
.btn { background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: #fff; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); text-decoration: none; }
.btn.disabled { background: var(--bg-soft); color: var(--muted); cursor: not-allowed; filter: none; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; display: block; }

main { max-width: 1120px; margin: 0 auto; padding: 24px 28px 60px; }

/* hero */
.hero { text-align: center; padding: 56px 0 36px; }
.hero h1 { font-size: 2.6rem; line-height: 1.2; margin: 0 0 18px; letter-spacing: -.5px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 760px; margin: 0 auto 26px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-bottom: 14px; }

/* feature cards */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 18px; margin-top: 30px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; }
.card.info { margin-top: 24px; }

.cta-band { text-align: center; margin-top: 56px; padding: 40px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--radius); }
.cta-band h2 { margin-top: 0; }

/* showcase carousel */
.showcase { margin-top: 84px; }
.showcase h2 { margin-bottom: 6px; }

.carousel-stage { position: relative; max-width: 980px; margin: 34px auto 0; }

/* ambient brand glow behind the carousel */
.carousel-glow { position: absolute; inset: -14% -10% -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42% 56% at 22% 28%, rgba(91,140,255,.50), transparent 70%),
    radial-gradient(46% 62% at 80% 72%, rgba(124,92,255,.46), transparent 72%);
  filter: blur(64px); opacity: .85;
  animation: glowDrift 16s ease-in-out infinite alternate; }
@keyframes glowDrift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  100% { transform: translate3d(2%, 2.5%, 0) scale(1.08); }
}

.carousel { position: relative; z-index: 1; }
.carousel-viewport { overflow: hidden; border-radius: 18px; border: 1px solid var(--line);
  background: var(--card); box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.02) inset;
  cursor: grab; touch-action: pan-y; user-select: none; }
.carousel-viewport.dragging { cursor: grabbing; }
.carousel-track { display: flex; will-change: transform; }
.carousel-track.animate { transition: transform .8s cubic-bezier(.22,.61,.36,1); }

.slide { position: relative; flex: 0 0 100%; margin: 0; overflow: hidden; }
.slide-media { overflow: hidden; }
.slide img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  background: var(--bg); transform: scale(1.06); filter: saturate(.9) brightness(.8);
  transition: transform 1.1s cubic-bezier(.22,.61,.36,1), filter .6s ease;
  -webkit-user-drag: none; }
.slide.is-active img { transform: scale(1); filter: saturate(1) brightness(.92); }
.carousel-viewport:hover .slide.is-active img { transform: scale(1.02);
  filter: saturate(1.06) brightness(1.04); }

/* glassmorphism overlay card, lower-left */
.slide-overlay { position: absolute; left: 22px; bottom: 22px; max-width: 64%;
  padding: 16px 20px; border-radius: 14px; color: #fff;
  background: rgba(12,16,28,.42); border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 12px 34px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(16px);
  transition: opacity .6s ease .12s, transform .6s cubic-bezier(.22,.61,.36,1) .12s; }
.slide.is-active .slide-overlay { opacity: 1; transform: translateY(0); }
.slide-overlay h3 { margin: 0 0 5px; font-size: 1.18rem; letter-spacing: -.2px; }
.slide-overlay p { margin: 0; font-size: .92rem; line-height: 1.45; color: rgba(232,237,247,.86); }
.slide-overlay code { color: #cdd8f5; }

/* segmented progress indicator with brand gradient */
.carousel-progress { display: flex; gap: 10px; margin: 18px 2px 0; }
.cp-seg { flex: 1; height: 4px; border-radius: 999px; overflow: hidden;
  background: rgba(147,160,186,.22); }
.cp-fill { display: block; width: 0%; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* graceful placeholder when a screenshot file is missing */
.slide.no-img img { display: none; }
.slide.no-img .slide-media::before { content: "Screenshot coming soon";
  display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10;
  color: var(--muted); font-size: 1.05rem;
  background: repeating-linear-gradient(45deg, var(--bg) 0 18px, var(--bg-soft) 18px 36px); }

@media (max-width: 640px) {
  .slide-overlay { left: 14px; bottom: 14px; max-width: 82%; padding: 12px 15px; }
  .slide-overlay h3 { font-size: 1.02rem; }
  .slide-overlay p { font-size: .85rem; }
  .carousel-glow { filter: blur(48px); }
}
@media (prefers-reduced-motion: reduce) {
  .carousel-glow { animation: none; }
  .carousel-track.animate { transition: transform .3s ease; }
  .slide img, .slide-overlay { transition: opacity .3s ease; }
}

/* page head */
.page-head { text-align: center; padding: 28px 0; }
.page-head h1 { margin: 0 0 8px; font-size: 2rem; }

/* pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 20px; align-items: start; }
.plan-card { position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.plan-card.featured { border-color: var(--brand); transform: translateY(-6px); }
.ribbon { position: absolute; top: -12px; right: 18px; background: linear-gradient(90deg,var(--brand),var(--brand-2));
  color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.price { font-size: 2rem; font-weight: 800; margin: 6px 0; }
.plan-features { list-style: none; padding: 0; margin: 16px 0 22px; }
.plan-features li { padding: 6px 0 6px 24px; position: relative; color: var(--text); }
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }

/* auth */
.auth-wrap { display: flex; justify-content: center; padding: 30px 0; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 6px; font-size: 1.5rem; }
.oauth-buttons { display: grid; gap: 10px; margin: 20px 0; }
.btn-oauth { border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); }
.btn-oauth:hover { border-color: var(--brand); text-decoration: none; }
.divider { text-align: center; border-bottom: 1px solid var(--line); line-height: 0; margin: 18px 0; }
.divider span { background: var(--card); padding: 0 12px; color: var(--muted); font-size: .85rem; }
form label { display: block; margin: 12px 0; font-size: .9rem; color: var(--muted); }
form input {
  width: 100%; margin-top: 6px; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 1rem;
}
form input:focus { outline: none; border-color: var(--brand); }

/* account — symmetrical 2x2 grid, equal-height cards */
.account-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: stretch; max-width: 880px; margin: 0 auto; }
.account-grid .card { display: flex; flex-direction: column; }
.account-grid .card .row-actions, .account-grid .card .btn { margin-top: auto; }
.account-grid .card h3 { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.badge { background: var(--bg-soft); border: 1px solid var(--brand); color: var(--brand);
  padding: 2px 10px; border-radius: 20px; font-size: .85rem; font-weight: 600; }
.row-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.notice { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; display: inline-block; }
.notice.success { border-color: var(--good); color: var(--good); }

.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 18px; }
pre.code { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px;
  overflow-x: auto; font-size: .9rem; }

/* legal */
.legal { max-width: 760px; margin: 0 auto; }
.legal h3 { margin-top: 26px; }

/* footer */
.footer { max-width: 1120px; margin: 40px auto 0; padding: 28px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.footer-links a { color: var(--muted); }
.disclaimer { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; border-top: 1px solid var(--line);
  padding-top: 16px; margin-top: 8px; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.9rem; }
  .footer { grid-template-columns: 1fr; }
  .footer-links { align-items: flex-start; }
  .account-grid { grid-template-columns: 1fr; }
}
