/* ==========================================================================
   BLACKENED TATTOO STUDIO — stylesheet
   Palette: near-black ground, light turquoise + comic-red accents (from logo)
   Type: Big Shoulders Display (headlines) / IBM Plex Sans (body) / IBM Plex Mono (labels)
   Signature: halftone dot divider — echoes the logo's polka-dot star AND the
   studio's dot-work tattoo style.
   ========================================================================== */

:root{
  --black:      #0a0c0d;
  --charcoal:   #15181a;
  --charcoal-2: #1d2123;
  --line:       #2a2f31;
  --paper:      #f4f0e7;
  --paper-dim:  #cfc9bd;
  --gray:       #8a918e;
  --turq:       #49d9cf;
  --turq-dim:   #1f4643;
  --red:        #e8402f;
  --red-dim:    #3a1a15;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin: 0;
  background: var(--black);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }

::selection{ background: var(--turq); color: var(--black); }

.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;
}

.eyebrow{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--turq);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before{
  content: "";
  width: 22px;
  height: 1px;
  background: var(--turq);
  display: inline-block;
}

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

#studio, #lavori, #eventi, #contatti{
  scroll-margin-top: 84px;
}

h1,h2,h3{
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 0.94;
}

/* ---------- reveal-on-scroll ---------- */
/* content is visible immediately — no scroll-triggered animation,
   avoids any perceived "loading" glitch */
.reveal{ opacity: 1; transform: none; }

/* ==========================================================================
   TOP NAV
   ========================================================================== */
.nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: linear-gradient(to bottom, rgba(8,10,11,0.96) 0%, rgba(8,10,11,0.85) 70%, rgba(8,10,11,0) 100%);
  padding-bottom: 34px;
  pointer-events: none;
}
.nav *{ pointer-events: auto; }
.nav__mark{
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10,12,13,0.5);
  backdrop-filter: blur(6px);
}
.nav__mark strong{ color: var(--turq); font-weight: 700; }
.nav__links{
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav__links a{
  color: var(--paper-dim);
  transition: color 0.25s ease;
}
.nav__links a:hover, .nav__links a:focus-visible{ color: var(--turq); }
@media (max-width: 720px){
  .nav__links{ display: none; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero{
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--black);
}
.hero__media-wrap{
  position: relative;
  flex: 1;
  min-height: 100svh;
  overflow: hidden;
}
.hero__media{
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(0.62);
  transform: scale(1.04);
}
.hero__scrim{
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,7,8,0.55) 0%, rgba(6,7,8,0.22) 30%, rgba(6,7,8,0.4) 66%, rgba(6,7,8,0.95) 100%);
  z-index: 1;
}
.hero__content{
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 118px var(--gutter) 60px;
  gap: 20px;
  min-height: 100%;
  justify-content: flex-start;
}
.hero__logo{
  width: min(320px, 60vw);
  filter: drop-shadow(0 18px 46px rgba(0,0,0,0.65)) drop-shadow(0 2px 10px rgba(0,0,0,0.5));
}
.hero__tag{
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin: 0;
  max-width: 60ch;
}
.hero__tag b{ color: var(--red); font-weight: 600; }
.hero__addr{ margin-top: -6px; }
.hero__addr a{
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--turq);
  border-bottom: 1px solid var(--turq-dim);
  padding-bottom: 2px;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.hero__addr a:hover{ color: var(--paper); border-color: var(--turq); }

.scroll-cue{
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 1px;
  height: 46px;
  background: var(--line);
  overflow: hidden;
}
.scroll-cue::after{
  content: "";
  position: absolute;
  top: -46px;
  left: 0;
  width: 1px;
  height: 46px;
  background: var(--turq);
  animation: cue 2.1s ease-in-out infinite;
}
@keyframes cue{
  0%{ top: -46px; }
  60%{ top: 46px; }
  100%{ top: 46px; }
}

/* ==========================================================================
   HALFTONE DIVIDER — signature element
   ========================================================================== */
.halftone{
  height: 52px;
  width: 100%;
  background: var(--black);
  background-image: radial-gradient(circle, var(--dot-color, var(--turq)) 2.1px, transparent 2.3px);
  background-size: 13px 13px;
  background-position: center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 6%, black 94%, transparent 100%),
                       radial-gradient(ellipse 62% 130% at 50% 50%, black 55%, transparent 92%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  opacity: 1;
}
.halftone--red{ --dot-color: var(--red); }
.halftone--mix{
  background-image:
    radial-gradient(circle, var(--turq) 2.1px, transparent 2.3px),
    radial-gradient(circle, var(--red) 1.7px, transparent 1.9px);
  background-size: 13px 13px, 21px 21px;
  background-position: center, 7px 3px;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about{
  background: var(--black);
  padding: 0 0 96px;
}

/* ---------- FOLLOW THE INK — marquee ticker ---------- */
.marquee{
  background: #0d1113;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  padding: 26px 0;
  margin-bottom: 64px;
}
.marquee__track{
  display: inline-flex;
  align-items: center;
  gap: 40px;
  animation: marquee-scroll 26s linear infinite;
  will-change: transform;
}
.marquee__track span{
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 4.4vw, 46px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--turq);
}
.marquee__dot{
  color: var(--red) !important;
  font-size: 16px !important;
  transform: translateY(-6px);
}
@keyframes marquee-scroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce){
  .marquee__track{ animation: none; }
}
.about__grid{
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
}
.about__photo{
  position: relative;
  border: 1px solid var(--line);
}
.about__photo img{
  width: 100%;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.6s ease;
}
.about__photo:hover img{ filter: grayscale(0.15) contrast(1.05); }
.about__photo::before{
  content: "";
  position: absolute;
  top: -10px; left: -10px;
  right: 10px; bottom: 10px;
  border: 1px solid var(--turq-dim);
  z-index: -1;
  pointer-events: none;
}
.about__body h2{
  font-size: clamp(34px, 5vw, 54px);
  margin-top: 14px;
  margin-bottom: 22px;
  color: var(--paper);
}
.about__body h2 em{
  font-style: normal;
  color: var(--turq);
}
.about__text{
  color: var(--paper-dim);
  font-size: 17px;
  line-height: 1.75;
  max-width: 46ch;
  margin: 0 0 30px;
}
.styles-list{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.styles-list li{
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  border: 1px solid var(--line);
  padding: 9px 14px;
  border-radius: 999px;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.styles-list li:nth-child(3n+1):hover{ border-color: var(--turq); color: var(--turq); }
.styles-list li:nth-child(3n+2):hover{ border-color: var(--red); color: var(--red); }
.styles-list li:nth-child(3n+3):hover{ border-color: var(--turq); color: var(--turq); }

@media (max-width: 860px){
  .about__grid{ grid-template-columns: 1fr; }
  .about{ padding: 0 0 64px; }
}

/* ==========================================================================
   WORK / GALLERY
   ========================================================================== */
.work{
  background: var(--charcoal);
  padding: 96px 0 100px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.work__head{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 46px;
  flex-wrap: wrap;
}
.work__head h2{
  font-size: clamp(32px, 4.6vw, 50px);
  margin-top: 14px;
}
.work__note{
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--gray);
  max-width: 34ch;
  line-height: 1.6;
}
.work__grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  gap: 10px;
}
.work__item{
  position: relative;
  overflow: hidden;
  background: var(--charcoal-2);
  border: 1px solid var(--line);
}
.work__item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1), filter 0.5s ease;
  filter: grayscale(0.35) contrast(1.05);
}
.work__item:hover img{
  transform: scale(1.06);
  filter: grayscale(0) contrast(1.05);
}
.work__item--a{ grid-column: span 2; grid-row: span 2; }
.work__item--b{ grid-column: span 2; grid-row: span 1; }

@media (max-width: 980px){
  .work__grid{ grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .work__item--a{ grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 560px){
  .work__grid{ grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; gap: 8px; }
  .work__item--a{ grid-column: span 2; grid-row: span 2; }
}

/* ==========================================================================
   EVENTS
   ========================================================================== */
.events{
  background: var(--black);
  padding: 100px 0 100px;
}
.events__head h2{
  font-size: clamp(32px, 4.6vw, 50px);
  margin-top: 14px;
  margin-bottom: 44px;
}
.events__list{
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.event{
  background: var(--black);
  padding: 26px clamp(16px,3vw,28px);
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 20px;
  align-items: center;
}
.event__date{
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--turq);
}
.event__body h3{
  font-family: var(--body);
  font-weight: 700;
  text-transform: none;
  font-size: 17px;
  letter-spacing: 0;
  margin-bottom: 4px;
  color: var(--paper);
}
.event__body p{
  margin: 0;
  color: var(--gray);
  font-size: 14.5px;
  max-width: 60ch;
}
.event__pill{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid var(--red-dim);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  justify-self: end;
}
@media (max-width: 680px){
  .event{ grid-template-columns: 1fr; gap: 8px; }
  .event__pill{ justify-self: start; }
}

/* ==========================================================================
   CONTACT / FOOTER
   ========================================================================== */
.contact{
  background: var(--charcoal);
  border-top: 1px solid var(--line);
  padding: 100px 0 40px;
}
.contact__top{
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(30px, 6vw, 90px);
  padding-bottom: 64px;
}
.contact__top h2{
  font-size: clamp(38px, 7vw, 76px);
  color: var(--paper);
}
.contact__top h2 span{ color: var(--turq); }
.contact__cta{
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--turq);
  padding: 14px 22px;
  border-radius: 999px;
  transition: transform 0.25s ease, background 0.25s ease;
}
.contact__cta:hover{ transform: translateY(-2px); background: #6fe5dc; }

.info-list{
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.info-list dt{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 6px;
}
.info-list dd{
  margin: 0;
  font-size: 17px;
  color: var(--paper);
}
.info-list a{
  border-bottom: 1px solid var(--line);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.info-list a:hover{ color: var(--turq); border-color: var(--turq); }

@media (max-width: 860px){
  .contact__top{ grid-template-columns: 1fr; gap: 46px; }
}

.contact__bottom{
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--gray);
  letter-spacing: 0.04em;
}
.contact__bottom a:hover{ color: var(--turq); }

/* ==========================================================================
   FLOATING ACTIONS — WhatsApp (right) / Instagram (left)
   ========================================================================== */
.float-btn{
  position: fixed;
  bottom: max(22px, env(safe-area-inset-bottom, 22px));
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.float-btn:hover{ transform: translateY(-3px) translateZ(0); }
.float-btn__icon{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.float-btn__icon svg{ width: 19px; height: 19px; }

.float-btn--whatsapp{
  right: 22px;
  background: #25D366;
  color: #ffffff;
}
.float-btn--whatsapp .float-btn__icon{ background: rgba(255,255,255,0.16); }
.float-btn--whatsapp .float-btn__icon svg{ fill: #ffffff; }

.float-btn--instagram{
  left: 22px;
  color: #ffffff;
  background: radial-gradient(circle at 30% 110%, #ffdb73 0%, #fd5949 26%, #d6249f 55%, #285AEB 100%);
}
.float-btn--instagram .float-btn__icon{ background: rgba(255,255,255,0.18); }
.float-btn--instagram .float-btn__icon svg{ stroke: #ffffff; }

@keyframes floatIn{
  from{ opacity: 0; transform: translateY(16px) scale(0.94); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}
.float-btn{ animation: floatIn 0.6s cubic-bezier(.2,.7,.2,1) both; animation-delay: 1.1s; opacity: 0; }
.float-btn--instagram{ animation-delay: 1.3s; }

@media (max-width: 560px){
  .float-btn{ padding: 12px; }
  .float-btn__label{ display: none; }
  .float-btn__icon{ width: 26px; height: 26px; }
}

/* ==========================================================================
   LIGHTBOX — galleria a schermo intero
   ========================================================================== */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6,7,8,0.94);
  backdrop-filter: blur(4px);
  padding: 60px 20px;
}
.lightbox.is-open{ display: flex; }
.lightbox__img{
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  border: 1px solid var(--line);
}
.lightbox__close{
  position: absolute;
  top: 18px;
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line);
  color: var(--paper);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.lightbox__close:hover{ background: var(--turq); color: var(--black); }

.lightbox__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--line);
  color: var(--paper);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.lightbox__nav:hover{ background: var(--turq); color: var(--black); }
.lightbox__nav--prev{ left: 16px; }
.lightbox__nav--next{ right: 16px; }

.work__item{
  cursor: zoom-in;
  border: 1px solid var(--line);
  background: var(--charcoal-2);
  padding: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.work__item:focus-visible{
  outline: 2px solid var(--turq);
  outline-offset: 2px;
}

@media (max-width: 640px){
  .lightbox{ padding: 90px 14px; }
  .lightbox__nav{ width: 44px; height: 44px; font-size: 24px; }
  .lightbox__close{ width: 40px; height: 40px; font-size: 22px; }
}
