/* Capo Santa Croce — sito v3
   Palette del sito attuale caposantacroce.com e del gestionale: navy, ambra, crema, carta, pietra.
   Ogni <section> corrisponde a un container Elementor. */



*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--bar); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-body)/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd, address { margin: 0; }
h1, h2, h3 { font-family: var(--csc-display); font-weight: 400; }
/* Bodoni a taglio ottico medio e peso 500: filetti più robusti, leggibili anche sul fondo chiaro */
h2, h3 { font-weight: 500; font-variation-settings: "opsz" 28; }
h2 { font-size: var(--t-head); line-height: 1.06; letter-spacing: -.02em; text-wrap: balance; }
h3 { font-size: clamp(30px, 2.6vw, 40px); line-height: 1.08; letter-spacing: -.01em; }
address { font-style: normal; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
::selection { background: var(--gold); color: var(--ink); }
.statement { font-size: var(--t-state); line-height: 1.45; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--paper); padding: 10px 16px; }
.skip:focus { left: 8px; }

/* Pulsante unico: ambra piena, testo navy, angoli vivi */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 26px;
  background: var(--gold); color: var(--ink);
  font: 600 15px/1.2 var(--text); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  border: 0; border-radius: 0; cursor: pointer;
  transition: background-color .25s, color .25s, transform .15s;
}
.btn:hover { background: var(--ink); color: var(--on-ink); }
.btn:active { transform: translateY(1px); }
.bar .btn:hover, .light .btn:hover, .hero .btn:hover { background: var(--cream); color: var(--ink); }
.btn-block { display: flex; width: 100%; min-height: 54px; }
.link { font-weight: 600; }

/* ---------- Barra ---------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: var(--bar);
  display: flex; align-items: center; gap: clamp(20px, 3vw, 44px);
  padding: 0 var(--csc-m);
  color: var(--on-ink);
}
/* fondo navy su un livello a parte: sopra la foto d'apertura la sua opacità segue lo scroll (--bar-fill da v3.js) */
.bar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); opacity: 1; }
.bar.over-hero::before { opacity: var(--bar-fill, 0); }
.bar.over-hero .bar-nav.open { background: var(--ink); }
.bar-logo img { width: auto; height: 50px; }
.bar-nav { display: flex; gap: clamp(18px, 2.4vw, 36px); margin-left: auto; font-size: 15px; font-weight: 500; }
.bar-nav a { text-decoration: none; padding: 6px 0; }
.bar-nav a:hover { color: var(--gold); }
.bar-toggle { display: none; }

/* ---------- Piede ---------- */
.foot { background: var(--ink); color: var(--on-ink); padding: clamp(72px, 9vw, 130px) var(--csc-m) 40px; }
.foot-logo { width: min(520px, 80vw); height: auto; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--csc-gap); margin-top: clamp(48px, 6vw, 80px); }
.foot-cols nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-content: start; justify-content: flex-end; }
.foot-cols a { text-decoration: none; }
.foot-cols a:hover { color: var(--gold); }
.foot-legal { margin-top: 56px; font-size: var(--t-small); color: var(--on-ink-soft); }



@media(max-width:1080px){.bar-cta{display:none}}
@media(max-width:760px){
  :root { --bar: 68px; }
  .bar-logo img { height: 40px; }
  .bar-toggle {
    display: inline-flex; margin-left: auto; min-height: 44px; padding: 10px 18px;
    background: var(--gold); color: var(--ink); border: 0; font: 600 15px var(--text); cursor: pointer;
  }
  .bar-nav {
    display: none; position: absolute; top: var(--bar); left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0; padding: 8px var(--csc-m) 20px;
    background: var(--ink); font-size: 19px;
  }
  .bar-nav.open { display: flex; }
  .bar-nav a { padding: 12px 0; }

.foot-cols{grid-template-columns:1fr}.foot-cols nav{justify-content:flex-start}
}

/* Theme shell only. Content layout, typography and spacing live in Elementor. */
:where(.elementor-widget-heading h2,.elementor-widget-heading h3){text-wrap:balance;font-variation-settings:"opsz" 28}
:where(.elementor-widget-text-editor p:last-child){margin-bottom:0}
/* Photos beside text: never taller than the screen nor 760px; the crop absorbs the rest. */
.csc-capped img{max-height:min(80svh,760px)}
/* Landscape photo next to a short text: lower cap. */
.csc-capped-short img{max-height:min(80svh,520px)}
/* Photo beside the places list: never longer than the list (about 690px). */
.csc-capped-list img{max-height:min(80svh,640px)}
/* Long legal text: separate paragraphs inside one text block. */
.csc-prose .elementor-widget-text-editor p + p{margin-top:1em}
.csc-hero{isolation:isolate}
/* A decorative top scrim protects the navigation. Main overlay uses native controls. */
.csc-hero::after{content:"";position:absolute;inset:0 0 auto;height:200px;pointer-events:none;z-index:1;background:linear-gradient(to bottom, rgb(10 16 24 / .55), transparent)}
:where(.csc-fill-image,.csc-fill-image .elementor-widget-container){height:100%}
:where(.csc-fill-image img){height:100%}
.csc-fallback{padding:calc(var(--bar) + 64px) var(--csc-m) 80px;min-height:60vh}
.csc-fallback article+article{margin-top:48px}
.admin-bar .bar{top:32px}
@media(max-width:782px){.admin-bar .bar{top:46px}}
@media(max-width:600px){.admin-bar .bar{top:var(--csc-admin-offset,46px)}}
@media(max-width:760px){:where(.csc-fill-image,.csc-fill-image .elementor-widget-container,.csc-fill-image img){height:auto}}
/* Elementor resets every link to no underline (.elementor a). Restore the v3 links:
   underlined inside running text and in the breadcrumb, none on heading values. */
.elementor :is(.elementor-widget-text-editor, .csc-breadcrumb) a { text-decoration: underline; text-decoration-thickness: 1px; }
.elementor :is(.elementor-widget-text-editor, .csc-breadcrumb) a:hover { text-decoration-thickness: 2px; }
.elementor .elementor-widget-heading .elementor-heading-title a:hover { color: var(--stone); }
/* The Elementor typography control writes the text-decoration shorthand, which resets thickness. */
.elementor .elementor-widget-button a.elementor-button.elementor-button-link { text-decoration-thickness: 1px; text-underline-offset: .22em; }
.elementor .elementor-widget-button a.elementor-button.elementor-button-link:hover { text-decoration-thickness: 2px; }
