/* Nooklith website — shared styles. Tokens mirror the app's Figma variables (Color · Light / Dark). */
:root {
  --bg: #FFFFFF; --bg2: #F5F5F7; --bg3: #EFEFF2; --card: #FFFFFF;
  --tp: #0A0A0B; --ts: #6E6E73; --tt: #AEAEB2;
  --bd: #E8E8EC; --bds: #D1D1D6;
  --acc: #0A0A0B; --onacc: #FFFFFF;
  --link: #3478F6; --ok: #30A46C; --err: #E5484D; --warn: #E2A336;
  --on-bg: #E3F4E8; --on-fg: #2E7A4B; --work-bg: #E5EDFB; --work-fg: #2F5C9C;
  --rest-bg: #FBF0DC; --rest-fg: #8A6420; --dnd-bg: #FBE5E5; --dnd-fg: #A63A3A;
  --glass: rgba(255, 255, 255, .46); --glass-strong: rgba(255, 255, 255, .72); --glass-stroke: rgba(255, 255, 255, .85);
  --shadow: 0 1px 1px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .08);
  --blob-a: #9EC7FA; --blob-b: #B8A9F7; --blob-c: #9EE6D1; --blob-d: #F3A3B4;
  --sponsor: linear-gradient(90deg, #F2B55A, #E8789A 50%, #9C8CF0);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --r-sm: 14px; --r-md: 22px; --r-lg: 28px; --r-xl: 40px;
  --max: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --bg2: #111113; --bg3: #1F1F21; --card: #161618;
    --tp: #F5F5F7; --ts: #AEAEB2; --tt: #6E6E73; --bd: #2C2C2E; --bds: #3A3A3C;
    --acc: #F5F5F7; --onacc: #0A0A0B; --link: #5E9BFF; --ok: #3DD68C; --err: #FF6369;
    --on-bg: #18301F; --on-fg: #92D6A9; --work-bg: #18263A; --work-fg: #A2C1F2;
    --rest-bg: #33281A; --rest-fg: #E9C784; --dnd-bg: #3A1D1E; --dnd-fg: #F2A5A5;
    --glass: rgba(41, 41, 43, .42); --glass-strong: rgba(30, 30, 32, .72); --glass-stroke: rgba(255, 255, 255, .14);
    --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .45);
    --blob-a: #2C4D7A; --blob-b: #43376F; --blob-c: #1E5245; --blob-d: #5A2A38;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--tp); font-family: var(--font); font-size: 17px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Liquid glass ---------- */
.glass { background: var(--glass); border: 1px solid var(--glass-stroke); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); }
.glass-strong { background: var(--glass-strong); }

/* ---------- Ambient color blobs ---------- */
.ambient { position: absolute; inset: 0 0 auto 0; height: 900px; overflow: hidden; pointer-events: none; z-index: -1; }
.ambient span { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .75; }
.ambient .a { width: 620px; height: 620px; background: var(--blob-a); left: -160px; top: -140px; }
.ambient .b { width: 640px; height: 640px; background: var(--blob-b); right: -160px; top: -120px; }
.ambient .c { width: 520px; height: 520px; background: var(--blob-c); left: 32%; top: 380px; opacity: .5; }
.ambient.warm .b { background: var(--blob-d); }
.page { position: relative; isolation: isolate; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* ---------- Layout ---------- */
.wrap { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.section { padding: 120px 0 0; }
.center { text-align: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ts); margin: 0 0 14px; }
.h1 { font-size: clamp(44px, 6.4vw, 78px); line-height: 1.02; letter-spacing: -.03em; font-weight: 700; margin: 0; }
.h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -.025em; font-weight: 700; margin: 0 auto; max-width: 760px; }
.lead { font-size: clamp(17px, 1.6vw, 21px); color: var(--ts); line-height: 1.45; max-width: 640px; margin: 18px auto 0; }
.muted { color: var(--ts); }

/* ---------- Header ---------- */
.topbar { position: sticky; top: 16px; z-index: 50; width: min(var(--max), calc(100% - 32px)); margin: 16px auto 0; display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 16px; border-radius: var(--r-lg); }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.logo svg { width: 26px; height: 26px; }
.logo svg path { fill: var(--tp); }
.nav { display: flex; gap: 28px; margin-left: auto; margin-right: 12px; font-size: 15px; color: var(--ts); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--tp); }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--glass-stroke); background: var(--glass); align-items: center; justify-content: center; cursor: pointer; }
.menu-btn i { display: block; width: 16px; height: 2px; background: var(--tp); border-radius: 1px; box-shadow: 0 5px 0 var(--tp); transform: translateY(-2.5px); }
.mobile-menu { position: fixed; inset: 0; z-index: 60; display: none; padding: 88px 24px 24px; background: var(--glass-strong); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; font-size: 28px; font-weight: 700; letter-spacing: -.02em; padding: 10px 0; }
.mobile-menu .close { position: absolute; top: 24px; right: 24px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 28px; font-weight: 600; font-size: 17px; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, opacity .15s ease; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--acc); color: var(--onacc); }
.btn-glass { background: var(--glass); border-color: var(--glass-stroke); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); }
.btn-sponsor { background: var(--sponsor); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; border-radius: 20px; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.appstore { display: inline-flex; align-items: center; height: 54px; }
.appstore img { height: 54px; width: auto; }

/* ---------- Cards / chips ---------- */
.card { border-radius: var(--r-lg); padding: 28px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 12px; border-radius: 16px; font-size: 14px; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.status-online { background: var(--on-bg); color: var(--on-fg); }
.status-working { background: var(--work-bg); color: var(--work-fg); }
.status-resting { background: var(--rest-bg); color: var(--rest-fg); }
.status-dnd { background: var(--dnd-bg); color: var(--dnd-fg); }
.icon-tile { width: 48px; height: 48px; border-radius: 16px; background: var(--acc); color: var(--onacc); display: grid; place-items: center; }
.icon-tile svg { width: 24px; height: 24px; }
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.feature h3 { margin: 16px 0 8px; font-size: 21px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--ts); }

/* ---------- Phone mockup ---------- */
.phone { position: relative; width: 320px; aspect-ratio: 440 / 956; padding: 10px; border-radius: 52px; background: #141416; border: 2px solid #9a9aa0; box-shadow: 0 40px 80px rgba(0, 0, 0, .22); flex: none; }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 42px; background: var(--bg2); }
.phone.tilt-l { transform: rotate(-6deg); }
.phone.tilt-r { transform: rotate(5deg); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 80px; }
.hero .lead { margin-left: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; align-items: center; }
.hero-phones { position: relative; height: 700px; }
.hero-phones .phone { position: absolute; }
.hero-phones .p1 { left: 0; top: 0; z-index: 2; }
.hero-phones .p2 { left: 230px; top: 40px; width: 290px; }
.avatars { display: flex; }
.avatars img, .avatars span { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--bg); margin-left: -10px; object-fit: cover; background: var(--bg3); }
.avatars :first-child { margin-left: 0; }
.trust { display: flex; align-items: center; gap: 12px; margin-top: 22px; color: var(--ts); font-size: 15px; }

.statuses { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 40px; }
.statuses .chip { font-size: 17px; padding: 10px 20px 10px 18px; border-radius: 24px; }
.duo { display: flex; justify-content: center; gap: 120px; margin-top: 64px; position: relative; }
.duo .note { position: absolute; right: 0; bottom: 120px; width: 300px; border-radius: 24px; padding: 18px 22px; }
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 40px; align-items: center; }
.split .lead { margin-left: 0; max-width: 100%; }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; gap: 24px; margin-top: 48px; }
.plans-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plan { border-radius: 32px; padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.plan.featured { outline: 2px solid var(--acc); outline-offset: -2px; }
.plan.sponsor { position: relative; }
.plan.sponsor::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; background: var(--sponsor); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.plan h3 { margin: 0; font-size: 26px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.price { font-size: 44px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.plan ul { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--on-fg); }
.plan.sponsor li svg { color: var(--link); }
.plan .btn { margin-top: auto; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 8px; background: var(--acc); color: var(--onacc); }
.petal { width: 16px; height: 16px; border-radius: 50% 50% 14% 50%; background: var(--sponsor); display: inline-block; border: 1px solid rgba(255, 255, 255, .7); }

.cta-final { display: flex; align-items: center; gap: 48px; padding: 48px 56px; border-radius: var(--r-xl); margin-top: 140px; }

/* ---------- Tables / FAQ ---------- */
.compare { border-radius: var(--r-lg); overflow: hidden; margin-top: 24px; }
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 14px 28px; text-align: center; font-size: 15px; }
.compare th:first-child, .compare td:first-child { text-align: left; font-size: 17px; }
.compare thead th { font-size: 17px; padding-top: 18px; padding-bottom: 18px; }
.compare tbody tr:nth-child(odd) { background: color-mix(in srgb, var(--bg3) 55%, transparent); }
.compare .yes { color: var(--on-fg); font-weight: 700; }
.compare .no { color: var(--tt); }
.faq { display: grid; gap: 12px; margin-top: 24px; }
.faq details { border-radius: 20px; padding: 18px 24px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "›"; color: var(--ts); transition: transform .2s; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { transform: rotate(90deg); }
.faq p { margin: 10px 0 0; color: var(--ts); }

/* ---------- Footer ---------- */
.footer { background: var(--bg2); margin-top: 140px; padding: 56px 0 40px; font-size: 15px; }
.footer .cols { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 40px; }
.footer h4 { margin: 0 0 12px; font-size: 15px; }
.footer a { display: block; color: var(--ts); padding: 4px 0; }
.footer a:hover { color: var(--tp); }
.footer .bottom { display: flex; justify-content: space-between; border-top: 1px solid var(--bd); margin-top: 40px; padding-top: 20px; color: var(--tt); font-size: 13px; }
.footer-small { margin-top: auto; padding: 28px 0; background: var(--bg2); display: flex; justify-content: center; gap: 24px; font-size: 13px; color: var(--tt); flex-wrap: wrap; }
.footer-small nav { display: flex; gap: 16px; }
.footer-small a { color: var(--ts); }

/* ---------- Doc / article layout ---------- */
.doc { display: grid; grid-template-columns: 260px 1fr; gap: 80px; padding-top: 56px; }
.toc { position: sticky; top: 110px; align-self: start; border-radius: 22px; padding: 20px; display: grid; gap: 12px; font-size: 15px; }
.toc b { font-size: 12px; letter-spacing: .08em; color: var(--tt); }
.toc a { color: var(--ts); }
.toc a:hover { color: var(--tp); }
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(34px, 4vw, 48px); letter-spacing: -.025em; line-height: 1.08; margin: 0 0 8px; }
.prose h2 { font-size: 26px; letter-spacing: -.01em; margin: 40px 0 10px; scroll-margin-top: 110px; }
.prose p, .prose li { font-size: 18px; line-height: 1.6; color: var(--ts); }
.prose a { color: var(--link); }
.crumbs { display: flex; gap: 8px; color: var(--ts); font-size: 15px; padding-top: 40px; }
.crumbs span:last-child { color: var(--tp); }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 22px; margin-top: 40px; }
.seg a { padding: 10px 18px; border-radius: 18px; font-size: 15px; color: var(--ts); }
.seg a[aria-current="page"] { background: var(--card); color: var(--tp); font-weight: 600; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }

/* ---------- Forms ---------- */
.search { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 18px; border-radius: 28px; width: min(640px, 100%); margin: 24px auto 0; }
.search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 17px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ts); }
.field input, .field select, .field textarea { width: 100%; border-radius: 16px; border: 1px solid var(--bd); background: color-mix(in srgb, var(--card) 85%, transparent); padding: 14px 16px; font-size: 17px; outline: none; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--link); }
.field.invalid input, .field.invalid textarea { border-color: var(--err); border-width: 1.5px; }
.field .error { display: none; color: var(--err); font-size: 13px; }
.field.invalid .error { display: block; }

/* ---------- Profile / invite ---------- */
.profile-page .ambient-photo { position: absolute; inset: 0 0 auto 0; height: 560px; overflow: hidden; z-index: -1; }
.profile-page .ambient-photo::before { content: ""; position: absolute; inset: -80px; background: var(--photo, none) center / cover no-repeat, linear-gradient(135deg, var(--blob-a), var(--blob-b)); filter: blur(70px) saturate(140%); transform: scale(1.2); opacity: .9; }
.profile-page .ambient-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 15%, transparent), var(--bg) 92%); }
.profile-layout { display: grid; grid-template-columns: minmax(0, 520px); gap: 40px; justify-content: center; align-items: center; padding: 64px 0 40px; }
.profile-card { border-radius: var(--r-xl); padding: 40px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.avatar { position: relative; width: 140px; height: 140px; border-radius: 50%; padding: 5px; border: 3.5px solid var(--ring, var(--bds)); }
.avatar img, .avatar .initials { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar .initials { display: grid; place-items: center; font-size: 40px; font-weight: 600; color: var(--ts); background: var(--glass); }
.avatar .st-dot { position: absolute; right: 2px; bottom: 6px; width: 34px; height: 34px; border-radius: 50%; background: var(--ring); border: 4px solid var(--bg); }
.profile-card .name { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 0; line-height: 1.1; }
.profile-card .user { color: var(--ts); font-size: 20px; margin: 0; }
.profile-card .bio { margin: 4px 0 0; max-width: 400px; }
.profile-card .link { color: var(--link); font-weight: 600; font-size: 15px; display: inline-flex; gap: 6px; align-items: center; }
.profile-actions { display: flex; width: 100%; gap: 12px; flex-direction: column; margin-top: 12px; }
.info-note { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 22px; font-size: 13px; color: var(--ts); text-align: left; width: 100%; }
.state-card { max-width: 440px; margin: 96px auto 0; text-align: center; display: grid; gap: 14px; justify-items: center; padding: 0 24px; }
.lens { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; }
.lens svg { width: 44px; height: 44px; color: var(--tp); }
.skeleton { background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.members { display: flex; align-items: center; gap: 10px; color: var(--ts); font-size: 13px; }

/* ---------- 404 ---------- */
.big-lens { position: relative; width: 200px; height: 200px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; }
.big-lens .core { width: 150px; height: 150px; border-radius: 50%; background: var(--acc); display: grid; place-items: center; }
.big-lens .core svg { width: 70px; height: 70px; }
.big-lens .core svg path { fill: var(--onacc); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero, .split { grid-template-columns: minmax(0,1fr); }
  .hero { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-cta, .trust { justify-content: center; }
  .hero-phones { height: 620px; width: 520px; margin: 0 auto; max-width: 100%; }
  .grid-3, .grid-4, .plans-3 { grid-template-columns: 1fr 1fr; }
  .duo { gap: 40px; } .duo .note { position: static; margin-top: 24px; }
  .profile-layout { grid-template-columns: minmax(0, 520px); }
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .doc { grid-template-columns: 1fr; gap: 24px; } .toc { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .topbar .btn-get { margin-left: auto; }
  .menu-btn { display: inline-flex; }
  .section { padding-top: 88px; }
  .hero { padding-top: 48px; }
  .hero-phones { height: 560px; width: 100%; }
  .hero-phones .p1 { left: 50%; transform: translateX(-50%); width: 250px; }
  .hero-phones .p2 { display: none; }
  .phone { width: 250px; border-radius: 42px; } .phone img { border-radius: 33px; }
  .duo { flex-direction: column; align-items: center; } .duo .phone:nth-child(2) { display: none; }
  .grid-3, .grid-4, .plans, .plans-3 { grid-template-columns: 1fr; }
  .feature { display: grid; grid-template-columns: 42px 1fr; gap: 0 14px; padding: 16px; }
  .feature .icon-tile { width: 42px; height: 42px; border-radius: 14px; grid-row: span 2; }
  .feature h3 { margin: 0 0 2px; font-size: 17px; }
  .cta-final { flex-direction: column; text-align: center; padding: 32px 24px; gap: 20px; }
  .footer .cols { grid-template-columns: 1fr; }
  .compare th, .compare td { padding: 12px 12px; }
  .profile-layout { padding-top: 24px; }
  .profile-card { background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 24px 0 0; }
    .avatar { width: 124px; height: 124px; }
  .profile-card .name { font-size: 30px; }
  .split .phone { margin: 0 auto; }
  .split .phone + .phone { display: none; }
  .split { text-align: center; } .split .lead { margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.only-phone { display: none !important; }
@media (max-width: 640px) { .only-phone { display: inline-flex !important; } .only-desktop { display: none; } }
.profile-actions .appstore { justify-content: center; }
