/* Emanuele Riva — rivaemanuele.it
   Palette: platino (fondo), grafite (testo), acciaio (secondario),
   blu quadrante (sezioni scure), lume (unico accento, solo su blu). */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --platinum: #e8eaeb;
  --graphite: #202327;
  --steel-text: #4f565d;
  --line: #c1c7cb;
  --dial: #14263b;
  --dial-2: #1f3855;
  --lume: #c9e8b9;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--platinum);
  color: var(--graphite);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--dial);
  outline-offset: 3px;
}

.section--dark :focus-visible {
  outline-color: var(--lume);
}

.skip {
  position: absolute;
  top: -5rem;
  left: var(--gutter);
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--graphite);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.skip:focus {
  top: 1rem;
}

/* ---------- Hero: piano d'acciaio con riflesso che segue il puntatore ---------- */

.hero {
  --x: 50%;
  --y: 40%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100svh;
  padding: 1.5rem var(--gutter) clamp(2rem, 6vh, 4rem);
  overflow: hidden;
  background: linear-gradient(180deg, #c7ccd0 0%, #aeb5bb 55%, #9ca4ab 100%);
}

.hero__metal {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    circle 42vmax at var(--x) var(--y),
    rgba(255, 255, 255, 0.92),
    rgba(255, 255, 255, 0.34) 38%,
    rgba(255, 255, 255, 0) 70%
  );
}

/* Grana orizzontale: l'effetto "satinato" dell'acciaio spazzolato */
.hero__metal::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='600'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.12 0 0 0 0 0.14 0.9 0 0 0 -0.15'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 100% 600px;
  background-repeat: repeat-y;
}

.nav {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 450;
  font-stretch: 100%;
}

.nav a {
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  text-decoration: none;
}

.nav a:hover {
  border-bottom-color: currentColor;
}

.hero__body {
  position: relative;
  z-index: 1;
}

.hero__name {
  margin: 0;
  font-family: var(--sans);
  font-weight: 200;
  font-stretch: 125%;
  font-size: clamp(3.4rem, 14.5vw, 12.5rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
}

.hero__role {
  max-width: 30rem;
  margin: 1.75rem 0 0;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.5;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 0;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--dial);
  background: var(--dial);
  color: var(--platinum);
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 500;
  font-stretch: 100%;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: transparent;
  color: var(--dial);
}

.btn--ghost {
  background: transparent;
  color: var(--dial);
}

.btn--ghost:hover {
  background: var(--dial);
  color: var(--platinum);
}

/* ---------- Sezioni ---------- */

.section {
  padding: clamp(4rem, 10vw, 9rem) var(--gutter);
}

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

.section--ruled {
  border-top: 1px solid var(--line);
}

.section__title {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-stretch: 112%;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.section__lede {
  max-width: 34rem;
  margin: 0.75rem 0 0;
  color: var(--steel-text);
}

/* ---------- Lavori ---------- */

.works {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem) var(--gutter);
  align-items: start;
  margin: clamp(2.5rem, 6vw, 5rem) 0 0;
  padding: 0;
  list-style: none;
}

.work {
  grid-column: 1 / -1;
}

.work--a { --ratio: 5 / 4; }
.work--b { --ratio: 4 / 5; }
.work--c { --ratio: 4 / 5; }
.work--d { --ratio: 3 / 2; }
.work--e { --ratio: 3 / 2; }
.work--f { --ratio: 1 / 1; }

@media (min-width: 760px) {
  .work--a { grid-column: 1 / 8; }
  .work--b { grid-column: 8 / 13; margin-top: clamp(3rem, 10vw, 9rem); }
  .work--c { grid-column: 1 / 6; margin-top: clamp(1rem, 4vw, 4rem); }
  .work--d { grid-column: 6 / 13; }
  .work--e { grid-column: 1 / 8; }
  .work--f { grid-column: 8 / 13; margin-top: clamp(3rem, 10vw, 9rem); }
}

.shot {
  position: relative;
  margin: 0 0 1rem;
  overflow: hidden;
  aspect-ratio: var(--ratio, 4 / 3);
  background: linear-gradient(135deg, var(--dial) 0%, var(--dial-2) 100%);
}

/* Riflesso fisso sul segnaposto: sparisce sotto la foto quando c'è */
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.12) 50%, transparent 62%);
}

.shot img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot__empty {
  position: absolute;
  bottom: 0.9rem;
  left: 1rem;
  z-index: 0;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--lume);
}

.work__title {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-stretch: 100%;
  font-size: 1.2rem;
  line-height: 1.3;
}

.work__text {
  max-width: 28rem;
  margin: 0.25rem 0 0;
  color: var(--steel-text);
}

/* ---------- Chi sono ---------- */

.about {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 820px) {
  .about {
    grid-template-columns: 5fr 6fr;
    gap: var(--gutter);
    align-items: start;
  }
}

.about__portrait {
  --ratio: 4 / 5;
  max-width: 26rem;
  margin: 0;
}

.about__text {
  max-width: 36rem;
}

.about__text p {
  margin: 1.25rem 0 0;
}

/* ---------- Clienti ---------- */

.clients__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 3rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-weight: 250;
  font-stretch: 112%;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.3;
}

/* ---------- Contatti ---------- */

.contact__title {
  max-width: 14ch;
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-stretch: 112%;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.contact__mail {
  display: inline-block;
  margin-top: clamp(1.75rem, 4vw, 3rem);
  font-family: var(--sans);
  font-weight: 300;
  font-stretch: 100%;
  font-size: clamp(1.25rem, 4.6vw, 3.2rem);
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: rgba(232, 234, 235, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.contact__mail:hover {
  color: var(--lume);
  text-decoration-color: var(--lume);
}

.contact__list {
  display: grid;
  gap: 0.6rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  color: #c5ccd3;
}

.contact__list a {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.contact__list a:hover {
  color: var(--lume);
}

/* ---------- Piè di pagina ---------- */

.foot {
  padding: 1.5rem var(--gutter);
  border-top: 1px solid rgba(232, 234, 235, 0.14);
  background: var(--dial);
  color: #9faab6;
  font-family: var(--sans);
  font-size: 0.88rem;
}

.foot p {
  margin: 0;
}
