/* =========================================================
   RS Automation Solutions — stylesheet
   Design tokens
   ========================================================= */

@font-face {
  font-family: 'LT Renovate';
  src: url('../assets/fonts/LTRenovate-ExtraBold.otf') format('opentype');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'LT Renovate';
  src: url('../assets/fonts/LTRenovate-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'LT Renovate';
  src: url('../assets/fonts/LTRenovate-Medium.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'LT Renovate';
  src: url('../assets/fonts/LTRenovate-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

:root {
  /* colour */
  --bg:          #141412;
  --bg-raised:   #1c1b18;
  --surface:     #1f1e1a;
  --line:        rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.16);
  --red:         #E30613;
  --red-deep:    #8A1002;
  --white:       #FFFFFF;
  --ink:         #F3F1EC;
  --ink-muted:   #ABA8A1;
  --ink-faint:   #706E68;

  /* type */
  --f-display: 'LT Renovate', 'Arial Black', sans-serif;
  --f-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  /* layout */
  --wrap: 1160px;
  --gutter: 24px;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* =========================================================
   Signature element: signal rail
   A thin vertical trace running the height of the page,
   echoing a single-line electrical diagram / ladder rail.
   ========================================================= */
.signal-rail {
  position: fixed;
  top: 0; left: 18px;
  width: 1px;
  height: 100vh;
  background: var(--line);
  z-index: 5;
  display: none;
}
.signal-rail__fill {
  position: absolute;
  top: 0; left: 0;
  width: 1px;
  height: 0%;
  background: linear-gradient(180deg, var(--red) 0%, var(--red-deep) 100%);
  transition: height 0.15s linear;
}
@media (min-width: 1024px) {
  .signal-rail { display: block; }
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20,20,18,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand__mark { height: 30px; width: auto; }
.brand__name {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  color: var(--white);
}
.brand__name em { color: var(--red); font-style: normal; }

.site-nav {
  display: none;
  gap: 32px;
}
.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--white); }

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

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

.lang-toggle {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
  cursor: pointer;
  font-family: var(--f-mono);
}
.lang-toggle__opt {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--ink-faint);
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-toggle__opt.is-active {
  background: var(--red);
  color: var(--white);
}

.nav-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-burger span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--white);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (min-width: 860px) {
  .nav-burger { display: none; }
}

.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* =========================================================
   Eyebrows / section titles (shared)
   ========================================================= */
.eyebrow, .section-eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--red);
  margin: 0 0 18px;
  text-transform: uppercase;
}
.section-eyebrow--light { color: rgba(255,255,255,0.75); }

.section-title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 48px;
  color: var(--white);
  letter-spacing: -0.01em;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
  background: var(--bg);
}
.hero__texture {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(135deg, rgba(227,6,19,0.16) 0%, rgba(227,6,19,0) 32%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 26px);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }

.hero__title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(34px, 6.4vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
  color: var(--white);
  max-width: 15ch;
}
.hero__title--accent {
  background: linear-gradient(90deg, var(--red) 0%, var(--red-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  font-size: 17px;
  color: var(--ink-muted);
  max-width: 46ch;
  margin: 0 0 40px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 28px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn--primary {
  background: var(--red);
  color: var(--white);
}
.btn--primary:hover { background: #c60510; }
.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--red); color: var(--white); }

/* =========================================================
   Services
   ========================================================= */
.services { padding: 96px 0; background: var(--bg-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 640px) {
  .service-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .service-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.service-card {
  background: var(--bg-raised);
  padding: 32px 28px;
  transition: background 0.2s ease;
}
.service-card:hover { background: var(--surface); }

.service-card__tag {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.node {
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 50%;
  flex-shrink: 0;
}
.tag-code {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.service-card h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--white);
  margin: 0 0 10px;
  letter-spacing: -0.005em;
}
.service-card p {
  font-size: 14.5px;
  color: var(--ink-muted);
  margin: 0;
}

/* =========================================================
   About
   ========================================================= */
.about { padding: 96px 0; }
.about__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
}
@media (min-width: 900px) {
  .about__inner { grid-template-columns: 1.05fr 1fr; align-items: start; }
}

.about__lead {
  font-size: 18px;
  color: var(--ink);
  margin: 0 0 20px;
}
.about p { color: var(--ink-muted); }
.about__col p:last-child { margin-bottom: 0; }

.about__panels {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.panel {
  background: var(--bg-raised);
  padding: 28px 28px 30px;
}
/* .panel .tag-code {
  display: inline-block;
  margin-bottom: 14px;
} */

.panel__tag {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.panel h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--white);
  margin: 0 0 10px;
}
.panel p {
  font-size: 14.5px;
  margin: 0;
}

/* =========================================================
   Contact
   ========================================================= */
.contact {
  padding: 104px 0 112px;
  background: linear-gradient(160deg, var(--red-deep) 0%, #4a0801 55%, var(--bg) 100%);
  border-top: 1px solid var(--line);
}
.contact__title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(28px, 4.5vw, 42px);
  color: var(--white);
  margin: 0 0 16px;
  max-width: 18ch;
}
.contact__sub {
  font-size: 16px;
  color: rgba(255,255,255,0.78);
  max-width: 44ch;
  margin: 0 0 44px;
}

.contact__methods {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: 460px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.18);
}
.contact-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(0,0,0,0.22);
  transition: background 0.15s ease;
}

.contact-method__icon {
  width: 18px;
  height: 18px;
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
}

.contact-method:hover { background: rgba(0,0,0,0.34); }
.contact-method .tag-code {
  color: rgba(255,255,255,0.6);
  width: 42px;
  flex-shrink: 0;
}
.contact-method__value {
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer { padding: 40px 0; background: var(--bg); }
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.site-footer__location {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

@media (min-width: 640px) {
  .site-footer__inner { flex-direction: row; justify-content: space-between; align-items: center; }
}
.brand--footer .brand__mark { height: 24px; }
.brand--footer .brand__name { font-size: 15px; }
.site-footer__copy {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 0;
}
