/* ── Arcway Website — Dark theme from arcway-android ── */

:root {
  --bg:         #060C18;
  --surface:    #0D1526;
  --surface-2:  #132040;
  --border:     #1C2B4A;
  --primary:    #4797F8;
  --teal:       #00D9C0;
  --fg:         #C2D0E8;
  --muted:      #4A6080;
  --yellow:     #FFCB6B;
  --red:        #F07178;

  --radius:     14px;
  --font:       'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: 15px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--teal); }

/* ── Header ── */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 12, 24, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

nav ul a {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

nav ul a:hover { color: var(--fg); }

.logo {
  font-weight: 700;
  font-size: 17px;
  color: var(--primary);
  letter-spacing: 1px;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  border: none;
  transition: opacity 0.18s, transform 0.18s;
}

.btn:hover { opacity: 0.85; transform: translateY(-1px); }

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

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-platform {
  background: var(--surface-2);
  color: var(--fg);
  border: 1px solid var(--border);
  width: 100%;
  font-size: 12px;
  padding: 9px 14px;
}

.btn-platform:hover { border-color: var(--primary); color: var(--primary); }

/* ── Sections shared ── */

section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
}

h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 10px;
}

h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
}

.section-sub {
  color: var(--muted);
  margin-bottom: 48px;
  font-size: 14px;
}

/* ── Hero ── */

.hero {
  padding-top: 110px;
  padding-bottom: 100px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 13px;
  color: var(--teal);
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 62px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 24px;
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.hero-with {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.platform-icons {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 auto;
}
.platform-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 36px;
  min-width: 132px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: var(--fg);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.platform-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.06);
}
.platform-svg {
  width: 48px;
  height: 48px;
  color: var(--fg);
}
.platform-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
}
.platform-card:hover .platform-name { color: var(--fg); }
@media (prefers-color-scheme: light) {
  .platform-card {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
  }
  .platform-card:hover { background: rgba(0, 0, 0, 0.05); }
}
@media (max-width: 540px) {
  .platform-icons { gap: 12px; }
  .platform-card { padding: 22px 26px; min-width: 100px; }
  .platform-svg { width: 38px; height: 38px; }
}

.brand-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  margin-bottom: 32px;
}

.brand {
  display: inline-flex;
  text-decoration: none;
  transition: transform 0.18s ease;
}
.brand:hover { transform: translateY(-1px); }
.brand-mark {
  width: 96px;
  height: 32px;
  display: block;
  border-radius: 6px;
  border: 1px solid #000;
  background: #ffffff;
  object-fit: contain;
  padding: 5px 15px;
  box-sizing: border-box;
}

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── How it works ── */

.how-it-works { border-top: 1px solid var(--border); }

.hiw-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 48px;
}

/* Steps column */
.hiw-steps { display: flex; flex-direction: column; }

.hiw-step {
  display: flex;
  gap: 20px;
}

.hiw-step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.hiw-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  z-index: 1;
}

.hiw-dot--active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 18px rgba(71, 151, 248, 0.45);
}

.hiw-line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin: 6px 0;
  min-height: 40px;
}

.hiw-step-body {
  padding-bottom: 40px;
}

.hiw-step--last .hiw-step-body { padding-bottom: 0; }

.hiw-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.hiw-step-body h3 {
  margin-bottom: 8px;
  color: var(--fg);
}

.hiw-step-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* Terminal visual */
.hiw-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.terminal-mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  min-width: 0;
  width: 100%;
}

.terminal-bar {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.t-red    { background: #F07178; }
.t-yellow { background: #FFCB6B; }
.t-green  { background: #00D9C0; }

.t-title {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.terminal-body {
  padding: 18px 20px;
  font-size: 12px;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
}

.t-line { display: flex; gap: 8px; align-items: baseline; }

.t-prompt {
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
}

.t-cmd { color: var(--fg); }

.t-out { color: var(--muted); padding-left: 4px; }

.t-dim { opacity: 0.6; }

.t-teal  { color: var(--teal); }
.t-green { color: #00D9C0; }

.t-cursor {
  color: var(--primary);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hiw-visual-caption {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.5px;
}

/* ── Features ── */

.features { border-top: 1px solid var(--border); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.feature-card h3 { margin-bottom: 10px; }

.feature-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Downloads / Get Started ── */

.downloads { border-top: 1px solid var(--border); }

.setup-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.setup-path {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color 0.2s;
}

.setup-path:hover { border-color: var(--primary); }

.setup-path--soon {
  opacity: 0.5;
  pointer-events: none;
}

.setup-path-header { display: flex; flex-direction: column; gap: 6px; }

.setup-path-label {
  font-size: 11px;
  color: var(--teal);
  letter-spacing: 2px;
  font-weight: 700;
}

.setup-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  counter-reset: step-counter;
}

.setup-steps li {
  counter-increment: step-counter;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setup-steps li::before {
  content: counter(step-counter) ".";
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.setup-step-title {
  font-size: 13px;
  color: var(--fg);
}

.soon-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Badges ── */

.badge-soon {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 11px;
  font-family: var(--font);
  letter-spacing: 0.5px;
  width: fit-content;
}

.badge-beta {
  display: inline-block;
  background: rgba(71, 151, 248, 0.15);
  border: 1px solid rgba(71, 151, 248, 0.35);
  color: var(--primary);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-family: var(--font);
  vertical-align: middle;
  letter-spacing: 0.5px;
}

/* ── Web access ── */

.web-access {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
  transition: border-color 0.2s;
}

.web-access:hover { border-color: var(--primary); }

.web-access-left { flex: 1; min-width: 220px; }

.web-access-left h3 { margin-bottom: 10px; }

.web-access-left p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.web-access-note {
  flex: 1;
  min-width: 180px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mono-label {
  font-size: 11px;
  color: var(--teal);
  letter-spacing: 1.5px;
  font-weight: 700;
}

.web-access-note p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Coming soon / Roadmap ── */

.coming-soon-section { border-top: 1px solid var(--border); }

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.roadmap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.roadmap-tag {
  font-size: 11px;
  color: var(--yellow);
  letter-spacing: 1.5px;
  font-weight: 700;
}

.roadmap-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Self-host ── */

.self-host { border-top: 1px solid var(--border); }

.selfhost-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.selfhost-steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sh-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.sh-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1.5px;
  flex-shrink: 0;
  padding-top: 3px;
  width: 24px;
}

.sh-step > div { flex: 1; min-width: 0; }

.sh-step h3 { margin-bottom: 10px; }

.sh-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--fg);
  overflow-x: auto;
  white-space: pre;
}

.c-comment { color: var(--muted); }
.c-val     { color: var(--teal); }

.inline-code {
  font-family: var(--font);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
  color: var(--teal);
}

.selfhost-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
}

.sh-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sh-info-label {
  font-size: 10px;
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.sh-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sh-list li {
  font-size: 13px;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
}

.sh-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border);
}

/* ── Early Access ── */

.early-access {
  border-top: 1px solid var(--border);
  padding: 80px 24px;
}

.ea-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ea-eyebrow {
  font-size: 11px;
  letter-spacing: 2.5px;
  color: var(--teal);
  font-weight: 700;
  text-transform: uppercase;
}

.ea-inner h2 {
  font-size: clamp(22px, 4vw, 32px);
  margin-bottom: 0;
}

.ea-inner > p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 420px;
}

.ea-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.ea-input-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.ea-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 16px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--fg);
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}

.ea-input::placeholder { color: var(--muted); }

.ea-input:focus { border-color: var(--primary); }

.ea-input--error {
  border-color: var(--red);
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-6px); }
  75%       { transform: translateX(6px); }
}

.ea-submit { white-space: nowrap; flex-shrink: 0; }

.ea-hint {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

/* Success state */
.hidden { display: none !important; }

.ea-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%;
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ea-success-icon {
  font-size: 22px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 1px;
}

.ea-success h3 {
  font-size: 18px;
  color: var(--fg);
}

.ea-success p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}

/* ── Footer ── */

footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-inner p {
  font-size: 13px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.footer-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--fg); }

/* ── Responsive ── */

/* Prevent horizontal overflow globally */
body { overflow-x: hidden; }

/* ── Tablet / large phone ── */
@media (max-width: 860px) {
  section { padding: 60px 20px; }

  .hiw-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Show terminal below steps on tablet */
  .hiw-visual { order: -1; }

  .setup-paths {
    grid-template-columns: 1fr;
  }

  .roadmap-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Hamburger button (hidden on desktop) ── */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 200;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* X state */
.nav-toggle--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle--open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Phone ── */
@media (max-width: 600px) {
  /* Nav: hamburger */
  nav { padding: 0 16px; position: relative; }
  .logo { font-size: 15px; }
  .nav-toggle { display: flex; }

  nav ul {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(6, 12, 24, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }

  nav ul.nav-open { display: flex; }

  nav ul li a {
    display: block;
    padding: 14px 20px;
    font-size: 14px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
  }

  nav ul li:last-child a { border-bottom: none; }

  /* Sections */
  section { padding: 48px 16px; }
  .self-host { padding: 48px 16px; }

  /* Hero */
  .hero {
    padding-top: 64px;
    padding-bottom: 64px;
  }
  .hero-sub { font-size: 13px; }
  .cta-row { flex-direction: column; align-items: center; }
  .cta-row .btn { width: 100%; max-width: 280px; }

  /* How it works */
  .hiw-visual { display: none; } /* hide terminal on small phone, steps are enough */
  .hiw-step-body { padding-bottom: 32px; }

  /* Features — 1 column */
  .feature-grid { grid-template-columns: 1fr; }

  /* Setup paths */
  .setup-paths { grid-template-columns: 1fr; gap: 14px; }
  .setup-path { padding: 22px 18px; }

  /* Web access */
  .web-access {
    flex-direction: column;
    gap: 20px;
    padding: 22px 18px;
  }
  .web-access-note { min-width: unset; }

  /* Roadmap */
  .roadmap-grid { grid-template-columns: 1fr; }

  /* Self-host */
  .selfhost-grid { grid-template-columns: 1fr; gap: 28px; }
  .selfhost-info { position: static; }
  .code-block { font-size: 11px; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: unset; }

  /* Early access */
  .early-access { padding: 48px 16px; }
  .ea-input-row { flex-direction: column; }
  .ea-submit { width: 100%; }

  /* Footer */
  .footer-links { gap: 16px; }
}

/* ── Very small phone (320px) ── */
@media (max-width: 380px) {
  .logo { font-size: 14px; letter-spacing: 0.5px; }
  h2 { font-size: 22px; }
  .hero h1 { font-size: 28px; }
}
