/* public/styles/global.css */

/* ---------- Design tokens ---------- */
:root {
  --primary-color: #2a2a2a;
  --primary-dark: #1a1a1a;
  --secondary-color: #CE3F2B;
  --secondary-hover: #a8311f;
  --background-color: #f7f7f8;
  --surface-color: #ffffff;
  --surface-alt: #f0f0f2;
  --text-color: #2a2a2a;
  --text-muted: #555;
  --border-color: #e2e2e6;
  --link-hover-color: var(--secondary-color);
  --max-width: 1200px;
  --max-width-text: 65ch;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.10);
  --nav-height: 48px;
  --lang-height: 32px;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--lang-height) + var(--nav-height) + 8px);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--secondary-hover); text-decoration: underline; }

/* ---------- Language bar ---------- */
.language-nav {
  background-color: var(--primary-dark);
  height: var(--lang-height);
  position: sticky;
  top: 0;
  z-index: 20;
}
.language-nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  list-style: none;
  height: 100%;
}
.language-nav a {
  color: #ddd;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.language-nav a:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}
.language-nav a[aria-current="page"] {
  color: #fff;
  background-color: var(--secondary-color);
  font-weight: 600;
}

/* ---------- Sticky page nav ---------- */
.page-nav {
  position: sticky;
  top: var(--lang-height);
  z-index: 15;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  height: var(--nav-height);
}
.page-nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  list-style: none;
  height: 100%;
  padding: 0 16px;
  flex-wrap: wrap;
}
.page-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.page-nav a:hover {
  color: var(--secondary-color);
  background-color: var(--surface-alt);
  text-decoration: none;
}

/* ---------- Containers ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 60%, #3a2418 100%);
  color: #fff;
  padding: 80px 24px 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(206, 63, 43, 0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}
.hero-logo {
  max-width: 120px;
  margin: 0 auto 24px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: #ddd;
  max-width: 600px;
  margin: 0 auto 32px;
}
.hero-cta {
  display: inline-block;
  background-color: var(--secondary-color);
  color: #fff;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-md);
}
.hero-cta:hover {
  background-color: var(--secondary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

/* ---------- Sections ---------- */
.section {
  padding: 72px 0;
  background-color: var(--surface-color);
}
.section-alt {
  background-color: var(--surface-alt);
}
.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
  position: relative;
  padding-bottom: 16px;
}
.section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 2px;
}
.section p {
  margin-bottom: 1rem;
  color: var(--text-color);
}
.section-intro {
  text-align: center;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 40px !important;
  font-size: 1.05rem;
}

/* ---------- Remote support ---------- */
#remote-support ol {
  list-style: decimal;
  list-style-position: outside;
  padding-left: 24px;
  margin: 16px 0 24px;
}
#remote-support ol li { margin-bottom: 8px; }

#remoteSupportIframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin: 24px 0;
  background-color: #fff;
}

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 16px;
}
.service-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-align: left;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-color);
}
.service-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--primary-color);
}
.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---------- About ---------- */
#about p {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ---------- Contact ---------- */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  font-size: 1.05rem;
}
.contact-info p { margin-bottom: 4px; }

/* ---------- Footer ---------- */
footer {
  background-color: var(--primary-dark);
  color: #bbb;
  padding: 48px 0 32px;
  font-size: 0.9rem;
}
footer p { margin-bottom: 8px; }
footer a { color: #ddd; text-decoration: none; }
footer a:hover { color: var(--secondary-color); text-decoration: underline; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  text-align: left;
}
.footer-col p { margin-bottom: 4px; line-height: 1.5; }
.footer-brand {
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px !important;
}
.footer-muted { color: #888; font-size: 0.85rem; }
.footer-label {
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px !important;
}

/* ---------- 404 page ---------- */
.not-found {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.not-found-code {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 800;
  color: var(--secondary-color);
  line-height: 1;
  margin-bottom: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero { padding: 56px 20px 72px; }
  .section { padding: 48px 0; }
  .page-nav ul { gap: 0; justify-content: space-around; padding: 0 4px; }
  .page-nav a { padding: 6px 8px; font-size: 13px; }
  .language-nav a { font-size: 12px; padding: 4px 8px; }
  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .container, .container-narrow { padding: 0 16px; }
}
