/* ── ContentaSoft Hub — Main Stylesheet ────────────────────────────
   Dark-themed company hub for contenta-software.com
   ------------------------------------------------------------------ */

/* ── CSS Variables ───────────────────────────────────────────────── */

:root {
  --bg-root: #0A0E14;
  --bg-panel: #111827;
  --bg-card: #0D1321;
  --border-subtle: #1E2D40;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --text-main: #E2E8F0;
  --text-dim: #94A3B8;
  --text-muted: #64748B;
  --green: #10B981;
  --red: #EF4444;
  --amber: #F59E0B;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, .4);
  --shadow-elevated: 0 4px 16px rgba(0, 0, 0, .5);
  --transition: 200ms ease;
  --nav-height: 48px;
}

/* ── Reset & Base ────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  background: var(--bg-root);
  color: var(--text-main);
  font-family: var(--font-stack);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-top: 42px;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select, button {
  font: inherit;
}

::selection {
  background: var(--accent);
  color: var(--bg-root);
}

/* ── Typography ──────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 1em;
}

.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-green  { color: var(--green); }
.text-center { text-align: center; }

/* ── Layout ──────────────────────────────────────────────────────── */

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

/* ── Navigation Bar ──────────────────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
}

.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--nav-height);
}

.site-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
}

.site-nav-brand:hover { color: var(--text-main); text-decoration: none; }

.site-nav-brand svg {
  color: var(--accent);
  flex-shrink: 0;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav-links li a {
  display: block;
  padding: 6px 12px;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.site-nav-links li a:hover {
  color: var(--accent);
  background: rgba(37, 99, 235, .06);
  text-decoration: none;
}

.site-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.site-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dim);
  border-radius: 1px;
  transition: background var(--transition);
}

.site-nav-toggle:hover span { background: var(--accent); }

@media (max-width: 767px) {
  .site-nav-toggle { display: flex; }

  .site-nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-subtle);
    padding: 8px 0;
    gap: 0;
  }

  .site-nav-links.open { display: flex; }

  .site-nav-links li a {
    padding: 10px 24px;
    font-size: 1rem;
    border-radius: 0;
  }
}

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform 100ms ease,
    box-shadow var(--transition);
  user-select: none;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  box-shadow: 0 0 16px rgba(37, 99, 235, .3);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-ghost:hover {
  background: var(--accent);
  color: #fff;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* ── Hero Section ────────────────────────────────────────────────── */

.hero {
  padding: calc(var(--nav-height) + 60px) 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, rgba(37,99,235,0.03) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.6em;
}

.hero h1 .text-accent {
  color: var(--accent);
}

.hero .subtitle {
  color: var(--text-dim);
  font-size: 1.2rem;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 2em;
}

.hero .hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 767px) {
  .hero { padding: calc(var(--nav-height) + 32px) 0 40px; }
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
}

/* ── Section ─────────────────────────────────────────────────────── */

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  margin-bottom: 0.4em;
}

.section-title p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-dim);
}

.section-alt {
  background: var(--bg-panel);
}

@media (max-width: 767px) {
  .section { padding: 48px 0; }
  .section-title { margin-bottom: 32px; }
}

/* ── Product Cards Grid ──────────────────────────────────────────── */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--card-accent, var(--accent));
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
}

.product-card:hover {
  border-color: var(--card-accent, var(--accent));
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevated);
  text-decoration: none;
  color: inherit;
}

.product-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(37, 99, 235, .1);
}

.product-card-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--card-accent, var(--accent));
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-card-title {
  flex: 1;
}

.product-card-title h3 {
  font-size: 1.15rem;
  margin-bottom: 0;
  color: var(--text-main);
}

.product-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.6;
}

.product-card .badge {
  align-self: flex-start;
}

/* ── Badges ──────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-green {
  background: rgba(16, 185, 129, .15);
  color: var(--green);
}

.badge-accent {
  background: rgba(37, 99, 235, .15);
  color: var(--accent);
}

@media (max-width: 767px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ── Value Props (Why Section) ───────────────────────────────────── */

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.value-card {
  text-align: center;
  padding: 32px 20px;
}

.value-card .value-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-card .value-icon svg {
  width: 48px;
  height: 48px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.value-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5em;
}

.value-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin: 0;
}

@media (max-width: 767px) {
  .value-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ── About Section ───────────────────────────────────────────────── */

.about-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ── Footer ──────────────────────────────────────────────────────── */

.site-footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 0;
  margin-top: 40px;
}

.footer-columns {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  max-width: 800px;
  margin: 0 auto 32px;
  padding: 0 20px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--text-main);
  text-decoration: none;
}

.footer-promo-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 0;
}

.footer-langs {
  text-align: center;
  padding: 16px 0;
  border-top: 1px solid var(--border-subtle);
}

.langs-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.langs-icon {
  display: inline-block;
  width: 37.5px;
  height: 22.5px;
  background-image: url("../images/flagsnew_big.png");
  background-repeat: no-repeat;
  background-size: 84px 273px;
  opacity: 0.6;
  transition: opacity var(--transition);
  vertical-align: middle;
  margin-right: 5px;
  margin-bottom: 5px;
}

.langs-icon:hover { opacity: 1; }

/* Mobile-first flag positions (flagsnew_big.png 84x273) */
.langs-en { background-position: -3px -5px; }
.langs-de { background-position: -46px -35px; }
.langs-fr { background-position: -46px -5px; }
.langs-es { background-position: -3px -35px; }
.langs-it { background-position: -3px -65px; }
.langs-pt { background-position: -46px -65px; }
.langs-nl { background-position: -3px -95px; }
.langs-sv { background-position: -3px -125px; }
.langs-jp { background-position: -46px -125px; }
.langs-cn { background-position: -46px -155px; }
.langs-no { background-position: -3px -215px; }
.langs-da { background-position: -46px -215px; }

@media (min-width: 992px) {
  .langs-icon {
    width: 25px;
    height: 15px;
    background-image: url("../images/flagsnew.png");
    background-size: 56px 182px;
  }
  /* Desktop flag positions (flagsnew.png 56x182) */
  .langs-en { background-position: -2px -3px; }
  .langs-de { background-position: -29px -23px; }
  .langs-fr { background-position: -29px -3px; }
  .langs-es { background-position: -2px -23px; }
  .langs-it { background-position: -2px -43px; }
  .langs-pt { background-position: -29px -43px; }
  .langs-nl { background-position: -2px -63px; }
  .langs-sv { background-position: -2px -83px; }
  .langs-jp { background-position: -29px -83px; }
  .langs-cn { background-position: -29px -103px; }
  .langs-no { background-position: -2px -143px; }
  .langs-da { background-position: -29px -143px; }
}

.footer-social {
  text-align: center;
  padding: 12px 0;
}

.footer-social a {
  display: inline-block;
  margin: 0 8px;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.footer-social a:hover { opacity: 1; }

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 20px;
  text-align: center;
}

.footer-bottom p {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom .cookie-preferences {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 575px) {
  .footer-columns { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Animations ──────────────────────────────────────────────────── */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger > :nth-child(1) { transition-delay: 0ms; }
.stagger > :nth-child(2) { transition-delay: 80ms; }
.stagger > :nth-child(3) { transition-delay: 160ms; }
.stagger > :nth-child(4) { transition-delay: 240ms; }
.stagger > :nth-child(5) { transition-delay: 320ms; }
.stagger > :nth-child(6) { transition-delay: 400ms; }
.stagger > :nth-child(7) { transition-delay: 480ms; }
.stagger > :nth-child(8) { transition-delay: 560ms; }

/* ── Stats Bar ───────────────────────────────────────────────────── */

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 40px 20px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-panel);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

@media (max-width: 575px) {
  .stats-bar { gap: 24px; flex-wrap: wrap; }
  .stat-value { font-size: 1.5rem; }
}

/* ── Device Frame (laptop mockup) ─────────────────────────────────── */

.device-frame {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.device-topbar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border-subtle);
}

.device-topbar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-subtle);
}

.device-topbar span:first-child { background: #EF4444; }
.device-topbar span:nth-child(2) { background: #F59E0B; }
.device-topbar span:nth-child(3) { background: #10B981; }

.device-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Hero Screenshots Collage ────────────────────────────────────── */

.hero-screenshots {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1000px;
  margin: 48px auto 0;
  padding: 0 20px;
  height: 320px;
}

.hero-screenshots .device-frame {
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0s;
  cursor: default;
}

.hero-screenshots .device-center {
  width: 54%;
  z-index: 3;
  box-shadow: 0 16px 50px rgba(0,0,0,0.6), 0 0 30px rgba(37,99,235,0.08);
}

.hero-screenshots .device-left {
  width: 28%;
  z-index: 2;
  margin-right: -24px;
  transform: perspective(800px) rotateY(6deg) scale(0.92);
  opacity: 0.85;
}

.hero-screenshots .device-right {
  width: 28%;
  z-index: 2;
  margin-left: -24px;
  transform: perspective(800px) rotateY(-6deg) scale(0.92);
  opacity: 0.85;
}

.hero-screenshots .device-frame:hover {
  z-index: 10;
  transform: scale(1.03);
  opacity: 1;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(37,99,235,0.12);
}

.hero-screenshots .device-left:hover {
  transform: perspective(800px) rotateY(0deg) scale(1.03);
}

.hero-screenshots .device-right:hover {
  transform: perspective(800px) rotateY(0deg) scale(1.03);
}

@media (max-width: 767px) {
  .hero-screenshots {
    flex-direction: column;
    height: auto;
    gap: 12px;
    margin-top: 32px;
  }
  .hero-screenshots .device-frame {
    width: 90% !important;
    margin: 0 !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .hero-screenshots .device-left,
  .hero-screenshots .device-right {
    display: none;
  }
}

/* ── Featured Product Section ─────────────────────────────────────── */

.featured-product {
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.featured-product.featured-reverse {
  flex-direction: row-reverse;
}

.featured-text {
  flex: 1;
}

.featured-text h2 {
  font-size: 1.8rem;
  margin-bottom: 0.4em;
}

.featured-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 1.2em;
}

.featured-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.featured-highlights span {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
}

.featured-visual {
  flex: 0 0 48%;
}

.featured-visual .device-frame {
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(37,99,235,0.06);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.featured-visual .device-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 70px rgba(0,0,0,0.5), 0 0 60px rgba(37,99,235,0.1);
}

@media (max-width: 767px) {
  .featured-product,
  .featured-product.featured-reverse {
    flex-direction: column;
    gap: 32px;
  }
  .featured-visual {
    flex: none;
    width: 100%;
  }
  .featured-text h2 { font-size: 1.5rem; }
}

/* ── Catalog Grid (Coming Soon products) ──────────────────────────── */

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 767px) {
  .catalog-grid { grid-template-columns: 1fr; }
}

/* ── Format Categories ────────────────────────────────────────────── */

.format-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.format-cat {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.format-cat:hover {
  border-color: #2a3f5a;
  transform: translateY(-2px);
}

.format-cat-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
}

.format-cat-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.format-cat h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-main);
}

.format-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.format-tags span {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(37,99,235,0.1);
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
}

@media (max-width: 767px) {
  .format-categories { grid-template-columns: 1fr; }
}

/* ── Utility ─────────────────────────────────────────────────────── */

.mt-2 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
