:root{
  --bg: #0b0f14;
  --fg: #e9eef5;
  --muted: rgba(233,238,245,0.72);
  --card: rgba(255,255,255,0.06);
  --accent: #86f7d4;
  --accent2: #8aa8ff;

  --radius: 18px;
  --shadow: 0 20px 60px rgba(0,0,0,0.45);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  line-height: 1.45;
}

/* Background */
.bg{
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.bg__glow{
  position: absolute;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.28;
  transform: translate3d(0,0,0);
}
.bg__glow--a{
  left: -260px;
  top: -260px;
  background: radial-gradient(circle at 30% 30%, var(--accent), transparent 60%);
  animation: driftA 18s ease-in-out infinite;
}
.bg__glow--b{
  right: -320px;
  bottom: -320px;
  background: radial-gradient(circle at 40% 40%, var(--accent2), transparent 60%);
  animation: driftB 22s ease-in-out infinite;
}
.bg__grain{
  position: absolute;
  inset: -20%;
  width: 140%;
  height: 140%;
  opacity: 0.35;
  mix-blend-mode: overlay;
  pointer-events: none;
}

@keyframes driftA{
  0%,100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(70px,40px) scale(1.06); }
}
@keyframes driftB{
  0%,100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(-60px,-50px) scale(1.05); }
}

@media (prefers-reduced-motion: reduce){
  .bg__glow--a, .bg__glow--b{ animation: none; }
}

/* Layout */
.wrap{
  min-height: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 22px 40px;
  display: flex;
  flex-direction: column;
}

.top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo{
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 18px;
}

.logo-link{
  color: inherit;
  text-decoration: none;
}

.top-actions{
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.22);
  color: var(--fg);
  font-size: 13px;
  text-decoration: none;
}

.top-link:hover{
  border-color: rgba(255,255,255,0.26);
}

.top-link:focus-visible{
  outline: 2px solid rgba(134,247,212,0.55);
  outline-offset: 2px;
}

.locale-control{
  display: flex;
  align-items: center;
}

.locale-flags{
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
}

.locale-flag{
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fg);
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.42;
  transition: opacity 120ms ease, background-color 120ms ease;
}

.locale-flag:hover{
  opacity: 0.72;
}

.locale-flag.is-active{
  opacity: 1;
  background: rgba(255,255,255,0.08);
}

.locale-flag:focus-visible{
  outline: 2px solid rgba(134,247,212,0.55);
  outline-offset: 2px;
}

.hero{
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px 0 20px;
  max-width: 820px;
}

.kicker{
  margin: 0 0 12px;
  color: rgba(233,238,245,0.78);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1{
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.subhead{
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 16px;
  max-width: 70ch;
}

.panel{
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

/* Chat mock */
.chat{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat__log{
  height: 180px;
  overflow: auto;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
}

.msg{
  display: flex;
  margin: 10px 0;
}
.msg--assistant{ justify-content: flex-start; }
.msg--user{ justify-content: flex-end; }

.msg__bubble{
  max-width: min(640px, 90%);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(233,238,245,0.90);
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg--user .msg__bubble{
  background: linear-gradient(180deg, rgba(134,247,212,0.14), rgba(134,247,212,0.06));
  border-color: rgba(134,247,212,0.22);
  color: rgba(233,238,245,0.95);
}

.composer{
  display: flex;
  gap: 10px;
  align-items: center;
}

.composer input[type="text"]{
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.22);
  color: var(--fg);
  font-size: 14px;
}
.composer input::placeholder{ color: rgba(233,238,245,0.5); }
.composer input:focus-visible{
  outline: 2px solid rgba(134,247,212,0.55);
  outline-offset: 2px;
}

.composer button{
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: var(--fg);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.composer button:hover{ border-color: rgba(255,255,255,0.26); }
.composer button:focus-visible{
  outline: 2px solid rgba(134,247,212,0.55);
  outline-offset: 2px;
}

.contact{
  margin-top: 2px;
  color: rgba(233,238,245,0.62);
  font-size: 13px;
}
.contact a{
  color: rgba(233,238,245,0.82);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.contact a:hover{ border-bottom-color: rgba(255,255,255,0.30); }

.footer{
  padding-top: 24px;
  color: rgba(233,238,245,0.55);
  font-size: 13px;
}

/* About page */
.page-title{
  margin: 0 0 14px;
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.about-grid{
  display: grid;
  gap: 14px;
}

.about-block{
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
}

.about-block h2{
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 0.01em;
}

.about-block p{
  margin: 0;
  color: rgba(233,238,245,0.86);
  font-size: 14px;
}

.about-contact{
  margin-top: 14px;
}

@media (max-width: 560px){
  .top{
    flex-direction: column;
    align-items: flex-start;
  }

  .top-actions{
    width: 100%;
    justify-content: space-between;
  }
}

/* Screen-reader only */
.sr-only{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
