:root {
  color-scheme: dark;
  --bg: #070a12;
  --bg-2: #0d1020;
  --surface: #12172a;
  --surface-up: #171d33;
  --blue: #4d7cff;
  --violet: #7c5cff;
  --cyan: #27d7f5;
  --text: #f7f9ff;
  --secondary: #aeb7cf;
  --muted: #737d98;
  --success: #3ed598;
  --warning: #ffbf5f;
  --error: #ff5d73;
  --border: rgba(125, 156, 255, 0.18);
  --gradient: linear-gradient(120deg, var(--blue), var(--violet) 54%, var(--cyan));
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; background: var(--bg); }
body { overflow-x: hidden; line-height: 1.6; }
body::before {
  position: fixed; inset: 0; z-index: -3; content: ""; pointer-events: none;
  background:
    radial-gradient(circle at 12% 4%, rgba(77, 124, 255, .13), transparent 32rem),
    radial-gradient(circle at 88% 16%, rgba(124, 92, 255, .12), transparent 29rem),
    radial-gradient(circle at 50% 82%, rgba(39, 215, 245, .06), transparent 34rem),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }

.site-header {
  position: sticky; top: 0; z-index: 50; width: min(1180px, calc(100% - 32px)); height: 72px;
  margin: 12px auto 0; padding: 0 14px 0 12px; display: flex; align-items: center; gap: 28px;
  border: 1px solid rgba(125, 156, 255, .14); border-radius: 22px;
  background: rgba(7, 10, 18, .76); backdrop-filter: blur(20px); box-shadow: 0 16px 55px rgba(0, 0, 0, .24);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 680; letter-spacing: .04em; }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.server-health { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.server-status {
  min-height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 11px;
  border: 1px solid rgba(255, 191, 95, .2); border-radius: 999px;
  color: var(--secondary); background: rgba(18, 23, 42, .7); font-size: 12px; font-weight: 700;
  white-space: nowrap; transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.server-status-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--warning); box-shadow: 0 0 14px rgba(255, 191, 95, .5); }
.server-status[data-state="online"] { color: #bdf3dd; border-color: rgba(62, 213, 152, .28); background: rgba(62, 213, 152, .07); }
.server-status[data-state="online"] .server-status-dot { background: var(--success); box-shadow: 0 0 14px rgba(62, 213, 152, .62); }
.server-status[data-state="degraded"], .server-status[data-state="checking"] { color: #ffe0a7; }
.server-status[data-state="offline"] { color: #ffc0ca; border-color: rgba(255, 93, 115, .3); background: rgba(255, 93, 115, .08); }
.server-status[data-state="offline"] .server-status-dot { background: var(--error); box-shadow: 0 0 14px rgba(255, 93, 115, .62); }
.server-refresh {
  width: 38px; height: 38px; display: grid; place-items: center; flex: none; padding: 0;
  border: 1px solid rgba(125, 156, 255, .14); border-radius: 50%; color: var(--secondary);
  background: rgba(18, 23, 42, .7); cursor: pointer; transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.server-refresh:hover { color: var(--text); border-color: rgba(39, 215, 245, .32); background: rgba(39, 215, 245, .08); }
.server-refresh:focus-visible { outline: 3px solid rgba(39, 215, 245, .42); outline-offset: 3px; }
.server-refresh:disabled { cursor: wait; opacity: .76; }
.server-refresh svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.server-refresh.is-refreshing svg { animation: server-refresh-spin .8s linear infinite; }
@keyframes server-refresh-spin { to { transform: rotate(360deg); } }
.site-header nav { display: flex; align-items: center; justify-content: center; gap: 26px; margin-left: auto; }
.site-header nav a, footer nav a { color: var(--secondary); font-size: 14px; transition: color .18s ease; }
.site-header nav a:hover, footer nav a:hover { color: var(--text); }
.menu-button { display: none; margin-left: auto; border: 0; color: var(--text); background: transparent; font-size: 25px; width: 44px; height: 44px; border-radius: 14px; }

.section { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 112px 0; }
.hero { min-height: calc(100vh - 84px); display: grid; grid-template-columns: minmax(0, .92fr) minmax(440px, 1.08fr); align-items: center; gap: 64px; padding-top: 70px; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: #a8b8ff; font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 16px rgba(62, 213, 152, .65); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 24px 0; max-width: 720px; font-size: clamp(46px, 6.2vw, 82px); line-height: .99; letter-spacing: -.055em; }
h1 span, .section-heading h2 span { color: transparent; background: var(--gradient); background-clip: text; -webkit-background-clip: text; }
.hero-lead { max-width: 610px; color: var(--secondary); font-size: clamp(17px, 2vw, 21px); line-height: 1.62; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 999px; padding: 0 23px; color: var(--text); font-weight: 700; cursor: pointer; transition: transform .18s ease, border-color .18s ease, filter .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button:focus-visible, .store-button:focus-visible, input:focus-visible, select:focus-visible, .menu-button:focus-visible { outline: 3px solid rgba(39, 215, 245, .42); outline-offset: 3px; }
.button.primary { background: var(--gradient); box-shadow: 0 14px 44px rgba(77, 124, 255, .25); }
.button.primary:hover { filter: brightness(1.08); }
.button.secondary { border-color: var(--border); background: rgba(18, 23, 42, .72); }
.button.ghost { color: var(--secondary); }
.button.compact { min-height: 42px; padding-inline: 18px; font-size: 14px; }
.button.wide { width: 100%; }
.mobile-only { display: none; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.trust-row span { padding: 6px 11px; border: 1px solid rgba(125, 156, 255, .12); border-radius: 999px; color: var(--muted); font-size: 12px; }

.hero-visual { position: relative; min-height: 650px; display: grid; place-items: center; isolation: isolate; }
.hero-visual::before { position: absolute; z-index: -2; width: 480px; height: 480px; content: ""; border-radius: 50%; background: radial-gradient(circle, rgba(92, 78, 255, .26), rgba(39, 215, 245, .05) 44%, transparent 70%); filter: blur(10px); }
.orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(1px); background: radial-gradient(circle at 30% 25%, #c0a8ff 0, #7152ff 25%, #1637a8 57%, rgba(8, 13, 36, .2) 72%); box-shadow: 0 0 40px rgba(124, 92, 255, .28); }
.orb-one { width: 86px; height: 86px; right: 7%; top: 13%; }
.orb-two { width: 38px; height: 38px; left: 8%; bottom: 19%; }
.phone { width: 330px; height: 640px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid rgba(173, 185, 255, .28); border-radius: 42px; background: #080b15; box-shadow: 0 40px 100px rgba(0, 0, 0, .58), inset 0 0 0 6px #080a12; transform: rotate(2.2deg); }
.phone-top { height: 48px; padding: 18px 25px 0; display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; }
.chat-head { min-height: 68px; display: flex; align-items: center; gap: 11px; padding: 10px 18px; border-bottom: 1px solid rgba(125, 156, 255, .12); }
.chat-head img { width: 40px; height: 40px; }
.chat-head div { display: grid; }
.chat-head small { color: var(--muted); }
.chat-wallpaper { flex: 1; padding: 24px 15px; display: flex; flex-direction: column; justify-content: flex-end; gap: 13px; background-size: cover; background-position: center; }
.summer-bg { background-image: linear-gradient(rgba(5, 8, 18, .24), rgba(5, 8, 18, .42)), url('/web-assets/wallpapers/oqelo_summer_03.jpg'); }
.bubble { width: fit-content; max-width: 80%; padding: 10px 12px 7px; border-radius: 17px; font-size: 13px; line-height: 1.35; box-shadow: 0 8px 20px rgba(0, 0, 0, .22); }
.bubble b { display: block; margin-bottom: 3px; color: var(--cyan); font-size: 11px; }
.bubble time { display: block; margin-top: 4px; color: rgba(247, 249, 255, .62); font-size: 9px; text-align: right; }
.bubble.received { align-self: flex-start; background: rgba(18, 23, 42, .93); border: 1px solid rgba(125, 156, 255, .17); }
.bubble.sent { align-self: flex-end; background: linear-gradient(130deg, #4d7cff, #7c5cff); }
.composer { min-height: 68px; display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 11px 15px 15px; color: var(--muted); font-size: 13px; }
.composer span { flex: 1; padding: 11px 15px; border: 1px solid rgba(125, 156, 255, .18); border-radius: 999px; background: var(--surface); }
.composer i { width: 39px; height: 39px; display: grid; place-items: center; margin-left: 8px; border-radius: 50%; font-style: normal; background: var(--gradient); color: white; }
.floating-card { position: absolute; z-index: 2; min-width: 210px; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 18px; background: rgba(18, 23, 42, .84); backdrop-filter: blur(18px); box-shadow: 0 18px 48px rgba(0, 0, 0, .36); }
.floating-card > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--cyan); background: rgba(77, 124, 255, .15); }
.floating-card div { display: grid; font-size: 13px; }
.floating-card small { color: var(--muted); }
.card-personalize { left: 0; top: 23%; }
.card-realtime { right: -3%; bottom: 17%; }
.card-realtime > span { color: var(--success); }

.block-section { padding-top: 80px; }
.section-heading { max-width: 720px; margin-bottom: 44px; }
.section-heading h2, .rooms-copy h2, .download-section h2, .beta-section h2 { margin: 14px 0; font-size: clamp(34px, 4.5vw, 58px); line-height: 1.08; letter-spacing: -.045em; }
.section-heading p, .rooms-copy p, .download-section p, .beta-copy p { max-width: 650px; color: var(--secondary); font-size: 17px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card { min-height: 240px; padding: 26px; border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(145deg, rgba(23, 29, 51, .78), rgba(13, 16, 32, .72)); box-shadow: 0 24px 60px rgba(0, 0, 0, .18); }
.feature-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 28px; border: 1px solid rgba(125, 156, 255, .2); border-radius: 15px; color: var(--cyan); background: rgba(77, 124, 255, .12); font-size: 22px; }
.feature-card h3 { margin-bottom: 8px; font-size: 19px; }
.feature-card p { color: var(--secondary); font-size: 15px; }

.personalize-section { padding-bottom: 70px; }
.wallpaper-showcase { min-height: 560px; display: flex; align-items: center; justify-content: center; gap: 22px; perspective: 1000px; }
.wallpaper-card { position: relative; width: 250px; height: 510px; overflow: hidden; border: 1px solid rgba(173, 185, 255, .25); border-radius: 32px; box-shadow: 0 35px 80px rgba(0, 0, 0, .42); transform: rotateY(8deg) scale(.92); }
.wallpaper-card:nth-child(3) { transform: rotateY(-8deg) scale(.92); }
.wallpaper-card.featured { z-index: 2; transform: translateY(-16px); }
.wallpaper-card img { width: 100%; height: 100%; object-fit: cover; }
.wallpaper-card::after { position: absolute; inset: 0; content: ""; background: linear-gradient(transparent 65%, rgba(5, 8, 18, .85)); }
.wallpaper-card span { position: absolute; z-index: 2; bottom: 20px; left: 20px; font-weight: 700; }

.rooms-section { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 80px; }
.rooms-copy .button { margin-top: 18px; }
.room-panel { padding: 28px; border: 1px solid var(--border); border-radius: 28px; background: linear-gradient(145deg, rgba(23, 29, 51, .86), rgba(10, 13, 26, .78)); box-shadow: 0 34px 90px rgba(0, 0, 0, .34); }
.room-title { display: flex; align-items: center; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.room-title div:nth-child(2) { flex: 1; display: grid; }
.room-title small { color: var(--muted); }
.room-avatar { width: 50px; height: 50px; display: grid !important; place-items: center; flex: none !important; border-radius: 50%; background: var(--gradient); font-size: 13px; font-weight: 800; }
.member-stack { display: flex; padding: 24px 0; }
.member-stack i { width: 42px; height: 42px; display: grid; place-items: center; margin-left: -7px; border: 3px solid var(--surface); border-radius: 50%; background: var(--gradient); font-size: 11px; font-style: normal; font-weight: 700; }
.member-stack i:first-child { margin-left: 0; }
.role-row { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; color: var(--secondary); border-top: 1px solid rgba(125, 156, 255, .09); }
.role-row b { color: var(--text); font-size: 14px; text-align: right; }
.invite-preview { margin-top: 20px; padding: 14px; border: 1px solid rgba(39, 215, 245, .18); border-radius: 15px; color: #badfff; background: rgba(39, 215, 245, .06); font-size: 14px; }

.security-section { text-align: center; }
.security-section .section-heading { margin-inline: auto; }
.security-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.security-grid span { padding: 22px 14px; border: 1px solid var(--border); border-radius: 18px; color: var(--secondary); background: rgba(18, 23, 42, .66); }
.download-section { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 58px; border: 1px solid var(--border); border-radius: 32px; background: radial-gradient(circle at 85% 30%, rgba(124, 92, 255, .19), transparent 38%), rgba(18, 23, 42, .6); }
.download-section h2 { max-width: 650px; }
.store-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.store-button { min-width: 190px; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 8px 18px; border: 1px solid rgba(247, 249, 255, .22); border-radius: 14px; color: var(--text); background: #080a0f; cursor: pointer; text-align: left; }
.store-button > span { font-size: 26px; }
.store-button small { line-height: 1.25; color: var(--secondary); }
.store-button b { color: var(--text); font-size: 18px; }
.store-notice { width: 100%; color: #badfff !important; font-size: 13px !important; text-align: right; }

.beta-section { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; align-items: start; }
.beta-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 28px; border: 1px solid var(--border); border-radius: 28px; background: rgba(18, 23, 42, .78); box-shadow: 0 28px 76px rgba(0, 0, 0, .28); }
.beta-form label { display: grid; gap: 7px; color: var(--secondary); font-size: 13px; font-weight: 650; }
.beta-form label:first-child { grid-column: 1 / -1; }
input, select { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid rgba(125, 156, 255, .2); border-radius: 14px; color: var(--text); background: var(--surface-up); }
select { cursor: pointer; }
.beta-form .button { align-self: end; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.form-result { grid-column: 1 / -1; min-height: 24px; margin: 0; color: var(--secondary); font-size: 14px; }
.form-result.success { color: var(--success); }
.form-result.error { color: #ff8294; }

footer { width: min(1160px, calc(100% - 40px)); margin: 70px auto 0; padding: 34px 0 48px; display: flex; align-items: center; gap: 24px; color: var(--muted); border-top: 1px solid rgba(125, 156, 255, .1); font-size: 13px; }
footer .brand img { width: 30px; height: 30px; }
footer .brand span { color: var(--text); font-size: 18px; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }

.invite-main, .legal-main { width: min(1160px, calc(100% - 40px)); min-height: calc(100vh - 180px); margin: 0 auto; padding: 80px 0; display: grid; place-items: center; }
.invite-card { width: min(520px, 100%); padding: 42px; border: 1px solid var(--border); border-radius: 32px; background: radial-gradient(circle at 50% 0, rgba(124, 92, 255, .15), transparent 45%), rgba(18, 23, 42, .86); box-shadow: 0 36px 100px rgba(0, 0, 0, .45); text-align: center; }
.invite-logo { width: 72px; height: 72px; object-fit: contain; margin-bottom: 18px; }
.invite-card h1 { margin: 16px 0 28px; font-size: clamp(32px, 6vw, 48px); line-height: 1.08; }
.invite-card h2 { margin: 14px 0 0; font-size: 25px; }
.invite-card > p { color: var(--muted); }
.invite-room-avatar { width: 92px; height: 92px; display: grid; place-items: center; margin: 0 auto; overflow: hidden; border: 2px solid rgba(125, 156, 255, .35); border-radius: 50%; background: var(--gradient); font-size: 20px; font-weight: 800; }
.invite-room-avatar img { width: 100%; height: 100%; object-fit: cover; }
.invite-copy { margin: 22px 0 !important; color: var(--secondary) !important; }
.invite-card .button { margin-top: 10px; }
.invite-card small { display: block; margin-top: 22px; color: var(--muted); line-height: 1.5; }
.legal-card { width: min(780px, 100%); padding: clamp(26px, 5vw, 52px); border: 1px solid var(--border); border-radius: 30px; background: rgba(18, 23, 42, .72); }
.legal-card h1 { margin-bottom: 22px; font-size: clamp(38px, 6vw, 64px); }
.legal-card h2 { margin-top: 34px; font-size: 21px; }
.legal-card p { color: var(--secondary); }
.legal-notice { padding: 18px; border: 1px solid rgba(255, 191, 95, .22); border-radius: 16px; background: rgba(255, 191, 95, .06); }
.faq details { margin-top: 12px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: rgba(13, 16, 32, .7); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 12px 0 0; }
.legal-card > .button { margin-top: 28px; }

.reveal { opacity: 1; transform: none; transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .site-header { gap: 12px; }
  .site-header nav { display: none; position: absolute; top: 68px; left: 0; right: 0; padding: 16px; flex-direction: column; align-items: stretch; border: 1px solid var(--border); border-radius: 18px; background: rgba(7, 10, 18, .97); box-shadow: 0 25px 60px rgba(0,0,0,.4); }
  .site-header nav.open { display: flex; }
  .site-header nav a { min-height: 44px; display: flex; align-items: center; padding-inline: 12px; }
  .desktop-open { display: none; }
  .menu-button { display: grid; place-items: center; }
  .hero { grid-template-columns: 1fr; gap: 20px; padding-top: 80px; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-visual { min-height: 620px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .rooms-section, .beta-section { grid-template-columns: 1fr; gap: 45px; }
  .download-section { flex-direction: column; align-items: flex-start; }
  .store-row { justify-content: flex-start; }
  .store-notice { text-align: left; }
  .security-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .site-header { width: calc(100% - 20px); height: 62px; margin-top: 8px; border-radius: 18px; }
  .brand img { width: 34px; height: 34px; }
  .brand { font-size: 20px; }
  .site-header > .brand span { display: none; }
  .server-status { max-width: 170px; padding-inline: 9px; }
  .server-status-label { overflow: hidden; text-overflow: ellipsis; }
  .section { width: calc(100% - 32px); padding: 78px 0; }
  .hero { min-height: auto; padding-top: 72px; }
  h1 { font-size: clamp(43px, 14vw, 62px); }
  .mobile-only { display: inline-flex; }
  .hero-visual { min-height: 550px; margin-inline: -16px; overflow: hidden; }
  .phone { width: 278px; height: 540px; border-radius: 36px; }
  .card-personalize { left: 0; top: 21%; }
  .card-realtime { right: 0; bottom: 14%; }
  .floating-card { min-width: 165px; padding: 10px; }
  .floating-card > span { width: 32px; height: 32px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: auto; }
  .wallpaper-showcase { min-height: 470px; gap: 8px; margin-inline: -15px; }
  .wallpaper-card { width: 31%; height: 400px; border-radius: 22px; }
  .wallpaper-card span { left: 12px; bottom: 14px; font-size: 12px; }
  .rooms-section { gap: 34px; }
  .room-panel { padding: 20px; }
  .security-grid { grid-template-columns: 1fr; }
  .download-section { width: calc(100% - 24px); padding: 30px 22px; }
  .store-row, .store-button { width: 100%; }
  .beta-form { grid-template-columns: 1fr; padding: 20px; }
  .beta-form label:first-child { grid-column: auto; }
  .form-result { grid-column: auto; }
  footer { width: calc(100% - 32px); align-items: flex-start; flex-direction: column; }
  footer nav { margin-left: 0; }
  .invite-main, .legal-main { width: calc(100% - 24px); padding: 50px 0; }
  .invite-card { padding: 30px 20px; }
}

@media (max-width: 360px) {
  .server-status { max-width: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
