/* ==========================================================================
   foraigent — topbar + hero + console
   ========================================================================== */

/* ---- Topbar ---- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--pad);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo__mark svg {
  width: 30px;
  height: 30px;
  display: block;
  fill: var(--lime);
  stroke: var(--lime);
  stroke-width: 1.6;
  stroke-linecap: round;
  animation: spin 18s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.logo__word {
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.logo__word em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.15em;
  color: var(--lime);
  padding: 0 1px;
}

.lang {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lang button {
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.lang button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

/* ---- Hero ---- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(32px, 7vh, 96px) var(--pad) clamp(48px, 8vh, 110px);
  max-width: 1360px;
  margin: 0 auto;
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}

.badge__dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--lime);
  animation: ping 2s var(--ease) infinite;
}

@keyframes ping {
  from { transform: scale(0.5); opacity: 1; }
  to { transform: scale(1.8); opacity: 0; }
}

.hero__title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(42px, 6.6vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--lime) 0%, var(--cyan) 45%, var(--violet) 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 8s ease-in-out infinite alternate;
  padding-right: 0.08em;
}

@keyframes sheen {
  to { background-position: 100% 0; }
}

.hero__typer {
  margin: 30px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.35vw, 17px);
  color: var(--muted);
  min-height: 1.6em;
}

.typer {
  color: var(--lime);
  white-space: nowrap;
}

.typer__caret {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: -0.18em;
  background: var(--lime);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero__lead {
  margin: 22px 0 0;
  max-width: 34em;
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--muted);
}

/* ---- Notify form ---- */

.notify {
  position: relative;
  display: flex;
  gap: 8px;
  margin-top: 36px;
  max-width: 480px;
  padding: 6px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(14, 14, 21, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.notify:focus-within {
  border-color: rgba(198, 255, 77, 0.55);
  box-shadow: 0 0 0 5px rgba(198, 255, 77, 0.08);
}

.notify input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 18px;
  font-size: 15.5px;
  outline: none;
}

.notify input::placeholder {
  color: var(--dim);
}

.notify button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  background: var(--lime);
  color: #0b0b0b;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.notify button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -8px rgba(198, 255, 77, 0.6);
}

.notify button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}

.notify button:hover svg {
  transform: translateX(3px);
}

.notify__msg {
  position: absolute;
  left: 22px;
  top: calc(100% + 12px);
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.notify__msg.is-ok { color: var(--lime); }
.notify__msg.is-err { color: #ff8a8a; }

.notify.shake {
  animation: shake 0.4s;
}

@keyframes shake {
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

/* ---- Agent console ---- */

.console {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 20, 30, 0.82), rgba(10, 10, 16, 0.82));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
}

.console::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 70%, var(--lime) 80%, var(--violet) 90%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: orbit 6s linear infinite;
  pointer-events: none;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes orbit {
  to { --angle: 360deg; }
}

.console__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.console__bar > span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-2);
}

.console__bar p {
  margin: 0 0 0 10px;
  color: var(--dim);
  flex: 1;
}

.console__live {
  font-style: normal;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lime);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.console__live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 1.4s steps(1) infinite;
}

.console__log {
  list-style: none;
  margin: 0;
  padding: 16px;
  height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 9px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent, #000 35%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%);
}

.console__log li {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: baseline;
  color: var(--muted);
  animation: log-in 0.5s var(--ease) both;
}

.console__log time {
  color: var(--dim);
}

.console__log .tag {
  color: var(--cyan);
}

.console__log .tag--violet { color: var(--violet); }
.console__log .tag--lime { color: var(--lime); }

.console__log .ok {
  color: var(--lime);
}

@keyframes log-in {
  from { opacity: 0; transform: translateY(10px); }
}

.console__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.console__stats div {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.console__stats div + div {
  border-left: 1px solid var(--line);
}

.console__stats b {
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.console__stats small {
  color: var(--dim);
  font-size: 11.5px;
}
