/* ============ BYTOS — bytos.dev ============ */

:root {
  --bg: #0a0b0f;
  --bg-soft: #10121a;
  --surface: #14161f;
  --surface-2: #1a1d29;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eaf2;
  --text-dim: #9aa0b4;
  --text-faint: #6b7185;
  --accent: #7c6cff;
  --accent-2: #38bdf8;
  --accent-grad: linear-gradient(120deg, #7c6cff, #38bdf8);
  --radius: 14px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: min(1140px, 100% - 48px);
  margin-inline: auto;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.925rem;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent-grad);
  color: #0b0c12;
  box-shadow: 0 4px 24px rgba(124, 108, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 32px rgba(124, 108, 255, 0.55); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--accent); background: rgba(124, 108, 255, 0.08); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  padding: 9px 14px;
  font-size: 0.85rem;
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  transition: all 0.15s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 11, 15, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand-logo {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: block;
}

.main-nav {
  display: flex;
  gap: 24px;
  margin-left: 8px;
}
.main-nav a {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--text); }

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 80px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(124, 108, 255, 0.08);
  margin-bottom: 26px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(124, 108, 255, 0.5);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(124, 108, 255, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(124, 108, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 108, 255, 0); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.65rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}

.hero-sub {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 480px;
  margin-bottom: 34px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-cta.center { justify-content: center; }

.hero-note {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.hero-glow {
  position: absolute;
  top: -220px;
  right: -120px;
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, rgba(124, 108, 255, 0.22) 0%, rgba(56, 189, 248, 0.1) 40%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* ---------- Hero screenshot ---------- */
.hero-shot {
  display: block;
  width: 100%;
  height: auto;
  max-height: 640px;
  object-fit: contain;
  object-position: top;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  background: var(--surface);
}

/* ---------- Strip ---------- */
.strip {
  border-block: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 26px 0;
}
.strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
}
.strip-item {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--accent-2);
}
.strip-item div { display: flex; flex-direction: column; line-height: 1.3; }
.strip-item strong { color: var(--text); font-size: 0.95rem; }
.strip-item span { color: var(--text-faint); font-size: 0.78rem; }
.strip-sep {
  width: 1px;
  height: 34px;
  background: var(--border-strong);
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.section-head p { color: var(--text-dim); }

/* ---------- Features page ---------- */
.feature-page { padding-top: 64px; padding-bottom: 96px; }

.feature-grid-2 {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: start;
}

.feature-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.feature-intro {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 560px;
  margin-bottom: 36px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.feature-item {
  border-left: 2px solid rgba(124, 108, 255, 0.4);
  padding-left: 18px;
}

.feature-item h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-item p {
  color: var(--text-dim);
  font-size: 0.92rem;
  max-width: 560px;
}

.feature-shot {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  margin-inline: auto;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  background: var(--surface);
}

.feature-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.feature-cta-note {
  color: var(--text-faint);
  font-size: 0.8rem;
}

.main-nav a.active {
  color: var(--text);
}

/* ---------- Account nav (signed-in header) ---------- */
.hidden { display: none !important; }

.avatar-btn {
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.avatar-btn:hover { border-color: var(--accent); }

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #0b0c12;
  font-weight: 700;
  font-size: 0.78rem;
  font-family: var(--font-display);
}

.account-nav { position: relative; }

.account-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  padding: 6px;
  z-index: 200;
}
.account-dropdown.open { display: block; }

.dropdown-user {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
}
.dropdown-user strong { font-size: 0.85rem; }
.dropdown-user span { color: var(--text-faint); font-size: 0.75rem; word-break: break-all; }

.account-dropdown a,
.account-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.account-dropdown a:hover,
.account-dropdown button:hover {
  background: rgba(124, 108, 255, 0.12);
  color: var(--text);
}

/* ---------- Account page ---------- */
.account-page { padding-top: 64px; padding-bottom: 96px; }

.account-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.account-head p { color: var(--text-dim); }

.demo-note {
  margin: 20px 0 34px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(124, 108, 255, 0.35);
  background: rgba(124, 108, 255, 0.08);
  color: var(--text-dim);
  font-size: 0.82rem;
  max-width: 640px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  align-items: start;
}

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.panel-card h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field { margin-bottom: 16px; display: flex; flex-direction: column; }

.form-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.form-field input {
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s ease;
}
.form-field input:focus { border-color: var(--accent); }
.form-field input:disabled { opacity: 0.55; cursor: not-allowed; }

.form-field small {
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 0.74rem;
}

.form-msg {
  font-size: 0.84rem;
  font-weight: 600;
  color: #34d399;
  margin-bottom: 10px;
}
.form-msg.error { color: #f87171; }

/* ---------- Auth pages (signin / signup / forgot / reset) ---------- */

.auth-page { padding-top: 64px; padding-bottom: 96px; }

.auth-wrap {
  width: min(460px, 100%);
  margin-inline: auto;
}

.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.auth-head p { color: var(--text-dim); font-size: 0.94rem; }

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.auth-card h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.auth-oauth { display: flex; flex-direction: column; gap: 10px; }

.btn-oauth {
  justify-content: center;
  width: 100%;
  background: var(--bg-soft);
  color: var(--text);
  border-color: var(--border-strong);
  padding: 11px 16px;
  font-size: 0.9rem;
}
.btn-oauth:hover { background: var(--surface-2); border-color: var(--accent); }
.btn-oauth svg { flex-shrink: 0; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
  color: var(--text-faint);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-card .btn-primary[type="submit"] { width: 100%; justify-content: center; }

.input-with-toggle { position: relative; display: flex; }
.input-with-toggle input { width: 100%; padding-right: 64px; }

.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.password-toggle:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.password-toggle.is-visible { color: var(--accent-2); }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.82rem;
}
.auth-row a { color: var(--text-dim); }
.auth-row a:hover { color: var(--accent-2); }

.auth-foot {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.auth-foot a { color: var(--accent-2); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

.auth-terms {
  margin-top: 14px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--text-faint);
  text-align: center;
}

.form-msg.info { color: var(--text-dim); }
.form-msg.success { color: #34d399; }
.form-msg.config-banner { margin-bottom: 16px; }

.field-error {
  margin-top: 6px;
  color: #f87171;
  font-size: 0.74rem;
  font-weight: 500;
}

.form-field input[aria-invalid="true"] { border-color: rgba(248, 113, 113, 0.7); }

.btn.is-busy,
.btn:disabled { opacity: 0.7; cursor: progress; transform: none; }

.auth-link-btn {
  display: inline-block;
  margin: 0 0 14px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--accent-2);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.auth-link-btn:hover { text-decoration: underline; }
.auth-link-btn:disabled { opacity: 0.6; cursor: progress; }

/* Success / verification-pending panel */
.auth-success { text-align: center; }
.auth-success .success-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.14);
  color: #34d399;
}
.auth-success h2 { margin-bottom: 10px; }
.auth-success p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 14px; }
.auth-success p strong { color: var(--text); word-break: break-all; }
.auth-success .btn { width: 100%; justify-content: center; margin-top: 4px; }

/* ---------- Account page additions ---------- */

.identity-card { margin-bottom: 22px; }

.identity-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
}
.identity-row { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.identity-row dt {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
.identity-row dd {
  font-size: 0.9rem;
  color: var(--text);
  word-break: break-word;
}

.identity-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(52, 211, 153, 0.14);
  color: #34d399;
}
.identity-badge.is-warning { background: rgba(251, 191, 36, 0.14); color: #fbbf24; }

.account-hint {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.account-hint a { color: var(--accent-2); }
.account-hint a:hover { text-decoration: underline; }

.account-signout { margin-top: 24px; display: flex; justify-content: flex-end; }

#accountGuard { text-align: center; }

/* ---------- Responsive ---------- */@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .feature-grid-2 { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-badge { margin-inline: auto; display: inline-flex; }
}

@media (max-width: 860px) {
  .main-nav, .header-actions {
    display: none;
  }
  .site-header.menu-open .main-nav {
    display: flex;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 16px;
  }
  .site-header.menu-open .header-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 172px;
    left: 0;
    right: 0;
    background: var(--bg-soft);
    padding: 0 24px 22px;
    border-bottom: 1px solid var(--border);
  }
  .site-header.menu-open .header-actions .icon-btn { display: none; }
  .nav-toggle { display: flex; margin-left: auto; }
}

@media (max-width: 640px) {
  .section { padding: 68px 0; }
  .hero { padding: 56px 0 60px; }
  .strip-sep { display: none; }
  .strip-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .auth-btn span { font-size: 0.8rem; }
  .account-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .identity-list { grid-template-columns: 1fr; }
  .account-signout { justify-content: stretch; }
  .account-signout .btn { width: 100%; justify-content: center; }
  .auth-card { padding: 22px 18px; }
}
