/* ═══════════════════════════════════════════════════
   DAVIDE BIANCHET — VIDEOMAKER
   Design: cinematic dark portfolio
   ═══════════════════════════════════════════════════ */

/* ─── FONTS ───────────────────────────────────────── */
@font-face {
  font-family: 'GothamPro';
  src: url('../font/GothamPro-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GothamPro';
  src: url('../font/GothamPro-LightItalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'GothamPro';
  src: url('../font/GothamPro.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GothamPro';
  src: url('../font/GothamPro-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'GothamPro';
  src: url('../font/GothamPro-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GothamPro';
  src: url('../font/GothamPro-MediumItalic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'GothamPro';
  src: url('../font/GothamPro-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GothamPro';
  src: url('../font/GothamPro-BoldItalic.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'GothamPro';
  src: url('../font/GothamPro-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GothamCond';
  src: url('../font/GothamCond-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GothamCond';
  src: url('../font/GothamCond-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GothamCond';
  src: url('../font/GothamCond-MediumItalic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'GothamCond';
  src: url('../font/GothamCond-Ultra.ttf') format('truetype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GothamCond';
  src: url('../font/GothamCond-UltraItalic.ttf') format('truetype');
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

/* ─── TOKENS ─────────────────────────────────────── */
:root {
  --primary:          #e85d04;
  --primary-dark:     #dc2f02;
  --primary-light:    #f48c06;
  --accent:           #ffba08;
  --dark:             #0a0a0a;
  --dark-soft:        #1a1a2e;
  --dark-card:        #16213e;
  --text-white:       #f8f9fa;
  --text-muted:       #adb5bd;
  --text-light:       #dee2e6;
  --border-subtle:    rgba(255, 255, 255, 0.08);
  --gradient-hero:    linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  --gradient-accent:  linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  --gradient-card:    linear-gradient(135deg, rgba(232,93,4,.08) 0%, rgba(255,186,8,.04) 100%);
  --shadow-glow:      0 0 40px rgba(232, 93, 4, 0.15);
  --shadow-card:      0 4px 24px rgba(0, 0, 0, 0.4);
  --font-sans:        'GothamPro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display:     'GothamCond', 'GothamPro', sans-serif;
  --radius:           16px;
  --radius-sm:        10px;
  --transition:       all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h:            72px;
}

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

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

body {
  background-color: var(--dark);
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* focus ring */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── TYPOGRAPHY SCALE ───────────────────────────── */
.hero-tagline    { font-size: clamp(1.8rem, 4.5vw, 4.2rem); }
.section-label   { font-size: clamp(.7rem, 1vw, .8rem); }
.section-title   { font-size: clamp(2rem, 4.5vw, 3.5rem); }
.service-title   { font-size: 1.25rem; }
.portfolio-name  { font-size: 1.125rem; }
.cta-title       { font-size: clamp(2rem, 4vw, 3rem); }

/* ─── LAYOUT HELPERS ─────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.section {
  padding-block: clamp(5rem, 10vw, 8rem);
}

.section-dark {
  background-color: var(--dark-soft);
}

.section-header {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section-label {
  display: inline-block;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .75rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-white);
}

/* ─── BUTTONS ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 2rem;
  border-radius: 50px;
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  min-height: 48px;
}

.btn-primary {
  background: var(--gradient-accent);
  color: var(--dark);
  box-shadow: 0 4px 20px rgba(232, 93, 4, .35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232, 93, 4, .5);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-white);
  border: 1.5px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.06);
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--dark);
  color: var(--text-white);
  border: 1.5px solid var(--border-subtle);
}
.btn-dark:hover {
  background: rgba(255,255,255,.06);
  transform: translateY(-2px);
}

.btn-lg  { padding: 1rem 2.5rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; border-radius: var(--radius-sm); }

/* ─── SCROLL ANIMATIONS ──────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .6s cubic-bezier(.4,0,.2,1), transform .6s cubic-bezier(.4,0,.2,1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal.delay-1 { transition-delay: .12s; }
.reveal.delay-2 { transition-delay: .24s; }
.reveal.delay-3 { transition-delay: .36s; }

/* hero entrance animations */
.animate-in {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp .8s cubic-bezier(.4,0,.2,1) forwards;
}
.animate-in.delay-1 { animation-delay: .2s; }
.animate-in.delay-2 { animation-delay: .4s; }
.animate-in.delay-3 { animation-delay: .6s; }

@keyframes fadeUp {
  to { opacity: 1; transform: none; }
}

/* ─── NAVBAR ─────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background .3s ease, box-shadow .3s ease;
}
.navbar.scrolled {
  background: rgba(10, 10, 10, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border-subtle);
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.nav-logo img {
  filter: brightness(0) invert(1);
  transition: opacity .2s;
}
.nav-logo:hover img { opacity: .75; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .2s;
  letter-spacing: .02em;
}
.nav-links a:hover { color: var(--text-white); }

.nav-cta {
  padding: .55rem 1.4rem !important;
  border-radius: 50px !important;
  background: var(--gradient-accent) !important;
  color: var(--dark) !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
  box-shadow: 0 2px 12px rgba(232,93,4,.3);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232,93,4,.45) !important;
}

/* hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-white);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10,10,10,.97);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
.mobile-menu ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.mobile-link {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-white);
  transition: color .2s;
}
.mobile-link:hover { color: var(--primary); }

/* ─── HERO ───────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(10,10,10,.55) 0%,
    rgba(10,10,10,.45) 60%,
    rgba(10,10,10,.85) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
  padding-top: var(--nav-h);
  max-width: 1000px;
}

.hero-tagline {
  font-family: 'GothamPro', sans-serif;
  font-weight: 900;
  line-height: 1.05;
  color: var(--text-white);
  margin-bottom: 2.5rem;
  letter-spacing: .04em;
}
.hero-tagline-italic {
  font-style: italic;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  translate: -50% 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .4; transform: scaleY(1); }
  50%       { opacity: 1;  transform: scaleY(1.1); }
}

/* ─── ABOUT ──────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.about-image-wrap {
  position: relative;
}
.about-img-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/5;
}
.about-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.about-img-frame:hover img { transform: scale(1.03); }

.about-accent-block {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  width: 45%;
  height: 45%;
  background: var(--gradient-accent);
  border-radius: var(--radius);
  z-index: -1;
  opacity: .25;
  filter: blur(24px);
}

.about-content .section-label { margin-bottom: .5rem; }
.about-content .section-title { margin-bottom: 1.5rem; }

.about-name {
  font-family: 'GothamPro', sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--text-white);
  letter-spacing: .02em;
  margin-bottom: .5rem;
}

.about-text {
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
  font-size: .9375rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
}

.stat {
  display: flex;
  flex-direction: column;
}
.stat-value {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: .1em;
}
.stat-number {
  font-size: clamp(2.8rem, 4vw, 4rem);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.stat-suffix {
  font-size: clamp(2rem, 3vw, 2.8rem);
  color: var(--accent);
  font-weight: 700;
  line-height: 1;
  display: inline;
}
.stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .4rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}

/* ─── SERVIZI ────────────────────────────────────── */
.servizi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity .3s ease;
  border-radius: inherit;
}
.service-card:hover {
  border-color: rgba(232,93,4,.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}
.service-card:hover::before { opacity: .04; }

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(232,93,4,.12);
  border: 1px solid rgba(232,93,4,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
  transition: var(--transition);
}
.service-card:hover .service-icon {
  background: rgba(232,93,4,.2);
  border-color: rgba(232,93,4,.4);
}
.service-icon svg { width: 24px; height: 24px; }

.service-title {
  font-family: 'GothamPro', sans-serif;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: .75rem;
}
.service-text {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.7;
}

/* ─── PORTFOLIO ──────────────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 340px 340px;
  gap: 1rem;
}

/* Motorclass: spans 2 cols + 2 rows (left block) */
.portfolio-feat.portfolio-tall {
  grid-column: span 2;
  grid-row: span 2;
}

.portfolio-thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--dark-card);
  width: 100%;
  height: 100%;
}

/* video thumbnail */
.portfolio-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(.4,0,.2,1), opacity .4s ease;
}
.portfolio-item:hover .portfolio-video { transform: scale(1.04); }

/* poster image — visibile solo su mobile al posto del video */
.portfolio-poster {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

/* placeholder shimmer — visibile finché il video non è pronto */
.portfolio-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    var(--dark-card) 0%,
    #1e2a3a 40%,
    var(--dark-card) 100%
  );
  background-size: 200% 200%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: inherit;
  transition: opacity .4s ease;
}
/* play icon sul placeholder */
.portfolio-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.15)'%3E%3Cpolygon points='5,3 19,12 5,21'/%3E%3C/svg%3E") center / 48px no-repeat;
  border-radius: inherit;
  transition: opacity .4s ease;
}

/* nasconde placeholder quando il video è caricato */
.portfolio-thumb.loaded::before,
.portfolio-thumb.loaded::after {
  opacity: 0;
  pointer-events: none;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 30%, rgba(0,0,0,.1) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease;
  border-radius: inherit;
}
.portfolio-item:hover .portfolio-overlay { opacity: 1; }

.portfolio-play {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: auto;
  margin-top: auto;
  transform: scale(.8);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  color: var(--dark);
}
.portfolio-play svg { width: 22px; height: 22px; margin-left: 3px; }
.portfolio-item:hover .portfolio-play { transform: scale(1); }

.portfolio-meta {
  width: 100%;
  padding: 1.5rem;
}
.portfolio-cat {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
}
.portfolio-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-white);
  margin-top: .25rem;
}

/* ─── CTA BANNER ─────────────────────────────────── */
.cta-banner {
  position: relative;
  padding-block: clamp(5rem, 9vw, 7rem);
  overflow: hidden;
  text-align: center;
}
.cta-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-accent);
  z-index: 0;
}
.cta-banner .container { position: relative; z-index: 1; }

.cta-inner { max-width: 680px; margin-inline: auto; }
.cta-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.cta-text {
  color: rgba(10,10,10,.75);
  font-size: 1.0625rem;
  margin-bottom: 2rem;
  line-height: 1.65;
}

/* ─── CONTATTI ───────────────────────────────────── */
.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.contatti-info .section-title { margin-bottom: 2rem; margin-top: .5rem; }

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: .9375rem;
  transition: color .2s;
}
.contact-item:hover { color: var(--text-white); }
.contact-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(232,93,4,.1);
  border: 1px solid rgba(232,93,4,.15);
  flex-shrink: 0;
  color: var(--primary);
  transition: var(--transition);
}
.contact-item:hover .contact-icon {
  background: rgba(232,93,4,.2);
  border-color: rgba(232,93,4,.35);
}
.contact-icon svg { width: 18px; height: 18px; }

.social-links { display: flex; gap: .75rem; }
.social-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: var(--transition);
}
.social-btn svg { width: 18px; height: 18px; }
.social-btn:hover {
  border-color: rgba(232,93,4,.3);
  background: rgba(232,93,4,.08);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ─── FORM ───────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.contatti-form-wrap {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.form-group label {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: .01em;
}
.required { color: var(--primary); }

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: .9375rem;
  padding: .8rem 1rem;
  min-height: 48px;
  transition: border-color .2s, background .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(232,93,4,.05);
  box-shadow: 0 0 0 3px rgba(232,93,4,.12);
}
.form-group input.error,
.form-group textarea.error,
.form-group select.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}

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

.select-wrap { position: relative; }
.select-arrow {
  position: absolute;
  right: .9rem;
  top: 50%;
  translate: 0 -50%;
  pointer-events: none;
  color: var(--text-muted);
}
.select-arrow svg { width: 18px; height: 18px; }
.form-group select option { background: var(--dark-soft); }

.field-error {
  font-size: .8125rem;
  color: #ef4444;
  min-height: 1em;
}

.form-success {
  text-align: center;
  color: var(--accent);
  font-weight: 500;
  padding: .75rem;
  border: 1px solid rgba(255,186,8,.2);
  border-radius: var(--radius-sm);
  background: rgba(255,186,8,.05);
  font-size: .9375rem;
}

/* submit button loading spinner */
.btn-loader svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── VIDEO MODAL ───────────────────────────────────*/
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.video-modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.modal-inner {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.modal-close {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
  background: rgba(255,255,255,.04);
}
.modal-close:hover { color: var(--text-white); border-color: rgba(255,255,255,.2); }

.modal-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.modal-cat {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
}
.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-white);
}

.modal-video {
  width: 100%;
  border-radius: var(--radius);
  background: var(--dark);
  max-height: 75vh;
  outline: none;
}

/* ─── FOOTER ─────────────────────────────────────── */
.footer {
  background: var(--dark);
  border-top: 1px solid var(--border-subtle);
  padding-block: 2.5rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text-white);
  transition: opacity .2s;
}
.footer-brand:hover { opacity: .75; }
.footer-brand img { filter: brightness(0) invert(1); }
.footer-copy  { font-size: .8125rem; color: var(--text-muted); }
.footer-tagline { font-size: .8125rem; color: rgba(232,93,4,.7); font-style: italic; }
.footer-privacy-link { font-size: .8125rem; color: var(--text-muted); text-decoration: none; transition: color .2s; }
.footer-privacy-link:hover { color: var(--accent); }
.footer-powered { font-size: .8125rem; color: var(--text-muted); }
.footer-powered a { color: var(--text-muted); text-decoration: none; transition: color .2s; }
.footer-powered a:hover { color: var(--accent); }

/* ─── RESPONSIVE ─────────────────────────────────── */

/* ≤ 1024px */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-image-wrap { max-width: 500px; justify-self: center; }
  .about-img-frame { aspect-ratio: 3/4; }

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

  /* portfolio: stack su 1 colonna, altezze fisse */
  .portfolio-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .portfolio-feat.portfolio-tall {
    grid-column: span 1;
    grid-row: span 1;
  }
  .portfolio-thumb { min-height: 280px; }

  /* su mobile: mostra poster, nascondi video */
  .portfolio-poster { display: block; }
  .portfolio-video  { display: none; }
  /* il poster è già caricato, nascondi shimmer */
  .portfolio-thumb::before,
  .portfolio-thumb::after { display: none; }
}

/* ≤ 768px */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .servizi-grid { grid-template-columns: 1fr; }

  .portfolio-thumb { min-height: 240px; }

  .contatti-grid { grid-template-columns: 1fr; }
  .contatti-form-wrap { order: -1; }

  .about-stats { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}

/* ≤ 480px */
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 320px; justify-content: center; }
  .about-stats { grid-template-columns: 1fr; gap: 1.5rem; }
}
