/* LogicLink Studio — design system */

:root {
  --bg: #0b1220;
  --bg-elevated: #111a2e;
  --bg-soft: #162038;
  --surface: #1a2740;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(34, 211, 238, 0.28);
  --text: #e8eef7;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-strong: #06b6d4;
  --navy: #0f172a;
  --success: #34d399;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --font: "Poppins", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", ui-monospace, monospace;
  --container: 1120px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: #67e8f9;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Background atmosphere */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(6, 182, 212, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(37, 99, 235, 0.16), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(15, 23, 42, 0.9), transparent 60%),
    linear-gradient(180deg, #0b1220 0%, #0a1020 50%, #070d18 100%);
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 70%);
}

/* Typography */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

h1,
h2,
h3 {
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.15rem;
}

.lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 42rem;
}

.section {
  padding: 5rem 0;
}

.section-head {
  margin-bottom: 2.5rem;
  max-width: 40rem;
}

.section-head p {
  color: var(--text-muted);
  margin: 0;
}

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

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

.brand span {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.85rem;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.lang-switch a {
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.lang-switch a.active,
.lang-switch a:hover {
  color: var(--bg);
  background: var(--accent);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.mobile-nav {
  display: none;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.96);
  padding: 1rem 0 1.25rem;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text);
  font-weight: 500;
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.btn:active {
  transform: translateY(1px);
}

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

.btn-primary:hover {
  background: #67e8f9;
  color: #042f2e;
}

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

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--accent-soft);
  color: var(--text);
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  padding: 4rem 0 5rem;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
  }
}

.hero-brand {
  font-family: var(--font);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
  color: var(--text);
}

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

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero .lead {
  margin-bottom: 1.75rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  letter-spacing: 0.02em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Terminal visual */
.terminal {
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  animation: terminal-in 0.9s ease-out both;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #475569;
}

.terminal-dot:nth-child(1) {
  background: #f87171;
}

.terminal-dot:nth-child(2) {
  background: #fbbf24;
}

.terminal-dot:nth-child(3) {
  background: #34d399;
}

.terminal-title {
  margin-left: 0.75rem;
  color: var(--text-dim);
  font-size: 0.72rem;
}

.terminal-body {
  padding: 1.25rem 1.15rem 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
  min-height: 280px;
}

.terminal-body .prompt {
  color: var(--accent);
}

.terminal-body .cmd {
  color: var(--text);
}

.terminal-body .ok {
  color: var(--success);
}

.terminal-body .dim {
  color: var(--text-dim);
}

.terminal-body .line {
  display: block;
  margin-bottom: 0.35rem;
}

@keyframes terminal-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy {
  animation: hero-copy-in 0.75s ease-out both;
}

@keyframes hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Differentials */
.diff-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .diff-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.diff-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-elevated), rgba(17, 26, 46, 0.4));
}

.diff-card .num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.diff-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Services */
.services-list {
  display: grid;
  gap: 1.25rem;
}

.service-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 1.5rem;
  transition: border-color 0.2s, background 0.2s;
}

.service-card:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.service-card h3 {
  margin-bottom: 0.5rem;
}

.service-card > p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.service-card ul {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.service-card li {
  margin-bottom: 0.4rem;
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Scope table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.scope-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.scope-table th,
.scope-table td {
  text-align: left;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.scope-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 600;
  background: var(--bg-soft);
}

.scope-table td {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.scope-table td:first-child {
  color: var(--text);
  font-weight: 600;
}

.scope-table tr:last-child td {
  border-bottom: none;
}

.scope-table .term {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  white-space: nowrap;
}

.scope-cards {
  display: none;
  gap: 1rem;
}

@media (max-width: 720px) {
  .table-wrap {
    display: none;
  }

  .scope-cards {
    display: grid;
  }

  .scope-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    padding: 1.25rem;
  }

  .scope-card h3 {
    margin-bottom: 0.75rem;
  }

  .scope-card dl {
    margin: 0;
    display: grid;
    gap: 0.75rem;
  }

  .scope-card dt {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 0.2rem;
  }

  .scope-card dd {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
  }
}

/* Method */
.method-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .method-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .method-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.method-step {
  position: relative;
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.method-step .step-n {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
  opacity: 0.85;
}

.method-step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Contact */
.contact-panel {
  display: grid;
  gap: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.06), transparent 40%),
    var(--bg-elevated);
  padding: 2rem 1.5rem;
}

@media (min-width: 900px) {
  .contact-panel {
    grid-template-columns: 1fr 1.1fr;
    padding: 2.5rem;
    gap: 3rem;
  }
}

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

.contact-meta a,
.contact-meta span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-meta a {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--navy);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.form-note {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.form-error {
  display: none;
  color: #fca5a5;
  font-size: 0.85rem;
  margin: 0;
}

.form-error.show {
  display: block;
}

.form-fallback {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
}

.form-fallback.show {
  display: block;
}

.form-fallback p {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.form-fallback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.form-copy-feedback {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--accent, #22d3ee);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-inner p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.muted {
  color: var(--text-muted);
}
