:root {
  --black: #0a0a0a;
  --white: #f5f2ec;
  --lime: #ff3627;
  --lime-dark: #ff3627;
  --gray-mid: #888880;
  --gray-light: #d4d1c8;
  --gray-dark: #1a1a18;
  --accent-orange: #ff6b35;
  --accent-blue: #3b82f6;
  --brand-red: #E8342A;
}

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

html { scroll-behavior: smooth; }

section[id], div[id] {
  scroll-margin-top: 90px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  cursor: default;
}

/* --- NOISE TEXTURE OVERLAY --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* --- NAV --- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  background: linear-gradient(to bottom, rgba(10,10,10,0.95) 0%, transparent 100%);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0;
}

.logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.logo-text-studio {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245,242,236,0.55);
  line-height: 1;
}

.logo-text-ronin {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--brand-red);
  margin-left: 0.4rem;
  line-height: 1;
}

nav ul {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

nav ul a {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-light);
  text-decoration: none;
  transition: color 0.2s;
}

nav ul a:hover { color: var(--lime); }

.nav-cta {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--lime);
  color: var(--lime);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
  background: var(--lime);
  color: var(--black);
}

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 4rem 6rem;
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,241,53,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,241,53,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200,241,53,0.12) 0%, transparent 70%);
  z-index: 0;
}

/* --- RONIN WARRIOR ILLUSTRATION --- */
.hero-ronin {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 88%;
  max-height: 700px;
  z-index: 0;
  opacity: 0.13;
  pointer-events: none;
  user-select: none;
}

.hero-tag {
  position: relative;
  z-index: 1;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: var(--lime);
}

.hero h1 {
  position: relative;
  z-index: 1;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(3.5rem, 9vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin-bottom: 3rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--lime);
  display: block;
}

.hero-sub {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.hero-desc {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--gray-light);
  max-width: 38ch;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.btn-primary {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  background: var(--lime);
  color: var(--black);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}

.btn-primary:hover { background: var(--lime-dark); transform: translateY(-2px); }

.btn-ghost {
  font-family: 'DM Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  border: 1px solid rgba(245,242,236,0.25);
  color: var(--white);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
  display: inline-block;
}

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

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--lime), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.15); }
}

/* --- NUMBERS STRIP --- */
.numbers-strip {
  border-top: 1px solid rgba(245,242,236,0.08);
  border-bottom: 1px solid rgba(245,242,236,0.08);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.num-item {
  padding: 2.5rem;
  border-right: 1px solid rgba(245,242,236,0.08);
}

.num-item:last-child { border-right: none; }

.num-value {
  font-family: 'Syne', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--lime);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.num-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-mid);
}

/* --- SERVICES --- */
.section {
  padding: 7rem 4rem;
  position: relative;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 4rem;
  gap: 2rem;
}

.section-tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-tag::before {
  content: '';
  display: inline-block;
  width: 1.2rem;
  height: 1px;
  background: var(--lime);
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.section-title em {
  font-style: normal;
  color: var(--lime);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--gray-mid);
  font-weight: 300;
  line-height: 1.65;
  max-width: 36ch;
}

/* --- SERVICE CARDS --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(245,242,236,0.06);
  border: 1px solid rgba(245,242,236,0.06);
}

.parallax-slow {
  will-change: transform;
  transition: transform 0.1s linear;
}

.service-card {
  background: var(--black);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  display: flex;
  flex-direction: column;
}

.service-card:hover { background: var(--gray-dark); }

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.service-card:hover::after { transform: scaleX(1); }

/* --- AI AGENTS CARD --- */
.service-card--ai {
  background: rgba(200, 241, 53, 0.02);
}

.service-card--ai::before {
  content: 'NUOVO';
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--lime);
  border: 1px solid rgba(200,241,53,0.25);
  padding: 0.2rem 0.5rem;
  background: rgba(200,241,53,0.05);
  z-index: 1;
}

/* override ::after per AI card — mantieni lime ma più visibile */
.service-card--ai:hover::after {
  background: var(--lime);
}

/* --- CTA CARD FULL WIDTH --- */
.service-card--cta {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background: rgba(200,241,53,0.04);
  border: 1px solid rgba(200,241,53,0.15);
}

.service-card--cta::after { display: none; }

.service-card--cta:hover {
  background: rgba(200,241,53,0.07);
}

.cta-card-content {
  max-width: 55%;
}

.service-num {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--lime);
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  display: block;
  filter: grayscale(1) brightness(2);
  transition: filter 0.3s;
}

.service-card:hover .service-icon { filter: none; }

.service-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}

.service-desc {
  font-size: 1rem;
  font-weight: 300;
  color: var(--gray-mid);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.tag {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(200,241,53,0.2);
  color: rgba(200,241,53,0.6);
}

/* --- APPROACH --- */
.approach-section {
  padding: 7rem 4rem;
  background: var(--gray-dark);
  border-top: 1px solid rgba(245,242,236,0.06);
  border-bottom: 1px solid rgba(245,242,236,0.06);
}

.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  margin-top: 4rem;
}

.approach-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.approach-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(245,242,236,0.07);
  transition: padding-left 0.3s;
  cursor: default;
}

.approach-item:first-child { border-top: 1px solid rgba(245,242,236,0.07); }
.approach-item:hover { padding-left: 0.5rem; }

.approach-n {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--lime);
  opacity: 0.5;
  padding-top: 0.2rem;
  min-width: 2rem;
}

.approach-content h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.approach-content p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--gray-mid);
  line-height: 1.6;
}

.approach-visual {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.av-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(200,241,53,0.12);
  animation: ringPulse 4s ease-in-out infinite;
}

.av-ring:nth-child(1) { width: 80%; height: 80%; animation-delay: 0s; }
.av-ring:nth-child(2) { width: 60%; height: 60%; animation-delay: 0.5s; border-color: rgba(200,241,53,0.2); }
.av-ring:nth-child(3) { width: 40%; height: 40%; animation-delay: 1s; border-color: rgba(200,241,53,0.3); }

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: 0.7; }
}

.av-center {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 120px;
  background: var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.2rem;
}

.av-center-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--black);
}

.av-center-num {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--black);
  line-height: 1;
}

/* --- CTA BANNER --- */
.cta-banner {
  padding: 7rem 4rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-banner-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(200,241,53,0.1) 0%, transparent 60%);
}

.cta-banner h2 {
  position: relative;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin-bottom: 1.5rem;
  z-index: 1;
}

.cta-banner h2 em {
  font-style: normal;
  color: var(--lime);
}

.cta-banner p {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--gray-mid);
  margin-bottom: 2.5rem;
}

.cta-banner .btn-primary {
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  padding: 1.1rem 2.8rem;
}

/* --- FOOTER --- */
footer {
  border-top: 1px solid rgba(245,242,236,0.08);
  padding: 3rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.footer-logo-img {
  height: 22px;
  width: auto;
  display: block;
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-mid);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--lime); }

.footer-copy {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  color: rgba(136,136,128,0.5);
}

/* --- MARQUEE --- */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid rgba(245,242,236,0.06);
  border-bottom: 1px solid rgba(245,242,236,0.06);
  padding: 1.2rem 0;
  background: var(--gray-dark);
}

.marquee-track {
  display: flex;
  gap: 3rem;
  animation: marqueeScroll 24s linear infinite;
  width: max-content;
}

.marquee-item {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-mid);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.marquee-item::after {
  content: '◆';
  color: var(--lime);
  font-size: 0.4rem;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --- FADE IN ANIMATIONS --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- CONTACT FORM --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 5rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-info-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(245,242,236,0.07);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-info-item:first-child { border-top: 1px solid rgba(245,242,236,0.07); }

.contact-info-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  opacity: 0.7;
}

.contact-info-val {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--white);
  text-decoration: none;
  transition: color 0.2s;
}

a.contact-info-val:hover { color: var(--lime); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-mid);
}

.form-input {
  background: var(--gray-dark);
  border: 1px solid rgba(245,242,236,0.1);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder { color: rgba(136,136,128,0.5); }

.form-input:focus {
  border-color: var(--lime);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888880' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-select option { background: var(--gray-dark); color: var(--white); }

.form-textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.form-privacy {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--gray-mid);
  line-height: 1.5;
}

.form-privacy a {
  color: var(--lime);
  text-decoration: none;
  opacity: 0.8;
}

.form-privacy a:hover { opacity: 1; }

.form-submit {
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.9rem 2rem;
  flex-shrink: 0;
}

.form-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.form-feedback {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  line-height: 1.55;
  padding: 1rem 1.25rem;
  display: none;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.form-feedback.success {
  display: flex;
  border: 1px solid rgba(200,241,53,0.25);
  border-left: 3px solid var(--lime);
  color: var(--lime);
  background: rgba(200,241,53,0.05);
  animation: feedbackIn 0.3s ease;
}

.form-feedback.error {
  display: flex;
  border: 1px solid rgba(255,107,53,0.25);
  border-left: 3px solid #ff6b35;
  color: #ff6b35;
  background: rgba(255,107,53,0.05);
  animation: feedbackIn 0.3s ease;
}

.feedback-icon {
  font-size: 1rem;
  line-height: 1.4;
  flex-shrink: 0;
}

@keyframes feedbackIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- VALIDAZIONE CAMPI --- */
.form-input.is-invalid {
  border-color: #ff6b35;
  background: rgba(255,107,53,0.04);
}

.field-error {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: #ff6b35;
  min-height: 0.85rem;
  display: block;
  margin-top: 0.25rem;
}

/* --- RESPONSIVE --- */
/* --- RECAPTCHA BADGE (discreta, ma visibile per ToS Google) --- */
.grecaptcha-badge {
  opacity: 0.35;
  transition: opacity 0.3s;
}
.grecaptcha-badge:hover {
  opacity: 1;
}

@media (max-width: 900px) {
  nav { padding: 1.25rem 1.75rem; }
  nav ul { display: none; }
  .hero { padding: 6rem 1.75rem 4rem; min-height: auto; justify-content: flex-start; }
  .hero-ronin { display: none; }
  .section { padding: 5rem 1.75rem; }
  .approach-section { padding: 5rem 1.75rem; }
  .cta-banner { padding: 5rem 1.75rem; }
  footer { padding: 2.5rem 1.75rem; }
  .numbers-strip { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .service-card--cta {
    grid-column: auto;
    flex-direction: column;
    align-items: flex-start;
  }
  .cta-card-content { max-width: 100%; }
  .approach-grid { grid-template-columns: 1fr; }
  .approach-visual { display: none; }
  .section-header { flex-direction: column; }
  .hero h1 { font-size: clamp(1.75rem, 7.5vw, 3rem); line-height: 1; letter-spacing: -0.02em; }
  .hero-sub { flex-direction: column; align-items: flex-start; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .form-row { grid-template-columns: 1fr; }
  .form-footer { flex-direction: column; align-items: flex-start; }
}
