/* Fiber Optic Group — site styles */

:root {
  --bg: #070b1c;
  --bg-2: #0d1430;
  --surface: #121a3a;
  --surface-2: #18224a;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8ecf8;
  --muted: #a3acc9;
  --brand: #3c61ad;
  --brand-bright: #6f93e0;
  --accent: #faa41a;
  --radius: 14px;
  --max: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Outfit", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand-bright); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 28, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand img { width: 48px; height: 48px; }
.brand span { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.brand:hover { color: var(--text); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav .btn { margin-left: 8px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary, .nav a.btn-primary { background: var(--accent); color: #1a1205; }
.btn-primary:hover, .nav a.btn-primary:hover { background: #ffb740; color: #1a1205; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.25); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
  background: var(--bg) url("../img/parallax.jpg") center / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 40%, rgba(60, 97, 173, 0.15), transparent 60%),
    linear-gradient(90deg, rgba(7, 11, 28, 0.94) 0%, rgba(7, 11, 28, 0.7) 55%, rgba(7, 11, 28, 0.35) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 30%);
}
.hero .container { position: relative; z-index: 2; padding-top: 60px; padding-bottom: 80px; }
.hero h1 { max-width: 15ch; }
.hero .lead { color: #c8cfe6; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.stars { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.stars i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.7);
  animation: twinkle var(--d, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0;
}
@keyframes twinkle {
  0%, 100% { opacity: 0; }
  50% { opacity: var(--o, 0.9); }
}
@media (prefers-reduced-motion: reduce) {
  .stars i { animation: none; opacity: 0.6; }
  html { scroll-behavior: auto; }
}

.page-hero {
  position: relative;
  padding: 90px 0 60px;
  background:
    linear-gradient(0deg, var(--bg), rgba(7, 11, 28, 0.6)),
    url("../img/hero.jpg") center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.page-hero .lead { margin: 0; }

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 48px; max-width: 48rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

@media (max-width: 640px) {
  .section { padding: 64px 0; }
}

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.card h3 { margin-bottom: 0.4em; }
.card p { color: var(--muted); margin: 0; }
.icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(250, 164, 26, 0.12);
  color: var(--accent);
  margin-bottom: 18px;
}
.icon svg { width: 24px; height: 24px; }

/* Split layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split img { border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
}

.tags { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 1.5rem 0 0; list-style: none; }
.tags li {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--text);
}

/* ---------- Product cards ---------- */

.product {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: transform 0.2s, border-color 0.2s;
}
.product:hover { transform: translateY(-4px); border-color: rgba(250, 164, 26, 0.5); color: var(--text); }
.product .thumb {
  aspect-ratio: 4 / 3;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.product .thumb img { width: 100%; height: 100%; object-fit: contain; }
.product .thumb.cover img { object-fit: cover; }
.product .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product h3 { font-size: 1.05rem; margin: 0; }
.product .meta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.gallery button {
  padding: 0;
  border: 0;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 16 / 10;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery button:hover img { transform: scale(1.04); }
.gallery button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 94vw;
  max-height: 92vh;
}
.lightbox::backdrop { background: rgba(3, 5, 14, 0.92); }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 10px; margin: 0 auto; }
.lightbox .lb-bar { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.lightbox .lb-bar button {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font: inherit;
  cursor: pointer;
}

/* ---------- Projects list ---------- */

.project-group h3 { color: var(--accent); font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; }
.project-list { list-style: none; padding: 0; margin: 0 0 2.5rem; display: grid; gap: 12px; }
.project-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
}
.project-list strong { display: block; color: var(--text); font-weight: 600; }
.project-list span { color: var(--muted); font-size: 0.95rem; }

/* ---------- CTA band ---------- */

.cta {
  background:
    linear-gradient(120deg, rgba(60, 97, 173, 0.9), rgba(13, 20, 48, 0.95)),
    url("../img/hero.jpg") center / cover;
  border-radius: 22px;
  padding: 56px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.cta h2 { margin: 0; }
.cta p { margin: 6px 0 0; color: #d4dbf0; }
@media (max-width: 640px) { .cta { padding: 32px 24px; } }

/* ---------- App block ---------- */

.app-block { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: center; text-align: center; }
.app-block img { max-width: 420px; width: 100%; background: #fff; border-radius: 14px; padding: 12px; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item { display: flex; gap: 16px; margin-bottom: 22px; }
.contact-item .icon { flex: none; margin: 0; }
.contact-item h3 { font-size: 1rem; margin: 0 0 2px; }
.contact-item p, .contact-item a { margin: 0; color: var(--muted); }
.contact-item a:hover { color: var(--accent); }

.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 500; }
.form input, .form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--brand-bright); outline-offset: 1px; border-color: transparent; }
.form textarea { min-height: 150px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.form-note { font-size: 0.85rem; color: var(--muted); margin: 0; }

.map {
  width: 100%;
  height: 340px;
  border: 0;
  border-radius: var(--radius);
  margin-top: 8px;
  filter: invert(0.9) hue-rotate(180deg) saturate(0.6);
}

/* ---------- Prose (terms) ---------- */

.prose { max-width: 48rem; }
.prose h2 { font-size: 1.4rem; margin-top: 2.2rem; color: var(--text); }
.prose p { color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  background: #050816;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--text); font-size: 0.95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 0.85rem;
}
