/* =========================================================
   MGNS — Embedded Solutions
   One-page, 6 full-screen sections (1:1 with MGNS.svg)
   ========================================================= */

:root {
  --bg:        #000000;
  --navy:      #0f2440;
  --navy-soft: #14304f;
  --fg:        #ffffff;
  --fg-muted:  #cfcfcf;
  --fg-dim:    #8c8c8c;
  --accent:    #e8ff00;
  --line:      rgba(255, 255, 255, 0.16);

  --maxw: 1240px;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --radius: 20px;

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

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.05vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #000; padding: .75rem 1.25rem;
  font-weight: 700; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

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

/* ---------- full-screen section shell ---------- */
.section {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: clamp(4rem, 8vh, 6rem);
  position: relative;
}
.section > .container { width: 100%; }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 4.6vw, 4.5rem); }
h2 { font-size: clamp(2.4rem, 5.5vw, 5rem); }
h3 { font-size: clamp(1.35rem, 2.1vw, 2rem); line-height: 1.15; }
p  { color: var(--fg-muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--font-head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; font-size: clamp(.78rem, .9vw, .9rem);
  padding: .95rem 2.2rem;
  color: var(--accent); background: transparent;
  border: 2px solid var(--accent);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
  transition: background .2s ease, color .2s ease;
  cursor: pointer;
}
.btn:hover { background: var(--accent); color: #000; }

/* ---------- language switch (your bilingual request) ---------- */
.lang {
  position: fixed; top: 1.5rem; right: clamp(1.25rem, 5vw, 2.5rem); z-index: 40;
  display: flex; align-items: center; gap: .4rem;
  font-family: var(--font-head); font-weight: 600; font-size: .85rem;
  mix-blend-mode: difference;
}
.lang a { color: #fff; padding: .25rem .45rem; border-radius: 4px; }
.lang a[aria-current="true"] { color: #000; background: var(--accent); mix-blend-mode: normal; }
.lang span { opacity: .5; }

/* ========== SECTION 1 — HERO ========== */
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero__brand { display: flex; flex-direction: column; align-items: center; gap: clamp(1.5rem, 4vh, 3rem); }
.hero__brand img { width: min(420px, 80%); height: auto; opacity: .5; }
.hero__brand .btn { align-self: center; }

/* ========== SECTION 2 — SERVICES ========== */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 4rem); }
.service { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.2rem; }
.service__icon { width: clamp(52px, 5vw, 68px); height: clamp(52px, 5vw, 68px); color: #fff; }
.service__icon svg { width: 100%; height: 100%; }
.service h3 { font-size: clamp(1.7rem, 2.6vw, 2.5rem); }
.service p { flex: 1; max-width: 32ch; }
.service .btn { margin-top: .5rem; }

/* ========== SECTIONS 3–5 — DETAIL ========== */
.detail__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; width: 100%; }
.detail__left { display: flex; flex-direction: column; gap: clamp(1.5rem, 4vh, 2.5rem); }
.detail__title { font-size: clamp(2.6rem, 6vw, 5.5rem); }
.detail__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }

.feature { padding-block: clamp(1.1rem, 2.4vh, 1.8rem); border-top: 1px solid var(--line); }
.feature:first-of-type { border-top: none; padding-top: 0; }
.feature h3 { margin-bottom: .75rem; }
.feature p { max-width: 60ch; }
.feature strong { color: var(--fg); font-weight: 600; }

/* ========== SECTION 6 — CONTACT ========== */
.contact { overflow: hidden; }
.contact__bg {
  position: absolute; inset: 0; z-index: 0;
  background: center/contain no-repeat;
  opacity: .22;
}
.contact .container { position: relative; z-index: 1; }
.contact__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.contact h2 { margin-bottom: clamp(2rem, 6vh, 3.5rem); }
.contact__text p { font-size: clamp(1.15rem, 2.1vw, 1.6rem); color: var(--fg); line-height: 1.5; font-weight: 500; max-width: 26ch; }
.contact__actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.contact-card {
  background: linear-gradient(160deg, rgba(15,36,64,.92), rgba(20,48,79,.92));
  border: 1px solid rgba(255,255,255,.07);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(2rem, 4vw, 3rem);
  display: flex; flex-direction: column; gap: clamp(1.5rem, 4vh, 2.25rem);
  backdrop-filter: blur(2px);
}
.contact-row { display: flex; align-items: center; gap: 1.25rem; }
.contact-row__icon { flex: none; width: 46px; height: 46px; display: grid; place-items: center; color: var(--fg); }
.contact-row__icon svg { width: 26px; height: 26px; }
.contact-row__value { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--fg); }
.contact-row a.contact-row__value:hover { color: var(--accent); }

/* ---------- scroll snap (desktop, tall screens) ---------- */
@media (min-width: 920px) and (min-height: 680px) {
  html { scroll-snap-type: y proximity; scroll-behavior: smooth; }
  .section { scroll-snap-align: start; }
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .section { min-height: auto; padding-block: clamp(3.5rem, 10vh, 5.5rem); }
  .hero .container { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__brand { align-items: flex-start; gap: 1.75rem; }
  .hero__brand img { opacity: .5; width: min(240px, 55%); }
  .hero__brand .btn { align-self: flex-start; }
  .services { grid-template-columns: 1fr; gap: 3rem; }
  .detail__grid { grid-template-columns: 1fr; }
  .detail__media img { aspect-ratio: 16 / 9; }
  .contact__grid { grid-template-columns: 1fr; }
  .contact__bg { opacity: .14; }
}
