/* EngineBuilds homepage */

:root {
  --bg-deep: #070b14;
  --bg-panel: #111827;
  --bg-panel-elevated: #1a2234;
  --bg-pill: #1e293b;
  --border-subtle: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #94a3b8;
  --accent: #22d3ee;
  --accent-hover: #67e8f9;
  --accent-ink: #04121c;
  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-panel: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  color: var(--text-primary);
  min-height: 100vh;
  padding: 24px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  body { padding: 16px; }
}
@media (max-width: 480px) {
  body { padding: 12px; }
}

.app {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
}

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

/* Brand header */
.brand {
  padding: 4px 0 24px;
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-home,
.brand-home:hover {
  color: inherit;
  text-decoration: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
}

.brand-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 2px 0;
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 480px) {
  .brand { margin-bottom: 24px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-title { font-size: 1.65rem; }
  .brand-tagline { font-size: 0.8125rem; }
}

.page-main {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

@media (max-width: 720px) {
  .page-main { gap: 32px; }
}

#software,
#contact {
  scroll-margin-top: 20px;
}

/* Panel */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-panel);
}

@media (max-width: 720px) {
  .panel { padding: 20px; }
}
@media (max-width: 480px) {
  .panel { padding: 16px; }
}

.hero-intro {
  margin: 0 0 24px;
}

.hero-headline {
  margin: 0 0 10px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-support {
  margin: 0;
  max-width: 62ch;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 0;
}

.hero-panel-title {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero-panel-text {
  margin: 0 0 24px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.hero-panel .btn {
  margin-top: auto;
  align-self: flex-start;
}

.hero-panel--trade {
  border-color: rgba(34, 211, 238, 0.55);
}

.step-heading {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.lead,
.intro p,
.contact .lead {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
  max-width: 62ch;
}

.intro p:last-child,
.lead:last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel .btn { align-self: stretch; }
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.3;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
  text-decoration: none;
}

@media (max-width: 480px) {
  .hero-intro { margin-bottom: 20px; }
  .hero-headline { font-size: 1.6rem; }
  .hero-panel-title { font-size: 1.3rem; }
  .step-heading { font-size: 1.3rem; }
}

/* Card */
.card {
  display: block;
  padding: 24px;
  background: var(--bg-panel-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  border-color: var(--accent);
  background: #1e293b;
  text-decoration: none;
  color: inherit;
}

.card--primary {
  border-color: rgba(34, 211, 238, 0.45);
  background: var(--bg-panel);
}

.card--primary:hover {
  border-color: var(--accent);
  background: var(--bg-panel);
  text-decoration: none;
  color: inherit;
}

.product-card {
  padding: 28px;
}

.card-title {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.card-desc {
  display: block;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 12px 0;
}

.product-card .card-desc:last-of-type {
  margin-bottom: 20px;
}

.product-card .btn {
  margin-top: 0;
}

.feature-card {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 32px;
  align-items: center;
  padding: 32px;
}

.feature-card .card-title {
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.s1-mark {
  color: var(--accent);
}

.feature-steps {
  list-style: none;
  margin: 4px 0 24px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.feature-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
}

.feature-steps svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: var(--radius-sm);
  background: #070b14;
}

.feature-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #070b14;
}

.feature-player .feature-video {
  height: 100%;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
  object-fit: contain;
  background: #070b14;
}

.feature-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 16px;
  border: 0;
  background: transparent;
  color: #f8fafc;
  font: inherit;
  cursor: pointer;
}

.feature-cover[hidden] {
  display: none;
}

.feature-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.feature-cover-shade {
  position: absolute;
  inset: 0;
  background: rgba(4, 18, 28, 0.42);
  pointer-events: none;
}

.feature-play {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.feature-play svg {
  width: 30px;
  height: 30px;
  margin-left: 3px;
  fill: currentColor;
}

.feature-cover:hover .feature-play,
.feature-cover:focus-visible .feature-play {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.feature-cover:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.feature-cover-label {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.feature-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.feature-actions .btn {
  padding: 12px 16px;
  white-space: nowrap;
}

.feature-actions .btn-quiet {
  font-size: 0.9375rem;
  background: rgba(7, 11, 20, 0.45);
  color: #ffffff;
  border: 1px solid rgba(34, 211, 238, 0.7);
}

.feature-actions .btn-quiet:hover {
  background: rgba(34, 211, 238, 0.1);
  color: #ffffff;
}

@media (max-width: 720px) {
  .feature-card {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px;
  }
  .feature-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .feature-card .btn {
    display: block;
    text-align: center;
  }
  .feature-play {
    width: 64px;
    height: 64px;
  }
  .feature-play svg {
    width: 26px;
    height: 26px;
  }
  .feature-cover-label {
    font-size: 0.6875rem;
    letter-spacing: 0.11em;
  }
}

.contact .btn-primary {
  margin-top: 4px;
}

.contact-aside {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.contact-aside-heading {
  margin: 0 0 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-aside-name {
  margin: 0 0 4px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.contact-aside-desc {
  margin: 0 0 12px;
  max-width: 62ch;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.btn-quiet {
  padding: 8px 14px;
  font-size: 0.8125rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.4);
}

.btn-quiet:hover {
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent-hover);
  text-decoration: none;
}

.external-mark::before {
  content: "↗";
  margin-left: 0.4em;
  font-size: 0.85em;
  opacity: 0.8;
}

/* Trade points */
.point-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.point {
  margin: 0;
  padding: 18px 18px 18px 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
}

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

/* Footer */
.site-footer {
  margin-top: 28px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.45em;
  row-gap: 0.15em;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.footer-part {
  white-space: nowrap;
}

.footer-part:not(:first-child)::before {
  content: "|";
  margin-right: 0.45em;
}
