/* ============================================================
   COMPONENTS — Navbar, buttons, cards, forms, footer
   ============================================================ */

:root {
  --navbar-scrolled-bg: rgba(10, 10, 15, 0.85);
}

[data-theme="light"] {
  --navbar-scrolled-bg: rgba(245, 245, 250, 0.92);
}

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  transition: background var(--transition-base), border-color var(--transition-base),
              backdrop-filter var(--transition-base);
  border-bottom: 1px solid transparent;
}

.navbar--scrolled {
  background: var(--navbar-scrolled-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-subtle);
}

[data-theme="light"] .navbar--scrolled {
  background: rgba(245, 245, 250, 0.92);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 101;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

@media (min-width: 768px) {
  .navbar__links {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.4rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  [data-theme="light"] .navbar__links {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(57, 155, 225, 0.15);
    box-shadow: 0 2px 20px rgba(57, 155, 225, 0.08), 0 1px 4px rgba(0, 0, 0, 0.06);
  }
}

.navbar__link {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast), background var(--transition-fast),
              border-color var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.navbar__link:hover {
  color: var(--text-primary);
  background: rgba(57, 155, 225, 0.09);
}

.navbar__link--active {
  color: var(--color-primary) !important;
  background: rgba(57, 155, 225, 0.08);
  font-weight: 600;
}

.navbar__link--active::after { display: none; }

/* Contact link — subtle border button */
.navbar__link--cta {
  border: 1px solid rgba(57, 155, 225, 0.30);
  color: var(--color-primary) !important;
  font-weight: 600;
}

.navbar__link--cta:hover {
  background: var(--color-primary);
  color: #fff !important;
  border-color: transparent;
}

.navbar__link--active.navbar__link--cta {
  background: rgba(57, 155, 225, 0.08);
  border-color: rgba(57, 155, 225, 0.30);
  color: var(--color-primary) !important;
}

/* Language switcher */
.navbar__lang {
  margin-left: 0.25rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border-subtle);
}

.navbar__link--lang {
  font-size: var(--text-xs) !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  color: var(--text-muted) !important;
  padding: 0.4rem 0.75rem !important;
}

.navbar__link--lang:hover {
  color: var(--color-primary) !important;
  background: transparent !important;
}

@media (max-width: 767px) {
  .navbar__lang {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }
}

/* Hamburger toggle */
.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  cursor: pointer;
  z-index: 101;
  transition: border-color var(--transition-fast);
}

.navbar__toggle:hover { border-color: var(--color-primary); }

.navbar__toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

.navbar__toggle--active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__toggle--active span:nth-child(2) { opacity: 0; }
.navbar__toggle--active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

  /* On mobile: logo left, hamburger + theme toggle grouped on the right */
  .navbar__inner {
    justify-content: flex-start;
  }

  .navbar__toggle {
    margin-left: auto;  /* absorbs all space → pushes itself + theme toggle to the right */
    margin-right: 0.25rem;
  }

  .navbar__theme {
    margin-left: 0;
  }

  .navbar__links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-surface);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
  }

  .navbar__links--open {
    transform: translateX(0);
  }

  .navbar__link {
    font-size: var(--text-2xl);
    font-family: var(--font-display);
    font-weight: 600;
  }

  .navbar__link--active::after { display: none; }
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform var(--transition-base), box-shadow var(--transition-base),
              background var(--transition-base), border-color var(--transition-base);
  white-space: nowrap;
  line-height: 1.4;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #2b7ab8);
  color: #fff;
  box-shadow: 0 4px 24px rgba(57, 155, 225, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 8px 32px rgba(57, 155, 225, 0.55);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-ghost:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 16px rgba(57, 155, 225, 0.15);
}

.btn-accent {
  background: linear-gradient(135deg, var(--color-accent), #00a8cc);
  color: #0a0a0f;
  font-weight: 700;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: var(--text-base);
  font-weight: 600;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: border-color var(--transition-base), box-shadow var(--transition-base),
              transform var(--transition-base);
}

.card:hover {
  border-color: var(--border-glass);
  transform: translateY(-2px);
}

.card-glass {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: border-color var(--transition-base), box-shadow var(--transition-base),
              transform var(--transition-base);
}

@supports not (backdrop-filter: blur(12px)) {
  .card-glass {
    background: var(--bg-raised);
  }
}

.card-glass:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow), var(--shadow-card);
  transform: translateY(-4px);
}

/* Service card */
.card-service {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card-service__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(57, 155, 225, 0.15), rgba(0, 212, 255, 0.1));
  border: 1px solid rgba(57, 155, 225, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-primary);
  flex-shrink: 0;
}

.card-service__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.card-service__desc {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: var(--text-sm);
  flex: 1;
}

.card-service__list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-service__list li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding-left: 1.2rem;
  position: relative;
}

.card-service__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-size: 0.7rem;
  top: 0.15rem;
}

/* Portfolio card */
.card-portfolio {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-portfolio__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--bg-raised), var(--bg-surface));
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  overflow: hidden;
  position: relative;
}

.card-portfolio__image-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(57, 155, 225, 0.1), rgba(0, 212, 255, 0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  letter-spacing: 0.05em;
}

.card-portfolio__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.card-portfolio__title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-portfolio__desc {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1rem;
}

.card-portfolio__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.card-portfolio__link:hover {
  gap: 0.6rem;
  color: var(--color-accent);
}

/* Tag / badge */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  white-space: nowrap;
}

.tag--primary {
  background: rgba(57, 155, 225, 0.12);
  border-color: rgba(57, 155, 225, 0.3);
  color: var(--color-primary);
}

/* Process step (timeline) */
.process {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  position: relative;
}

@media (min-width: 768px) {
  .process {
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
  }

  .process::before {
    content: '';
    position: absolute;
    top: 28px;
    left: calc(10% + 1rem);
    right: calc(10% + 1rem);
    height: 1px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    opacity: 0.3;
  }
}

.process__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  position: relative;
}

.process__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(57, 155, 225, 0.15), rgba(0, 212, 255, 0.1));
  border: 1px solid rgba(57, 155, 225, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-primary);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  background-color: var(--bg-base);
}

.process__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.process__desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* Tech stack logos */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-width: 80px;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.tech-item:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
}

.tech-item__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

[data-theme="dark"] .tech-item__logo {
  filter: brightness(0) invert(1);
}

.tech-item__name {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(57, 155, 225, 0.12);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

/* ── CTA Banner ──────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, rgba(57, 155, 225, 0.08), rgba(0, 212, 255, 0.05));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(57, 155, 225, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 4vw, 3rem);
}

.cta-banner p {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-md);
}

.cta-banner__btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Success Alert ───────────────────────────────────────── */
.alert-success {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(0, 212, 100, 0.1);
  border: 1px solid rgba(0, 212, 100, 0.3);
  border-radius: var(--radius-md);
  color: #00d464;
  font-weight: 500;
  margin-bottom: var(--space-md);
}

/* ── Testimonial ─────────────────────────────────────────── */
.testimonial {
  padding: var(--space-md);
  position: relative;
}

.testimonial__quote {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.testimonial__quote::before {
  content: '"';
  font-size: 4rem;
  font-family: var(--font-display);
  color: var(--color-primary);
  line-height: 0;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.testimonial__name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.testimonial__role {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── About page ─────────────────────────────────────────── */
.about-pillar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(57, 155, 225, 0.15), rgba(0, 212, 255, 0.1));
  color: var(--color-primary);
  margin-top: 0.1rem;
}

.about-culture-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(57, 155, 225, 0.15), rgba(0, 212, 255, 0.1));
  color: var(--color-primary);
}

.about-culture-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 3rem;
}

.about-culture-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(57, 155, 225, 0.12), rgba(0, 212, 255, 0.08));
  border: 1px solid rgba(57, 155, 225, 0.2);
  color: var(--color-primary);
}

.about-roots-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-glass);
  background: linear-gradient(135deg, rgba(57, 155, 225, 0.08), rgba(0, 212, 255, 0.05));
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding-block: var(--space-lg) var(--space-md);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

@media (min-width: 640px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer__brand .logo-text {
  font-size: 1.25rem;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer__tagline {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 280px;
}

.footer__col-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer__link:hover { color: var(--text-primary); }

.footer__bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer__copy {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer__made {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer__made span {
  color: var(--color-primary);
}

/* Contact info block */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-info__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(57, 155, 225, 0.1);
  border: 1px solid rgba(57, 155, 225, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--color-primary);
  flex-shrink: 0;
}

.contact-info__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.contact-info__value {
  font-size: var(--text-base);
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Theme toggle button ─────────────────────────────────── */
.navbar__theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: border-color var(--transition-fast), color var(--transition-fast),
              background var(--transition-fast);
}

.navbar__theme:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.theme-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Show sun in dark mode (to switch to light), moon in light mode */
[data-theme="dark"]  .theme-icon--sun  { display: block; }
[data-theme="dark"]  .theme-icon--moon { display: none;  }
[data-theme="light"] .theme-icon--sun  { display: none;  }
[data-theme="light"] .theme-icon--moon { display: block; }

/* ── Light mode component overrides ─────────────────────── */

/* Card glass on light background needs visible border + white bg */
[data-theme="light"] .card-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: rgba(0, 0, 0, 0.09);
}

@supports not (backdrop-filter: blur(12px)) {
  [data-theme="light"] .card-glass {
    background: #fff;
  }
}

[data-theme="light"] .card-glass:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

/* Plain card on light bg */
[data-theme="light"] .card {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
}

/* CTA banner */
[data-theme="light"] .cta-banner {
  background: linear-gradient(135deg, rgba(57, 155, 225, 0.06), rgba(0, 212, 255, 0.04));
  border-color: rgba(57, 155, 225, 0.15);
}

/* Mobile menu full-screen bg */
[data-theme="light"] .navbar__links {
  background: var(--bg-surface);
}

/* Form inputs */
[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea {
  background: var(--bg-base);
  border-color: var(--border-glass);
  color: var(--text-primary);
}

/* Tech item */
[data-theme="light"] .tech-item {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
}

/* Process step number circle */
[data-theme="light"] .process__number {
  background-color: var(--bg-surface);
}

/* Footer */
[data-theme="light"] .footer {
  border-top-color: var(--border-subtle);
}

/* Alert success */
[data-theme="light"] .alert-success {
  background: rgba(0, 180, 100, 0.08);
  border-color: rgba(0, 180, 100, 0.25);
}

/* ── Scroll progress bar ─────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  z-index: 200;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  pointer-events: none;
  transition: width 0.08s linear;
  will-change: width;
}

/* ── 3D card tilt — disable CSS hover lift (JS takes over) ── */
.card-glass:hover,
.card-service:hover,
.card-portfolio:hover {
  transform: none;
}

/* Positioning context for sheen child */
.card-glass,
.card-service,
.card-portfolio {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Sheen highlight overlay */
.card-sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--sheen-x, 50%) var(--sheen-y, 50%),
    rgba(255, 255, 255, 0.06) 0%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 2;
}

/* ── AI availability badge ───────────────────────────────── */
.ai-badge {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 212, 100, 0.1);
  border: 1px solid rgba(0, 212, 100, 0.25);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  color: #00d464;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: badgeEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 1.2s;
  cursor: default;
  user-select: none;
}

@keyframes badgeEntrance {
  from { opacity: 0; transform: translateY(12px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00d464;
  flex-shrink: 0;
  animation: badgePulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(0, 212, 100, 0.5);
}

@keyframes badgePulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 212, 100, 0.5); }
  50%  { box-shadow: 0 0 0 5px rgba(0, 212, 100, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 212, 100, 0); }
}

[data-theme="light"] .ai-badge {
  background: rgba(0, 180, 80, 0.08);
  border-color: rgba(0, 180, 80, 0.2);
}

@media (max-width: 640px) {
  .ai-badge { bottom: 1rem; right: 1rem; }
}

/* ── Custom cursor glow (desktop only) ──────────────────── */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 155, 225, 0.5) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9000;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease, opacity 0.3s ease;
  opacity: 0;
  will-change: transform, opacity;
}

#cursor-glow.is-active { opacity: 1; }

#cursor-glow.is-hovering {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.4) 0%, transparent 70%);
}

@media (hover: none) {
  #cursor-glow { display: none; }
}

/* ── Hero activity feed ─────────────────────────────────── */
.activity-feed {
  width: 100%;
  max-width: 380px;
  margin-inline: auto;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(57, 155, 225, 0.12),
    0 30px 80px rgba(0, 0, 0, 0.5);
  animation: afFloat 5s ease-in-out infinite;
  transform: rotate(-1deg);
}

@keyframes afFloat {
  0%, 100% { transform: rotate(-1deg) translateY(0px); }
  50%       { transform: rotate(-1deg) translateY(-14px); }
}

.activity-feed__bar {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 0.5rem;
}

.af-bar-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.af-bar-dot--red    { background: #ff5f57; }
.af-bar-dot--yellow { background: #febc2e; }
.af-bar-dot--green  { background: #28c840; }

.af-bar-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.3);
  margin: 0 auto;
  letter-spacing: 0.04em;
}

.af-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #28c840;
  letter-spacing: 0.05em;
}

.af-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #28c840;
  animation: badgePulse 2s ease-in-out infinite;
}

.activity-feed__viewport {
  height: 272px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
}

.activity-feed__track {
  animation: afScroll 14s linear infinite;
}

@keyframes afScroll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

.af-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition-fast);
}

.af-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.af-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.af-item__body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.af-item__type {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.af-item__text {
  font-size: 0.78rem;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.af-item__time {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="light"] .activity-feed {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(57, 155, 225, 0.12);
  box-shadow: 0 30px 80px rgba(57, 155, 225, 0.1), 0 4px 16px rgba(0,0,0,0.06);
}

@media (max-width: 640px) {
  .activity-feed { display: none; }
}

/* ── Hero project card stack ────────────────────────────── */
.proj-stack {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 420px;
  margin-inline: auto;
}

.proj-card {
  position: absolute;
  width: 300px;
  background: var(--bg-raised);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  display: flex;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(20px)) {
  .proj-card {
    background: var(--bg-surface);
    border-color: var(--border-subtle);
  }
}

.proj-card--1 {
  top: 0;
  left: 0;
  transform: rotate(-3deg);
  z-index: 3;
  animation: pcFloat1 4.5s ease-in-out infinite;
}
.proj-card--2 {
  top: 80px;
  left: 40px;
  transform: rotate(2deg);
  z-index: 2;
  animation: pcFloat2 5.2s ease-in-out infinite 0.8s;
}
.proj-card--3 {
  top: 160px;
  left: 20px;
  transform: rotate(-1deg);
  z-index: 1;
  animation: pcFloat3 4.8s ease-in-out infinite 1.4s;
}

@keyframes pcFloat1 {
  0%, 100% { transform: rotate(-2deg)  translateY(0px); }
  50%       { transform: rotate(-2deg)  translateY(-14px); }
}
@keyframes pcFloat2 {
  0%, 100% { transform: rotate(3.5deg) translateY(0px); }
  50%       { transform: rotate(3.5deg) translateY(-10px); }
}
@keyframes pcFloat3 {
  0%, 100% { transform: rotate(8deg)   translateY(0px); }
  50%       { transform: rotate(8deg)   translateY(-7px); }
}

.proj-card__accent {
  width: 4px;
  flex-shrink: 0;
}

.proj-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  flex: 1;
  min-width: 0;
}

.proj-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.proj-card__name {
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-card__client {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.proj-card__tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.1rem;
}

.proj-card__tags span {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  white-space: nowrap;
}

.proj-card__badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.proj-card__badge--live {
  background: rgba(40, 200, 64, 0.15);
  color: #28c840;
  border: 1px solid rgba(40, 200, 64, 0.3);
}

.proj-card__badge--wip {
  background: rgba(254, 188, 46, 0.12);
  color: #febc2e;
  border: 1px solid rgba(254, 188, 46, 0.25);
}

.proj-card__badge--done {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.proj-card__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #28c840;
  animation: badgePulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

[data-theme="light"] .proj-card {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  box-shadow: 0 16px 48px rgba(57, 155, 225, 0.1), 0 2px 8px rgba(0,0,0,0.08);
}

@supports not (backdrop-filter: blur(20px)) {
  [data-theme="light"] .proj-card {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
  }
}

[data-theme="light"] .proj-card__tags span {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .proj-stack { height: 300px; }
  .proj-card { width: 260px; }
}

@media (max-width: 640px) {
  .proj-stack { display: none; }
}

/* ── Hero floating proof cards ──────────────────────────── */
.hero-float-cards {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 400px;
  margin-inline: auto;
}

.hfc-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(57, 155, 225, 0.18) 0%, rgba(0, 212, 255, 0.08) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 1;   transform: translate(-50%, -50%) scale(1.12); }
}

.hfc {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.9rem 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.06);
  min-width: 190px;
}

.hfc--1 {
  top: 4%;
  left: 2%;
  transform: rotate(-3deg);
  animation: hfcFloat1 4.2s ease-in-out infinite;
}
.hfc--2 {
  top: 38%;
  right: 0%;
  transform: rotate(2.5deg);
  animation: hfcFloat2 5s ease-in-out infinite 0.7s;
}
.hfc--3 {
  bottom: 6%;
  left: 10%;
  transform: rotate(-1.5deg);
  animation: hfcFloat3 4.6s ease-in-out infinite 1.3s;
}

@keyframes hfcFloat1 {
  0%, 100% { transform: rotate(-3deg)   translateY(0px); }
  50%       { transform: rotate(-3deg)   translateY(-13px); }
}
@keyframes hfcFloat2 {
  0%, 100% { transform: rotate(2.5deg)  translateY(0px); }
  50%       { transform: rotate(2.5deg)  translateY(-17px); }
}
@keyframes hfcFloat3 {
  0%, 100% { transform: rotate(-1.5deg) translateY(0px); }
  50%       { transform: rotate(-1.5deg) translateY(-11px); }
}

.hfc__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hfc__icon--primary { background: rgba(57, 155, 225, 0.15); border: 1px solid rgba(57, 155, 225, 0.28); color: var(--color-primary); }
.hfc__icon--accent  { background: rgba(0, 212, 255, 0.12);  border: 1px solid rgba(0, 212, 255, 0.25);  color: var(--color-accent); }
.hfc__icon--green   { background: rgba(40, 200, 64, 0.12);  border: 1px solid rgba(40, 200, 64, 0.25);  color: #28c840; }

.hfc__text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hfc__num {
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hfc__sub {
  font-size: 0.75em;
  color: var(--text-muted);
  font-weight: 400;
}

.hfc__label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

[data-theme="light"] .hfc {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(57, 155, 225, 0.12);
  box-shadow: 0 8px 32px rgba(57, 155, 225, 0.1), 0 2px 8px rgba(0,0,0,0.06);
}

@media (max-width: 900px) {
  .hero-float-cards { height: 320px; max-width: 340px; }
  .hfc { min-width: 160px; padding: 0.75rem 0.9rem; }
  .hfc__num { font-size: 1.15rem; }
}

@media (max-width: 640px) {
  .hero-float-cards { display: none; }
}

/* ── Hero code editor ───────────────────────────────────── */
.code-editor {
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  background: #0d0d12;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(57, 155, 225, 0.15),
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(57, 155, 225, 0.08);
  animation: editorFloat 5s ease-in-out infinite;
  transform: rotate(-1.5deg);
}

@keyframes editorFloat {
  0%, 100% { transform: rotate(-1.5deg) translateY(0px); }
  50%       { transform: rotate(-1.5deg) translateY(-14px); }
}

.code-editor__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-editor__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.code-editor__dot--red    { background: #ff5f57; }
.code-editor__dot--yellow { background: #febc2e; }
.code-editor__dot--green  { background: #28c840; }

.code-editor__filename {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.3);
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.03em;
}

.code-editor__body {
  padding: 1.1rem 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.75;
}

.code-editor__line {
  display: flex;
  align-items: baseline;
  padding: 0 1.25rem;
  white-space: nowrap;
}

.code-editor__line:hover {
  background: rgba(255, 255, 255, 0.025);
}

.ce-blank { min-height: 1.4rem; }

.ce-ln {
  display: inline-block;
  min-width: 1.6rem;
  color: rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  text-align: right;
  margin-right: 1.25rem;
  user-select: none;
  flex-shrink: 0;
}

.ce-i {
  display: inline-block;
  width: 1.6rem;
  flex-shrink: 0;
}

/* Blinking cursor */
.ce-cursor {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  background: var(--color-primary);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: ceCursor 1s step-end infinite;
}
@keyframes ceCursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Syntax highlight */
.hl-comment { color: #546e7a; font-style: italic; }
.hl-dec     { color: #82aaff; }
.hl-kw      { color: #c792ea; }
.hl-fn      { color: #82aaff; }
.hl-tp      { color: #ffcb6b; }
.hl-str     { color: #c3e88d; }
.hl-pm      { color: #f78c6c; }
.hl-pt      { color: rgba(255, 255, 255, 0.55); }

/* Light mode */
[data-theme="light"] .code-editor {
  background: #1e1e2e;
  border-color: rgba(57, 155, 225, 0.2);
  box-shadow:
    0 0 0 1px rgba(57, 155, 225, 0.1),
    0 30px 80px rgba(57, 155, 225, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.15);
}

@media (max-width: 900px) {
  .code-editor {
    max-width: 380px;
    font-size: 0.72rem;
  }
}

@media (max-width: 640px) {
  .code-editor { display: none; }
}

/* ── Navbar NEW badge ───────────────────────────────────── */
.nav-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 3px 7px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1;
  animation: badgePulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1) inset;
  min-height: 18px;
}

/* ── Tool cards ─────────────────────────────────────────── */
.card-tool {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: 2px solid var(--color-primary);
  padding: var(--space-md);
}

.card-tool__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-tool__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(57, 155, 225, 0.12);
  border: 1px solid rgba(57, 155, 225, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  flex-shrink: 0;
}

.card-tool__icon--muted {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.card-tool__badge {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-primary);
  border: 1px solid rgba(57, 155, 225, 0.35);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  box-shadow: 0 2px 8px rgba(57, 155, 225, 0.25);
}

.card-tool__name {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0;
}

.card-tool__name--muted {
  color: var(--text-muted);
}

.card-tool__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0;
  flex-grow: 1;
}

.card-tool__desc--muted {
  color: var(--text-muted);
}

.card-tool__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card-tool__cta {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.card-tool--coming {
  border-top-color: var(--border-subtle);
  opacity: 0.6;
}

[data-theme="light"] .card-tool__icon {
  background: rgba(57, 155, 225, 0.08);
}

[data-theme="light"] .card-tool--coming {
  opacity: 0.5;
}

[data-theme="light"] .card-tool__badge {
  background: var(--color-primary);
  color: #fff;
  border-color: rgba(57, 155, 225, 0.3);
}

/* ── Tool featured card ─────────────────────────────────── */
.card-tool-featured {
  background: var(--bg-surface);
  border: 1px solid rgba(57, 155, 225, 0.3);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.card-tool-featured::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 50%, rgba(57, 155, 225, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.card-tool-featured:hover {
  border-color: rgba(57, 155, 225, 0.6);
  box-shadow: 0 0 60px rgba(57, 155, 225, 0.12), 0 20px 60px rgba(0, 0, 0, 0.3);
}

.card-tool-featured__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 3rem;
  align-items: center;
  position: relative;
}

.card-tool-featured__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.card-tool-featured__name {
  font-size: var(--text-4xl);
  font-weight: 800;
  font-family: var(--font-display);
  margin: 0 0 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-tool-featured__desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

.card-tool-featured__terminal {
  position: relative;
}

@media (max-width: 768px) {
  .card-tool-featured__inner {
    grid-template-columns: 1fr;
    padding: 2rem;
    gap: 2rem;
  }
  .card-tool-featured__name { font-size: var(--text-3xl); }
}

[data-theme="light"] .card-tool-featured {
  background: #fff;
  border-color: rgba(57, 155, 225, 0.2);
}

[data-theme="light"] .card-tool-featured::before {
  background: radial-gradient(ellipse at 60% 50%, rgba(57, 155, 225, 0.04) 0%, transparent 70%);
}

/* ── Terminal mock ───────────────────────────────────────── */
.terminal-mock {
  background: #0d0d12;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.04);
}

.terminal-mock--lg {
  font-size: var(--text-base);
}

.terminal-mock__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-mock__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.terminal-mock__dot--red    { background: #ff5f57; }
.terminal-mock__dot--yellow { background: #febc2e; }
.terminal-mock__dot--green  { background: #28c840; }

.terminal-mock__title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.3);
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.05em;
}

.terminal-mock__body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* Terminal lines — delay via CSS custom property --tl-delay */
.terminal-line {
  display: block;
  white-space: pre;
  color: rgba(255, 255, 255, 0.75);
  opacity: 0;
  transform: translateX(-6px);
  line-height: 1.7;
}

.reveal.is-visible .terminal-line {
  animation: termLine 0.4s ease forwards var(--tl-delay, 0s);
}

@keyframes termLine {
  to { opacity: 1; transform: translateX(0); }
}

/* Command line: visible immediately — typewriter handles the text */
.terminal-line--cmd {
  opacity: 1;
  transform: none;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
}
.reveal.is-visible .terminal-line--cmd {
  animation: none;
}

/* Typewriter on command text */
.terminal-typing {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  max-width: 0;
  vertical-align: bottom;
}
.reveal.is-visible .terminal-typing {
  animation: termTyping 1.3s steps(33, end) forwards 0.2s;
}
@keyframes termTyping {
  to { max-width: 33ch; }
}

/* Blinking cursor */
.terminal-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--color-primary);
  vertical-align: text-bottom;
  opacity: 0;
  margin-left: 1px;
}
.reveal.is-visible .terminal-cursor {
  animation: termCursor 0.5s step-end 6 forwards 0.2s;
}
@keyframes termCursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Package info line — flex for badges */
.terminal-line--pkg {
  white-space: normal;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-left: 1.25rem;
}

/* Section label */
.terminal-line--section {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: normal;
}

/* Analyzing line — appare, i dot pulsano, poi sparisce prima di SAFE */
.terminal-line--analyzing {
  color: rgba(255, 255, 255, 0.5);
  white-space: normal;
  padding-left: 1.25rem;
}
.reveal.is-visible .terminal-line--analyzing {
  animation: termAnalyzing 1.4s ease forwards var(--tl-delay, 0s);
}
@keyframes termAnalyzing {
  0%        { opacity: 0; transform: translateX(-6px); }
  15%       { opacity: 1; transform: translateX(0); }
  72%       { opacity: 1; }
  100%      { opacity: 0; }
}

/* Dots pulsanti durante Analyzing */
.t-dot { opacity: 0; }
.reveal.is-visible .t-dot:nth-child(1) { animation: dotBlink 0.55s step-end infinite calc(var(--tl-delay, 0s) + 0.2s); }
.reveal.is-visible .t-dot:nth-child(2) { animation: dotBlink 0.55s step-end infinite calc(var(--tl-delay, 0s) + 0.38s); }
.reveal.is-visible .t-dot:nth-child(3) { animation: dotBlink 0.55s step-end infinite calc(var(--tl-delay, 0s) + 0.56s); }
@keyframes dotBlink {
  0%, 100% { opacity: 0; }
  50%       { opacity: 1; }
}

/* Inline badges (PyPI, verified) */
.terminal-badge {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
  vertical-align: middle;
  font-family: var(--font-mono);
}
.terminal-badge--pypi     { background: rgba(0, 212, 255, 0.12); color: var(--color-accent); border: 1px solid rgba(0, 212, 255, 0.25); }
.terminal-badge--verified { background: rgba(40, 200, 64, 0.12);  color: #28c840;             border: 1px solid rgba(40, 200, 64, 0.25); }

/* Result lines */
.terminal-line--safe {
  color: #28c840;
  font-weight: 700;
  font-size: 1.05em;
  letter-spacing: 0.02em;
  padding-left: 1.25rem;
  white-space: normal;
}
.terminal-score { color: rgba(40, 200, 64, 0.65); font-weight: 400; }

.terminal-line--ok { color: rgba(255, 255, 255, 0.75); white-space: normal; padding-left: 1.25rem; }

.terminal-line--blank { height: 0.5rem; opacity: 1; transform: none; }
.reveal.is-visible .terminal-line--blank { animation: none; }

.terminal-prompt { color: var(--color-primary); margin-right: 0.5rem; font-weight: 700; }
.terminal-check  { color: #28c840; font-weight: 700; margin-right: 0.3rem; }

.terminal-pkg-name { color: #fff; font-weight: 600; }
.terminal-pkg-ver  { color: rgba(255, 255, 255, 0.45); }

@media (max-width: 640px) {
  .terminal-mock__body { padding: 1rem; font-size: var(--text-xs); }
  .terminal-mock--lg { font-size: var(--text-sm); }
}

/* ── News cards ─────────────────────────────────────────── */
.card-news {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  cursor: pointer;
}

.card-news:hover {
  border-color: rgba(57, 155, 225, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  color: inherit;
  text-decoration: none;
}

.card-news__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.card-news__date {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.card-news__title {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

.card-news__excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 1rem;
}

.card-news__cta {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap var(--transition-fast);
}

.card-news:hover .card-news__cta {
  gap: 0.5rem;
}

.card-news--full .card-news__title {
  font-size: var(--text-2xl);
}

.news-teaser-list,
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

[data-theme="light"] .card-news {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .card-news:hover {
  box-shadow: 0 8px 32px rgba(57, 155, 225, 0.12);
}

/* ── Article body ───────────────────────────────────────── */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color var(--transition-fast);
}

.article-back:hover {
  color: var(--color-primary);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.article-date {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--text-secondary);
}

.article-body p { margin: 0 0 1.25rem; }

.article-body h2,
.article-body h3 {
  color: var(--text-primary);
  font-family: var(--font-display);
  margin: 2rem 0 0.75rem;
}

.article-body h2 { font-size: var(--text-2xl); }
.article-body h3 { font-size: var(--text-xl); }

.article-body ul {
  padding-left: 1.5rem;
  margin: 0 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.article-body li { line-height: 1.7; }

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.15em 0.4em;
  color: var(--color-accent);
}

.article-body pre {
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 0 0 1.25rem;
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.article-body a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.article-body strong { color: var(--text-primary); font-weight: 600; }

.article-footer {
  max-width: 720px;
  margin: 2.5rem auto 0;
}

[data-theme="light"] .article-body code {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #0070c0;
}

[data-theme="light"] .article-body pre {
  background: #f5f5f8;
  border-color: rgba(0, 0, 0, 0.08);
}

/* Legal pages */
.legal-section {
  margin-bottom: 3rem;
}

.legal-section:last-child {
  margin-bottom: 0;
}

/* Product cards */
.card-product {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: var(--space-md);
}

.card-product__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-product__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--product-color, var(--color-primary));
  color: #fff;
  flex-shrink: 0;
}

.card-product__logo {
  display: flex;
  align-items: center;
  height: 56px;
  flex-shrink: 0;
}

.product-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
}

/* Default (no theme attr): show dark logo */
.product-logo--light { display: none; }
.product-logo--dark { display: block; }

[data-theme="dark"] .product-logo--dark { display: block; }
[data-theme="dark"] .product-logo--light { display: none; }
[data-theme="light"] .product-logo--dark { display: none; }
[data-theme="light"] .product-logo--light { display: block; }

.card-product__title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0;
}

.card-product__desc {
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.card-product__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.card-product__cta {
  margin-top: auto;
  padding-top: 0.5rem;
}

.tag--warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

[data-theme="light"] .tag--warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
  color: #d97706;
}
