/* =========================
   Nusenics Shared Stylesheet
   Reusable across:
   - index.html
   - products.html
   - applications.html
   - news.html
   - about.html
   ========================= */

:root {
  --bg: #07111f;
  --bg-elevated: #0d1728;
  --bg-soft: #101d31;
  --bg-soft-2: #13233a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text: #edf4ff;
  --text-soft: #b8c5d8;
  --text-muted: #8ea0b8;

  --accent: #8fd3ff;
  --accent-strong: #d8f2ff;

  --shadow: 0 16px 44px rgba(0, 0, 0, 0.28);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;

  --container: 1180px;
  --transition: 180ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(96, 153, 255, 0.09), transparent 28%),
    radial-gradient(circle at top left, rgba(90, 195, 255, 0.05), transparent 20%),
    linear-gradient(180deg, #07111f 0%, #091321 100%);
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.narrow {
  width: min(100%, 820px);
}

.section {
  padding: 5.5rem 0;
}

.section-alt {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.015) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
}

.eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin-top: 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  margin-bottom: 1.1rem;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  max-width: 12ch;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
}

h3 {
  margin-bottom: 0.7rem;
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
  color: var(--text-soft);
}

.lead,
.hero-text,
.section-intro-text {
  font-size: 1.08rem;
  max-width: 70ch;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.button-link:hover,
.button-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(143, 211, 255, 0.5);
  background: rgba(143, 211, 255, 0.08);
}

.button-link-solid {
  background: linear-gradient(180deg, rgba(143, 211, 255, 0.2), rgba(143, 211, 255, 0.12));
  border-color: rgba(143, 211, 255, 0.4);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-strong);
  font-weight: 600;
  transition: color var(--transition), transform var(--transition);
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--accent);
  transform: translateX(1px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 17, 31, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 180px;
  height: 64px;
  padding: 0.35rem 0.6rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: transparent;
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-strong);
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-soft);
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
  color: var(--text);
}

/* =========================
   Homepage Hero Carousel
   ========================= */

.hero-carousel {
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: #06101d;
}

.hero-carousel-viewport {
  position: relative;
  min-height: clamp(520px, 72vh, 820px);
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-slide-media,
.hero-slide-media img {
  width: 100%;
  height: 100%;
}

.hero-slide-media img {
  object-fit: cover;
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(4, 10, 18, 0.88) 0%,
      rgba(4, 10, 18, 0.74) 28%,
      rgba(4, 10, 18, 0.42) 55%,
      rgba(4, 10, 18, 0.18) 100%
    ),
    linear-gradient(
      180deg,
      rgba(4, 10, 18, 0.18) 0%,
      rgba(4, 10, 18, 0.34) 100%
    );
  z-index: 1;
}

.hero-slide-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

.hero-slide-copy {
  width: min(100%, 760px);
  padding: 5rem 0 7rem;
}

.hero-slide-label {
  display: inline-flex;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(143, 211, 255, 0.18);
  border-radius: 999px;
  background: rgba(10, 22, 38, 0.34);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.hero-slide-copy h1 {
  max-width: 11ch;
  margin-bottom: 1rem;
}

.hero-slide-copy .hero-text {
  max-width: 62ch;
  margin-bottom: 0;
  color: #d2deee;
}

.hero-carousel-bar {
  position: absolute;
  inset-inline: 0;
  bottom: 1.4rem;
  z-index: 3;
}

.hero-carousel-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hero-carousel-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition:
    transform var(--transition),
    background var(--transition),
    border-color var(--transition);
}

.hero-dot:hover,
.hero-dot:focus-visible {
  transform: scale(1.08);
  border-color: rgba(143, 211, 255, 0.8);
  background: rgba(143, 211, 255, 0.45);
}

.hero-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
}

.hero-carousel-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.hero-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.5);
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.hero-control:hover,
.hero-control:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(143, 211, 255, 0.5);
  background: rgba(143, 211, 255, 0.1);
}

/* =========================
   Cards / Panels
   ========================= */

.card-grid {
  display: grid;
  gap: 1.2rem;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.info-panel,
.cta-panel,
.highlight-item,
.news-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025)),
    var(--surface);
  box-shadow: var(--shadow);
}

.info-card {
  padding: 1.6rem;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.info-card:hover,
.info-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(143, 211, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03)),
    var(--surface-strong);
}

.info-card p,
.info-panel p {
  margin-bottom: 0;
}

.info-panel {
  padding: 1.6rem;
}

/* =========================
   Highlights
   ========================= */

.highlight-list {
  display: grid;
  gap: 0.95rem;
}

.highlight-item {
  padding: 1rem 1.2rem;
}

.highlight-text {
  margin: 0;
  color: var(--text);
  font-weight: 500;
}

/* =========================
   News
   ========================= */

.page-hero {
  padding: 4.5rem 0 2.5rem;
}

.page-hero-copy {
  width: min(100%, 760px);
}

.section-news {
  padding-top: 1rem;
}

.news-list {
  display: grid;
  gap: 1rem;
}

.news-item {
  padding: 1.35rem 1.45rem;
}

.news-item h2 {
  margin-bottom: 0.65rem;
  font-size: 1.22rem;
}

.news-item p:last-child {
  margin-bottom: 0;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(143, 211, 255, 0.2);
  background: rgba(143, 211, 255, 0.08);
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* =========================
   CTA
   ========================= */

.cta-section {
  padding-top: 3rem;
  padding-bottom: 5.5rem;
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
}

.cta-copy p:last-child {
  margin-bottom: 0;
}

.cta-action {
  flex-shrink: 0;
}

/* =========================
   Footer
   ========================= */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.12);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem 0 2rem;
}

.footer-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-copy p + p {
  margin-top: 0.3rem;
}

.footer-links {
  min-height: 1rem;
}

/* =========================
   Reusable inner-page helpers
   ========================= */

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.stack {
  display: grid;
  gap: 1.2rem;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 1024px) {
  .three-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero-slide-copy {
    width: min(100%, 700px);
  }
}

@media (max-width: 720px) {
  .section {
    padding: 4.25rem 0;
  }

  .header-inner {
    min-height: 76px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 0.9rem 0;
  }

  .site-nav {
    width: 100%;
  }

  .nav-links {
    gap: 0.9rem 1rem;
    justify-content: flex-start;
  }

  .brand-name {
    font-size: 1rem;
  }

  .hero-carousel-viewport {
    min-height: clamp(440px, 66vh, 620px);
  }

  .hero-slide-overlay {
    background:
      linear-gradient(
        90deg,
        rgba(4, 10, 18, 0.9) 0%,
        rgba(4, 10, 18, 0.8) 42%,
        rgba(4, 10, 18, 0.48) 72%,
        rgba(4, 10, 18, 0.22) 100%
      ),
      linear-gradient(
        180deg,
        rgba(4, 10, 18, 0.22) 0%,
        rgba(4, 10, 18, 0.4) 100%
      );
  }

  .hero-slide-copy {
    width: min(100%, 100%);
    padding: 4.5rem 0 6.5rem;
  }

  .hero-slide-copy h1 {
    max-width: 12ch;
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-slide-copy .hero-text {
    font-size: 1rem;
    max-width: 36rem;
  }

  .hero-carousel-bar-inner {
    align-items: flex-end;
  }

  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  .cta-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .nav-links {
    font-size: 0.95rem;
    gap: 0.75rem 0.9rem;
  }

  .brand {
    gap: 0.7rem;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .hero-carousel-viewport {
    min-height: 420px;
  }

  .hero-slide-copy {
    padding: 4rem 0 6rem;
  }

  .hero-slide-label {
    margin-bottom: 0.9rem;
    font-size: 0.72rem;
  }

  .hero-carousel-bar {
    bottom: 1rem;
  }

  .hero-carousel-bar-inner {
    gap: 0.85rem;
  }

  .hero-control {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
  }

  .hero-dot {
    width: 10px;
    height: 10px;
  }

  .info-card,
  .info-panel,
  .cta-panel,
  .highlight-item,
  .news-item {
    padding: 1.2rem;
  }
}