/* ============================================
   BRUNO LORENZON — PORTFOLIO
   Based on Artemis template style
   ============================================ */

/* --- FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400;1,700&family=Fragment+Mono&display=swap');

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

:root {
  --cream:     #f8f6f3;
  --cream-2:   #ebe9e4;
  --cream-3:   #e0deda;
  --orange:    #ff5900;
  --navy:      #001666;
  --dark-bg:   #2a3132;
  --gray:      #5f6566;
  --gray-light:#ccc9c4;
  --black:     #1a1a1a;
  --white:     #ffffff;

  --font-serif: 'Libre Baskerville', Georgia, serif;
  --font-sans:  'DM Sans', system-ui, sans-serif;
  --font-mono:  'Fragment Mono', monospace;

  --gap:        160px;
  --gap-md:     100px;
  --gap-sm:     60px;
  --radius:     16px;
  --radius-lg:  24px;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--cream);
  color: var(--black);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* --- TYPOGRAPHY --- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--navy);
  line-height: 1.1;
  text-wrap: balance;
}

h1 { font-size: clamp(52px, 8vw, 110px); }
h2 { font-size: clamp(36px, 5vw, 72px); }
h3 { font-size: clamp(24px, 3vw, 40px); }

p {
  font-family: var(--font-sans);
  color: var(--gray);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.7;
}

/* --- LAYOUT --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.section { padding: var(--gap) 0; }
.section--sm { padding: var(--gap-sm) 0; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: transparent;
  transition: background 0.3s;
}

.nav.scrolled {
  background: rgba(248, 246, 243, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav__logo {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--orange);
  text-align: center;
  line-height: 1.2;
  grid-column: 2;
}

.nav__logo-top {
  display: block;
  font-weight: 700;
  font-style: normal;
}

.nav__logo-bottom {
  display: block;
  font-weight: 700;
  font-style: italic;
}

.nav__links {
  display: flex;
  gap: 40px;
}

.nav__left  { justify-content: flex-start; }
.nav__right { justify-content: flex-end; }

.nav__link {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--gray);
  font-weight: 400;
  transition: color 0.2s;
}

.nav__link:hover { color: var(--navy); }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 100px 80px 60px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  width: 270px;
  height: 72px;
  margin-bottom: 0px;
  position: relative;
  z-index: 2;
  opacity: 0;
}

.hero__eyebrow text,
.hero__eyebrow textPath {
  font-family: var(--font-sans);
  font-size: 16px;
  fill: var(--dark-bg);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.03em;
}

.hero__title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(60px, 5.6vw, 84px);
  color: var(--navy);
  line-height: 1.18;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  text-wrap: balance;
}

.hero__subtitle {
  font-family: var(--font-sans);
  font-size: clamp(15px, 1.3vw, 18px);
  color: var(--gray);
  margin-bottom: 36px;
  max-width: 440px;
  font-weight: 400;
  position: relative;
  z-index: 2;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  padding: 16px 28px;
  border-radius: 100px;
  transition: transform 0.25s, background 0.25s;
  position: relative;
  z-index: 2;
  letter-spacing: -0.01em;
}

.hero__cta:hover {
  background: var(--navy);
  transform: translateY(-2px);
}

.hero__cta svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
}

/* Floating images */
.hero__floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero__float {
  position: absolute;
  border-radius: 14px;
  overflow: hidden;
  will-change: transform;
  box-shadow: 0 16px 48px rgba(0,0,0,0.14);
  transition: transform 0.1s linear;
}

.hero__float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Pulse wrapper — breathing scale, JS enables it after entrance */
.float-pulse {
  width: 100%; height: 100%;
  animation: float-breathe 3s ease-in-out infinite;
  animation-play-state: paused;
}
.hero__float--2 .float-pulse { animation-delay: -1.1s; }
.hero__float--3 .float-pulse { animation-delay: -2.2s; }
.hero__float--4 .float-pulse { animation-delay: -0.7s; }

@keyframes float-breathe {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

/* Top-left: grande, bordo sinistro */
.hero__float--1 {
  width: 280px; height: 310px;
  top: 4vh; left: clamp(-30px, 4vw, 80px);
  transform: rotate(-25deg);
}
/* Top-right: card colorata, bordo destro */
.hero__float--2 {
  width: 245px; height: 265px;
  top: 2vh; right: clamp(-25px, 4vw, 80px);
  transform: rotate(32deg);
}
/* Bottom-left: art print, più interna verso il centro */
.hero__float--3 {
  width: 210px; height: 175px;
  bottom: 8vh; left: clamp(140px, 20%, 300px);
  transform: rotate(-19deg);
}
/* Bottom-right: card orizzontale, piccola, più interna */
.hero__float--4 {
  width: 165px; height: 130px;
  bottom: 8vh; right: clamp(130px, 18%, 280px);
  transform: rotate(12deg);
}

/* ============================================
   SNEAK PEAK / CAROUSEL
   ============================================ */
.sneak {
  padding: var(--gap-sm) 0;
  overflow: hidden;
}

.sneak__label {
  text-align: center;
  margin-bottom: 48px;
}

.sneak__icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.sneak__title {
  font-size: clamp(28px, 3vw, 44px);
}

.sneak__track-wrapper {
  overflow: hidden;
  padding: 20px 0;
}

.sneak__track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: slideTrack 30s linear infinite;
}

.sneak__track:hover { animation-play-state: paused; }

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

.sneak__item {
  width: 280px;
  height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--cream-2);
}

.sneak__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.sneak__item:hover img { transform: scale(1.04); }

/* ============================================
   WORKS GRID
   ============================================ */
.works-section { padding: var(--gap) 0; }

.works-section__header {
  text-align: center;
  margin-bottom: 56px;
}

.works-section__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 16px;
}

.works-section__title { margin-bottom: 16px; }

.works-section__sub {
  max-width: 500px;
  margin: 0 auto;
}

/* Filter pills */
.filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.filter-btn {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 100px;
  border: 1.5px solid var(--cream-3);
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* Project grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  padding: 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s ease;
}

.project-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: 8px;
  background: var(--cream-3);
  flex-shrink: 0;
}

/* Browser mockup variant */
.project-card__image--browser {
  background: #2d2d2d;
  border-radius: 10px;
  aspect-ratio: unset;
  overflow: hidden;
}

.project-card__browser-bar {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  gap: 8px;
  background: #3a3a3a;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.browser-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
}

.dot--red    { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green  { background: #28c840; }

.browser-url {
  flex: 1;
  background: #262626;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 10px;
  color: #777;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  text-align: center;
  max-width: 180px;
  margin: 0 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card__browser-viewport {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 62.5%; /* 10/16 ratio */
  overflow: hidden;
}

/* MacBook mockup variant */
.project-card__image--mac {
  background: #e8f0f5;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  aspect-ratio: 16/10;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) {
  .project-card:hover .project-card__image--mac .mockup-mac {
    transform: scale(1.05);
  }
}

.mockup-mac {
  width: 85%;
  max-height: 90%;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mockup-mac__screen {
  background: #000;
  border-radius: 3% 3% 0.5% 0.5% / 5%;
  margin: 0 auto;
  position: relative;
  width: 80%;
}

.mockup-mac__screen::before {
  border: 2px solid #cacacc;
  border-radius: 3% 3% 0.5% 0.5% / 5%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8) inset, 0 0 1px 2px rgba(255,255,255,0.3) inset;
  content: "";
  display: block;
  padding-top: 67%;
}

.mockup-mac__viewport {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  margin: 4.3% 3.2%;
  background: #f5f5f5;
  overflow: hidden;
}

.project-card__image--mac .project-card__image-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 155%;
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.project-card__image--mac .project-card__image-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

@media (hover: hover) {
  .project-card:hover .project-card__image--mac .project-card__image-inner {
    transform: translateY(-35%);
  }
}

.mockup-mac__base {
  position: relative;
  width: 100%;
}

.mockup-mac__base::before {
  content: "";
  display: block;
  padding-top: 3.3%;
  background: linear-gradient(#eaeced, #edeef0 55%, #fff 55%, #8a8b8f 56%, #999ba0 61%, #4B4B4F 84%, #262627 89%, rgba(0,0,0,.01) 98%);
  border-radius: 0 0 10% 10% / 0 0 50% 50%;
}

.mockup-mac__notch {
  position: relative;
  background: #ddd;
  border-radius: 0 0 7% 7% / 0 0 95% 95%;
  box-shadow: -5px -1px 3px rgba(0,0,0,0.2) inset, 5px -1px 3px rgba(0,0,0,0.2) inset;
  margin: -3.5% auto 0;
  z-index: 2;
  width: 14%;
}

.mockup-mac__notch::before {
  content: "";
  display: block;
  padding-top: 10%;
}

.project-card__placeholder {
  width: 100%; height: 100%;
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
}

@media (hover: hover) {
  .project-card:hover .project-card__placeholder {
    transform: scale(1.04);
  }
}

.project-card__image img {
  transition: transform 0.7s cubic-bezier(0.16,1,0.3,1);
}

@media (hover: hover) {
  .project-card:hover .project-card__image img {
    transform: scale(1.04);
  }
}

/* 3D tilt — driven by JS mousemove, transition on leave only */
.project-card {
  transform-style: preserve-3d;
  will-change: transform;
}

.project-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0;
  margin-top: 18px;
}

.project-card__title {
  font-family: var(--font-sans);
  font-size: 36px;
  color: #2A3132;
  font-style: normal;
  font-weight: 500;
  margin-bottom: 10px;
  line-height: 1.3;
}

.project-card__desc {
  font-size: 16px;
  color: #5F6566;
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}

.project-card__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
}

.project-card__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.project-card__arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2A3132;
  color: #F8F6F3;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(6px) scale(0.85);
  transition: opacity 0.3s cubic-bezier(0.16,1,0.3,1),
              transform 0.3s cubic-bezier(0.16,1,0.3,1);
}

@media (hover: hover) {
  .project-card:hover .project-card__arrow {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (hover: none) {
  .project-card__arrow {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  .project-card {
    touch-action: manipulation;
  }
}

.tag {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  padding: 5px 14px 6px;
  border-radius: 20px;
  background: #2A3132;
  color: #F8F6F3;
}

.tag--outline {
  background: transparent;
  border: 1.5px solid var(--navy);
  color: var(--navy);
}

/* ============================================
   VALUE / "COSA PORTO AL TAVOLO" — floating tags
   ============================================ */
.value {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.value__floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.value__center {
  position: relative;
  z-index: 2;
  text-align: center;
  pointer-events: none;
}

.value__icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.value__title {
  font-family: var(--font-serif);
  font-size: clamp(52px, 6.5vw, 90px);
  color: var(--navy);
  font-style: italic;
  line-height: 1.1;
  margin-bottom: 20px;
}

.value__sub {
  font-family: var(--font-sans);
  font-size: 18px;
  color: var(--gray);
  line-height: 1.55;
  max-width: 500px;
  margin: 0 auto;
}

.value__tag {
  position: absolute;
  background: #2A3132;
  color: #F8F6F3;
  border-radius: 100px;
  padding: 10px 22px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

@media (max-width: 900px) {
  .value__floats { display: none; }
}

/* ============================================
   ABOUT / BEHIND THE CANVAS
   ============================================ */
.about {
  background: var(--dark-bg);
  border-radius: 32px;
  margin: 0 40px;
  padding: var(--gap-md) 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-light);
  margin-bottom: 16px;
}

.about__title {
  font-size: clamp(36px, 4vw, 60px);
  color: var(--cream);
  margin-bottom: 24px;
}

.about__text {
  color: var(--gray-light);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 32px;
}

.about__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 100px;
  transition: transform 0.2s, background 0.2s;
}

.about__cta:hover {
  background: var(--white);
  color: var(--navy);
  transform: translateY(-2px);
}

.about__photo {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 20px;
  overflow: hidden;
  background: var(--gray);
}

.about__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.about__photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: linear-gradient(135deg, #3a4445, #2a3132);
  color: var(--gray-light);
}

/* ============================================
   CONTACT / CTA
   ============================================ */
.contact {
  padding: var(--gap) 0;
  text-align: center;
}

.contact__icon { font-size: 48px; margin-bottom: 16px; }

.contact__title {
  font-size: clamp(36px, 6vw, 80px);
  margin-bottom: 12px;
}

.contact__sub {
  color: var(--gray);
  margin-bottom: 56px;
}

.contact__links {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact__link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  background: var(--cream-2);
  border-radius: 14px;
  border: 1.5px solid var(--cream-3);
  transition: all 0.2s;
  font-size: 15px;
  color: var(--gray);
}

.contact__link-item:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
  transform: translateX(4px);
}

.contact__link-label { font-weight: 500; }
.contact__link-value { font-size: 14px; opacity: 0.8; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--cream-3);
}

.footer__logo {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--orange);
  font-style: italic;
  font-weight: 700;
}

.footer__copy {
  font-size: 13px;
  color: var(--gray-light);
}

/* ============================================
   WORKS PAGE
   ============================================ */
.page-hero {
  padding: 160px 40px 80px;
  text-align: center;
}

.page-hero__title { margin-bottom: 20px; }
.page-hero__sub { max-width: 500px; margin: 0 auto; }

/* ============================================
   CASE STUDY PAGE
   ============================================ */
.case-hero {
  padding: 160px 40px 80px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.case-hero__title { font-size: clamp(32px, 4.5vw, 60px); margin-bottom: 20px; }
.case-hero__desc { max-width: 640px; margin: 0 auto 32px; font-size: 18px; }
.case-hero__tags { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.case-cover {
  margin: 0 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--cream-2);
}

.case-cover img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.case-cover-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  background: linear-gradient(135deg, var(--cream-2), var(--cream-3));
}

.case-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 100px 40px;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 40px 0;
  border-top: 1px solid var(--cream-3);
  border-bottom: 1px solid var(--cream-3);
  margin-bottom: 64px;
}


.case-meta__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-light);
  margin-bottom: 6px;
}
.case-meta__value {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}

.case-section { margin-bottom: 100px; }

.case-section__title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-light);
  margin-bottom: 12px;
}

.case-section__heading {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 44px);
  font-style: italic;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 20px;
}

.case-section__text {
  font-size: 17px;
  color: var(--black);
  line-height: 1.8;
}

.case-image {
  margin: 48px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream-2);
}

.case-image img { width: 100%; }

.case-image-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: linear-gradient(135deg, var(--cream-2), var(--cream-3));
}

.case-image--wide {
  margin: 48px -40px;
  border-radius: 0;
}

/* Next project */
.case-next {
  padding: var(--gap-sm) 40px;
  text-align: center;
  border-top: 1px solid var(--cream-3);
}

.case-next__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 12px;
}

.case-next__title {
  font-size: clamp(28px, 4vw, 52px);
  transition: color 0.2s;
}

.case-next:hover .case-next__title { color: var(--orange); }

/* ============================================
   CASE STUDY — EXTENDED COMPONENTS
   ============================================ */

/* Eyebrow above title */
.case-hero__eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 20px;
}

/* Full-width image block (replaces small case-image) */
.case-full-image {
  margin: 0 40px 120px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream-2);
  aspect-ratio: 16/9;
}

/* Image scroll animation */
.img-reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: opacity 1s cubic-bezier(0.16,1,0.3,1),
              transform 1s cubic-bezier(0.16,1,0.3,1);
}
.img-reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Section stagger */
.case-section__title  { transition-delay: 0s; }
.case-section__heading { transition-delay: 0.1s; }
.case-section__text   { transition-delay: 0.2s; }

.case-full-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  padding: 48px 80px;
}

.case-full-image img[src$=".webp"],
.case-full-image img[src$=".jpg"],
.case-full-image img[src$=".png"] {
  object-fit: cover;
  padding: 0;
}

.case-full-image__inner {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 24px 32px;
  position: relative;
}

.case-img-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
}

/* Bullet lists */
.case-list {
  margin: 20px 0 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-list li {
  font-size: 17px;
  color: var(--black);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}

.case-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gray-light);
  font-weight: 400;
}

.case-list--bold li { font-weight: 500; }

/* Metrics row */
.case-metrics {
  display: flex;
  gap: 0;
  margin-top: 36px;
  border-top: 1px solid var(--cream-3);
  border-bottom: 1px solid var(--cream-3);
}

.case-metrics--grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.case-metric {
  flex: 1;
  padding: 24px 0;
  border-right: 1px solid var(--cream-3);
  padding-right: 24px;
  margin-right: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-metric:last-child {
  border-right: none;
  padding-right: 0;
  margin-right: 0;
}

.case-metric__value {
  font-family: var(--font-serif);
  font-size: 32px;
  font-style: italic;
  color: var(--navy);
  line-height: 1;
}

.case-metric__label {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.4;
}

/* System box (input → motore → output) */
.case-system-box {
  margin-top: 28px;
  border: 1px solid var(--cream-3);
  border-radius: var(--radius);
  overflow: hidden;
}

.case-system-box__row {
  display: flex;
  gap: 24px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--cream-3);
  align-items: baseline;
}

.case-system-box__row:last-child { border-bottom: none; }

.case-system-box__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-light);
  flex-shrink: 0;
  width: 72px;
}

.case-system-box__value {
  font-size: 15px;
  color: var(--black);
  line-height: 1.6;
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Fade up — default reveal */
.fade-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.fade-up-delay-1 { transition-delay: 0.25s; }
.fade-up-delay-2 { transition-delay: 0.50s; }
.fade-up-delay-3 { transition-delay: 0.70s; }

/* Case study stagger items */
.case-stagger {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--sd, 0s);
}
.case-stagger.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card reveal — slide up with scale */
.card-reveal {
  opacity: 0;
  transform: translateY(56px) scale(0.97);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.card-reveal-delay-1 { transition-delay: 0.1s; }
.card-reveal-delay-2 { transition-delay: 0.22s; }
.card-reveal-delay-3 { transition-delay: 0.34s; }
.card-reveal-delay-4 { transition-delay: 0.46s; }
.card-reveal-delay-5 { transition-delay: 0.1s; }
.card-reveal-delay-6 { transition-delay: 0.22s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  :root { --gap: 100px; }
  .about { grid-template-columns: 1fr; gap: 48px; padding: 64px 48px; }
  .about__photo { max-width: 320px; margin: 0 auto; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .case-meta { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --gap: 48px; --gap-md: 64px; --gap-sm: 32px; }
  .container { padding: 0 24px; }
  .nav { padding: 20px 24px; }
  .nav__right li:first-child { display: none; }
  .hero { padding: 80px 24px 40px; }
  .hero__float--1, .hero__float--2 { width: 140px; height: 170px; }
  .hero__float--3, .hero__float--4 { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .about { margin: 0 16px; padding: 32px 24px; }
  .case-meta { grid-template-columns: repeat(2, 1fr); }
  .case-body { padding: var(--gap-sm) 24px; }
  .case-cover { margin: 0 16px; }
  .case-full-image { margin: 0 16px 60px; aspect-ratio: unset; }
  .case-full-image img { height: auto; padding: 24px; object-fit: unset; }
  .case-full-image picture img { padding: 8px; }
  .case-full-image img[src$=".webp"],
  .case-full-image img[src$=".jpg"],
  .case-full-image img[src$=".png"] { height: 260px; object-fit: cover; padding: 0; }
  .case-image--wide { margin: 48px -24px; }
  .page-hero, .case-hero { padding: 120px 24px 60px; }
  .case-metrics { flex-direction: column; border: none; gap: 0; }
  .case-metrics--grid { grid-template-columns: repeat(2, 1fr); }
  .case-metric { border-right: none; border-bottom: 1px solid var(--cream-3); padding-right: 0; margin-right: 0; padding-bottom: 16px; margin-bottom: 0; }
  .case-metric:last-child { border-bottom: none; }
  .case-system-box__row { flex-direction: column; gap: 6px; }
  .case-system-box__label { width: auto; }
}
