/* ==========================================================
   SiteBrainly – landing page
   ========================================================== */
:root {
  --brand: #5B3DF5;
  --brand-dark: #3B2BD9;
  --brand-soft: #EEEAFF;
  --mint: #2EE6B6;
  --mint-dark: #12B98F;
  --ink: #0F1430;
  --text: #3A4062;
  --muted: #6B7194;
  --line: #E4E6F0;
  --bg: #FFFFFF;
  --bg-alt: #F6F6FB;
  --radius: 16px;
  --shadow: 0 20px 50px -20px rgba(31, 22, 120, .25);
  --shadow-sm: 0 6px 20px -10px rgba(31, 22, 120, .25);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--brand-soft); color: var(--brand-dark); padding: .1em .35em; border-radius: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head p:last-child { color: var(--muted); font-size: 1.08rem; }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--brand); margin-bottom: 14px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(46, 230, 182, .25); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; font-size: 1rem;
  padding: 14px 24px; border-radius: 12px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, .swatch:focus-visible, .nav-toggle:focus-visible, summary:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px -10px rgba(91, 61, 245, .7); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); }
.btn-mint { background: var(--mint); color: var(--ink); }
.btn-mint:hover { background: #5ff0ca; }
.btn-sm { padding: 9px 18px; font-size: .93rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-name { font-size: 1.35rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.brand-name span { color: var(--brand); }
.brand-light .brand-name { color: #fff; }
.brand-light .brand-name span { color: #A99BFF; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) { color: var(--text); font-weight: 600; font-size: .95rem; }
.nav-links a:not(.btn):hover { color: var(--brand); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; border-radius: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 40px;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(91, 61, 245, .14), transparent 70%),
    radial-gradient(500px 300px at 0% 90%, rgba(46, 230, 182, .14), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hl { background: linear-gradient(100deg, var(--brand) 10%, #9B5CFF 60%, var(--mint-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 540px; margin-bottom: 28px; }

.url-form { display: flex; gap: 10px; max-width: 540px; background: #fff; padding: 8px; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.url-input { flex: 1; display: flex; align-items: center; gap: 10px; padding-left: 12px; min-width: 0; }
.url-input svg { width: 20px; height: 20px; fill: var(--muted); flex: none; }
.url-input input { width: 100%; border: 0; outline: 0; font: inherit; font-size: 1.02rem; color: var(--ink); background: transparent; padding: 10px 0; }
.url-input input::placeholder { color: #A3A8C3; }
.url-form:focus-within { border-color: var(--brand); }
.form-note { margin-top: 14px; font-size: .9rem; color: var(--muted); }

/* Browser mockup */
.hero-demo { position: relative; }
.browser { background: #fff; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: #F3F3F8; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #D9DBE7; }
.browser-bar i:nth-child(1) { background: #FF6B6B; } .browser-bar i:nth-child(2) { background: #FFC14D; } .browser-bar i:nth-child(3) { background: #3DD68C; }
.browser-url { margin-left: 12px; flex: 1; font-size: .78rem; color: var(--muted); background: #fff; border-radius: 6px; padding: 4px 10px; }
.browser-body { position: relative; height: 470px; }
.fake-site { padding: 22px; opacity: .55; }
.fs-hero { height: 120px; border-radius: 12px; background: linear-gradient(120deg, #FFE4CF, #FFD2DC); margin-bottom: 18px; }
.fs-line { height: 12px; border-radius: 6px; background: #E6E7F0; margin-bottom: 10px; }
.w70 { width: 70%; } .w90 { width: 90%; } .w50 { width: 50%; }
.fs-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.fs-cards div { height: 90px; border-radius: 10px; background: #EFEFF6; }

/* Chat widget (shared) */
.widget {
  --w: var(--brand);
  position: absolute; right: 18px; bottom: 18px; width: 300px;
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px -18px rgba(15, 20, 48, .45);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  font-size: .86rem;
}
.widget-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--w); color: #fff; transition: background .3s; }
.widget-head strong { display: block; font-size: .92rem; line-height: 1.2; }
.widget-head small { opacity: .8; font-size: .74rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-weight: 800; flex: none; }
.widget-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; height: 270px; overflow: hidden; background: #FAFAFD; }
.msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; line-height: 1.45; animation: pop .3s ease-out; }
.msg.bot { background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--w); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; transition: background .3s; }
.msg.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: #B4B8D0; animation: blink 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
.widget-input { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); color: #A3A8C3; }
.widget-input b { color: var(--w); transition: color .3s; }
.widget-foot { text-align: center; font-size: .68rem; color: var(--muted); padding: 0 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { border: 1px solid var(--w); color: var(--w); border-radius: 999px; padding: 4px 10px; font-size: .78rem; font-weight: 600; transition: color .3s, border-color .3s; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* Platforms */
.platforms { text-align: center; margin-top: 64px; }
.platforms p { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 16px; }
.platforms ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; }
.platforms li { padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: .92rem; color: var(--ink); }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.step { position: relative; padding: 32px 28px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.step-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 1.15rem; margin-bottom: 18px; }
.step p { color: var(--muted); margin: 0; }
.code-snippet { margin: 40px auto 0; max-width: 820px; background: var(--ink); border-radius: 14px; padding: 18px 22px; overflow-x: auto; }
.code-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--mint); margin-bottom: 8px; }
.code-snippet code { background: none; color: #DADFFF; padding: 0; font-size: .9rem; white-space: nowrap; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.feature p { color: var(--muted); margin: 0; font-size: .97rem; }
.f-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), #8C6BFF); margin-bottom: 18px; }
.f-icon svg { width: 24px; height: 24px; fill: #fff; }

/* ---------- Customizer split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 24px 0 28px; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 32px; font-weight: 600; color: var(--ink); }
.checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230F1430' d='m9.5 16.2-4-4 1.4-1.4 2.6 2.6 7.1-7.1 1.4 1.4z'/%3E%3C/svg%3E") center/14px no-repeat; }
.swatches { display: flex; gap: 12px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 1px var(--line); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.swatch:hover { transform: scale(1.08); }
.swatch.active { box-shadow: 0 0 0 2px var(--c); }
.custom-preview {
  display: grid; place-items: center; padding: 40px 20px; border-radius: 24px;
  background: radial-gradient(circle at 30% 20%, var(--brand-soft), #F6F6FB 70%);
}
.widget-static { position: static; width: 100%; max-width: 340px; }
.widget-static .widget-body { height: auto; }

/* ---------- Pricing ---------- */
.currency-toggle { display: inline-flex; margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.currency-toggle button { font: inherit; font-weight: 700; font-size: .9rem; border: 0; background: none; color: var(--muted); padding: 8px 16px; border-radius: 9px; cursor: pointer; }
.currency-toggle button.active { background: var(--brand); color: #fff; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.plan { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; }
.plan-featured { border: 2px solid var(--brand); box-shadow: var(--shadow); transform: translateY(-8px); }
.badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--mint); color: var(--ink); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 5px 14px; border-radius: 999px; white-space: nowrap; }
.plan h3 { font-size: 1.35rem; margin-bottom: 4px; }
.plan-desc { color: var(--muted); font-size: .95rem; min-height: 1.6em; }
.price { display: flex; align-items: baseline; gap: 4px; margin: 8px 0 22px; }
.amount { font-size: 2.8rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1; }
.per { color: var(--muted); font-weight: 600; }
.plan-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 11px; font-size: .95rem; }
.plan-list li { position: relative; padding-left: 28px; color: var(--ink); }
.plan-list li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%235B3DF5' d='m9.5 16.2-4-4 1.4-1.4 2.6 2.6 7.1-7.1 1.4 1.4z'/%3E%3C/svg%3E") center/13px no-repeat; }
.plan-list li.no { color: var(--muted); }
.plan-list li.no::before { background: #F0F0F5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%239AA0BC' d='M6 11h12v2H6z'/%3E%3C/svg%3E") center/12px no-repeat; }
.plan-list li.star::before { background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230F1430' d='M12 2c.8 5.4 2.6 7.2 8 8-5.4.8-7.2 2.6-8 8-.8-5.4-2.6-7.2-8-8 5.4-.8 7.2-2.6 8-8z'/%3E%3C/svg%3E") center/12px no-repeat; }

.compare { margin: 48px auto 0; max-width: 860px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.compare summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; align-items: center; border-radius: var(--radius); }
.compare summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.compare summary::after, .faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 500; color: var(--brand); line-height: 1; transition: transform .2s; }
.compare[open] summary::after, .faq details[open] summary::after { transform: rotate(45deg); }
.table-wrap { overflow-x: auto; padding: 0 22px 22px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 480px; }
th, td { padding: 12px 10px; text-align: center; border-bottom: 1px solid var(--line); }
thead th { color: var(--ink); font-weight: 800; }
tbody th { text-align: left; font-weight: 600; color: var(--ink); }
td { color: var(--text); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.pricing-note { text-align: center; margin-top: 24px; color: var(--muted); font-size: .93rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .2s; }
.faq details[open] { border-color: #CFC6FF; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 22px; font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; border-radius: 14px; }
.faq details p { padding: 0 22px 20px; margin: 0; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { padding: 0 0 96px; }
.cta-inner {
  text-align: center; border-radius: 28px; padding: 72px 24px;
  background:
    radial-gradient(400px 260px at 90% 0%, rgba(46, 230, 182, .35), transparent 70%),
    linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  max-width: 1120px;
}
.cta h2 { color: #fff; }
.cta p { color: #DCD6FF; font-size: 1.12rem; margin-bottom: 28px; }
.cta .url-form { margin: 0 auto; box-shadow: none; border-color: transparent; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #A8ADCC; padding: 64px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-tag { margin-top: 14px; max-width: 280px; }
.site-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.site-footer nav a { display: block; color: #A8ADCC; margin-bottom: 8px; }
.site-footer nav a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 48px; padding-top: 24px; font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { text-align: center; }
  .hero-copy .lead, .url-form { margin-left: auto; margin-right: auto; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .plan-featured { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 20px;
    box-shadow: 0 20px 30px -20px rgba(15, 20, 48, .3);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 14px; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .hero { padding-top: 48px; }
  .url-form { flex-direction: column; }
  .url-input { padding: 4px 8px; }
  .features { grid-template-columns: 1fr; }
  .browser-body { height: 440px; }
  .widget { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .widget-static { max-width: none; }
  .fs-cards { display: none; }
  .cta-inner { border-radius: 20px; padding: 56px 18px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
