/* ============================================================
   pJrAI — Professional Neobrutalism
   ============================================================ */

:root {
  --yellow: #FFD600;
  --blue: #4285F4;
  --green: #00FF66;
  --pink: #FF0088;
  --black: #000000;
  --white: #FFFFFF;
  --gray: #F5F5F5;

  /* themed tokens */
  --bg: #F5F5F5;
  --surface: #FFFFFF;
  --text: #000000;
  --muted: #555555;
  --border: #000000;
  --shadow-color: #000000;

  --border-w: 3px;
  --radius: 14px;
  --shadow: 6px 6px 0 var(--shadow-color);
  --shadow-lg: 10px 10px 0 var(--shadow-color);
  --shadow-sm: 4px 4px 0 var(--shadow-color);

  --font-head: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --maxw: 1180px;
}

[data-theme="dark"] {
  --bg: #121212;
  --surface: #1e1e1e;
  --text: #FFFFFF;
  --muted: #b0b0b0;
  --border: #000000;
  --shadow-color: #000000;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 800; line-height: 1.1; }

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 88px 0; position: relative; }

.section__head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section__title { font-size: clamp(28px, 4vw, 44px); margin: 16px 0 12px; text-wrap: balance; }
.section__lead { color: var(--muted); font-size: 17px; }

/* ---------- Badge ---------- */
.badge {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: var(--border-w) solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  color: #000;
}
.badge--yellow { background: var(--yellow); }
.badge--blue { background: var(--blue); color: #fff; }
.badge--green { background: var(--green); }
.badge--pink { background: var(--pink); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border: var(--border-w) solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-color); }
.btn--primary { background: var(--yellow); color: #000; }
.btn--ghost { background: var(--surface); }
.btn--danger { background: var(--pink); color: #fff; }
.btn--lg { padding: 15px 30px; font-size: 16px; }
.btn--mini { padding: 8px 14px; font-size: 13px; box-shadow: var(--shadow-sm); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: var(--border-w) solid var(--border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.logo { font-family: var(--font-head); font-weight: 800; font-size: 24px; letter-spacing: -.02em; }
.logo__mark { background: var(--yellow); color: #000; padding: 2px 6px; border: 2px solid #000; border-radius: 6px; }
.logo__rest { margin-left: 2px; }
.logo--light { color: #fff; }
.logo--light .logo__rest { color: #fff; }

.nav { display: flex; gap: 6px; }
.nav__link {
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  padding: 8px 14px; border-radius: 8px; border: 2px solid transparent;
  transition: background .15s, border-color .15s;
}
.nav__link:hover { background: var(--gray); border-color: var(--border); }
[data-theme="dark"] .nav__link:hover { background: #2a2a2a; }

.header__actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 44px; height: 44px;
  border: var(--border-w) solid var(--border);
  border-radius: 10px; background: var(--green);
  box-shadow: var(--shadow-sm); cursor: pointer;
  display: grid; place-items: center;
  transition: transform .12s, box-shadow .12s;
}
.theme-toggle:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow); }
.theme-toggle__icon { width: 18px; height: 18px; display: block; }

.menu-toggle { display: none; width: 44px; height: 44px; border: var(--border-w) solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; flex-direction: column; gap: 4px; align-items: center; justify-content: center; }
.menu-toggle span { width: 20px; height: 2.5px; background: var(--text); border-radius: 2px; transition: .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: 120px; padding-bottom: 96px; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero__title { font-size: clamp(38px, 6vw, 68px); margin: 18px 0 20px; text-wrap: balance; }
.hero__desc { font-size: 18px; color: var(--muted); max-width: 520px; }
.hero__buttons { display: flex; gap: 14px; margin: 32px 0; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero__stat strong { display: block; font-family: var(--font-head); font-size: 28px; }
.hero__stat span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.chat-preview {
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(-1.5deg);
}
.chat-preview__bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; background: var(--blue); border-bottom: var(--border-w) solid var(--border); }
.dot { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #000; }
.dot--pink { background: var(--pink); } .dot--yellow { background: var(--yellow); } .dot--green { background: var(--green); }
.chat-preview__title { color: #fff; font-family: var(--font-head); font-weight: 700; margin-left: 8px; }
.chat-preview__body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.bubble { padding: 12px 16px; border: 2.5px solid #000; border-radius: 12px; font-size: 14.5px; max-width: 85%; box-shadow: 3px 3px 0 #000; }
.bubble--user { background: var(--yellow); color: #000; align-self: flex-end; border-bottom-right-radius: 3px; }
.bubble--ai { background: var(--white); color: #000; align-self: flex-start; border-bottom-left-radius: 3px; }

/* decorations */
.deco { position: absolute; z-index: 0; border: var(--border-w) solid var(--border); box-shadow: var(--shadow); }
.deco--square { width: 64px; height: 64px; border-radius: 8px; }
.deco--sm { width: 38px; height: 38px; }
.deco--circle { width: 70px; height: 70px; border-radius: 50%; }
.deco--triangle { width: 0; height: 0; border: none; box-shadow: none; border-left: 34px solid transparent; border-right: 34px solid transparent; border-bottom: 60px solid var(--pink); filter: drop-shadow(4px 4px 0 #000); }
.deco--blue { background: var(--blue); top: 14%; right: 6%; animation: float 6s ease-in-out infinite; }
.deco--green { background: var(--green); bottom: 8%; left: 50%; animation: float 7s ease-in-out infinite; }
.deco--pink { top: 64%; right: 12%; animation: float 8s ease-in-out infinite; }
.deco--yellow { background: var(--yellow); bottom: 8%; right: 44%; animation: float 5.5s ease-in-out infinite; }

@keyframes float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-16px) rotate(6deg); } }

/* ---------- Advantages ---------- */
.advantages__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.adv-card {
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
  transition: transform .15s, box-shadow .15s;
}
.adv-card:hover { transform: translate(-4px,-4px); box-shadow: var(--shadow-lg); }
.adv-card__num { font-family: var(--font-head); font-weight: 800; font-size: 30px; opacity: .25; }
.adv-card h3 { font-size: 19px; margin: 8px 0 8px; }
.adv-card p { color: var(--muted); font-size: 14.5px; }
.adv-card--yellow { background: var(--yellow); color: #000; }
.adv-card--blue { background: var(--blue); color: #fff; }
.adv-card--green { background: var(--green); color: #000; }
.adv-card--yellow p, .adv-card--green p { color: #222; }
.adv-card--blue p { color: #f0f0f0; }

/* ---------- Features ---------- */
.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  transition: transform .15s, box-shadow .15s;
}
.feature-card:hover { transform: translate(-4px,-4px); box-shadow: var(--shadow-lg); }
.feature-card h3 { font-size: 20px; margin: 16px 0 10px; }
.feature-card p { color: var(--muted); font-size: 15px; }
.feature-card__icon {
  width: 56px; height: 56px; border: var(--border-w) solid var(--border);
  border-radius: 12px; display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.feature-card__icon--yellow { background: var(--yellow); }
.feature-card__icon--blue { background: var(--blue); }
.feature-card__icon--pink { background: var(--pink); }
.feature-card__icon--green { background: var(--green); }

/* simple geometric icons drawn with CSS */
.ico { width: 26px; height: 26px; display: block; position: relative; }
.ico-bolt { background: #000; clip-path: polygon(45% 0,10% 55%,42% 55%,30% 100%,90% 40%,55% 40%); }
.ico-brain { border: 3px solid #000; border-radius: 50% 50% 45% 45%; }
.ico-brain::after { content:""; position:absolute; inset: 6px 11px; border-left: 3px solid #000; }
.ico-layout { border: 3px solid #000; border-radius: 4px; }
.ico-layout::after { content:""; position:absolute; left: 0; top: 8px; right: 0; height: 3px; background: #000; }
.ico-device { border: 3px solid #000; border-radius: 4px; width: 18px; height: 26px; margin: 0 auto; }
.ico-device::after { content:""; position:absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 6px; height: 3px; background: #000; }
.feature-card__icon--blue .ico, .feature-card__icon--pink .ico { filter: invert(0); }
.feature-card__icon--blue .ico-bolt { background:#000; }
.ico-shield { width: 24px; height: 26px; background: #000; clip-path: polygon(50% 0,100% 18%,100% 60%,50% 100%,0 60%,0 18%); }
.ico-cloud { width: 28px; height: 18px; background: #000; border-radius: 14px; position: relative; }
.ico-cloud::before { content:""; position:absolute; width:13px; height:13px; background:#000; border-radius:50%; top:-7px; left:5px; }
.ico-cloud::after { content:""; position:absolute; width:10px; height:10px; background:#000; border-radius:50%; top:-4px; right:5px; }

/* ---------- Chat Section ---------- */
.chat-section { background: var(--surface); border-top: var(--border-w) solid var(--border); border-bottom: var(--border-w) solid var(--border); }
.chat {
  max-width: 860px; margin: 0 auto;
  background: var(--bg);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.chat__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: var(--blue); border-bottom: var(--border-w) solid var(--border); }
.chat__id { display: flex; align-items: center; gap: 12px; color: #fff; }
.chat__avatar { width: 42px; height: 42px; display: grid; place-items: center; background: var(--yellow); color: #000; border: 2.5px solid #000; border-radius: 10px; font-family: var(--font-head); font-weight: 800; box-shadow: 3px 3px 0 #000; }
.chat__id strong { display: block; font-family: var(--font-head); }
.chat__id small { opacity: .9; font-size: 12.5px; }

.chat__messages { height: 460px; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 18px; scroll-behavior: smooth; }
.chat__messages::-webkit-scrollbar { width: 12px; }
.chat__messages::-webkit-scrollbar-thumb { background: var(--text); border: 3px solid var(--bg); border-radius: 10px; }

.msg { max-width: 80%; display: flex; flex-direction: column; gap: 6px; animation: msgIn .3s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.msg--user { align-self: flex-end; align-items: flex-end; }
.msg--ai { align-self: flex-start; align-items: flex-start; }
.msg__body { padding: 13px 17px; border: 2.5px solid #000; border-radius: 14px; font-size: 15px; box-shadow: 4px 4px 0 #000; white-space: pre-wrap; word-break: break-word; }
.msg--user .msg__body { background: var(--yellow); color: #000; border-bottom-right-radius: 4px; }
.msg--ai .msg__body { background: #fff; color: #000; border-bottom-left-radius: 4px; }
.msg__meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.msg__copy { background: none; border: none; cursor: pointer; font-family: var(--font-head); font-weight: 700; font-size: 12px; color: var(--blue); padding: 0; }
.msg__copy:hover { text-decoration: underline; }
.msg__error { background: #fff; border-color: var(--pink) !important; }
.msg__retry { align-self: flex-start; }

.typing { display: inline-flex; gap: 5px; padding: 4px 0; }
.typing span { width: 9px; height: 9px; background: #000; border-radius: 50%; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .25; transform: translateY(0);} 40% { opacity: 1; transform: translateY(-4px);} }
.cursor { display:inline-block; width:8px; background:#000; margin-left:2px; animation: caret .7s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.chat__inputbar { display: flex; gap: 12px; padding: 16px 20px 6px; border-top: var(--border-w) solid var(--border); background: var(--surface); }
.chat__input {
  flex: 1; resize: none; font-family: var(--font-body); font-size: 15px;
  padding: 12px 16px; border: var(--border-w) solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm);
  max-height: 160px; line-height: 1.5;
}
.chat__input:focus { outline: none; transform: translate(-1px,-1px); box-shadow: var(--shadow); }
.chat__hint { text-align: center; font-size: 12.5px; color: var(--muted); padding: 6px 0 16px; }

/* ---------- About ---------- */
.about__inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: center; }
.about__panel {
  position: relative; aspect-ratio: 1/1; background: var(--yellow);
  border: var(--border-w) solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); display: grid; place-items: center;
}
.about__big { font-family: var(--font-head); font-weight: 800; font-size: clamp(80px, 14vw, 150px); color: #000; }
.about__tag { position: absolute; bottom: 20px; right: -14px; }
.about__content h2 { margin: 14px 0 16px; }
.about__content p { color: var(--muted); font-size: 16px; margin-bottom: 20px; }
.about__list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.about__list li { position: relative; padding-left: 32px; font-weight: 500; }
.about__list li::before { content:""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; background: var(--green); border: 2.5px solid #000; border-radius: 4px; }

/* ---------- Testimonials ---------- */
.testimonials__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testi-card { background: var(--surface); border: var(--border-w) solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 24px; transition: transform .15s, box-shadow .15s; }
.testi-card:hover { transform: translate(-4px,-4px); box-shadow: var(--shadow-lg); }
.testi-card__quote { font-size: 15.5px; margin-bottom: 22px; }
.testi-card__author { display: flex; align-items: center; gap: 12px; }
.testi-card__avatar { width: 46px; height: 46px; display: grid; place-items: center; border: 2.5px solid #000; border-radius: 10px; font-family: var(--font-head); font-weight: 800; box-shadow: 3px 3px 0 #000; }
.testi-card__avatar--yellow { background: var(--yellow); color:#000; } .testi-card__avatar--blue { background: var(--blue); color:#fff; } .testi-card__avatar--green { background: var(--green); color:#000; }
.testi-card__author strong { display: block; font-family: var(--font-head); }
.testi-card__author small { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq__inner { max-width: 800px; margin: 0 auto; }
.faq__list { display: flex; flex-direction: column; gap: 16px; }
.faq-item { background: var(--surface); border: var(--border-w) solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .15s; }
.faq-item:hover { box-shadow: var(--shadow); }
.faq-item__q { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; background: none; border: none; cursor: pointer; font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--text); }
.faq-item__plus { position: relative; width: 22px; height: 22px; flex-shrink: 0; }
.faq-item__plus::before, .faq-item__plus::after { content:""; position: absolute; background: var(--text); border-radius: 2px; transition: transform .25s ease; }
.faq-item__plus::before { left: 0; top: 9.5px; width: 22px; height: 3px; }
.faq-item__plus::after { left: 9.5px; top: 0; width: 3px; height: 22px; }
.faq-item__q[aria-expanded="true"] .faq-item__plus::after { transform: rotate(90deg); opacity: 0; }
.faq-item__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item__a p { padding: 0 22px 22px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact__inner { max-width: 640px; margin: 0 auto; }
.contact__form { background: var(--surface); border: var(--border-w) solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 32px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-family: var(--font-head); font-weight: 700; margin-bottom: 8px; }
.field input, .field textarea { width: 100%; font-family: var(--font-body); font-size: 15px; padding: 12px 16px; border: var(--border-w) solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; transform: translate(-1px,-1px); box-shadow: var(--shadow); }
.contact__feedback { margin-top: 14px; font-weight: 600; color: var(--blue); }

/* ---------- Footer ---------- */
.footer { background: #000; color: #fff; border-top: var(--border-w) solid var(--border); }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 56px 24px; }
.footer__brand p { color: #bbb; margin-top: 16px; max-width: 320px; }
.footer__col h4 { font-size: 16px; margin-bottom: 16px; color: var(--yellow); }
.footer__col a { display: block; color: #ccc; padding: 5px 0; font-size: 15px; transition: color .15s; }
.footer__col a:hover { color: var(--green); }
.footer__bottom { border-top: 2px solid #333; padding: 20px 0; text-align: center; }
.footer__bottom p { color: #999; font-size: 14px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { order: 1; max-width: 460px; margin: 0 auto; width: 100%; }
  .hero__content { order: 0; }
  .about__inner { grid-template-columns: 1fr; gap: 36px; }
  .advantages__grid { grid-template-columns: repeat(2, 1fr); }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed; top: 72px; right: 0; left: 0;
    flex-direction: column; gap: 4px; padding: 16px 24px;
    background: var(--surface); border-bottom: var(--border-w) solid var(--border);
    transform: translateY(-150%); transition: transform .3s ease; z-index: 99;
  }
  .nav.is-open { transform: translateY(0); }
  .nav__link { border: 2px solid var(--border); }
  .menu-toggle { display: flex; }
  .header__cta { display: none; }
  .section { padding: 64px 0; }
  .features__grid, .advantages__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .chat__messages { height: 400px; }
  .deco { display: none; }
  .chat__header { flex-wrap: wrap; }
  .chat__avatar { width: 38px; height: 38px; }
  .chat__id small { font-size: 11.5px; }
  .chat__header .btn--mini { font-size: 11.5px; padding: 7px 10px; }
  .container { padding: 0 18px; }
  .hero__title { font-size: clamp(32px, 9vw, 48px); }
  .hero__buttons .btn { flex: 1; min-width: 140px; }
}

@media (max-width: 400px) {
  .chat__id small { display: none; }
  .hero__stats { gap: 18px; }
  .hero__stat strong { font-size: 24px; }
  .hero__buttons .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
