/* Light In Design – fotografia di architettura e interni */

@font-face { font-family: "Manrope"; src: url("fonts/manrope-variable.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("fonts/cormorant.woff2") format("woff2"); font-weight: 300 500; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("fonts/cormorant-italic.woff2") format("woff2"); font-weight: 300 500; font-style: italic; font-display: swap; }

:root {
  --bg: #f5f4f1;
  --paper: #fbfaf8;
  --ink: #1b1b1a;
  --soft: #5d5c58;
  --line: #dcd9d2;
  --accent: #fb8953;      /* l'arancio della casetta del logo */
  --accent-ink: #b94f1f;  /* stesso arancio, leggibile come testo su fondo chiaro */
  --dark: #111111;
  --sans: "Manrope", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Cormorant", "Iowan Old Style", Georgia, serif;
  --gut: clamp(16px, 4vw, 56px);
  --gut-l: max(var(--gut), env(safe-area-inset-left, 0px));   /* iPhone in orizzontale: non finire sotto la tacca */
  --gut-r: max(var(--gut), env(safe-area-inset-right, 0px));
  --max: 1440px;
  --head: 84px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--head); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 300; letter-spacing: -.02em; line-height: 1.08; margin: 0; }
p, h1, h2, h3, li, dd, blockquote { overflow-wrap: break-word; }
p { margin: 0 0 1em; }
.legal p { overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-left: var(--gut-l); padding-right: var(--gut-r); }
.label { font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--soft); margin: 0; }
.arr { display: inline-block; transition: transform .4s var(--ease); }
@media (hover: hover) { a:hover .arr { transform: translateX(6px); } }
.more { display: inline-flex; gap: .6em; align-items: center; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.btn { display: inline-flex; gap: .8em; align-items: center; padding: 16px 28px; background: var(--ink); color: #fff; border: 0; border-radius: 0; font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background .3s; }
.btn:hover { background: #000; }
.btn:disabled { opacity: .5; cursor: wait; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--head); display: flex; align-items: center; justify-content: space-between; padding-left: var(--gut-l); padding-right: var(--gut-r); padding-top: env(safe-area-inset-top, 0px); height: calc(var(--head) + env(safe-area-inset-top, 0px)); background: rgba(245, 244, 241, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: background .4s, border-color .4s, height .4s; }
.scrolled .site-header { border-bottom-color: var(--line); }
.brand { display: block; position: relative; z-index: 60; width: clamp(150px, 16vw, 210px); }
.logo { width: 100%; height: auto; transition: opacity .4s; }
.logo-light { position: absolute; inset: 0; opacity: 0; }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.nav a { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; position: relative; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.nav a:hover::after, .nav a[aria-current]::after { transform: scaleX(1); }
.nav a[aria-current]::after { background: var(--accent); height: 2px; }
.nav-ig { display: flex; }
.nav-ig::after { display: none; }
.menu-btn { display: none; }

/* header trasparente sopra le foto scure, finché non si scorre */
.over-dark:not(.scrolled):not(.menu-open) .site-header { background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,0)); backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; }
.over-dark:not(.scrolled):not(.menu-open) .logo-dark { opacity: 0; }
.over-dark:not(.scrolled):not(.menu-open) .logo-light { opacity: 1; }

main { min-height: 60vh; }
body:not(.over-dark) main { padding-top: var(--head); }

/* immagini: compaiono dolcemente quando sono caricate */
.js main img { opacity: 0; transition: opacity .9s var(--ease); }
.js main img.in { opacity: 1; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- home */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; background: var(--dark); color: #fff; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.js .hero-img.in { animation: slowzoom 18s var(--ease) both; }
@keyframes slowzoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.62) 0%, rgba(0,0,0,.15) 45%, rgba(0,0,0,0) 70%); pointer-events: none; }
.hero-text { position: absolute; inset: auto 0 clamp(48px, 9vh, 96px); z-index: 2; }
.hero-text .label { color: rgba(255,255,255,.82); margin-bottom: 18px; }
.hero h1 { font-size: clamp(40px, 6.6vw, 104px); font-weight: 250; max-width: 12ch; letter-spacing: -.035em; }
.hero-links { display: flex; gap: 28px; margin-top: 34px; }
.hero-links a { font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.6); transition: border-color .3s; }
.hero-links a:hover { border-color: var(--accent); }
.hero-links.dark a { border-color: var(--ink); }
.scroll-cue { position: absolute; right: var(--gut-r); bottom: clamp(48px, 9vh, 96px); z-index: 2; width: 1px; height: 64px; background: rgba(255,255,255,.35); overflow: hidden; }
.scroll-cue i { position: absolute; left: 0; top: 0; width: 1px; height: 24px; background: #fff; animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { from { transform: translateY(-24px); } to { transform: translateY(64px); } }

.intro { display: grid; grid-template-columns: 1fr 2.2fr; gap: 40px; padding-block: clamp(80px, 12vw, 180px) clamp(56px, 8vw, 110px); }
.intro h2 { font-size: clamp(30px, 3.8vw, 58px); max-width: 18ch; margin-bottom: 32px; }
.intro p:not(.label) { font-size: 19px; color: var(--soft); max-width: 58ch; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 48px); }
.card { display: block; }
.card-img { overflow: hidden; aspect-ratio: 4 / 5; background: #e6e3dd; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease), opacity .9s var(--ease); }
@media (hover: hover) { .card:hover .card-img img { transform: scale(1.04); } }
.card-text { padding-top: 28px; }
.card h2 { font-size: clamp(34px, 4vw, 60px); margin: 10px 0 18px; }
.card p { color: var(--soft); max-width: 52ch; }
.card .more { margin-top: 10px; }
.cards .card:nth-child(2) { margin-top: clamp(0px, 10vw, 140px); }

.clients { display: grid; grid-template-columns: 1fr 2.2fr; gap: 40px; padding-block: clamp(90px, 12vw, 170px); }
.clients .drone { margin-top: 22px; font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.35; color: var(--ink); max-width: 22ch; }
.clients ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); counter-reset: c; }
.clients li { padding: 30px 30px 34px 0; border-bottom: 1px solid var(--line); counter-increment: c; }
.clients li:nth-child(odd) { border-right: 1px solid var(--line); }
.clients li:nth-child(even) { padding-left: 30px; }
.clients li::before { content: "0" counter(c); display: block; font-size: 12px; font-weight: 600; letter-spacing: .2em; color: var(--accent-ink); margin-bottom: 18px; }
.clients h3 { font-size: 24px; font-weight: 400; margin-bottom: 10px; }
.clients li p { color: var(--soft); margin: 0; font-size: 16px; }

.pause { position: relative; margin: 0; min-height: 80vh; display: flex; align-items: flex-end; background: var(--dark); color: #fff; overflow: hidden; }
.pause img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pause::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,.05) 60%); }
.pause figcaption { position: relative; z-index: 2; padding-block: clamp(48px, 8vw, 110px); }
.pause blockquote { margin: 0 0 22px; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(26px, 3.4vw, 50px); line-height: 1.2; max-width: 30ch; }
.pause .label { color: rgba(255,255,255,.8); }

.about-teaser { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 110px); align-items: center; padding-block: clamp(90px, 12vw, 170px); }
.at-img { overflow: hidden; }
.at-copy h2 { font-size: clamp(34px, 4vw, 60px); margin: 14px 0 24px; }
.at-copy p:not(.label) { color: var(--soft); font-size: 19px; max-width: 46ch; margin-bottom: 30px; }

/* ---------------------------------------------------------------- gallerie */
.g-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: end; padding-block: clamp(70px, 9vw, 130px) clamp(40px, 5vw, 70px); }
.g-head h1 { font-size: clamp(56px, 9vw, 150px); letter-spacing: -.045em; margin-top: 12px; }
.g-head > p { color: var(--soft); font-size: 18px; max-width: 60ch; margin: 0; }

.justified { --rowh: clamp(240px, 26vw, 460px); display: flex; flex-wrap: wrap; gap: clamp(10px, 1.2vw, 18px); }
.justified::after { content: ""; flex: 2 1 0; }
.justified figure { margin: 0; flex: var(--r) 1 calc(var(--r) * var(--rowh)); min-width: 0; }
.justified figure:first-child { flex-basis: 100%; }
.justified a { display: block; overflow: hidden; background: #e6e3dd; cursor: zoom-in; }
.justified img { width: 100%; height: auto; transition: transform 1.2s var(--ease), opacity .9s var(--ease); }
@media (hover: hover) { .justified a:hover img { transform: scale(1.025); } }
.justified figcaption { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--soft); padding-top: 10px; }

.next { display: flex; flex-direction: column; gap: 10px; padding-block: clamp(80px, 10vw, 150px); border-bottom: 1px solid var(--line); }
.next-title { font-size: clamp(48px, 8vw, 130px); font-weight: 250; letter-spacing: -.04em; line-height: 1; }
.next:hover .next-title { color: var(--accent-ink); }

/* ---------------------------------------------------------------- banner (chi sono, contatti) */
.banner { position: relative; margin: 0; height: 72vh; min-height: 420px; background: var(--dark); overflow: hidden; }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner::after { content: ""; position: absolute; inset: 0 0 auto; height: 160px; background: linear-gradient(rgba(0,0,0,.4), rgba(0,0,0,0)); }
.banner figcaption { position: absolute; right: var(--gut-r); bottom: 20px; color: rgba(255,255,255,.88); text-shadow: 0 1px 8px rgba(0,0,0,.5); }

.about { padding-block: clamp(70px, 9vw, 130px); }
.about-head { margin-bottom: clamp(40px, 6vw, 90px); }
.about-head h1, .contact-head h1, .legal h1, .notfound h1 { font-size: clamp(56px, 9vw, 140px); letter-spacing: -.045em; margin-top: 12px; }
.about-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 6vw, 110px); align-items: start; }
.about-photo { margin: 0; position: sticky; top: calc(var(--head) + 30px); }
.about-body p { color: var(--soft); max-width: 62ch; }
.about-body .lead { font-family: var(--serif); font-style: italic; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.3; color: var(--ink); margin-bottom: 1.2em; }
.sign { font-family: var(--serif); font-style: italic; font-size: 30px; color: var(--ink) !important; margin: 40px 0 36px; }

/* ---------------------------------------------------------------- contatti */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 7vw, 120px); padding-block: clamp(70px, 9vw, 130px); }
.contact-head > p:not(.label) { color: var(--soft); font-size: 19px; margin: 28px 0 14px; }
.big-mail { display: inline-block; font-size: clamp(22px, 2.6vw, 34px); font-weight: 300; border-bottom: 1px solid var(--line); padding-bottom: 6px; transition: border-color .3s, color .3s; word-break: break-all; }
.big-mail:hover { border-color: var(--accent); color: var(--accent-ink); }
.ig { margin-top: 26px; }
.ig a { display: inline-flex; gap: 10px; align-items: center; font-size: 15px; color: var(--soft); }
.ig a:hover { color: var(--ink); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; align-content: start; background: var(--paper); padding: clamp(24px, 4vw, 56px); border: 1px solid var(--line); }
.form-intro { grid-column: 1 / -1; color: var(--soft); margin: 0; }
.field { display: flex; flex-direction: column; gap: 8px; }
.wide { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.field input, .field textarea, .field select { font: inherit; font-size: 17px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid #bdb9b0; border-radius: 0; padding: 8px 0 10px; -webkit-appearance: none; appearance: none; transition: border-color .3s; }
.field select { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235d5c58' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 4px center; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-bottom-color: var(--ink); }
.field [aria-invalid="true"] { border-bottom-color: #c0392b; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--soft); line-height: 1.5; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.check a { text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.form-status { margin: 0; font-size: 15px; }
.form-status.ok { color: #2e6b3a; }
.form-status.err { color: #b0322a; }

/* ---------------------------------------------------------------- privacy, 404 */
.legal { max-width: 860px; padding-block: clamp(60px, 8vw, 120px); }
.legal h1 { margin-bottom: 40px; }
.legal h2 { font-size: 24px; font-weight: 500; margin: 44px 0 12px; }
.legal p { color: var(--soft); }
.legal a { text-decoration: underline; }
.legal .updated { font-size: 14px; margin-top: 48px; }
.notfound { padding-block: clamp(90px, 14vw, 200px); }
.notfound > p:not(.label) { color: var(--soft); font-size: 19px; margin-top: 20px; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--dark); color: #e9e7e2; margin-top: clamp(40px, 6vw, 80px); }
.p-index .site-footer, .p-esterni .site-footer, .p-interni .site-footer { margin-top: 0; }
.foot-cta { padding-block: clamp(70px, 9vw, 130px) clamp(50px, 6vw, 80px); }
.foot-cta .label { color: #a7a49d; margin-bottom: 18px; }
.foot-mail { font-size: clamp(30px, 5.4vw, 84px); font-weight: 250; letter-spacing: -.035em; line-height: 1.1; word-break: break-word; transition: color .3s; }
.foot-mail:hover { color: var(--accent); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 30px; padding-block: 28px calc(36px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid #2c2c2b; font-size: 13px; color: #a7a49d; }
.foot-bottom nav { display: flex; gap: 26px; }
.foot-bottom a:hover { color: #fff; }

/* ---------------------------------------------------------------- lightbox */
.lb { position: fixed; inset: 0; z-index: 200; background: #0d0d0d; color: #fff; display: none; }
.lb.open { display: block; }
.lb figure { position: absolute; inset: 64px 72px 72px; margin: 0; display: flex; align-items: center; justify-content: center; }
.lb img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; opacity: 1; transition: opacity .35s; user-select: none; -webkit-user-drag: none; }
.lb img.loading { opacity: 0; }
.lb-bar { position: absolute; inset: auto 0 0; height: calc(72px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); display: flex; align-items: center; justify-content: space-between; padding-inline: 24px; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.lb button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; padding: 0; width: 56px; height: 56px; display: grid; place-items: center; opacity: .75; transition: opacity .2s; }
.lb button:hover { opacity: 1; }
.lb-close { top: calc(8px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); }
.lb-prev { left: 8px; top: 50%; translate: 0 -50%; }
.lb-next { right: 8px; top: 50%; translate: 0 -50%; }
.lb svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.4; }
body.lb-on { overflow: hidden; }

/* ---------------------------------------------------------------- tablet e telefono */
@media (max-width: 960px) {
  :root { --head: 68px; }
  .menu-btn { display: flex; align-items: center; gap: 12px; position: relative; z-index: 60; background: none; border: 0; color: inherit; font: 600 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; padding: 10px 0; cursor: pointer; }
  .menu-btn i { position: relative; width: 22px; height: 8px; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; transition: transform .3s, height .3s; }
  .menu-open .menu-btn i { height: 0; border-bottom: 0; transform: rotate(45deg); }
  .menu-open .menu-btn i::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; border-top: 1px solid currentColor; transform: rotate(-90deg); }
  .nav { position: fixed; inset: 0; z-index: 55; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: var(--head) var(--gut-r) calc(40px + env(safe-area-inset-bottom, 0px)) var(--gut-l); overflow-y: auto; background: var(--bg); color: var(--ink); opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .nav a { font-size: clamp(34px, 9vw, 56px); font-weight: 250; letter-spacing: -.03em; text-transform: none; }
  .nav a::after { display: none; }
  .nav a[aria-current] { color: var(--accent-ink); }
  .nav-ig { margin-top: 24px; }
  .menu-open { overflow: hidden; }
  /* backdrop-filter farebbe da contenitore al menu a tutto schermo: va tolto quando è aperto */
  .menu-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .intro, .clients, .g-head, .contact { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { position: static; max-width: 560px; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .cards { grid-template-columns: 1fr; gap: 64px; }
  .cards .card:nth-child(2) { margin-top: 0; }
  .clients ol { grid-template-columns: 1fr; }
  .clients li, .clients li:nth-child(even) { padding: 26px 0 28px; border-right: 0; }
  .about-teaser { grid-template-columns: 1fr; }
  .justified figure { flex-basis: 100%; }
  .form { grid-template-columns: 1fr; }
  .lb figure { inset: calc(56px + env(safe-area-inset-top, 0px)) 0 calc(64px + env(safe-area-inset-bottom, 0px)); }
  .lb-prev, .lb-next { display: none !important; }
  .banner { height: 56vh; }
  .hero-links { gap: 22px; }
  /* citazione sopra la foto: più ombra, perché sul telefono il testo copre metà immagine */
  .pause { min-height: 88vh; }
  .pause::after { background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,.05) 80%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .site-footer, .scroll-cue { display: none; }
  .js main img { opacity: 1; }
}
