/* =========================================================
   PUPILLA DIGITALE — stylesheet
   Palette: notte torinese (blu navy) + luce dorata (Mole)
   ========================================================= */

:root{
  --navy-950: #081226;
  --navy-900: #0c1c38;
  --navy-800: #13294f;
  --navy-700: #1c3862;
  --gold-600: #c68a1f;
  --gold-500: #dba43a;
  --gold-400: #e8b954;
  --paper: #f7f5f0;
  --paper-dim: #ece8de;
  --ink: #16223b;
  --ink-soft: #4d5872;
  --line: #dcd6c6;
  --white: #ffffff;
  --panna: #f2ead6;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", "Segoe UI", Arial, sans-serif;

  --container: 1180px;
  --radius: 3px;
  --shadow-card: 0 18px 40px -22px rgba(8,18,38,0.35);
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--paper);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block;}
a{color:inherit;text-decoration:none;}
ul{margin:0;padding:0;list-style:none;}
h1,h2,h3,h4{
  font-family:var(--font-display);
  font-weight:600;
  line-height:1.15;
  margin:0 0 .5em;
  color:var(--navy-950);
}
p{margin:0 0 1em;}
.container{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:0 28px;
}
.visually-hidden{
  position:absolute!important;width:1px;height:1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;
}
:focus-visible{outline:3px solid var(--gold-500);outline-offset:2px;}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  gap:.5em;
  padding:14px 30px;
  font-family:var(--font-body);
  font-weight:600;
  font-size:.95rem;
  border-radius:var(--radius);
  border:1px solid transparent;
  cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
  letter-spacing:.01em;
}
.btn:hover{transform:translateY(-1px);}
.btn-gold{
  background:linear-gradient(135deg,var(--gold-400),var(--gold-600));
  color:var(--navy-950);
}
.btn-gold:hover{box-shadow:0 12px 24px -10px rgba(198,138,31,.55);}
.btn-outline{
  background:transparent;
  border-color:rgba(255,255,255,.55);
  color:var(--white);
}
.btn-outline:hover{background:rgba(255,255,255,.1);}
.btn-outline-dark{
  background:transparent;
  border-color:var(--navy-800);
  color:var(--navy-900);
}
.btn-outline-dark:hover{background:var(--navy-900);color:var(--white);}
.btn-block{width:100%;justify-content:center;}

/* ---------- header / nav ---------- */
.site-header{
  position:fixed;
  top:0;left:0;right:0;
  z-index:100;
  background:var(--navy-950);
  border-bottom:1px solid rgba(255,255,255,.08);
  transition:transform .35s ease;
}
.site-header.header--hidden{transform:translateY(-100%);}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 28px;
  gap:24px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--white);
}
.brand-mark{
  width:38px;height:38px;flex:none;
}
.brand-text{
  font-family:var(--font-display);
  font-size:1.05rem;
  font-weight:600;
  letter-spacing:.03em;
  color:var(--white);
}
.brand-text small{
  display:block;
  font-family:var(--font-body);
  font-size:.6rem;
  font-weight:500;
  letter-spacing:.16em;
  color:var(--gold-500);
  margin-top:2px;
}
.main-nav{display:flex;min-width:0;}
.main-nav ul{display:flex;flex-wrap:nowrap;gap:0;}
.main-nav a{
  display:block;
  padding:10px 9px;
  font-size:.72rem;
  font-weight:500;
  letter-spacing:.02em;
  color:rgba(255,255,255,.82);
  border-radius:var(--radius);
  transition:color .15s ease, background-color .15s ease;
  white-space:nowrap;
}
.main-nav a:hover,
.main-nav a.active{color:var(--white);background:rgba(255,255,255,.08);}
.main-nav a.active{box-shadow:inset 0 -2px 0 var(--gold-500);}
.nav-toggle{
  display:none;
  background:none;border:none;color:var(--white);
  width:40px;height:40px;cursor:pointer;
}
.nav-toggle span,.nav-toggle::before,.nav-toggle::after{
  content:"";display:block;height:2px;background:var(--white);margin:7px 6px;
}

@media (max-width: 1180px){
  .main-nav{
    position:absolute;top:100%;left:0;right:0;
    background:var(--navy-950);
    max-height:0;overflow:hidden;
    transition:max-height .3s ease;
  }
  .main-nav.open{max-height:600px;}
  .main-nav ul{flex-direction:column;flex-wrap:nowrap;padding:8px 20px 20px;}
  .main-nav a{padding:12px 6px;font-size:.9rem;}
  .nav-toggle{display:block;}
}
@media (min-width:1181px) and (max-width:1320px){
  .main-nav a{padding:9px 6px;font-size:.66rem;}
  .brand-text{font-size:.92rem;}
}

/* ---------- hero ---------- */
.hero{
  position:relative;
  background:linear-gradient(160deg,var(--navy-950) 0%,var(--navy-800) 100%);
  color:var(--white);
  padding:168px 0 88px;
  overflow:hidden;
}
.hero-grid{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:48px;
  align-items:center;
  position:relative;
  z-index:2;
}
.hero-eyebrow{
  font-size:.78rem;
  letter-spacing:.14em;
  color:var(--gold-500);
  font-weight:600;
  margin-bottom:16px;
}
.hero h1{
  color:var(--white);
  font-size:clamp(2.1rem,4vw,3.1rem);
  margin-bottom:.35em;
}
.hero h1 em{
  font-style:normal;
  color:var(--gold-500);
  display:block;
}
.hero .lede{
  font-size:1.08rem;
  color:rgba(255,255,255,.82);
  max-width:46ch;
  margin-bottom:1.6em;
}
.hero-actions{display:flex;gap:14px;flex-wrap:wrap;}
.hero-art{position:relative;}
.skyline-dots{
  position:absolute;inset:0;
  background-image:radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
  background-size:16px 16px;
  opacity:.5;
  z-index:1;
  mask-image:linear-gradient(to bottom, transparent, black 40%);
}
.page-hero{
  background:linear-gradient(160deg,var(--navy-950) 0%,var(--navy-800) 100%);
  color:var(--white);
  padding:150px 0 64px;
  position:relative;
  overflow:hidden;
}
.page-hero .container{position:relative;z-index:2;}
.page-hero-eyebrow{
  font-size:.78rem;letter-spacing:.14em;color:var(--gold-500);font-weight:600;margin-bottom:14px;
}
.page-hero h1{color:var(--white);font-size:clamp(1.9rem,3.6vw,2.7rem);max-width:20ch;}
.page-hero .lede{color:rgba(255,255,255,.78);max-width:56ch;font-size:1.02rem;margin-top:10px;}

/* ---------- sections ---------- */
section{padding:84px 0;}
.section-tight{padding:56px 0;}
.section-alt{background:var(--paper-dim);}
.section-navy{background:var(--navy-950);color:var(--white);}
.section-navy h2,.section-navy h3{color:var(--white);}
.section-head{
  max-width:720px;
  margin:0 0 44px;
}
.section-head.centered{margin-left:auto;margin-right:auto;text-align:center;}
.section-kicker{
  font-size:.76rem;
  letter-spacing:.14em;
  font-weight:600;
  color:var(--gold-600);
  margin-bottom:10px;
  display:block;
}
.section-navy .section-kicker{color:var(--gold-500);}
.section-head h2{font-size:clamp(1.6rem,2.8vw,2.15rem);}
.section-head p{color:var(--ink-soft);font-size:1.02rem;}
.section-navy .section-head p{color:rgba(255,255,255,.75);}
.section-rule{
  width:56px;height:3px;background:var(--gold-500);margin:16px 0;border-radius:2px;
}
.centered .section-rule{margin-left:auto;margin-right:auto;}

/* ---------- grids & cards ---------- */
.grid{display:grid;gap:28px;}
.grid-2{grid-template-columns:repeat(2,1fr);}
.grid-3{grid-template-columns:repeat(3,1fr);}
.grid-4{grid-template-columns:repeat(4,1fr);}
.grid-5{grid-template-columns:repeat(5,1fr);}

.service-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:30px 26px;
  text-align:left;
  cursor:pointer;
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  display:block;
  width:100%;
}
.service-card:hover{
  border-color:var(--gold-500);
  box-shadow:var(--shadow-card);
  transform:translateY(-3px);
}
.icon-badge{
  width:52px;height:52px;
  border-radius:50%;
  border:1.5px solid var(--gold-500);
  display:flex;align-items:center;justify-content:center;
  margin-bottom:18px;
  color:var(--navy-900);
  flex:none;
}
.icon-badge svg{width:24px;height:24px;stroke:var(--navy-900);}
.icon-badge--invert{border-color:var(--panna);}
.icon-badge--invert svg{stroke:var(--panna);}
.service-card h3{font-size:1.08rem;margin-bottom:.4em;}
.service-card p{color:var(--ink-soft);font-size:.94rem;margin:0;}

.info-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:32px 28px;
}
.info-card h3{font-size:1.12rem;}
.info-card p{color:var(--ink-soft);font-size:.95rem;margin-bottom:0;}

.stat-row{display:flex;gap:40px;flex-wrap:wrap;margin-top:8px;}
.stat{min-width:120px;}
.stat .num{font-family:var(--font-display);font-size:2.1rem;color:var(--gold-500);display:block;}
.stat .label{font-size:.82rem;color:rgba(255,255,255,.7);letter-spacing:.03em;}

.split{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:56px;
  align-items:center;
}
.split.reverse .split-media{order:2;}

.media-frame{
  border-radius:var(--radius);
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow:var(--shadow-card);
}

.anchor-target{scroll-margin-top:110px;}

.detail-block{
  padding:52px 0;
  border-top:1px solid var(--line);
}
.detail-block:first-of-type{border-top:none;}
.detail-block .icon-badge{margin-bottom:14px;}
.detail-block h3{font-size:1.4rem;}
.detail-grid{
  display:grid;
  grid-template-columns:.55fr 1fr;
  gap:44px;
  align-items:start;
}

/* ---------- team ---------- */
.team-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(190px,1fr));
  gap:26px;
}
.team-card{text-align:center;}
.avatar{
  width:104px;height:104px;
  border-radius:50%;
  margin:0 auto 14px;
  display:flex;align-items:center;justify-content:center;
  font-family:var(--font-display);
  font-size:1.5rem;
  color:var(--white);
  border:2px solid var(--gold-500);
}
.team-card .name{font-weight:600;font-size:.98rem;color:var(--navy-950);}
.team-card .role{font-size:.82rem;color:var(--gold-600);font-weight:600;letter-spacing:.02em;}

/* ---------- timeline / process ---------- */
.process-list{display:flex;flex-direction:column;}
.process-item{
  display:grid;grid-template-columns:64px 1fr;gap:22px;
  padding:22px 0;border-top:1px solid var(--line);
}
.process-item:first-child{border-top:none;}
.process-mark{
  font-family:var(--font-display);color:var(--gold-600);font-size:1.3rem;
}

/* ---------- projects ---------- */
.project-card{
  position:relative;
  border-radius:var(--radius);
  overflow:hidden;
  min-height:280px;
  display:flex;align-items:flex-end;
  color:var(--white);
  border:1px solid var(--navy-800);
}
.project-card .overlay{
  position:absolute;inset:0;
  background:linear-gradient(200deg,transparent 15%, rgba(8,18,38,.92) 92%);
}
.project-card .content{position:relative;z-index:2;padding:26px;}
.project-card .content span{
  font-size:.72rem;letter-spacing:.12em;color:var(--gold-500);font-weight:600;
}
.project-card .content h3{color:var(--white);margin:.3em 0 0;font-size:1.2rem;}

/* ---------- news ---------- */
.news-card{
  background:var(--white);border:1px solid var(--line);border-radius:var(--radius);
  overflow:hidden;display:flex;flex-direction:column;
}
.news-card .news-media{
  height:170px;
}
.news-card .news-body{padding:22px 24px;flex:1;display:flex;flex-direction:column;}
.news-tag{
  font-size:.7rem;letter-spacing:.1em;font-weight:700;color:var(--gold-600);text-transform:uppercase;
}
.news-date{font-size:.78rem;color:var(--ink-soft);margin-bottom:10px;display:block;}
.news-card h3{font-size:1.08rem;margin:.3em 0 .5em;}
.news-card p{color:var(--ink-soft);font-size:.92rem;flex:1;}
.news-readmore{font-size:.85rem;font-weight:600;color:var(--navy-900);border-top:1px solid var(--line);padding-top:12px;margin-top:auto;}
.news-featured{
  background:var(--navy-950);color:var(--white);border-radius:var(--radius);
  padding:40px;display:grid;grid-template-columns:1fr 1fr;gap:32px;align-items:center;margin-bottom:44px;
}
.news-featured h3{color:var(--white);font-size:1.6rem;}
.news-featured p{color:rgba(255,255,255,.8);}

/* ---------- forms ---------- */
.form-panel{
  background:var(--white);border:1px solid var(--line);border-radius:var(--radius);
  padding:36px;
}
.field{margin-bottom:20px;}
.field label{
  display:block;font-size:.85rem;font-weight:600;margin-bottom:7px;color:var(--navy-950);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea{
  width:100%;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  font-family:var(--font-body);
  font-size:.95rem;
  background:var(--paper);
  color:var(--ink);
}
.field textarea{min-height:130px;resize:vertical;}
.field input:focus,.field textarea:focus{outline:none;border-color:var(--gold-500);background:var(--white);}
.file-field{
  border:1.5px dashed var(--line);
  border-radius:var(--radius);
  padding:22px;
  text-align:center;
  background:var(--paper);
  font-size:.88rem;
  color:var(--ink-soft);
}
.file-field input{margin-top:10px;}
.form-note{font-size:.82rem;color:var(--ink-soft);margin-top:14px;}
.form-success{
  display:none;background:#eef7ee;border:1px solid #bfe3bf;color:#255d25;
  padding:16px 18px;border-radius:var(--radius);font-size:.9rem;margin-bottom:18px;
}

/* ---------- CTA banner ---------- */
.cta-banner{
  background:linear-gradient(135deg,var(--navy-900),var(--navy-950));
  color:var(--white);
  border-radius:var(--radius);
  padding:56px;
  display:flex;justify-content:space-between;align-items:center;gap:32px;flex-wrap:wrap;
}
.cta-banner h2{color:var(--white);margin-bottom:.2em;font-size:1.7rem;}
.cta-banner p{color:rgba(255,255,255,.75);margin:0;}

/* ---------- back to top ---------- */
.back-to-top{
  display:inline-flex;align-items:center;gap:10px;
  margin:0 auto;
  padding:12px 26px;
  border:1px solid var(--navy-800);
  border-radius:40px;
  background:var(--white);
  color:var(--navy-950);
  font-size:.82rem;
  font-weight:600;
  letter-spacing:.04em;
  cursor:pointer;
}
.back-to-top:hover{background:var(--navy-950);color:var(--white);}
.back-to-top-wrap{text-align:center;padding:36px 0 0;}

/* ---------- footer ---------- */
.site-footer{
  background:var(--navy-950);
  color:rgba(255,255,255,.72);
  padding:64px 0 26px;
}
.footer-grid{
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr 1fr;
  gap:36px;
  padding-bottom:36px;
  border-bottom:1px solid rgba(255,255,255,.12);
}
.footer-brand .brand-text{color:var(--white);}
.footer-brand p{font-size:.9rem;color:rgba(255,255,255,.6);margin-top:14px;max-width:32ch;}
.footer-col h4{
  color:var(--white);font-family:var(--font-body);font-size:.78rem;
  letter-spacing:.1em;text-transform:uppercase;margin-bottom:16px;
}
.footer-col ul li{margin-bottom:10px;}
.footer-col a{font-size:.9rem;color:rgba(255,255,255,.72);}
.footer-col a:hover{color:var(--gold-500);}
.social-row{display:flex;gap:12px;margin-top:16px;}
.social-row a{
  width:36px;height:36px;border-radius:50%;border:1px solid rgba(255,255,255,.25);
  display:flex;align-items:center;justify-content:center;
}
.social-row a:hover{border-color:var(--gold-500);color:var(--gold-500);}
.social-row svg{width:16px;height:16px;}
.footer-bottom{
  display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;
  padding-top:22px;font-size:.8rem;color:rgba(255,255,255,.5);
}
.footer-bottom a{color:rgba(255,255,255,.5);}
.footer-bottom a:hover{color:var(--gold-500);}

/* ---------- utility ---------- */
.mt-0{margin-top:0;}
.text-center{text-align:center;}
.eyebrow-list{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px;}
.pill{
  font-size:.72rem;font-weight:600;letter-spacing:.06em;
  padding:6px 14px;border:1px solid var(--line);border-radius:40px;color:var(--ink-soft);
}
.section-navy .pill{border-color:rgba(255,255,255,.25);color:rgba(255,255,255,.75);}

/* ---------- scroll reveal animations ---------- */
.reveal{
  opacity:0;
  transform:translateY(28px);
  filter:blur(7px);
  transition:opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1), filter .8s ease;
  will-change:opacity, transform, filter;
}
.reveal.is-visible{opacity:1;transform:translateY(0);filter:blur(0);}
.reveal-delay-1.is-visible{transition-delay:.08s;}
.reveal-delay-2.is-visible{transition-delay:.16s;}
.reveal-delay-3.is-visible{transition-delay:.24s;}
.reveal-delay-4.is-visible{transition-delay:.32s;}
@media (prefers-reduced-motion: reduce){
  .reveal{opacity:1;transform:none;filter:none;transition:none;}
}

/* ---------- photo hero (Torino / Mole Antonelliana) ---------- */
.photo-hero{
  position:relative;
  border-radius:var(--radius);
  overflow:hidden;
  aspect-ratio:4/5;
  background:#0a1730;
}
.photo-hero img{
  width:100%;height:100%;object-fit:cover;display:block;
}
.photo-hero .photo-overlay{
  position:absolute;inset:0;
  background:linear-gradient(200deg, rgba(8,18,38,0) 30%, rgba(8,18,38,.85) 100%);
}
.photo-hero .partner-badge{
  position:absolute;left:20px;bottom:20px;right:20px;
  display:flex;align-items:center;gap:12px;
  background:rgba(8,18,38,.72);
  border:1px solid rgba(255,255,255,.18);
  backdrop-filter:blur(3px);
  padding:14px 16px;
  border-radius:var(--radius);
}
.partner-badge .dot{width:10px;height:10px;border-radius:50%;background:var(--gold-500);flex:none;}
.partner-badge .wordmark{
  font-family:var(--font-display);
  font-weight:700;
  font-size:1.15rem;
  color:#fff;
  letter-spacing:.01em;
}
.partner-badge .wordmark span{color:var(--gold-500);}
.partner-badge small{display:block;font-family:var(--font-body);font-size:.66rem;letter-spacing:.1em;color:rgba(255,255,255,.6);}

.photo-bg-section{
  position:relative;
  overflow:hidden;
  isolation:isolate;
}
.photo-bg-section .bg-photo{
  position:absolute;inset:0;z-index:0;
}
.photo-bg-section .bg-photo img{
  width:100%;height:100%;object-fit:cover;
  filter:blur(3px) brightness(.55) saturate(1.05);
  transform:scale(1.06);
}
.photo-bg-section .bg-photo::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(100deg,var(--navy-950) 18%, rgba(12,28,56,.55) 60%, rgba(12,28,56,.25) 100%);
}
.photo-bg-section > .container{position:relative;z-index:1;}

.illus-card{
  border-radius:var(--radius);
  overflow:hidden;
  border:1px solid var(--line);
  line-height:0;
}
.illus-card img,.illus-card svg{width:100%;height:100%;display:block;object-fit:cover;}

.stat-row-light{display:flex;gap:36px;flex-wrap:wrap;margin-top:18px;}
.stat-row-light .stat .num{color:var(--gold-600);}
.stat-row-light .stat .label{color:var(--ink-soft);}

/* ---------- article page ---------- */
.article-topbar{
  display:flex;justify-content:space-between;align-items:center;
  padding:150px 0 18px;
}
.article-back{
  display:inline-flex;align-items:center;gap:8px;
  font-size:.82rem;font-weight:600;color:var(--navy-950);
}
.article-back svg{width:16px;height:16px;transform:rotate(180deg);}
.article-hero-img{
  border-radius:var(--radius);overflow:hidden;margin:18px 0 36px;
  aspect-ratio:16/7;
}
.article-hero-img img,.article-hero-img svg{width:100%;height:100%;object-fit:cover;}
.article-body{max-width:74ch;margin:0 auto;font-size:1.04rem;color:var(--ink);}
.article-body p{margin-bottom:1.3em;}
.article-meta{display:flex;gap:14px;align-items:center;margin-bottom:18px;color:var(--ink-soft);font-size:.85rem;}
.article-nav{
  display:flex;justify-content:space-between;gap:20px;
  border-top:1px solid var(--line);margin-top:52px;padding-top:28px;
  max-width:74ch;margin-left:auto;margin-right:auto;
}
.article-nav a{
  display:flex;align-items:center;gap:10px;font-size:.88rem;font-weight:600;color:var(--navy-950);
  max-width:45%;
}
.article-nav a.next{margin-left:auto;text-align:right;flex-direction:row-reverse;}
.article-nav svg{width:18px;height:18px;flex:none;}
.article-nav .prev svg{transform:rotate(180deg);}

/* ---------- responsive ---------- */
@media (max-width: 900px){
  .hero{padding-top:140px;}
  .hero-grid{grid-template-columns:1fr;}
  .hero-art{order:-1;}
  .split{grid-template-columns:1fr;}
  .split.reverse .split-media{order:0;}
  .detail-grid{grid-template-columns:1fr;}
  .grid-2,.grid-3,.grid-4,.grid-5{grid-template-columns:repeat(2,1fr);}
  .footer-grid{grid-template-columns:1fr 1fr;}
  .news-featured{grid-template-columns:1fr;}
  .cta-banner{padding:36px;}
}
@media (max-width: 900px){
  .photo-hero{aspect-ratio:16/11;}
}
@media (max-width: 560px){
  .grid-2,.grid-3,.grid-4,.grid-5{grid-template-columns:1fr;}
  .footer-grid{grid-template-columns:1fr;}
  .hero,.page-hero{padding-top:120px;}
  .cta-banner{flex-direction:column;text-align:center;}
  section{padding:56px 0;}
}
