/* =========================================
   KONDUITDATA COMPONENTS
   Reusable UI components for all pages
   ========================================= */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-primary);
  background: var(--color-background);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* === Typography === */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1.05rem;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.section-title {
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.section-subtitle {
  max-width: 640px;
  margin: 0 auto var(--space-3xl);
  text-align: center;
  font-size: 1.1rem;
}

/* === Container === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* === Section === */
.section {
  padding: var(--space-4xl) 0;
}

.section--gray {
  background: var(--gray-100);
}

.section--dark {
  background: var(--gradient-dark);
  color: var(--text-inverted);
}

.section--dark p,
.section--dark .section-subtitle {
  color: rgba(255, 255, 255, 0.7);
}

.section--dark .section-title {
  color: var(--text-inverted);
}

.section--teal {
  background: var(--gradient-primary);
  color: var(--text-inverted);
}

.section--teal p {
  color: rgba(255, 255, 255, 0.85);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

/* === Navigation === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  transition: var(--transition-base);
}

.nav--scrolled {
  box-shadow: var(--shadow-md);
}

.nav--hero {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav--hero.nav--scrolled {
  background: rgba(0, 40, 50, 0.95);
  backdrop-filter: blur(20px);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}

.nav__logo img {
  height: 28px;
  width: 28px;
}

.nav__logo span {
  font-weight: 400;
}

/* Show light (teal) icon by default on white bg */
.nav__logo .nav__logo-icon-white {
  display: none;
}
.nav__logo .nav__logo-icon-teal {
  display: block;
}

/* Hero pages: show white icon on teal bg, white text */
.nav--hero .nav__logo {
  color: var(--text-inverted);
}
.nav--hero .nav__logo .nav__logo-icon-teal {
  display: none;
}
.nav--hero .nav__logo .nav__logo-icon-white {
  display: block;
}

/* Hero scrolled: keep white icon since scrolled bg is dark teal */
.nav--hero.nav--scrolled .nav__logo .nav__logo-icon-teal {
  display: none;
}
.nav--hero.nav--scrolled .nav__logo .nav__logo-icon-white {
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav__links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  position: relative;
}

.nav--hero .nav__links a {
  color: rgba(255, 255, 255, 0.8);
}

.nav__links a:hover {
  color: var(--color-primary);
}

.nav--hero .nav__links a:hover {
  color: var(--text-inverted);
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: var(--transition-fast);
}

.nav__links a:hover::after {
  width: 100%;
}

.nav__lang {
  display: flex;
  gap: 2px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  padding: 2px;
  font-size: 0.8rem;
  font-weight: 600;
}

.nav--hero .nav__lang {
  background: rgba(255, 255, 255, 0.15);
}

.nav__lang button {
  padding: 4px 10px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: inherit;
  transition: var(--transition-fast);
}

.nav--hero .nav__lang button {
  color: rgba(255, 255, 255, 0.7);
}

.nav__lang button.active {
  background: var(--color-accent);
  color: white;
}

/* Mobile hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-fast);
}

.nav--hero .nav__hamburger span {
  background: var(--text-inverted);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition-base);
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--gradient-primary);
  color: var(--text-on-primary);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--gradient-accent);
}

.btn--accent {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 4px 16px rgba(0, 183, 181, 0.3);
}

.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 183, 181, 0.4);
  background: #00cbc9;
}

.btn--outline {
  background: transparent;
  color: var(--text-inverted);
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-primary);
  border: 2px solid var(--gray-200);
}

.btn--secondary:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

/* === Cards === */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--gray-300);
}

.card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
  color: white;
}

.card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.card__text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

/* === Feature Row (icon + text side by side) === */
.feature-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.feature-item {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

.feature-item:hover {
  background: var(--gray-50);
}

.feature-item__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(0, 183, 181, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--color-accent);
}

.feature-item__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.feature-item__text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === CTA Banner === */
.cta-banner {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
}

.cta-banner h2 {
  color: var(--text-inverted);
  margin-bottom: var(--space-md);
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-2xl);
  font-size: 1.1rem;
}

/* === Steps === */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  counter-reset: step;
}

.step {
  position: relative;
  padding: var(--space-xl);
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
}

.step__title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.step__text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === Dashboard Preview === */
.dashboard-preview {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.dashboard-preview img {
  width: 100%;
  display: block;
}

/* === Forms === */
.form-container {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--color-surface);
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 183, 181, 0.15);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.form-checkboxes {
  display: flex;
  gap: var(--space-lg);
}

.form-checkboxes label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  text-transform: none;
  font-weight: 500;
  cursor: pointer;
}

.form-checkboxes input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
}

.form-success {
  display: none;
  text-align: center;
  padding: var(--space-3xl);
}

.form-success.visible {
  display: block;
}

.form-success__icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
}

/* === Footer === */
.footer {
  background: var(--gray-900);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  margin-bottom: var(--space-md);
}

.footer__brand img {
  height: 24px;
  width: 24px;
}

.footer__brand span {
  font-weight: 400;
}

.footer__desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
}

.footer__heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
  margin-bottom: var(--space-lg);
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__links a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  transition: var(--transition-fast);
}

.footer__links a:hover {
  color: var(--color-accent);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-xl);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Animation delays for staggered reveals */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* === Responsive === */
@media (max-width: 968px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
}

@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__lang { display: none; }
  .nav__hamburger { display: flex; }

  /* Mobile menu */
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: white;
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    gap: var(--space-md);
  }

  .nav--hero .nav__links.open {
    background: rgba(0, 40, 50, 0.98);
  }

  .nav__links.open .nav__lang {
    display: flex;
    margin-top: var(--space-md);
  }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .form-checkboxes { flex-direction: column; }
}
