/* Modly website. Same tokens as the app (Modly/wwwroot/css/app.css). */
:root {
  --bg: #0E1016;
  --bg-deep: #0B0D12;
  --panel: #12151D;
  --card: #161922;
  --card-2: #181B25;
  --raise: #1E2230;
  --raise-hover: #252A39;
  --line: #242835;
  --line-2: #2C3140;
  --text: #F2F3F7;
  --text-2: #D5D9E3;
  --muted: #B4BAC8;
  --dim: #8A91A3;
  --faint: #5B6275;
  --mint: #3DF5A6;
  --mint-hover: #6BFFBF;
  --mint-bg: #1C2A26;
  --mint-line: #2A5A47;
  --amber: #FFB547;
  --amber-bg: #3A2314;
  --blue: #7CC4FF;
  --blue-bg: #14283A;
  --violet: #C4A6FF;
  --violet-bg: #2A1F3D;
  --pink: #FF7AA8;
  --pink-bg: #3A1424;
  --ink: #0B0D12;
  --font: 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
  --mono: 'JetBrains Mono', Consolas, monospace;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: var(--mint); text-decoration: none; }
a:hover { color: var(--mint-hover); }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
::selection { background: var(--mint); color: var(--ink); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 12px; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.btn-p { background: var(--mint); color: var(--ink); }
.btn-p:hover { background: var(--mint-hover); color: var(--ink); }
.btn-g { background: var(--raise); color: var(--text); border: 1px solid var(--line-2); }
.btn-g:hover { background: var(--raise-hover); color: var(--text); }
.chip { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 500; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--ink); border-color: var(--text); }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--mint-bg); color: var(--mint); font-size: 13px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); display: inline-block; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.free { background: var(--mint-bg); color: var(--mint); }
.badge.pro { background: var(--amber-bg); color: var(--amber); }
.badge.soon { background: var(--raise); color: var(--muted); }
.badge.game { background: var(--blue-bg); color: var(--blue); }
.badge.mod { background: var(--violet-bg); color: var(--violet); }
.tile { border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.t-mint { background: var(--mint-bg); color: var(--mint); }
.t-amber { background: var(--amber-bg); color: var(--amber); }
.t-blue { background: var(--blue-bg); color: var(--blue); }
.t-violet { background: var(--violet-bg); color: var(--violet); }
.t-pink { background: var(--pink-bg); color: var(--pink); }
.t-gray { background: var(--raise); color: var(--muted); }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: #0E1016E6; backdrop-filter: blur(12px); border-bottom: 1px solid #1C2030; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand b { font-size: 22px; font-weight: 700; direction: ltr; letter-spacing: -0.5px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 10px; }
.nav a:hover, .nav a.on { color: var(--text); background: #1A1D27; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--raise); cursor: pointer; align-items: center; justify-content: center; }

/* ---------- sections ---------- */
section { padding: 88px 0; }
.sec-head { display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin-bottom: 40px; }
.sec-head.center { margin-inline: auto; text-align: center; align-items: center; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--mint); }
.sec-head h2 { font-size: 38px; line-height: 1.3; font-weight: 700; }
.sec-head p { font-size: 17px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* hero */
.hero { padding: 72px 0 96px; overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#1C202B 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(to bottom, #000 30%, transparent); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 54px; line-height: 1.25; font-weight: 700; margin: 18px 0 18px; }
.hero h1 em { font-style: normal; color: var(--mint); }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 560px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero .note { margin-top: 16px; font-size: 13px; color: var(--dim); }

/* the live demo: gift -> Modly -> action */
.demo { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px #00000070; }
.demo .bar { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--dim); }
.demo .live { display: inline-flex; align-items: center; gap: 6px; color: #FF7A7A; font-weight: 700; }
.demo .live i { width: 8px; height: 8px; border-radius: 50%; background: #FF5C5C; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.demo .feed { display: flex; flex-direction: column; gap: 10px; min-height: 236px; }
.demo .row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; animation: rowIn .5s cubic-bezier(.2,1.2,.4,1) both; }
.demo .ev, .demo .act { display: flex; align-items: center; gap: 10px; background: var(--card-2); border: 1px solid #2A2F3D; border-radius: 14px; padding: 10px 12px; font-size: 14px; min-width: 0; }
.demo .act { background: var(--mint-bg); border-color: var(--mint-line); }
.demo .ev b, .demo .act b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo .ev small { display: block; font-size: 11px; color: var(--dim); }
.demo .arrow { color: var(--faint); }
@keyframes rowIn { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: none; } }

/* steps */
.steps { counter-reset: s; }
.step { position: relative; padding-top: 64px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: 22px; right: 26px; width: 34px; height: 34px; border-radius: 50%; background: var(--mint); color: var(--ink); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step h3 { font-size: 19px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }

/* services */
.service { display: flex; flex-direction: column; gap: 14px; }
.service h3 { font-size: 22px; }
.service p { color: var(--muted); }
.service ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); font-size: 15px; }
.service li { display: flex; gap: 10px; align-items: flex-start; }
.service li svg { flex: 0 0 auto; margin-top: 5px; color: var(--mint); }

/* store */
.store-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 10px; min-height: 46px; width: 320px; max-width: 100%; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; padding: 0 14px; color: var(--dim); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font: inherit; font-size: 15px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; text-align: right; padding: 0; transition: transform .2s, border-color .2s; color: inherit; }
.item:hover { transform: translateY(-4px); border-color: var(--line-2); }
.item .thumb { height: 140px; display: flex; align-items: center; justify-content: center; position: relative; }
.item .thumb .badges { position: absolute; top: 12px; right: 12px; left: 12px; display: flex; justify-content: space-between; }
.item .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.item h3 { font-size: 18px; }
.item .game { font-size: 13px; color: var(--dim); }
.item p { font-size: 14px; color: var(--muted); line-height: 1.65; }
.item .more { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 600; color: var(--mint); }
.empty { padding: 40px; text-align: center; color: var(--dim); border: 1px dashed var(--line-2); border-radius: 18px; }

/* pricing */
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.seg button { min-height: 40px; padding: 0 20px; border-radius: 999px; border: 0; font-weight: 600; font-size: 14px; cursor: pointer; background: transparent; color: var(--muted); }
.seg button.on { background: var(--text); color: var(--ink); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; margin-top: 28px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 18px; position: relative; }
.plan.best { border: 2px solid var(--mint); }
.plan .tag { position: absolute; top: -14px; right: 26px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--mint); color: var(--ink); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; }
.plan h3 { font-size: 22px; }
.plan .sub { color: var(--muted); font-size: 14px; }
.price { display: flex; align-items: baseline; gap: 6px; }
.price b { font-size: 42px; font-weight: 700; }
.price span { color: var(--muted); }
.feat { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: var(--text-2); }
.feat li { display: flex; gap: 10px; align-items: flex-start; }
.feat li.no { color: var(--dim); }
.feat svg { flex: 0 0 auto; margin-top: 4px; }

/* about */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.about p { color: var(--muted); font-size: 17px; margin-bottom: 14px; }
.values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.value { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.value b { display: block; font-size: 17px; margin: 10px 0 4px; }
.value span { color: var(--muted); font-size: 14px; }

/* faq */
.faq { display: flex; flex-direction: column; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 64px; font-weight: 600; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; color: var(--mint); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; }

/* download band + footer */
.band { background: var(--mint-bg); border: 1px solid var(--mint-line); border-radius: 28px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.band h2 { font-size: 32px; }
.band p { color: var(--muted); margin-top: 6px; }
.site-foot { border-top: 1px solid #1C2030; padding: 48px 0 32px; color: var(--dim); font-size: 14px; }
.site-foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 30px; }
.site-foot h4 { color: var(--text); margin: 0 0 12px; font-size: 15px; }
.site-foot ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--text); }
.site-foot .legal { border-top: 1px solid #1C2030; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }

/* modal */
.modal-back { position: fixed; inset: 0; background: #05060ACC; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(620px, 100%); max-height: 100%; overflow-y: auto; background: var(--card); border: 1px solid var(--line-2); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 16px; animation: up .25s cubic-bezier(.2,.9,.3,1) both; }
@keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.icon-btn:hover { color: var(--text); background: var(--raise); }
.actions-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.actions-list li { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; display: flex; gap: 8px; align-items: center; }

/* intro (same "pop the logo" entrance as the app) */
.intro { position: fixed; inset: 0; z-index: 100; background-color: var(--bg-deep); background-image: radial-gradient(#1C202B 1px, transparent 1px); background-size: 28px 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; overflow: hidden; }
.intro .hole { position: relative; width: 240px; height: 240px; display: flex; align-items: center; justify-content: center; }
.intro .glow { position: absolute; inset: 20px; border-radius: 50%; transition: box-shadow .3s, background .3s; pointer-events: none; }
.intro .logo { position: relative; width: 170px; height: 170px; border: 0; padding: 0; background: transparent; cursor: pointer; --s: 1; transform: scale(var(--s)); }
.intro .logo rect { transition: fill .25s; }
.intro .crack { transition: opacity .2s; }
.intro .idle { animation: breathe 2.4s ease-in-out infinite; }
.intro .hitA { animation: hitA .45s cubic-bezier(.3,1.6,.5,1); }
.intro .hitB { animation: hitB .45s cubic-bezier(.3,1.6,.5,1); }
.intro .pop { animation: popout .5s cubic-bezier(.5,0,.8,.4) forwards; pointer-events: none; }
@keyframes breathe { 50% { transform: scale(1.05); } }
@keyframes hitA { 15% { transform: scale(calc(var(--s) * .8)) rotate(-9deg); } 40% { transform: scale(calc(var(--s) * 1.14)) rotate(6deg); } 100% { transform: scale(var(--s)); } }
@keyframes hitB { 15% { transform: scale(calc(var(--s) * .8)) rotate(9deg); } 40% { transform: scale(calc(var(--s) * 1.14)) rotate(-6deg); } 100% { transform: scale(var(--s)); } }
@keyframes popout { 35% { transform: scale(calc(var(--s) * 1.4)); } 100% { transform: scale(0) rotate(30deg); opacity: 0; } }
.intro .hint { font-size: 22px; font-weight: 600; min-height: 34px; text-align: center; }
.intro .dots { display: flex; gap: 12px; justify-content: center; }
.intro .dots span { width: 12px; height: 12px; border-radius: 50%; background: #232733; transition: background .2s, transform .2s; }
.intro .dots span.on { background: var(--mint); transform: scale(1.25); }
.intro .p { position: absolute; left: 50%; top: 50%; animation: fly 1.1s cubic-bezier(.1,.7,.3,1) forwards; pointer-events: none; }
@keyframes fly { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(.3); opacity: 0; } }
.intro .ring { position: absolute; left: 50%; top: 50%; width: 140px; height: 140px; border-radius: 50%; border: 3px solid var(--mint); transform: translate(-50%, -50%) scale(.3); animation: ring 1s ease-out forwards; pointer-events: none; }
@keyframes ring { to { transform: translate(-50%, -50%) scale(7); opacity: 0; } }
.intro .flash { position: absolute; inset: 0; background: #F2FFF8; animation: flash .45s ease-out forwards; pointer-events: none; }
@keyframes flash { from { opacity: .85; } to { opacity: 0; } }
.intro .word { display: flex; align-items: center; gap: 20px; font-size: 84px; font-weight: 700; letter-spacing: -3px; direction: ltr; }
.intro .ch { display: inline-block; opacity: 0; animation: rise .6s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(40px) scale(.6); } to { opacity: 1; transform: none; } }
.intro.leave { animation: leave .7s cubic-bezier(.7,0,.2,1) forwards; }
@keyframes leave { to { clip-path: circle(0% at 50% 50%); } }
.intro { clip-path: circle(150% at 50% 50%); }
.intro .skip { position: absolute; bottom: 24px; left: 24px; background: none; border: 0; color: var(--dim); font-size: 14px; cursor: pointer; padding: 10px; }
.intro .skip:hover { color: var(--text); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.9,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap, .about { grid-template-columns: 1fr; }
  .hero h1 { font-size: 42px; }
  .g3, .plans { grid-template-columns: 1fr; }
  .site-foot .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: 72px; right: 0; left: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; }
  .nav.open { display: flex; }
  .head-cta { display: none; }
  section { padding: 64px 0; }
  .sec-head h2 { font-size: 30px; }
  .hero h1 { font-size: 34px; }
  .g2, .values, .actions-list { grid-template-columns: 1fr; }
  .band { padding: 32px 24px; }
  .wrap { padding: 0 16px; }
  .intro .word { font-size: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
