/* ============================================================
   Front-Robo.Tech — styles
   Modern dark "hardware/circuit" aesthetic, fully responsive.
   ============================================================ */

:root {
  --bg: #070b11;
  --bg-2: #0a1019;
  --surface: #0e1622;
  --surface-2: #111c2b;
  --border: #1b2a3d;
  --border-soft: rgba(120, 160, 200, 0.14);

  --text: #e9eff7;
  --text-muted: #9fb2c8;
  --text-dim: #6f8299;

  --accent: #38e8c8;
  --accent-2: #2f8fff;
  --accent-grad: linear-gradient(135deg, #38e8c8 0%, #2f8fff 100%);
  --accent-glow: rgba(56, 232, 200, 0.25);

  --danger: #ff6b6b;

  --maxw: 1160px;
  --radius: 14px;
  --radius-sm: 10px;

  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 0 1px rgba(56, 232, 200, 0.15), 0 20px 60px -25px rgba(47, 143, 255, 0.5);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --header-h: 70px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }

.section { padding: 96px 0; position: relative; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--border); }

.section-head { max-width: 720px; margin-bottom: 52px; }
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.section-lead { color: var(--text-muted); font-size: 1.08rem; margin-top: 16px; }

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--accent); color: #04121a; padding: 10px 16px;
  border-radius: 8px; font-weight: 700; z-index: 200; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 13px; --pad-x: 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent-grad); color: #04121a; font-weight: 700;
  box-shadow: 0 10px 30px -12px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 14px 36px -10px var(--accent-glow); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; }
.btn-sm { --pad-y: 9px; --pad-x: 16px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 11, 17, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.site-header.scrolled { border-bottom-color: var(--border); background: rgba(7, 11, 17, 0.9); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; letter-spacing: 0.02em; }
.brand-mark { filter: drop-shadow(0 0 8px rgba(56, 232, 200, 0.35)); }
.brand-text { font-size: 1.05rem; }
.brand-accent { color: var(--accent); }

.main-nav { display: flex; gap: 26px; }
.main-nav a { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; position: relative; padding: 4px 0; transition: color 0.2s; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent-grad); transition: width 0.25s ease; border-radius: 2px;
}
.main-nav a:hover, .main-nav a:focus-visible { color: #fff; }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-btn {
  background: transparent; border: none; color: var(--text-muted);
  padding: 7px 12px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s;
}
.lang-btn.active { background: var(--accent-grad); color: #04121a; }
.lang-btn:not(.active):hover { color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: transparent; border: none; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(72px, 12vw, 140px) 0 clamp(60px, 9vw, 110px); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 60% at 78% 8%, rgba(47, 143, 255, 0.18), transparent 60%),
    radial-gradient(46% 46% at 12% 20%, rgba(56, 232, 200, 0.14), transparent 60%),
    linear-gradient(180deg, transparent, rgba(7, 11, 17, 0.4));
}
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border-soft) 1px, transparent 1px), linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 72%);
  opacity: 0.6;
}
.hero-inner { position: relative; z-index: 1; max-width: 860px; }
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5.6vw, 4rem);
  line-height: 1.05; letter-spacing: -0.03em; font-weight: 700;
  margin-bottom: 20px;
}
.hero-subtitle { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--text-muted); max-width: 680px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-highlights { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 40px; }
.hero-highlights li { position: relative; padding-left: 22px; color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.hero-highlights li::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 9px; height: 9px; border-radius: 2px; background: var(--accent-grad);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ---------- Stats ---------- */
.stats { border-block: 1px solid var(--border); background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 22px; text-align: center; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat-num { display: block; font-family: var(--font-head); font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Cards / Services ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; position: relative; overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--accent-grad); opacity: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; transition: opacity 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover::after { opacity: 0.7; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(56, 232, 200, 0.08); border: 1px solid var(--border); color: var(--accent);
  margin-bottom: 18px;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-family: var(--font-head); font-size: 1.2rem; margin-bottom: 10px; letter-spacing: -0.01em; }
.card p { color: var(--text-muted); font-size: 0.96rem; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 54px; align-items: center; }
.about-copy p { color: var(--text-muted); margin-top: 16px; }
.about-copy .section-title { margin-bottom: 6px; }
.check-list { margin: 24px 0 30px; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 30px; color: var(--text); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 5px;
  background: rgba(56, 232, 200, 0.12); border: 1px solid var(--accent);
}
.check-list li::after {
  content: ""; position: absolute; left: 6px; top: 8px; width: 6px; height: 10px;
  border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.about-panel { position: relative; }
.panel-card {
  background: linear-gradient(160deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.panel-card::before {
  content: ""; position: absolute; left: 33px; top: 40px; bottom: 40px; width: 2px;
  background: linear-gradient(var(--accent), transparent); opacity: 0.4;
}
.panel-line { display: flex; align-items: center; gap: 16px; padding: 12px 0; color: var(--text); font-weight: 500; position: relative; }
.panel-line .dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--bg);
  border: 2px solid var(--accent); flex: none; box-shadow: 0 0 0 4px rgba(56, 232, 200, 0.08);
}

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: step; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 20px; position: relative; transition: border-color 0.2s, transform 0.2s;
}
.step:hover { border-color: var(--accent); transform: translateY(-3px); }
.step-num { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; color: transparent; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; }
.step h3 { font-family: var(--font-head); font-size: 1.1rem; margin: 12px 0 8px; }
.step p { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Technologies ---------- */
.tech-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.tech-group {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.tech-group h3 { font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 16px; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted);
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-2);
  transition: color 0.2s, border-color 0.2s;
}
.tech-group:hover .chips li { border-color: var(--border-soft); }
.chips li:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Industries ---------- */
.industries-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.industry {
  padding: 26px; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); transition: border-color 0.2s, transform 0.2s;
}
.industry:hover { border-color: var(--accent); transform: translateY(-3px); }
.industry h3 { font-family: var(--font-head); font-size: 1.14rem; margin-bottom: 8px; }
.industry p { color: var(--text-muted); font-size: 0.94rem; }

/* ---------- Contact ---------- */
.section-contact { background: var(--bg-2); border-top: 1px solid var(--border); }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 54px; align-items: start; }
.contact-info { margin-top: 30px; display: grid; gap: 18px; }
.contact-info li { display: flex; flex-direction: column; gap: 2px; }
.ci-label { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); }
.contact-info a { color: var(--accent); font-weight: 600; }
.contact-info a:hover { text-decoration: underline; }

.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  background: linear-gradient(160deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 30px;
  box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.field .opt { color: var(--text-dim); font-weight: 400; }
.field input, .field select, .field textarea {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 12px 14px; font: inherit; font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 232, 200, 0.15);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239fb2c8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.field .error { color: var(--danger); font-size: 0.82rem; display: none; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field.invalid .error { display: block; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-footer { gap: 12px; }
.form-note { color: var(--text-dim); font-size: 0.82rem; text-align: center; }
.form-status { grid-column: 1 / -1; padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.95rem; }
.form-status.success { background: rgba(56, 232, 200, 0.12); border: 1px solid var(--accent); color: var(--accent); }
.form-status.error { background: rgba(255, 107, 107, 0.1); border: 1px solid var(--danger); color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); padding-top: 54px; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 30px; padding-bottom: 34px; }
.footer-brand p { color: var(--text-muted); margin-top: 14px; max-width: 320px; font-size: 0.94rem; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: var(--text-muted); font-size: 0.94rem; transition: color 0.2s; }
.footer-nav a:hover { color: var(--accent); }
.footer-contact a { color: var(--accent); font-weight: 600; }
.footer-bottom { border-top: 1px solid var(--border); padding: 22px 0; }
.footer-bottom p { color: var(--text-dim); font-size: 0.86rem; text-align: center; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .cards-grid, .tech-groups, .industries-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    flex-direction: column; gap: 0; padding: 10px 22px 22px;
    transform: translateY(-140%); transition: transform 0.3s ease; z-index: 90;
    box-shadow: var(--shadow);
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--border); }
  .section { padding: 68px 0; }
}

@media (max-width: 560px) {
  .cards-grid, .tech-groups, .industries-grid, .steps { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; padding: 22px; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1; }
}
