/* ============================================================
   RAVENG Design System — "Dark Fortress"
   Version: 1.0.0 | 2026-03-25
   Brand: RAVENG by CE4U S.r.l.
   ============================================================ */

/* --- Design Tokens --- */
:root {
  /* Color Palette */
  --navy-deep:    #0a0a1a;
  --navy:         #1a1a2e;
  --charcoal:     #2d2d44;
  --slate:        #6c7a89;
  --ice:          #f0f2f5;
  --white:        #ffffff;
  --crimson:      #e63946;
  --crimson-dark: #c62d39;
  --crimson-glow: rgba(230, 57, 70, 0.25);
  --amber:        #f4a261;
  --amber-glow:   rgba(244, 162, 97, 0.2);

  /* Surfaces */
  --surface-0:    #070712;
  --surface-1:    #0a0a1a;
  --surface-2:    #12122a;
  --surface-3:    #1a1a2e;
  --surface-card: rgba(26, 26, 46, 0.6);
  --surface-glass: rgba(26, 26, 46, 0.4);

  /* Borders */
  --border-subtle:  rgba(108, 122, 137, 0.15);
  --border-medium:  rgba(108, 122, 137, 0.25);
  --border-crimson: rgba(230, 57, 70, 0.3);

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Font Sizes — Fluid */
  --text-xs:    clamp(0.694rem, 0.66rem + 0.17vw, 0.8rem);
  --text-sm:    clamp(0.833rem, 0.78rem + 0.27vw, 1rem);
  --text-base:  clamp(1rem, 0.93rem + 0.36vw, 1.2rem);
  --text-lg:    clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --text-xl:    clamp(1.44rem, 1.28rem + 0.8vw, 1.875rem);
  --text-2xl:   clamp(1.728rem, 1.47rem + 1.29vw, 2.5rem);
  --text-3xl:   clamp(2.074rem, 1.68rem + 1.97vw, 3.25rem);
  --text-4xl:   clamp(2.488rem, 1.89rem + 2.99vw, 4.5rem);
  --text-hero:  clamp(3rem, 2rem + 5vw, 7rem);

  /* Spacing */
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2rem;
  --space-2xl:  3rem;
  --space-3xl:  4rem;
  --space-4xl:  6rem;
  --space-5xl:  8rem;
  --space-section: clamp(5rem, 4rem + 5vw, 10rem);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 600ms;
  --duration-slower: 1000ms;

  /* Layout */
  --max-width:  1280px;
  --max-width-narrow: 900px;
  --gutter:     clamp(1.5rem, 1rem + 2vw, 3rem);
  --radius-sm:  0.375rem;
  --radius-md:  0.75rem;
  --radius-lg:  1rem;
  --radius-xl:  1.5rem;

  /* Z-index */
  --z-cursor:    99999;
  --z-loader:    9998;
  --z-nav:       1000;
  --z-modal:     900;
  --z-overlay:   800;
}


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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ice);
  background-color: var(--navy-deep);
  overflow-x: hidden;
}

body.is-loading {
  overflow: hidden;
}

::selection {
  background: var(--crimson);
  color: var(--white);
}

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

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

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

ul, ol { list-style: none; }

input, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}


/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

.text-gradient {
  background: linear-gradient(135deg, var(--white) 0%, var(--slate) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-crimson { color: var(--crimson); }
.text-amber { color: var(--amber); }
.text-slate { color: var(--slate); }
.text-ice { color: var(--ice); }

.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }

.label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--crimson);
}


/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding: var(--space-section) 0;
  position: relative;
}

.grid {
  display: grid;
  gap: var(--space-xl);
}

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

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

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


/* --- Loading Screen --- */
.loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  background: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Loader uses the icon logo with fade-in animation */


/* --- Custom Cursor --- */
.cursor {
  display: none;
}

@media (pointer: fine) {
  .cursor {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-cursor);
    pointer-events: none;
    mix-blend-mode: difference;
  }

  .cursor__crosshair {
    width: 24px;
    height: 24px;
    position: relative;
    transform: translate(-50%, -50%);
  }

  .cursor__crosshair::before,
  .cursor__crosshair::after {
    content: '';
    position: absolute;
    background: var(--white);
  }

  .cursor__crosshair::before {
    width: 1px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
  }

  .cursor__crosshair::after {
    width: 100%;
    height: 1px;
    top: 50%;
    transform: translateY(-50%);
  }

  .cursor__ring {
    width: 48px;
    height: 48px;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: absolute;
    top: -12px;
    left: -12px;
    transition: width 0.3s var(--ease-out-expo),
                height 0.3s var(--ease-out-expo),
                top 0.3s var(--ease-out-expo),
                left 0.3s var(--ease-out-expo),
                border-color 0.3s;
  }

  .cursor.is-hovering .cursor__ring {
    width: 64px;
    height: 64px;
    top: -20px;
    left: -20px;
    border-color: var(--crimson);
  }

  body { cursor: none !important; }
  a, button, input, textarea, select, [data-cursor] {
    cursor: none !important;
  }
}


/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: var(--space-lg) 0;
  transition: background 0.4s, padding 0.4s, backdrop-filter 0.4s;
}

.nav.is-scrolled {
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__brand img {
  height: 48px;
  width: auto;
  display: block;
  transition: height var(--duration-base), opacity var(--duration-base);
}

.nav.is-scrolled .nav__brand img {
  height: 38px;
}

.nav__brand:hover img {
  opacity: 0.85;
}

/* Footer uses square mark logo */
.footer__brand {
  display: inline-block;
}

.footer__brand img {
  height: 72px;
  width: auto;
  display: block;
}

@media (max-width: 1024px) {
  .nav__brand img {
    height: 40px;
  }
  .nav.is-scrolled .nav__brand img {
    height: 32px;
  }
  .footer__brand img {
    height: 56px;
  }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav__link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ice);
  opacity: 0.7;
  transition: opacity var(--duration-base), color var(--duration-base);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--crimson);
  transition: width var(--duration-base) var(--ease-out-expo);
}

.nav__link:hover {
  opacity: 1;
  color: var(--white);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.625rem 1.5rem;
  background: var(--crimson);
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: background var(--duration-base), transform var(--duration-base), box-shadow var(--duration-base);
}

.nav__cta:hover {
  background: var(--crimson-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--crimson-glow);
}

/* Mobile Nav */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}

.nav__toggle.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav__toggle.is-active span:nth-child(2) {
  opacity: 0;
}
.nav__toggle.is-active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) - 1);
  background: rgba(10, 10, 26, 0.97);
  backdrop-filter: blur(30px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
}

.nav__mobile.is-open {
  display: flex;
}

.nav__mobile a {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--white);
  opacity: 0.8;
  transition: opacity 0.3s, color 0.3s;
}

.nav__mobile a:hover {
  opacity: 1;
  color: var(--crimson);
}

@media (max-width: 1024px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
}


/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--duration-base) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--crimson);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--crimson-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--crimson-glow);
}

.btn--outline {
  border: 1.5px solid var(--border-medium);
  color: var(--ice);
}

.btn--outline:hover {
  border-color: var(--crimson);
  color: var(--white);
  background: rgba(230, 57, 70, 0.08);
}

.btn--ghost {
  color: var(--ice);
  padding: 0.5rem 0;
}

.btn--ghost:hover {
  color: var(--crimson);
}

.btn--ghost .btn__arrow {
  transition: transform var(--duration-base) var(--ease-out-expo);
}

.btn--ghost:hover .btn__arrow {
  transform: translateX(4px);
}

.btn--lg {
  padding: 1.125rem 2.5rem;
  font-size: var(--text-base);
}


/* --- Cards --- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  transition: all var(--duration-slow) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(230, 57, 70, 0.03) 100%);
  opacity: 0;
  transition: opacity var(--duration-slow);
}

.card:hover {
  border-color: var(--border-crimson);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.card:hover::before {
  opacity: 1;
}

.card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  background: rgba(230, 57, 70, 0.1);
  color: var(--crimson);
  font-size: 1.5rem;
  transition: background var(--duration-base), transform var(--duration-base);
}

.card:hover .card__icon {
  background: rgba(230, 57, 70, 0.15);
  transform: scale(1.05);
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.card__desc {
  color: var(--slate);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.card__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 9999px;
  background: rgba(230, 57, 70, 0.1);
  color: var(--crimson);
  border: 1px solid rgba(230, 57, 70, 0.2);
}


/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__canvas canvas {
  width: 100%;
  height: 100%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--navy-deep) 70%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 var(--gutter);
}

.hero__wordmark {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  line-height: 1;
}

.hero__wordmark .eng {
  color: var(--crimson);
}

.hero__claim {
  font-size: var(--text-xl);
  font-weight: 300;
  color: var(--ice);
  opacity: 0.85;
  margin-bottom: var(--space-2xl);
  font-style: italic;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--slate);
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: scrollBounce 2s infinite;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--crimson), transparent);
  animation: scrollLine 2s infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes scrollLine {
  0% { opacity: 1; height: 40px; }
  100% { opacity: 0; height: 0; }
}


/* --- Countdown Banner --- */
.countdown {
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--navy-deep) 100%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.countdown::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--crimson), transparent);
}

.countdown__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

.countdown__label {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  max-width: 500px;
}

.countdown__label .highlight {
  color: var(--crimson);
}

.countdown__timer {
  display: flex;
  gap: var(--space-md);
}

.countdown__unit {
  text-align: center;
  min-width: 72px;
}

.countdown__number {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--crimson);
  line-height: 1;
  display: block;
}

.countdown__text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-xs);
}

.countdown__cta {
  margin-left: var(--space-lg);
}

@media (max-width: 768px) {
  .countdown__inner {
    flex-direction: column;
    text-align: center;
  }
  .countdown__cta { margin-left: 0; }
}


/* --- Pillars Section --- */
.pillars__header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.pillars__header h2 {
  margin-bottom: var(--space-md);
}

.pillars__header p {
  color: var(--slate);
  max-width: 600px;
  margin: 0 auto;
}

.pillar-card {
  padding: var(--space-3xl) var(--space-2xl);
}

.pillar-card__number {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--crimson);
  letter-spacing: 0.2em;
  margin-bottom: var(--space-lg);
}

.pillar-card__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

.pillar-card__desc {
  color: var(--slate);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.pillar-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.pillar-card__tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(108, 122, 137, 0.1);
  color: var(--slate);
  border: 1px solid var(--border-subtle);
}


/* --- Stats Section --- */
.stats {
  background: var(--surface-2);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-subtle);
}

.stat {
  background: var(--surface-2);
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
}

.stat__number {
  font-family: var(--font-mono);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.stat__number .suffix {
  color: var(--crimson);
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--slate);
}

@media (max-width: 768px) {
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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


/* --- Cinematic Motto --- */
.motto {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.motto__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--surface-2) 50%, var(--navy-deep) 100%);
}

.motto__text {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
  padding: 0 var(--gutter);
}

.motto__text .word {
  display: inline-block;
}


/* --- Case Studies --- */
.cases__header {
  margin-bottom: var(--space-3xl);
}

.case-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.case-card__image {
  aspect-ratio: 16 / 9;
  background: var(--surface-3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.case-card__image-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--charcoal) 0%, var(--navy) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.5;
}

.case-card__sector {
  display: inline-block;
  margin-bottom: var(--space-xs);
}

.case-card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.case-card__result {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--amber);
}


/* --- Software Showcase --- */
.software {
  background: var(--surface-0);
}

.software__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.software__content {
  max-width: 500px;
}

.software__mockup {
  position: relative;
  perspective: 1200px;
}

.software__screen {
  background: var(--surface-3);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-medium);
  overflow: hidden;
  transform: rotateY(-5deg) rotateX(2deg);
  transition: transform var(--duration-slow) var(--ease-out-expo);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

.software__screen:hover {
  transform: rotateY(0deg) rotateX(0deg);
}

.software__topbar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-subtle);
}

.software__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--charcoal);
}

.software__dot:first-child { background: var(--crimson); }
.software__dot:nth-child(2) { background: var(--amber); }
.software__dot:nth-child(3) { background: #4ade80; }

.software__body {
  padding: var(--space-xl);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.software__line {
  height: 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.software__line--short { width: 60%; }
.software__line--medium { width: 80%; }
.software__line--accent {
  width: 40%;
  background: rgba(230, 57, 70, 0.15);
}

.software__grid-mock {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.software__cell {
  height: 60px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

@media (max-width: 1024px) {
  .software__inner {
    grid-template-columns: 1fr;
  }
  .software__screen {
    transform: none;
  }
}


/* --- Trust Bar --- */
.trust {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-3xl) 0;
}

.trust__items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
}

.trust__item {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  opacity: 0.6;
  transition: opacity var(--duration-base);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.trust__item:hover { opacity: 1; }

.trust__icon {
  width: 20px;
  height: 20px;
  color: var(--crimson);
}


/* --- Blog Preview --- */
.blog-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.blog-card__date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--slate);
}

.blog-card__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
  transition: color var(--duration-base);
}

.blog-card:hover .blog-card__title {
  color: var(--crimson);
}

.blog-card__excerpt {
  color: var(--slate);
  font-size: var(--text-sm);
  line-height: 1.7;
}


/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--navy-deep) 100%);
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--crimson), transparent);
}

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

.cta__inner h2 {
  margin-bottom: var(--space-md);
}

.cta__inner p {
  color: var(--slate);
  margin-bottom: var(--space-2xl);
}

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

.cta__input {
  padding: 0.875rem 1.25rem;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--ice);
  font-size: var(--text-sm);
  transition: border-color var(--duration-base);
}

.cta__input::placeholder {
  color: var(--slate);
}

.cta__input:focus {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px var(--crimson-glow);
}

.cta__input--full {
  grid-column: 1 / -1;
}

.cta__submit {
  grid-column: 1 / -1;
}

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


/* --- Footer --- */
.footer {
  background: var(--surface-0);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-4xl) 0 var(--space-2xl);
}

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

.footer__brand-text {
  color: var(--slate);
  font-size: var(--text-sm);
  line-height: 1.8;
  margin-top: var(--space-md);
  max-width: 300px;
}

.footer__sigillo {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-xs);
  color: var(--slate);
  margin-top: var(--space-lg);
  letter-spacing: 0.05em;
}

.footer__heading {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: var(--space-lg);
}

.footer__link {
  display: block;
  font-size: var(--text-sm);
  color: var(--slate);
  padding: var(--space-xs) 0;
  transition: color var(--duration-base);
}

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

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-xs);
  color: var(--slate);
}

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

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

@media (max-width: 640px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
  .footer__bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}


/* --- Scroll Animations --- GSAP handles all animation.
   No CSS opacity:0 on data-reveal — content is always visible as fallback. */


/* --- Inner Page Specific --- */
.page-header {
  padding: calc(var(--space-5xl) + 80px) 0 var(--space-4xl);
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
}

.page-header__label {
  margin-bottom: var(--space-md);
}

.page-header__title {
  margin-bottom: var(--space-md);
}

.page-header__desc {
  color: var(--slate);
  max-width: 700px;
  font-size: var(--text-lg);
}

/* Service detail page */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.service-item {
  padding: var(--space-2xl);
}

.service-item__norm {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--crimson);
  margin-top: var(--space-md);
}

/* Contact form page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-4xl);
}

.contact-info__item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.contact-info__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(230, 57, 70, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--crimson);
  flex-shrink: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}

.form-input {
  padding: 0.875rem 1.25rem;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--ice);
  font-size: var(--text-sm);
  transition: border-color var(--duration-base), box-shadow var(--duration-base);
}

.form-input:focus {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px var(--crimson-glow);
}

.form-input::placeholder {
  color: var(--slate);
}

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

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

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

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

/* Timeline (Chi siamo) */
.timeline {
  position: relative;
  padding-left: var(--space-3xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--crimson), var(--border-subtle), transparent);
}

.timeline__item {
  position: relative;
  padding-bottom: var(--space-3xl);
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-3xl) - 1px);
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--crimson);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--navy-deep), 0 0 20px var(--crimson-glow);
}

.timeline__year {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--crimson);
  letter-spacing: 0.15em;
  margin-bottom: var(--space-sm);
}

.timeline__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.timeline__desc {
  color: var(--slate);
  line-height: 1.7;
}


/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.divider {
  width: 60px;
  height: 2px;
  background: var(--crimson);
  margin: var(--space-lg) 0;
}

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

.cta__privacy {
  font-size: var(--text-xs);
  color: var(--slate);
  margin-top: var(--space-sm);
}

.cta__privacy a {
  color: var(--crimson);
  transition: opacity var(--duration-base);
}

.cta__privacy a:hover { opacity: 0.8; }

.footer__link--small {
  font-size: var(--text-xs);
}

/* --- GDPR Consent Checkbox --- */
.form-consent {
  grid-column: 1 / -1;
  padding: var(--space-md);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(26, 26, 46, 0.4);
  transition: border-color var(--duration-base);
}

.form-consent--error {
  border-color: var(--crimson);
  animation: consentShake 0.4s ease;
}

@keyframes consentShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.form-consent__label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  font-size: var(--text-xs);
  color: var(--slate);
  line-height: 1.6;
  cursor: pointer;
}

.form-consent__label a {
  color: var(--crimson);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-consent__label a:hover {
  color: var(--white);
}

.form-consent__check {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  margin-top: 1px;
  cursor: pointer;
  transition: all var(--duration-base);
  position: relative;
}

.form-consent__check:checked {
  background: var(--crimson);
  border-color: var(--crimson);
}

.form-consent__check:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-consent__check:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 2px;
}

/* Submit button full-width on forms */
.cta__submit {
  width: 100%;
  justify-content: center;
}

/* Loading screen logo — GSAP handles animation */
.loader__logo {
  height: 64px;
  width: auto;
}

/* Hero — GSAP animates entrance. No CSS hiding — content always visible as fallback. */

.hero__label {
  display: inline-flex;
  align-items: center;
}

/* Section utilities */
.section--flush { padding: 0; }

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

/* Page Transition Overlay */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-loader) - 1);
  background: var(--navy-deep);
  pointer-events: none;
  opacity: 0;
}

/* ============================================================
   SOFTWARE SECTION — Clean mockup classes
   ============================================================ */
.software__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.software__feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.software__feature-dot {
  color: var(--crimson);
  font-size: 1.2rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.software__feature-name {
  color: var(--white);
  display: block;
  margin-bottom: 4px;
}

.software__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.software__url {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--slate);
}

/* Mockup dashboard */
.mockup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.mockup-header__actions {
  display: flex;
  gap: 6px;
}

.mockup-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.mockup-btn--accent {
  background: rgba(166, 38, 62, 0.2);
}

.software__line--title { width: 120px; height: 16px; margin-bottom: 6px; }
.software__line--subtitle { width: 80px; height: 8px; }
.software__line--ai { width: 90%; height: 6px; }
.software__line--ai-short { width: 70%; height: 6px; margin-top: 4px; }

.mockup-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: var(--space-lg);
}

.mockup-stat {
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.mockup-stat__number {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  display: block;
}

.mockup-stat--highlight .mockup-stat__number { color: var(--crimson); }
.mockup-stat--warning .mockup-stat__number { color: var(--amber); }

.mockup-stat__label {
  font-size: 0.6rem;
  color: var(--slate);
  margin-top: 2px;
  display: block;
}

.mockup-ai-badge {
  margin-top: var(--space-md);
  padding: 12px;
  background: rgba(166, 38, 62, 0.06);
  border: 1px solid rgba(166, 38, 62, 0.18);
  border-radius: var(--radius-md);
}

.mockup-ai-badge__label {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--crimson);
  display: block;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.mockup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.mockup-grid__cell {
  height: 52px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--duration-base);
}

.mockup-grid__cell:hover {
  border-color: var(--border-crimson);
}

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

/* ============================================================
   FAQ SECTION
   ============================================================ */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.faq-item {
  cursor: pointer;
  transition: border-color var(--duration-base);
  overflow: visible;
}

.faq-item::before {
  display: none;
}

.faq-item:hover {
  border-color: var(--border-crimson);
}

.faq-item__question {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--white);
  padding: var(--space-lg) var(--space-xl);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__question::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--crimson);
  flex-shrink: 0;
  transition: transform var(--duration-base);
}

.faq-item[open] .faq-item__question::after {
  transform: rotate(45deg);
}

.faq-item__answer {
  padding: 0 var(--space-xl) var(--space-xl);
  line-height: 1.75;
}

/* ============================================================
   AI CHATBOT WIDGET
   ============================================================ */

.chatbot-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(230, 57, 70, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chatbot-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 32px rgba(230, 57, 70, 0.6);
}

.chatbot-fab svg {
  width: 28px;
  height: 28px;
  fill: white;
}

.chatbot-fab__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2ecc71;
  border: 2px solid var(--surface-1);
  font-size: 0;
}

.chatbot-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 9998;
  width: 380px;
  max-width: calc(100vw - 48px);
  max-height: 520px;
  background: var(--surface-2);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chatbot-panel.is-open {
  display: flex;
  animation: chatbot-slide-up 0.3s ease-out;
}

@keyframes chatbot-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.chatbot-panel__header {
  background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-panel__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: white;
}

.chatbot-panel__subtitle {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.8);
  margin-top: 2px;
}

.chatbot-panel__close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 4px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.chatbot-panel__close:hover { opacity: 1; }

.chatbot-panel__messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-height: 280px;
}

.chatbot-msg {
  max-width: 85%;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.chatbot-msg--bot {
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  color: var(--ice);
  align-self: flex-start;
}

.chatbot-msg--user {
  background: var(--crimson);
  color: white;
  align-self: flex-end;
}

.chatbot-msg--typing {
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  align-self: flex-start;
  padding: var(--space-sm) var(--space-lg);
}

.chatbot-msg--typing span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--slate);
  margin: 0 2px;
  animation: chatbot-typing 1.4s infinite;
}

.chatbot-msg--typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot-msg--typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes chatbot-typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.chatbot-panel__quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 var(--space-lg) var(--space-sm);
}

.chatbot-quick-btn {
  background: var(--surface-3);
  border: 1px solid var(--border-subtle);
  color: var(--ice);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: var(--text-xs);
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
}

.chatbot-quick-btn:hover {
  border-color: var(--crimson);
  color: var(--crimson);
}

.chatbot-panel__input {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-1);
}

.chatbot-panel__input input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color var(--duration-base);
}

.chatbot-panel__input input:focus {
  border-color: var(--crimson);
}

.chatbot-panel__input input::placeholder {
  color: var(--slate);
}

.chatbot-panel__input button {
  background: var(--crimson);
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chatbot-panel__input button:hover {
  background: var(--crimson-dark);
}

.chatbot-panel__input button svg {
  width: 18px;
  height: 18px;
  fill: white;
}

/* Social links in footer */
.footer__social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--slate);
  transition: all var(--duration-base);
}

.footer__social-link:hover {
  border-color: var(--crimson);
  color: var(--crimson);
  background: rgba(230, 57, 70, 0.1);
}

.footer__social-link svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .chatbot-panel {
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .chatbot-fab {
    bottom: 16px;
    right: 16px;
  }
}

/* ============================================================
   ARTICLE / BLOG POST STYLES
   ============================================================ */

.article {
  color: var(--ice);
  font-size: var(--text-base);
  line-height: 1.85;
}

.article h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--white);
  margin: var(--space-4xl) 0 var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

.article h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.article h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--white);
  margin: var(--space-2xl) 0 var(--space-md);
}

.article p {
  margin-bottom: var(--space-lg);
  color: var(--ice);
}

.article ul, .article ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

.article li {
  margin-bottom: var(--space-sm);
  color: var(--ice);
}

.article li::marker {
  color: var(--crimson);
}

.article strong {
  color: var(--white);
  font-weight: 600;
}

.article a {
  color: var(--crimson);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--duration-fast);
}

.article a:hover {
  color: var(--crimson-dark);
}

.article blockquote {
  margin: var(--space-2xl) 0;
  padding: var(--space-xl) var(--space-2xl);
  border-left: 3px solid var(--crimson);
  background: rgba(230, 57, 70, 0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--ice);
}

.article blockquote p:last-child {
  margin-bottom: 0;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-2xl) 0;
  font-size: var(--text-sm);
}

.article th {
  background: var(--surface-2);
  color: var(--white);
  font-weight: 600;
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 2px solid var(--crimson);
}

.article td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--ice);
}

.article tr:hover td {
  background: rgba(230, 57, 70, 0.03);
}

.article-toc {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.article-toc__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-md);
}

.article-toc ol {
  padding-left: var(--space-lg);
  counter-reset: toc;
}

.article-toc li {
  margin-bottom: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--slate);
  list-style: none;
  counter-increment: toc;
}

.article-toc li::before {
  content: counter(toc) ". ";
  color: var(--crimson);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  margin-right: var(--space-xs);
}

.article-toc a {
  color: var(--ice);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.article-toc a:hover {
  color: var(--crimson);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
  color: var(--slate);
  flex-wrap: wrap;
}

.article-meta__author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--white);
  font-weight: 500;
}

.article-meta__divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--slate);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--slate);
  text-decoration: none;
  margin-bottom: var(--space-xl);
  transition: color var(--duration-fast);
}

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

.article-cta {
  margin-top: var(--space-4xl);
  padding: var(--space-3xl);
  background: rgba(230, 57, 70, 0.05);
  border: 1px solid var(--border-crimson);
  border-radius: var(--radius-lg);
  text-align: center;
}

.article-cta h3 {
  margin-top: 0;
}

.article-share {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-3xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

.article-share__label {
  font-size: var(--text-sm);
  color: var(--slate);
}

.article-share__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--slate);
  transition: all var(--duration-base);
  text-decoration: none;
}

.article-share__link:hover {
  border-color: var(--crimson);
  color: var(--crimson);
}
