/* SEO Chat — X-inspired marketing site */
:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --surface: #16181c;
  --surface-hover: #1e2024;
  --line: #2f3336;
  --ink: #e7e9ea;
  --muted: #71767b;
  --accent: #1d9bf0;
  --accent-soft: rgba(29, 155, 240, 0.14);
  --accent-hover: #1a8cd8;
  --danger: #f4212e;
  --ok: #00ba7c;
  --rail: 275px;
  --column: 600px;
  --radius: 16px;
  --font-display: "Syne", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

/* —— App shell (X layout) —— */
.x-app {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, var(--column)) minmax(0, 1fr);
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
}

.x-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 0.75rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-right: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0.5rem;
  border-radius: 999px;
  transition: background 0.2s var(--ease);
}

.brand:hover {
  background: var(--surface);
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f2f6fa;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.brand-logo-lg {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.brand-wordmark {
  width: auto;
  height: 42px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.brand-text span {
  color: var(--accent);
}

/* legacy square mark kept for pages mid-migrate */
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #1d9bf0 0%, #0a66a8 100%);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.04em;
  color: #fff;
  flex-shrink: 0;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rail-link {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 500;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  transition: background 0.2s var(--ease);
}

.rail-link:hover {
  background: var(--surface);
  text-decoration: none;
}

.rail-link.is-active {
  font-weight: 700;
}

.rail-ico {
  width: 1.35rem;
  height: 1.35rem;
  opacity: 0.95;
}

.rail-cta {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  width: min(100%, 230px);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.rail-cta:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

.rail-foot {
  margin-top: auto;
  padding: 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Center column */
.x-column {
  border-right: 1px solid var(--line);
  min-width: 0;
}

.column-head {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 1rem;
}

.column-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.column-head p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Hero post-style */
.hero-post {
  padding: 1.25rem 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.hero-post::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background:
    radial-gradient(ellipse 60% 50% at 30% 40%, rgba(29, 155, 240, 0.18), transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(0, 186, 124, 0.08), transparent 65%);
  pointer-events: none;
  animation: atmosphere 12s ease-in-out infinite alternate;
}

@keyframes atmosphere {
  from { transform: translateY(0) scale(1); opacity: 0.9; }
  to { transform: translateY(12px) scale(1.05); opacity: 1; }
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  position: relative;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  overflow: hidden;
  background: #f2f6fa;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-who strong {
  display: block;
  font-size: 0.95rem;
}

.post-who span {
  color: var(--muted);
  font-size: 0.9rem;
}

.badge {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(29, 155, 240, 0.28);
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
}

.hero-title {
  position: relative;
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-lede {
  position: relative;
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 34rem;
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--surface);
}

/* Feed cards */
.feed-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s var(--ease) forwards;
}

.feed-item:nth-child(1) { animation-delay: 0.08s; }
.feed-item:nth-child(2) { animation-delay: 0.18s; }
.feed-item:nth-child(3) { animation-delay: 0.28s; }
.feed-item:nth-child(4) { animation-delay: 0.38s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.feed-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.feed-body h3 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
}

.feed-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.feed-tag {
  display: inline-block;
  margin-top: 0.55rem;
  color: var(--accent);
  font-size: 0.85rem;
}

/* Right rail */
.x-aside {
  padding: 0.85rem 1rem 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.aside-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.aside-card h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.trend {
  display: block;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.trend:last-child {
  border-bottom: 0;
}

.trend:hover {
  text-decoration: none;
}

.trend small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.trend strong {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.95rem;
}

.aside-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 0.25rem 0.35rem;
}

.aside-links a {
  color: var(--muted);
}

.aside-links a:hover {
  color: var(--accent);
}

/* Legal / content pages */
.legal {
  padding: 1.25rem 1rem 3.5rem;
  min-height: 70vh;
  color: var(--ink);
}

.legal-toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin: 0 0 1.5rem;
}

.legal-toc h2 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-family: var(--font-body);
  letter-spacing: 0;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.15rem;
  columns: 1;
}

.legal-toc a {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.7;
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.legal h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.7rem;
  color: var(--ink);
  scroll-margin-top: 4.5rem;
}

.legal h2:first-of-type {
  margin-top: 0.5rem;
}

.legal h3 {
  margin: 1.1rem 0 0.45rem;
  font-size: 1.02rem;
  color: var(--ink);
}

.legal p,
.legal li {
  color: #c7cbd1;
  max-width: 42rem;
  font-size: 0.98rem;
  line-height: 1.65;
}

.legal ul,
.legal ol {
  padding-left: 1.2rem;
  margin: 0.4rem 0 0.9rem;
}

.legal strong {
  color: var(--ink);
}

.legal a {
  color: var(--accent);
}

.updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
  max-width: 42rem;
}

.contact-grid {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.contact-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.contact-card:hover {
  border-color: rgba(29, 155, 240, 0.45);
  background: var(--surface-hover);
  text-decoration: none;
}

.contact-card small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.contact-card strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.contact-card span {
  display: block;
  margin-top: 0.25rem;
  color: #c7cbd1;
  font-size: 0.9rem;
}

/* Contact */
.contact-form {
  display: grid;
  gap: 0.85rem;
  max-width: 28rem;
  margin-top: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

.form-status {
  display: none;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(0, 186, 124, 0.12);
  border: 1px solid rgba(0, 186, 124, 0.35);
  color: var(--ok);
  font-size: 0.9rem;
}

.form-status.is-visible {
  display: block;
  animation: rise 0.45s var(--ease) forwards;
}

/* Mobile top bar */
.mobile-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
}

.mobile-nav {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.mobile-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

/* Reveal helper */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .x-app {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .brand-text,
  .rail-link span,
  .rail-cta,
  .rail-foot {
    display: none;
  }

  .x-rail {
    align-items: center;
    padding-inline: 0.35rem;
  }

  .rail-link {
    padding: 0.75rem;
  }

  .x-aside {
    display: none;
  }
}

@media (max-width: 720px) {
  .x-app {
    grid-template-columns: 1fr;
  }

  .x-rail {
    display: none;
  }

  .mobile-bar {
    display: flex;
  }

  .hero-title {
    font-size: 1.85rem;
  }
}
