/* Hero: chat prompt over a wall of template previews */
.hero { position: relative; overflow: hidden; padding: 0; min-height: min(860px, 100svh); display: grid; place-items: center; }
.wall {
  position: absolute; inset: -40px -20px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
  transform: rotate(-4deg) scale(1.08); pointer-events: none; opacity: .95;
}
.wall-col { display: flex; flex-direction: column; gap: 14px; animation: wall-up 60s linear infinite; }
.wall-col:nth-child(even) { animation-name: wall-down; animation-duration: 70s; }
.wall-col:nth-child(3n) { animation-duration: 80s; }
@keyframes wall-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes wall-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.tile { position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: var(--soft); flex: none; }
.tile video, .tile img { width: 100%; height: 100%; object-fit: cover; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 62% 58% at 50% 50%, var(--bg) 42%, color-mix(in srgb, var(--bg) 82%, transparent) 62%, color-mix(in srgb, var(--bg) 20%, transparent) 100%),
    linear-gradient(to bottom, color-mix(in srgb, var(--bg) 70%, transparent), transparent 22%, transparent 78%, var(--bg));
}
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 96px 0 110px; width: min(820px, 100% - 40px); }
.hero h1 { font-size: clamp(40px, 7vw, 78px); font-weight: 800; }
.hero .lede { font-size: clamp(17px, 2.2vw, 21px); color: var(--muted); margin: 18px auto 34px; max-width: 620px; }

.prompt {
  display: flex; align-items: flex-end; gap: 10px; text-align: start; padding: 12px 12px 12px 22px;
  border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  max-width: 700px; margin-inline: auto; position: relative;
}
[dir="rtl"] .prompt { padding: 12px 22px 12px 12px; }
.prompt::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: var(--accent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask-composite: exclude; opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.prompt:focus-within::before { opacity: 1; }
.prompt textarea {
  flex: 1; border: 0; outline: 0; background: transparent; resize: none; min-height: 56px; max-height: 160px;
  font-size: 18px; line-height: 1.5; padding: 6px 0;
}
.prompt textarea::placeholder { color: var(--muted); }
.prompt-tools { display: flex; align-items: center; gap: 8px; }
.prompt .send {
  width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--ink); color: var(--bg);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.prompt .send svg { width: 20px; height: 20px; }
[dir="rtl"] .prompt .send svg { transform: scaleX(-1); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.chip {
  border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 85%, transparent); border-radius: 999px;
  padding: 6px 14px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.chip code, .kbd { direction: ltr; unicode-bidi: isolate; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; color: var(--blue); }
.hero-cta { display: flex; justify-content: center; gap: 10px; margin-top: 26px; flex-wrap: wrap; }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.feature + .feature { margin-top: 110px; }
.feature.flip .feature-copy { order: 2; }
.feature-copy h3 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; }
.feature-copy p { color: var(--muted); font-size: 18px; margin-top: 14px; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 4px; border-radius: 99px; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.2-4-4 1.4-1.4 2.6 2.6 5-5 1.4 1.4-6.4 6.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 0a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.2-4-4 1.4-1.4 2.6 2.6 5-5 1.4 1.4-6.4 6.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mock { padding: 22px; position: relative; }
.mock-bar { display: flex; gap: 6px; margin-bottom: 16px; }
.mock-bar i { width: 10px; height: 10px; border-radius: 99px; background: var(--line); }

/* Chat mock */
.bubbles { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 82%; padding: 10px 16px; border-radius: 20px; font-size: 15px; background: var(--soft); }
.bubble.me { align-self: flex-end; background: var(--blue); color: #fff; border-end-end-radius: 6px; }
.bubble.bot { border-end-start-radius: 6px; }
.result { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 18px; background: var(--soft); max-width: 88%; }
.result .tile { width: 92px; border-radius: 12px; }
.result b { display: block; }
.result span { font-size: 14px; color: var(--muted); }

/* Command palette */
.palette { padding: 0; overflow: hidden; }
.palette-input { direction: ltr; display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 18px; }
.palette-input .caret { width: 2px; height: 22px; background: var(--blue); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.palette-input .typed { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.palette-list { list-style: none; margin: 0; padding: 8px; height: 362px; overflow: hidden; }
.palette-list li.dim .ttl, .palette-list li.dim .cmd { color: var(--muted); }
.palette-list li { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; }
.palette-list li.on { background: var(--soft); }
.palette-list .cmd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--blue-ink); font-weight: 700; min-width: 116px; direction: ltr; text-align: start; }
.palette-list .ttl { font-weight: 700; }
.palette-list .dsc { color: var(--muted); font-size: 14px; display: block; }
.palette-foot { display: flex; justify-content: space-between; padding: 10px 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* Autopost */
.platforms { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.platform { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.platform .ring {
  width: 56px; height: 56px; border-radius: 18px; background: #fff; display: grid; place-items: center;
  border: 1px solid var(--line); box-shadow: 0 0 0 3px transparent;
}
.platform .ring img { width: 26px; height: 26px; }
.platform.live .ring { box-shadow: 0 0 0 2px var(--glow), 0 8px 24px color-mix(in srgb, var(--glow) 40%, transparent); }
.platform.soon .ring { opacity: .45; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-size: 13px; }
.calendar .dow { color: var(--muted); font-weight: 700; padding-bottom: 4px; }
.calendar .day { height: 40px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; position: relative; font-weight: 600; }
.calendar .day.post::after { content: ""; position: absolute; bottom: 6px; width: 6px; height: 6px; border-radius: 99px; background: var(--blue); }
.calendar .day.post2::after { width: 14px; background: var(--accent); }
.calendar .day.today { background: var(--ink); color: var(--bg); }
.calendar .day.muted { background: transparent; color: var(--line); }
.times { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.times .chip { cursor: default; }
.times .chip.ai { background: var(--accent); color: #fff; border: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stats div { background: var(--soft); border-radius: 14px; padding: 10px 12px; }
.stats b { display: block; font-size: 20px; }
.stats span { font-size: 12px; color: var(--muted); }

/* Templates */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 16px; overflow-x: auto; padding: 4px 20px 18px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail .tpl { scroll-snap-align: start; }
.tpl .tile { border-radius: 18px; box-shadow: var(--shadow); }
.tpl b { display: block; margin-top: 10px; font-size: 15px; }
.tpl span { font-size: 13px; color: var(--muted); }
.tpl-more { text-align: center; margin-top: 28px; }
.tpl .rank { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; }
.rail-wrap { width: min(var(--wrap) + 40px, 100%); margin-inline: auto; }

/* Bilingual */
.langs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.langs .card { padding: 26px; }
.langs .big { font-size: 28px; font-weight: 800; margin-bottom: 6px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan { padding: 28px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.plan.best { border: 0; }
.plan.best::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; background: var(--accent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.plan .tag { position: absolute; top: -12px; inset-inline-end: 22px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 12px; border-radius: 99px; }
.plan h3 { font-size: 20px; }
.price { font-size: 44px; font-weight: 800; letter-spacing: -.02em; direction: ltr; text-align: start; }
[dir="rtl"] .price { text-align: end; }
.price small { font-size: 16px; color: var(--muted); font-weight: 600; }
.plan .ticks { margin: 0; flex: 1; font-size: 15px; }
.plan .btn { width: 100%; }
.fine { text-align: center; color: var(--muted); font-size: 14px; margin-top: 22px; }

/* FAQ */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { padding: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--muted); }

/* Download */
.download { text-align: center; padding: 64px 28px; overflow: hidden; position: relative; }
.download::before { content: ""; position: absolute; inset: 0; background: var(--accent); opacity: .12; }
.download > * { position: relative; }
.download h2 + p { margin-top: 12px; }
.download img.app-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 20px; box-shadow: var(--shadow); }
.appstore { display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px; border-radius: 16px; background: #000; color: #fff; text-decoration: none; margin-top: 24px; text-align: start; }
.appstore svg { width: 28px; height: 28px; }
.appstore small { display: block; font-size: 12px; opacity: .8; }
.appstore b { font-size: 19px; line-height: 1.1; }
:root[data-theme="dark"] .appstore { background: #fff; color: #000; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .appstore { background: #fff; color: #000; } }

@media (max-width: 1000px) {
  .wall { grid-template-columns: repeat(4, 1fr); }
  .wall-col:nth-child(n+5) { display: none; }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
}
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature.flip .feature-copy { order: 0; }
  .feature + .feature { margin-top: 80px; }
  .langs { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wall { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .wall-col { gap: 10px; }
  .wall-col:nth-child(n+4) { display: none; }
  .hero-inner { padding: 64px 0 80px; }
  .prompt textarea { font-size: 16px; }
  .palette-list .cmd { min-width: 96px; }
  .stats b { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .wall-col { animation: none; }
}
