/* ====== GLOBAL ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #050509;
  --bg-alt: #0b0b11;
  --card: #11111a;
  --card-alt: #171722;
  --border: #262637;
  --text: #f5f5ff;
  --muted: #a3a3c2;
  --accent: #ff2338;
  --accent-soft: rgba(255, 35, 56, 0.25);
  --accent-border: rgba(255, 35, 56, 0.6);
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.72);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 999px;
}

html,
body {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #151521 0, #050509 40%);
  color: var(--text);
  line-height: 1.5;
}

/* Layout */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 270px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #080811, #040409);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 30;
}

.sidebar-inner {
  padding: 1.2rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.main-content {
  flex: 1;
  background: transparent;
}

/* Container & sections */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 3.8rem 0;
}

.section-divider {
  border-top: 1px solid #181822;
  border-bottom: 1px solid #181822;
  background: radial-gradient(circle at top, #11111b 0, #050509 50%);
}

/* ====== SIDEBAR & NAV ====== */
.logo-main {
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 0.9rem;
}

.logo-accent {
  color: var(--accent);
}

.logo-tagline {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.12em;
  margin-top: 0.15rem;
}

.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 1.3rem;
}

/* nav links */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.4rem;
}

.nav-link {
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 0.35rem 0.4rem;
  border-radius: 10px;
  position: relative;
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 999px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, var(--accent), #ff7b7b);
  transition: height 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
  color: var(--text);
  background: rgba(255, 35, 56, 0.14);
}

.nav-link.active::before {
  height: 70%;
}

.sidebar-cta {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-footnote {
  margin-top: 0.5rem;
  font-size: 0.76rem;
  color: var(--muted);
}

/* NAV TOGGLE (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  margin-top: 0.1rem;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease,
    border-color 0.12s ease;
}

.btn-primary {
  background: radial-gradient(circle at top, #ff445a, var(--accent));
  border-color: var(--accent-border);
  box-shadow: 0 10px 30px rgba(255, 35, 56, 0.5);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 40px rgba(255, 35, 56, 0.6);
}

.btn-secondary {
  background: transparent;
  border-color: #2e2e46;
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.btn-outline {
  background: transparent;
  border-color: var(--accent-border);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent-soft);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
}

.full-width {
  width: 100%;
}

/* Pills & chips */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pill-outline {
  border: 1px solid #2b2b40;
  color: var(--muted);
}

/* ====== HERO ====== */
.hero-section {
  padding-top: 3.2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.8rem;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.2rem, 3.2vw + 1rem, 3.4rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.text-accent {
  color: var(--accent);
}

.hero-subtitle {
  color: var(--muted);
  max-width: 32rem;
  margin-bottom: 1.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* Hero right card */
.hero-card {
  background: radial-gradient(circle at top left, #1c1c2a, #0c0c14);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow-soft);
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.badge-live {
  font-size: 0.65rem;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: 0.18em;
}

.hero-card-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.hero-feed {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-feed li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.feed-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  padding-top: 0.25rem;
}

.feed-text strong {
  font-size: 0.82rem;
}

.feed-text p {
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 1.1rem;
  padding: 0.6rem 0.3rem 0;
}

.stat-number {
  display: block;
  font-weight: 700;
  font-size: 1rem;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ====== SHARED SECTION ELEMENTS ====== */
.section-title {
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}

.section-title-sm {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--muted);
  max-width: 34rem;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.4rem;
}

/* Chips */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  border-radius: var(--radius-sm);
  border: 1px solid #27273b;
  background: rgba(15, 15, 26, 0.9);
  color: var(--muted);
  padding: 0.25rem 0.7rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer;
}

.chip-active,
.chip:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ====== MEDIA ROW (image + video) ====== */
.section-media-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.4rem;
  margin: 1.6rem 0 0.4rem;
}

.media-image img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid #26263a;
  object-fit: cover;
  max-height: 260px;
  display: block;
}

.media-video {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid #26263a;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6);
}

.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.media-caption {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ====== NEWS CARDS ====== */
.news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.6fr);
  gap: 1.3rem;
  margin-top: 1.4rem;
}

.news-feature {
  grid-column: 1 / -1;
}

.news-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid #1f1f30;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

.card-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.card-title {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.card-excerpt {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: #7d7da4;
  margin-bottom: 0.5rem;
}

.card-link {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

/* ====== MODEL TABLE ====== */
.model-table-wrapper {
  margin-top: 1.5rem;
  overflow-x: auto;
}

.model-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.model-table thead {
  background: #10101a;
}

.model-table th,
.model-table td {
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid #202032;
  vertical-align: top;
}

.model-table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.model-table tbody tr:nth-child(even) {
  background: rgba(9, 9, 20, 0.7);
}

.model-name {
  font-weight: 600;
  color: #fefefe;
}

.note-box {
  margin-top: 1.3rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--accent-border);
  background: rgba(255, 35, 56, 0.04);
}

/* ====== BUILD YOUR OWN AI ====== */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 1.3rem;
}

.level-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  border: 1px solid #23233a;
  box-shadow: var(--shadow-soft);
}

.card-list {
  margin: 0.6rem 0 0.8rem;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.card-list li {
  margin-bottom: 0.2rem;
}

/* ====== ECHO AI ====== */
.echo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 1.6rem;
}

.echo-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.echo-feature {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  border: 1px solid #23233a;
}

.echo-feature h3 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.echo-feature p {
  font-size: 0.8rem;
  color: var(--muted);
}

.echo-console {
  background: #05050b;
  border-radius: 18px;
  border: 1px solid #2b2b3f;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.echo-console-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: linear-gradient(90deg, #151521, #1e1e2e);
  border-bottom: 1px solid #2b2b3f;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.dot-red {
  background: #ff5f57;
}

.dot-yellow {
  background: #febc2e;
}

.dot-green {
  background: #28c840;
}

.echo-console-title {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: 0.4rem;
}

.echo-console-body {
  padding: 0.8rem 0.9rem;
}

.console-line {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.console-prefix {
  color: #5ac8fa;
  margin-right: 0.3rem;
}

.console-prefix-echo {
  color: var(--accent);
}

.console-text {
  color: var(--text);
}

.faint .console-text {
  color: #7e7ea0;
}

.echo-note {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ====== TOOLS & ARTICLES ====== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
  margin-top: 1.3rem;
}

.tool-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  border: 1px solid #23233a;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  margin-top: 1.3rem;
}

.article-block {
  background: var(--card-alt);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  border: 1px solid #26263a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.article-title {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.article-meta {
  font-size: 0.75rem;
  color: #8b8bb0;
  margin-bottom: 0.5rem;
}

.article-block p {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

/* ====== NEWSLETTER & ABOUT ====== */
.newsletter-section {
  background: radial-gradient(circle at center, #141426, #050509);
  border-top: 1px solid #202033;
  border-bottom: 1px solid #202033;
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.newsletter-form input {
  min-width: 220px;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #33334a;
  background: rgba(4, 4, 10, 0.9);
  color: var(--text);
  font-size: 0.86rem;
}

.newsletter-form input::placeholder {
  color: #7e7ea2;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
}

.about-text {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.contact-form input,
.contact-form textarea {
  border-radius: 12px;
  border: 1px solid #303049;
  background: rgba(5, 5, 12, 0.95);
  padding: 0.6rem 0.8rem;
  color: var(--text);
  font-size: 0.86rem;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* ====== FOOTER ====== */
.site-footer {
  border-top: 1px solid #181824;
  padding: 1.8rem 0 1.4rem;
  background: #050509;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.9rem;
}

.footer-logo {
  font-size: 1rem;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.footer-right {
  display: flex;
  gap: 1.5rem;
}

.footer-column h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.4rem;
}

.footer-column a {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 0.25rem;
}

.footer-column a:hover {
  color: var(--accent);
}

.footer-bottom {
  font-size: 0.72rem;
  color: #6f6f96;
  text-align: center;
}

/* ====== BACK TO TOP ====== */
.back-to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #343452;
  background: rgba(10, 10, 20, 0.9);
  color: var(--text);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 40;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 960px) {
  .sidebar {
    position: fixed;
    height: auto;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .layout {
    flex-direction: column;
  }

  .main-content {
    margin-top: 80px;
  }

  .sidebar-inner {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .sidebar-header {
    margin-bottom: 0;
    flex: 1;
  }

  .sidebar-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #050509;
    padding: 0.6rem 1rem 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateY(-200%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
    max-height: 70vh;
    overflow-y: auto;
  }

  .sidebar-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-grid,
  .echo-grid,
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-media-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .levels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .levels-grid,
  .tools-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .echo-features {
    grid-template-columns: minmax(0, 1fr);
  }

  .newsletter-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-right {
    justify-content: space-between;
  }

  .container {
    padding-inline: 1.1rem;
  }
}

@media (max-width: 520px) {
  .hero-section {
    padding-top: 2.6rem;
  }
}
