/* ============================================================
   X Mechatronics — Stylesheet
   Modern, single-page brochure site
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --navy-900: #0b1622;
  --navy-800: #0e1b2c;
  --navy-700: #142639;
  --navy-600: #1c3450;
  --ink: #17212e;
  --slate-700: #3d4c5e;
  --slate-500: #647587;
  --slate-400: #8695a6;
  --line: #e4e9ef;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --surface-3: #eef2f6;

  --accent: #ff7a1a;
  --accent-600: #ee6a08;
  --accent-soft: #fff1e6;
  --teal: #17c3b2;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(16, 32, 52, .06), 0 2px 8px rgba(16, 32, 52, .05);
  --shadow-md: 0 12px 30px rgba(16, 32, 52, .10);
  --shadow-lg: 0 24px 60px rgba(11, 22, 34, .18);

  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --maxw: 1160px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.1; color: var(--navy-900); margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease;
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(255, 122, 26, .28); }
.btn-primary:hover { background: var(--accent-600); box-shadow: 0 10px 26px rgba(255, 122, 26, .36); }

.btn-ghost { background: transparent; color: var(--navy-800); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-3); }

.btn-outline { background: transparent; color: var(--navy-800); border-color: var(--line); }
.btn-outline:hover { border-color: var(--navy-700); background: var(--surface-2); }

.btn-light { background: #fff; color: var(--navy-800); }
.btn-light:hover { background: #f0f3f7; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 20px; color: var(--navy-900); }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900)); color: var(--accent);
}
.brand-text { font-weight: 600; letter-spacing: -.02em; }
.brand-text strong { font-weight: 700; }

.main-nav { margin-inline: auto; }
.main-nav ul { display: flex; gap: 28px; }
.main-nav a { font-size: 15px; font-weight: 500; color: var(--slate-700); position: relative; padding: 4px 0; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--accent);
  transition: width .22s ease;
}
.main-nav a:hover { color: var(--navy-900); }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.btn-phone { font-weight: 600; color: var(--navy-800); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy-900); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.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); }

.mobile-nav {
  display: none; flex-direction: column; gap: 6px; padding: 12px 24px 24px;
  border-top: 1px solid var(--line); background: #fff;
}
.mobile-nav.open { display: flex; }
.mobile-nav ul { display: flex; flex-direction: column; }
.mobile-nav a { padding: 14px 4px; font-size: 17px; font-weight: 500; border-bottom: 1px solid var(--surface-3); }
.mobile-nav .btn { margin-top: 12px; }

/* ---------- Eyebrow / section heads ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-600); margin-bottom: 14px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.section { padding: 92px 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-sub { color: var(--slate-500); font-size: 18px; margin-top: 14px; }

.grid { display: grid; gap: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--surface-2) 100%); }
.hero-glow {
  position: absolute; top: -180px; right: -120px; width: 620px; height: 620px; pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 122, 26, .16), transparent 62%);
  filter: blur(4px);
}
.hero-inner {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
  padding: 84px 24px 92px;
}
.hero-copy h1 { font-size: clamp(38px, 6vw, 64px); letter-spacing: -.02em; }
.hero-copy h1 .accent { color: var(--accent); }
.hero .lead { color: var(--slate-700); font-size: 19px; margin-top: 22px; max-width: 540px; }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.hero-badges { display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.hero-badges li { display: flex; flex-direction: column; }
.hero-badges strong { font-family: var(--font-head); font-size: 17px; color: var(--navy-900); }
.hero-badges span { font-size: 14px; color: var(--slate-500); }

.hero-card {
  background: var(--navy-800); color: #dfe7f0; border-radius: var(--radius-lg); padding: 30px;
  box-shadow: var(--shadow-lg); position: relative;
}
.hero-card-head {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: #a9c3e0; background: rgba(255, 255, 255, .06); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(23, 195, 178, .22); }
.hero-card h2 { color: #fff; font-size: 24px; }
.hero-card > p { color: #a9bace; margin-top: 8px; font-size: 15px; }
.hero-list { display: flex; flex-direction: column; gap: 12px; margin: 22px 0 24px; }
.hero-list li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: #d6e2ef; }
.hero-list svg { color: var(--teal); flex-shrink: 0; }

/* ---------- Strip ---------- */
.strip { background: var(--navy-900); }
.strip-inner {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 18px;
  padding: 20px 24px; color: #7f93aa; font-family: var(--font-head); font-weight: 500; font-size: 15px;
}
.strip-inner i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .8; }

/* ---------- Cards / Services ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.services-grid { grid-template-columns: repeat(3, 1fr); }
.service { padding: 30px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d7dee7; }
.service-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent-600); margin-bottom: 20px;
}
.service h3 { font-size: 20px; margin-bottom: 10px; }
.service p { color: var(--slate-500); font-size: 15.5px; }

/* ---------- Sectors ---------- */
.sectors-grid { grid-template-columns: repeat(2, 1fr); }
.sector-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.sector-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-600));
}
.sector-icon {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 16px;
  background: var(--navy-800); color: var(--accent); margin-bottom: 22px;
}
.sector-card h3 { font-size: 24px; margin-bottom: 12px; }
.sector-card p { color: var(--slate-500); margin-bottom: 20px; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 600; color: var(--accent-600); }
.link-arrow svg { transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Why us ---------- */
.why-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.why-copy { position: sticky; top: 100px; }
.why-copy h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
.why-copy .btn { margin-top: 26px; }
.why-list { display: flex; flex-direction: column; gap: 8px; }
.why-list li { display: flex; gap: 20px; padding: 24px; border-radius: var(--radius); transition: background .2s ease; }
.why-list li:hover { background: var(--surface-2); }
.why-num { font-family: var(--font-head); font-weight: 700; font-size: 18px; color: var(--accent); flex-shrink: 0; padding-top: 2px; }
.why-list h3 { font-size: 19px; margin-bottom: 6px; }
.why-list p { color: var(--slate-500); font-size: 15.5px; }

/* ---------- Process ---------- */
.process-grid { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; text-align: center; box-shadow: var(--shadow-sm); }
.step-num {
  display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--navy-800); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 18px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--slate-500); font-size: 15px; }
.step-line { height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 16px); }

/* ---------- Contact ---------- */
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-copy h2 { font-size: clamp(28px, 4vw, 40px); }
.contact-details { display: flex; flex-direction: column; gap: 20px; margin-top: 34px; }
.contact-details li { display: flex; align-items: center; gap: 16px; }
.ci { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-600); flex-shrink: 0; }
.ci-label { display: block; font-size: 13px; color: var(--slate-400); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.contact-details a, .contact-details div > span:not(.ci-label) { font-size: 17px; font-weight: 500; color: var(--navy-900); }
.contact-details a:hover { color: var(--accent-600); }

.contact-form { padding: 30px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--slate-700); margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; font-family: inherit; font-size: 15.5px; color: var(--ink);
  background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--slate-400); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 96px; }
.field.invalid input, .field.invalid textarea { border-color: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .12); }
.form-note { margin-top: 14px; font-size: 14.5px; text-align: center; min-height: 20px; }
.form-note.ok { color: #12864f; }
.form-note.err { color: #d13438; }

/* ---------- CTA banner ---------- */
.cta-banner { background: linear-gradient(135deg, var(--navy-800), var(--navy-900)); position: relative; overflow: hidden; }
.cta-banner::after {
  content: ""; position: absolute; top: -140px; left: 20%; width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(255, 122, 26, .22), transparent 60%);
}
.cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  padding: 60px 24px; position: relative; z-index: 1;
}
.cta-inner h2 { color: #fff; font-size: clamp(24px, 3.5vw, 34px); max-width: 560px; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #93a6ba; padding-top: 64px; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.brand-footer { color: #fff; margin-bottom: 16px; }
.brand-footer .brand-mark { background: rgba(255, 255, 255, .08); }
.footer-brand p { font-size: 15px; max-width: 320px; color: #8296ab; }
.footer-col h4 { color: #fff; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a, .footer-col li { font-size: 15px; color: #93a6ba; transition: color .18s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 22px 24px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 14px; color: #6f8399;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .main-nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; }
  .hero-card { max-width: 460px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-inner { grid-template-columns: 1fr; gap: 36px; }
  .why-copy { position: static; }
  .contact-inner { grid-template-columns: 1fr; gap: 36px; }
  .process-grid { grid-template-columns: 1fr; }
  .step-line { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .services-grid, .sectors-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-badges { gap: 20px; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .btn-lg { padding: 14px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
