/* =========================================================
   STUDIO TECNICO ING. NICOLA PAPPANO, DESIGN SYSTEM
   Blueprint Engineering Aesthetic
   ========================================================= */

:root {
  --blue: #228CB4;
  --blue-dark: #1B7093;
  --orange: #F37543;
  --orange-dark: #DB5F2E;
  --graphite: #22303C;
  --slate: #647380;
  --offwhite: #F4F7F8;
  --white: #FFFFFF;

  --line: rgba(34, 48, 60, 0.12);
  --line-soft: rgba(34, 48, 60, 0.07);
  --blue-line: rgba(34, 140, 180, 0.25);

  --font-display: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container: 1360px;
  --gutter: clamp(24px, 4vw, 64px);
  --unit: 8px;

  --header-h: 96px;
  --header-h-sticky: 72px;
  --topbar-h: 40px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--graphite);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
input, textarea { font: inherit; color: inherit; }

/* ---------- Accessibility: skip link & focus visibility ---------- */
.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;
}
.skip-link {
  position: absolute;
  top: -100%;
  left: 12px;
  z-index: 1000;
  background: var(--graphite);
  color: var(--white);
  padding: 12px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  transition: top .25s var(--ease);
}
.skip-link:focus {
  top: 12px;
}
:focus-visible {
  outline: 2px solid var(--blue-dark);
  outline-offset: 2px;
}
.field input:focus-visible, .field textarea:focus-visible,
.category-select:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--graphite);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  position: relative;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-dark); /* AA contrast on white: var(--blue) alone is 3.83:1 at this size, --blue-dark is 5.55:1 */
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--orange);
}
.eyebrow .idx {
  font-family: var(--font-mono);
  color: var(--slate);
  letter-spacing: 0.05em;
}

/* ---------- Technical grid backdrop ---------- */
.blueprint-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.coord-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--slate);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform .45s var(--ease), background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  /* var(--orange) alone gives 2.82:1 with white text (fails WCAG AA 4.5:1); var(--orange-dark)
     is the best achievable contrast (3.69:1) while staying within the locked brand palette. */
  background: var(--orange-dark);
  color: var(--white);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.btn-primary:hover { filter: brightness(0.88); transform: translate(2px, -2px); }
.btn-outline {
  border-color: var(--graphite);
  color: var(--graphite);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); transform: translate(2px, -2px); }
.btn-ghost {
  color: var(--graphite);
  border-bottom: 1px solid var(--graphite);
  padding: 4px 0;
  gap: 8px;
}
.btn-ghost i { font-size: 0.9rem; transition: transform .3s var(--ease); }
.btn-ghost:hover { color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover i { transform: translateX(5px); }

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar { background: var(--blue); color: var(--white); }
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 3vw, 36px);
  height: var(--topbar-h);
  font-size: 0.8rem;
}
.topbar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,1);
}
.topbar-item i { flex-shrink: 0; font-size: 0.875rem; color: rgba(255,255,255,0.75); }
a.topbar-item:hover { color: var(--white); }
a.topbar-item:hover i { color: var(--white); }
@media (max-width: 640px) { .topbar-item.topbar-address { display: none; } }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .4s var(--ease);
}
.site-header.is-sticky { box-shadow: 0 8px 24px rgba(34,48,60,0.08); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  transition: height .35s var(--ease);
}
.site-header.is-sticky .header-inner { height: var(--header-h-sticky); }
.logo {
  display: flex;
  align-items: flex-start;
  align-self: flex-start;
  margin-top: calc(-1 * var(--topbar-h));
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--graphite);
  letter-spacing: -0.01em;
  position: relative;
  z-index: 5;
}
.site-header.is-sticky .logo { align-self: center; margin-top: 0; }
.logo-img {
  height: 160px; width: auto;
  margin-top: 0;
  object-fit: contain;
  flex-shrink: 0;
  transition: height .35s var(--ease);
}
.site-header.is-sticky .logo-img { height: 50px; }
.logo small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--slate);
  text-transform: uppercase;
  margin-top: 2px;
}

.main-nav { display: flex; align-items: center; gap: 40px; }
.main-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--graphite);
  position: relative;
  padding: 6px 0;
  text-transform: uppercase;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--orange);
  transition: width .35s var(--ease);
}
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 22px; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 18px; height: 1.5px;
  background: var(--graphite);
  position: relative;
  transition: all .3s var(--ease);
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle.open span::after { top: 0; transform: rotate(-45deg); }

/* =========================================================
   SECTION SCAFFOLD
   ========================================================= */
section { position: relative; }
.section-pad { padding: clamp(72px, 10vw, 140px) 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: clamp(48px, 6vw, 88px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}
.section-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  max-width: 640px;
  margin-top: 14px;
}
.section-head .head-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--slate);
  text-align: right;
  padding-bottom: 6px;
}
.alt-bg { background: var(--offwhite); }

/* Full-color section, Blueprint Blue, breaks up the white/off-white rhythm */
.color-section {
  background: var(--blue);
  color: var(--white);
}
.color-section .blueprint-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
}
.color-section .eyebrow { color: var(--white); }
.color-section .eyebrow .idx { color: rgba(255,255,255,0.9); }
.color-section .section-head { border-color: rgba(255,255,255,0.25); }
.color-section .section-head h2 { color: var(--white); }
.color-section .head-meta { color: rgba(255,255,255,0.95); }

/* =========================================================
   CHI SIAMO
   ========================================================= */
.about-section .about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 5vw, 90px);
  align-items: start;
}
.about-portrait {
  position: relative;
  aspect-ratio: 4/5;
  border: 1px solid var(--line);
  background: var(--offwhite);
  overflow: hidden;
}
.about-portrait-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-portrait .frame-corner {
  position: absolute;
  width: 26px; height: 26px;
  border: 1.5px solid var(--blue);
}
.fc-tl { top: 14px; left: 14px; border-right: none; border-bottom: none; }
.fc-br { bottom: 14px; right: 14px; border-left: none; border-top: none; }
.about-portrait .tag-strip {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 18px;
  background: rgba(34,48,60,0.88);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  display: flex;
  justify-content: space-between;
}

.about-copy .lead {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  color: var(--graphite);
  font-weight: 500;
  margin-bottom: 26px;
  line-height: 1.5;
}
.about-copy p {
  color: var(--slate);
  margin-bottom: 20px;
  max-width: 60ch;
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: clamp(24px, 4vw, 56px);
  margin: 40px 0 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.metric .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  color: var(--blue);
  display: block;
}
.metric .label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 4px;
}
.mission-block {
  border-left: 2px solid var(--orange);
  padding: 4px 0 4px 22px;
  margin-bottom: 24px;
}
.mission-block p { font-style: normal; color: var(--graphite); font-weight: 500; margin: 0; }
.tools-block {
  background: rgba(34, 140, 180, 0.06);
  border: 1px solid rgba(34, 140, 180, 0.22);
  border-left: 2px solid var(--blue);
  padding: 22px 24px;
  font-size: 0.92rem;
  color: var(--slate);
}
.tools-block strong { color: var(--graphite); }

/* =========================================================
   SERVIZI, TECHNICAL ACCORDION ROWS
   ========================================================= */
.services-list { border-top: 1px solid rgba(255,255,255,0.4); }
.service-row {
  border-bottom: 1px solid rgba(255,255,255,0.18);
  transition: background .4s var(--ease);
}
.service-row.active { background: rgba(255,255,255,0.07); }
.service-row-head {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(22px, 3vw, 34px) 4px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.service-index {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  width: 44px;
  flex-shrink: 0;
}
.service-row.active .service-index { color: var(--white); }
.service-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  flex: 1;
  color: var(--white);
  transition: color .3s var(--ease);
}
.service-row.active .service-title { color: var(--white); }
.service-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 5px 10px;
  display: none;
}
@media (min-width: 720px) { .service-tag { display: inline-block; } }
.service-plus {
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,0.35);
  flex-shrink: 0;
  position: relative;
  transition: border-color .3s var(--ease), transform .5s var(--ease);
}
.service-row.active .service-plus { border-color: var(--orange); transform: rotate(45deg); }
.service-plus::before, .service-plus::after {
  content: "";
  position: absolute;
  background: var(--white);
  top: 50%; left: 50%;
}
.service-plus::before { width: 12px; height: 1.5px; transform: translate(-50%,-50%); }
.service-plus::after { width: 1.5px; height: 12px; transform: translate(-50%,-50%); }
.service-row.active .service-plus::before,
.service-row.active .service-plus::after { background: var(--orange); }

.service-row-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .55s var(--ease);
}
.service-row.active .service-row-body { max-height: 340px; }
.service-body-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 3vw, 40px);
  padding: 0 4px clamp(28px, 3vw, 38px);
}
@media (min-width: 720px) { .service-body-inner { grid-template-columns: 44px 1fr; } }
@media (min-width: 900px) { .service-body-inner { grid-template-columns: 44px 1fr 200px; } }
.service-body-inner .spacer { display: none; }
@media (min-width: 720px) { .service-body-inner .spacer { display: block; } }
.service-desc { color: rgba(255,255,255,0.95); max-width: 56ch; }
.service-icon {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,0.3);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
@media (min-width: 900px) { .service-icon { display: flex; } }
.service-icon i { font-size: 2.75rem; color: var(--white); }

/* =========================================================
   GALLERY PREVIEW
   ========================================================= */
.gallery-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  /*background: var(--line);*/
  /*border: 1px solid var(--line);*/
}
@media (max-width: 900px) { .gallery-preview-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-preview-grid { grid-template-columns: 1fr; } }

.gp-item {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--white);
  overflow: hidden;
}
.gp-item .wire {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.gp-item:hover .wire { transform: scale(1.04); }
.gp-item .gp-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 24px;
  background: linear-gradient(180deg, transparent, rgba(34,48,60,0.92) 55%);
  color: var(--white);
}
.gp-item > .gp-cat {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(34,48,60,0.85);
  padding: 4px 10px;
  text-decoration: none;
}
.gp-item > .gp-cat:hover { background: var(--orange); }
.gp-overlay h3 { font-size: 0.95rem; color: var(--white); font-weight: 600; line-height: 1.4; }
.gp-overlay .gp-loc { font-size: 0.75rem; color: rgba(255,255,255,0.65); margin-top: 8px; display: block; }

.gallery-video-feature {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--graphite);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-top: clamp(24px, 3vw, 40px);
  cursor: pointer;
}
.video-slot-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--white); gap: 14px;
}
.play-ring {
  width: 64px; height: 64px;
  border: 1.5px solid var(--orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .4s var(--ease);
}
.gallery-video-feature:hover .play-ring { transform: scale(1.1); }
.video-slot-inner span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.gallery-cta-bar {
  display: flex;
  justify-content: center;
  margin-top: clamp(40px, 5vw, 64px);
}

/* =========================================================
   CONTATTI
   ========================================================= */
.contact-section { background: var(--graphite); color: var(--white); }
.contact-section .eyebrow { color: var(--orange); }
.contact-section .eyebrow .idx { color: rgba(255,255,255,0.62); }
.contact-section .section-head { border-color: rgba(255,255,255,0.12); }
.contact-section .section-head h2 { color: var(--white); }
.contact-section .head-meta { color: rgba(255,255,255,0.62); }

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 5vw, 90px);
}
.contact-info p.lead-text { color: rgba(255,255,255,0.7); max-width: 44ch; margin-bottom: 40px; }
.info-line {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.info-line:last-of-type { border-bottom: 1px solid rgba(255,255,255,0.12); }
.info-line i { font-size: 1.125rem; color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.info-line .info-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
}
.info-line .info-value { display: block; font-size: 0.98rem; font-weight: 500; }
.info-line a:hover { color: var(--orange); }

.contact-form {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.14);
  padding: clamp(28px, 4vw, 44px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 22px; position: relative; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.28);
  padding: 10px 2px;
  color: var(--white);
  font-size: 0.95rem;
  transition: border-color .3s var(--ease);
}
.field input:focus, .field textarea:focus { border-color: var(--orange); }
.field input:focus:not(:focus-visible), .field textarea:focus:not(:focus-visible) { outline: none; }
.field textarea { resize: vertical; min-height: 90px; }
.field-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 26px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}
.field-check input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--orange); }
.field-check a { color: var(--white); text-decoration: underline; }
.contact-form .btn-primary { width: 100%; justify-content: center; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--graphite); color: rgba(255,255,255,0.75); border-top: 1px solid rgba(255,255,255,0.1); }
.footer-bottom {
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
}
.footer-bottom a { color: rgba(255,255,255,0.68); }
.footer-bottom a:hover { color: var(--orange); }

.credits_link{
 color: #38B5E6 !important;
 font-weight: 700;
 font-family: sans-serif;
}

.credits_link:hover{
 color: #fff !important;
}

 .credits_link:before{
  content: "";
  vertical-align: middle;
  width:16px;
  height: 16px;
  display: inline-block;
  margin-right: 5px;
  margin-left: 5px;
  background-image: url(https://www.clion.it/favicon-96x96.png);
  background-repeat: no-repeat;
  -webkit-background-size: contain;
  background-size: contain;
  background-position: center center;

  transition: all 450ms ease;
 }

  .credits_link:hover:before{
   transform: rotateZ(360deg) rotateY(360deg);
  }
/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive: nav & big blocks ---------- */
@media (max-width: 900px) {
  .main-nav {
    display: none;
    position: fixed;
    top: calc(var(--topbar-h) + var(--header-h));
    left: 0; right: 0;
    z-index: 90;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 32px rgba(34,48,60,0.14);
    padding: 6px var(--gutter) 22px;
    max-height: calc(100vh - var(--topbar-h) - var(--header-h));
    overflow-y: auto;
  }
  .site-header.is-sticky .main-nav { top: var(--header-h-sticky); max-height: calc(100vh - var(--header-h-sticky)); }
  .main-nav.nav-open { display: flex; }
  .main-nav a {
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }
  .main-nav a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .about-grid, .contact-grid { grid-template-columns: 1fr !important; }
  .about-portrait { max-width: 420px; margin: 0 auto; }
}

@media (max-width: 560px) {
  .header-actions .btn-primary { display: none; }
}
