/* Portfolio — sfondo scuro neutro: le tre demo portano i colori */
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-latin-300-normal.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('fonts/archivo-latin-wdth-normal.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

:root {
  --bg: #0e0f12; --bg2: #15171b; --line: rgba(255, 255, 255, .1); --line2: rgba(255, 255, 255, .18);
  --text: #f1f2f4; --muted: #a2a8b1;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gut: clamp(20px, 5vw, 56px);
}
body { font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; background: var(--bg); color: var(--text); overflow-x: clip; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: radial-gradient(900px 600px at 15% -10%, rgba(184, 138, 68, .13), transparent 70%), radial-gradient(800px 600px at 100% 30%, rgba(198, 255, 61, .07), transparent 70%), radial-gradient(900px 700px at 40% 110%, rgba(192, 100, 58, .12), transparent 70%); pointer-events: none; }
.wrap { width: min(1320px, 100% - var(--gut) * 2); margin-inline: auto; }
:focus-visible { outline: 3px solid #fff; outline-offset: 4px; border-radius: 6px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; transition: background .3s, box-shadow .3s; }
.site-header.is-stuck { background: rgba(14, 15, 18, .85); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand em { font-style: normal; font-weight: 400; color: var(--muted); margin-left: 4px; }
.brand-dot { width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(#b88a44 0 33%, #c0643a 0 66%, #c6ff3d 0); box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); }
.head-nav { display: flex; gap: 6px; }
.head-nav a { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid transparent; font-size: .92rem; font-weight: 500; text-decoration: none; color: #d4d8de; transition: border-color .25s, background .25s, color .25s; }
.head-nav a:hover { border-color: var(--line2); background: rgba(255, 255, 255, .06); color: #fff; }

/* Intro */
.intro { position: relative; padding: clamp(56px, 11vw, 150px) 0 clamp(80px, 11vw, 150px); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.kicker { display: flex; align-items: center; gap: 14px; font-size: .82rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 26px; }
.kicker::before { content: ''; width: 40px; height: 1px; background: currentColor; }
h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(3rem, 8.2vw, 7.6rem); line-height: .98; letter-spacing: -.03em; }
h1 em { font-style: italic; font-weight: 400; background: linear-gradient(100deg, #d9b06a, #c0643a 50%, #c6ff3d); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.intro-side p:not(.pick) { color: #c3c8d0; font-size: 1.15rem; max-width: 40ch; }
.pick { display: flex; align-items: center; gap: 12px; margin-top: 28px; font-size: .9rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.pick span { width: 10px; height: 10px; border-radius: 50%; background: #c6ff3d; box-shadow: 0 0 0 0 rgba(198, 255, 61, .6); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(198, 255, 61, .55); } 70%, 100% { box-shadow: 0 0 0 12px rgba(198, 255, 61, 0); } }
.scroll-cue { position: absolute; left: 50%; bottom: 24px; translate: -50% 0; display: grid; justify-items: center; gap: 8px; font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.scroll-cue i { width: 1px; height: 40px; background: linear-gradient(#fff, transparent); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%, 100% { transform: scaleY(.3); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* Card */
.projects { padding: 0 0 clamp(80px, 10vw, 140px); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); align-items: stretch; }
.card { --accent: #fff; position: relative; }
.card-barber { --accent: #d9b06a; } .card-resto { --accent: #e0825a; } .card-fit { --accent: #c6ff3d; }
.card article { position: relative; height: 100%; display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; transition: transform .5s var(--ease), border-color .4s, box-shadow .5s; isolation: isolate; }
.card article::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%); }
.card:hover article, .card:focus-within article { transform: translateY(-10px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 40px 70px -34px color-mix(in srgb, var(--accent) 45%, #000); }
.card:hover article::before { opacity: 1; }

.media { position: relative; aspect-ratio: 4 / 4.6; overflow: hidden; background: #111; }
.media > img, .media .m-disc { transition: transform 1.1s var(--ease); }
.card:hover .m-bg { transform: scale(1.06); }
.m-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m-obj { position: absolute; left: 50%; top: 50%; translate: -50% -50%; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .45)); transition: transform 1.1s var(--ease); }
.card-barber .m-obj { height: 76%; width: auto; top: 54%; }
.card-resto .media { background: #f1e6cc; }
.card-resto .m-disc { position: absolute; width: 74%; aspect-ratio: 1; left: 13%; top: 14%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #77803f, #5b6130 55%, #3f4522); box-shadow: 0 0 0 10px rgba(192, 100, 58, .0), 0 0 0 1px rgba(63, 69, 34, .4); }
.card-resto .m-disc::after { content: ''; position: absolute; inset: -6%; border-radius: 50%; border: 2px dashed rgba(192, 100, 58, .75); }
.card-resto .m-obj { width: 92%; height: auto; top: 50%; }
.card-fit .media { background: #181b1f; }
.card-fit .m-obj { width: 78%; height: auto; top: 54%; }
.card:hover .m-obj { transform: scale(1.07) rotate(-2deg); }
.card-resto:hover .m-obj { transform: scale(1.06) rotate(10deg); }
.card:hover .m-disc { transform: scale(1.04); }

.chrome { position: absolute; z-index: 4; left: 14px; right: 14px; top: 14px; display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: rgba(14, 15, 18, .72); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; font-size: .75rem; color: #c9ced6; }
.chrome i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .28); }
.chrome i:nth-child(1) { background: #ff6a5f; } .chrome i:nth-child(2) { background: #ffbd3a; } .chrome i:nth-child(3) { background: #3bd16f; }
.chrome span { margin-left: 8px; letter-spacing: .02em; }
.m-chips { position: absolute; z-index: 4; left: 14px; right: 14px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; transform: translateY(14px); opacity: 0; transition: transform .5s var(--ease), opacity .4s; }
.m-chips li { padding: 7px 13px; border-radius: 999px; background: rgba(14, 15, 18, .85); border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); color: #fff; font-size: .78rem; font-weight: 600; }
.card:hover .m-chips, .card:focus-within .m-chips { transform: none; opacity: 1; }

.body { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 12px; padding: 28px 28px 30px; flex: 1; }
.num { position: absolute; right: 24px; top: 20px; font-family: var(--serif); font-size: 3.4rem; font-weight: 300; line-height: 1; color: rgba(255, 255, 255, .12); }
.cat { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); max-width: 80%; }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.2vw, 2.7rem); line-height: 1.05; letter-spacing: -.02em; }
.desc { color: #bdc2ca; font-size: 1rem; }
.swatches { display: flex; gap: 8px; margin-top: 4px; }
.swatches li { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.btn { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 12px; padding: 15px 24px; border-radius: 999px; background: var(--accent); color: #111; font-weight: 700; font-size: .98rem; text-decoration: none; transition: gap .3s var(--ease), transform .25s, background .25s; }
.body > .swatches + .btn { margin-top: 18px; }
.btn::after { content: ''; position: absolute; inset: 0; z-index: 5; }
.btn:hover { gap: 18px; }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline-offset: 5px; }
.card:has(.btn:focus-visible) article { box-shadow: 0 0 0 3px #fff; }

/* Dietro le quinte */
.facts { padding: clamp(56px, 8vw, 110px) 0; border-top: 1px solid var(--line); }
.facts h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(1.8rem, 3.6vw, 2.8rem); margin-bottom: 36px; letter-spacing: -.02em; }
.facts-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2.4vw, 32px); }
.facts-list li { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 1px solid var(--line2); }
.facts-list strong { font-size: 2.4rem; font-weight: 800; font-stretch: 112%; line-height: 1; letter-spacing: -.02em; }
.facts-list span { color: var(--muted); font-size: .98rem; }

.footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: .9rem; }
.foot-in { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-in p { max-width: 70ch; }
.to-top { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: #fff; border: 1px solid var(--line2); padding: 11px 18px; border-radius: 999px; font-weight: 600; transition: background .25s, color .25s, transform .25s; }
.to-top:hover { background: #fff; color: #111; transform: translateY(-2px); }

@media (max-width: 1100px) {
  .cards { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
  .media { aspect-ratio: 16 / 11; }
  .card-barber .m-obj { height: 88%; top: 56%; }
  .card-resto .m-disc { width: 60%; left: 20%; top: 16%; }
  .card-resto .m-obj { width: 70%; }
  .card-fit .m-obj { width: 58%; top: 55%; }
  .intro-grid { grid-template-columns: 1fr; align-items: start; }
  .facts-list { grid-template-columns: repeat(2, 1fr); }
  .scroll-cue { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .head-nav { display: none; }
  .brand em { display: inline; }
  h1 { font-size: clamp(2.8rem, 14vw, 4rem); }
  .media { aspect-ratio: 4 / 3.6; }
  .facts-list { grid-template-columns: 1fr; }
  .body { padding: 24px 22px 26px; }
}
@media (hover: none) { .m-chips { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .card:hover article, .card:focus-within article { transform: none; }
  .card:hover .m-obj, .card:hover .m-bg, .card:hover .m-disc, .card-resto:hover .m-obj { transform: none; }
  .pick span, .scroll-cue i { animation: none; }
}
