/* ============================================================
   INVITI WOW - TEMPLATE GIORNALE
   style.css
   Versione 1.0
   ============================================================ */


/* ============================================================
   RESET
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;

  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;

  margin: 0;
  padding: 0;

  overflow: hidden;

  background: #eeeeee;

  color: #1d1d1d;

  font-family: Georgia, "Times New Roman", serif;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}


/* ============================================================
   VARIABILI

   script.js potrà sovrascriverle leggendo config.js
   ============================================================ */

:root {

  --viewer-bg: #eeeeee;

  --paper: #fffefb;

  --primary: #748d70;

  --secondary: #b578cc;

  --text: #1d1d1d;

  --text-secondary: #555555;

  --line: #8ca087;

  --line-light: #d8d8d8;

  --button-bg: #b578cc;

  --button-text: #ffffff;

  --font-newspaper:
    "UnifrakturMaguntia",
    "Times New Roman",
    serif;

  --font-title:
    "Cormorant Garamond",
    Georgia,
    serif;

  --font-body:
    "Libre Baskerville",
    Georgia,
    "Times New Roman",
    serif;

  --font-sans:
    "Montserrat",
    Arial,
    sans-serif;

  --font-signature:
    "Allura",
    cursive;

  --page-shadow:
    0 10px 35px rgba(0, 0, 0, 0.18);

  --page-radius:
    0px;

  --page-ratio:
    0.707;

}


/* ============================================================
   CLASSI GENERALI
   ============================================================ */

.hidden {
  display: none !important;
}

.no-scroll {
  overflow: hidden !important;
}

.text-center {
  text-align: center;
}

.uppercase {
  text-transform: uppercase;
}

.nowrap {
  white-space: nowrap;
}


/* ============================================================
   LOADING
   ============================================================ */

.loading-screen {
  position: fixed;
  inset: 0;

  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 24px;

  background: var(--viewer-bg);
}

.loading-content {
  text-align: center;
}

.loading-newspaper {
  margin-bottom: 14px;

  font-size: 52px;

  animation: loadingPulse 1.4s ease-in-out infinite;
}

.loading-content p {
  margin: 0;

  color: var(--text-secondary);

  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;

  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes loadingPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.65;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }

}


/* ============================================================
   APP
   ============================================================ */

.newspaper-app {
  position: fixed;
  inset: 0;

  display: flex;
  flex-direction: column;

  width: 100%;
  height: 100vh;
  height: 100dvh;

  overflow: hidden;

  background: var(--viewer-bg);
}


/* ============================================================
   TOOLBAR SUPERIORE
   ============================================================ */

.viewer-toolbar {
  position: fixed;

  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));

  z-index: 3000;

  display: flex;
  align-items: center;

  gap: 8px;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.92);

  color: #252525;

  box-shadow:
    0 3px 12px rgba(0, 0, 0, 0.14);

  cursor: pointer;

  font-size: 18px;

  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    opacity 0.18s ease;
}

.toolbar-btn:hover {
  background: #ffffff;
}

.toolbar-btn:active {
  transform: scale(0.92);
}

.toolbar-btn:disabled {
  opacity: 0.35;
  cursor: default;
}


/* ============================================================
   VIEWER
   ============================================================ */

.viewer {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 1;

  width: 100%;
  min-height: 0;

  padding:
    max(58px, calc(env(safe-area-inset-top) + 48px))
    54px
    max(24px, env(safe-area-inset-bottom));

  overflow: hidden;
}

.book-viewport {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  overflow: hidden;

  touch-action: pan-y;
}

.book {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 0;

  flex: 0 0 auto;

  max-width: none;
  max-height: none;

  transform-origin: center center;
}


/* ============================================================
   PAGINA BASE
   ============================================================ */

.newspaper-page {
  position: relative;

  display: none;

  flex: 0 0 900px;

  width: 900px;
  height: 1273px;

  min-width: 900px;
  min-height: 1273px;

  max-width: none;
  max-height: none;

  overflow: hidden;

  background: var(--paper);
  color: var(--text);

  border-radius: var(--page-radius);
  box-shadow: var(--page-shadow);

  transform-origin: center center;

  font-family: var(--font-body);
}

.newspaper-page.is-visible {
  display: block;
}


/* lato centrale del giornale */

.book.double-page .newspaper-page.page-left {
  box-shadow:
    -8px 10px 30px rgba(0, 0, 0, 0.16),
    inset -15px 0 22px -24px rgba(0, 0, 0, 0.65);
}

.book.double-page .newspaper-page.page-right {
  box-shadow:
    8px 10px 30px rgba(0, 0, 0, 0.16),
    inset 15px 0 22px -24px rgba(0, 0, 0, 0.65);
}


/* ============================================================
   INTERNO PAGINA
   ============================================================ */

.page-inner {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;

  width: 100%;
  height: 100%;

  padding: 3.5% 4%;

  overflow: hidden;

  background: var(--paper);
}


/* ============================================================
   TEXTURE CARTA LEGGERA
   ============================================================ */

.page-inner::after {
  content: "";

  position: absolute;
  inset: 0;

  z-index: 100;

  pointer-events: none;

  opacity: 0.04;

  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.09) 0,
      rgba(0, 0, 0, 0.09) 1px,
      transparent 1px,
      transparent 3px
    );
}


/* ============================================================
   TESTATA GIORNALE
   ============================================================ */

.newspaper-header {
  position: relative;

  flex: 0 0 auto;

  width: 100%;

  margin-bottom: 2.2%;

  text-align: center;
}

.newspaper-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  padding: 0.7% 0;

  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);

  font-family: var(--font-sans);
  font-size: clamp(6px, 0.75vw, 11px);
  font-weight: 600;

  letter-spacing: 0.04em;

  text-transform: uppercase;
}

.newspaper-name {
  margin: 1% 0 0.5%;

  font-family: var(--font-newspaper);

  font-size: clamp(30px, 4.8vw, 69px);
  font-weight: 400;

  line-height: 0.95;
}

.newspaper-header-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  padding: 0.7% 0;

  border-top: 1px solid var(--text);
  border-bottom: 3px double var(--text);

  font-family: var(--font-body);
  font-size: clamp(6px, 0.65vw, 10px);
}


/* ============================================================
   TITOLI
   ============================================================ */

.page-kicker {
  margin: 0 0 0.6%;

  color: var(--primary);

  font-family: var(--font-sans);
  font-size: clamp(7px, 0.78vw, 11px);
  font-weight: 700;

  letter-spacing: 0.1em;

  text-transform: uppercase;
}

.page-title {
  margin: 0;

  font-family: var(--font-title);
  font-size: clamp(30px, 5vw, 70px);
  font-weight: 600;

  line-height: 0.9;

  text-transform: uppercase;
}

.page-subtitle {
  margin: 1% 0 2%;

  font-family: var(--font-title);
  font-size: clamp(15px, 1.8vw, 26px);
  font-style: italic;
  font-weight: 500;

  line-height: 1.05;
}

.section-title {
  margin: 0 0 2%;

  font-family: var(--font-title);
  font-size: clamp(17px, 2vw, 30px);
  font-weight: 700;

  line-height: 1;

  text-transform: uppercase;
}


/* ============================================================
   TESTO
   ============================================================ */

.newspaper-text {
  margin: 0;

  font-family: var(--font-body);
  font-size: clamp(7px, 0.88vw, 12.5px);

  line-height: 1.55;

  text-align: justify;
}

.newspaper-text + .newspaper-text {
  margin-top: 2%;
}

.drop-cap::first-letter {
  float: left;

  margin:
    0.05em
    0.08em
    0
    0;

  color: var(--primary);

  font-family: var(--font-title);
  font-size: 4em;
  font-weight: 700;

  line-height: 0.75;
}


/* ============================================================
   SEPARATORI
   ============================================================ */

.rule {
  width: 100%;
  height: 1px;

  margin: 2% 0;

  background: var(--line-light);
}

.rule-dark {
  background: var(--text);
}

.rule-primary {
  background: var(--primary);
}

.double-rule {
  width: 100%;

  margin: 2% 0;

  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);

  height: 4px;
}


/* ============================================================
   LINK STILE GIORNALE
   ============================================================ */

.newspaper-link {
  color: var(--primary);

  font-weight: 700;

  text-decoration:
    underline
    dotted;

  text-underline-offset: 2px;

  cursor: pointer;
}

.newspaper-link:hover {
  opacity: 0.72;
}


/* ============================================================
   IMMAGINI GENERALI
   ============================================================ */

.newspaper-photo {
  width: 100%;

  object-fit: cover;

  filter:
    contrast(0.96)
    saturate(0.9);
}

.photo-frame {
  position: relative;

  overflow: hidden;

  border: 1px solid #bdbdbd;

  background: #e9e9e9;
}

.photo-caption {
  margin-top: 0.7%;

  color: var(--text-secondary);

  font-family: var(--font-body);
  font-size: clamp(6px, 0.62vw, 9px);
  font-style: italic;
}


/* ============================================================
   COPERTINA
   ============================================================ */

.page-cover .page-inner {
  padding: 3.4% 4.4%;
}

.cover-breaking-news {
  margin: 0 0 0.8%;

  text-align: center;

  color: var(--primary);

  font-family: var(--font-sans);
  font-size: clamp(8px, 0.9vw, 13px);
  font-weight: 700;

  letter-spacing: 0.25em;

  text-transform: uppercase;
}

.cover-title {
  margin: 1.5% 0 0;

  text-align: center;

  font-family: var(--font-title);
  font-size: clamp(39px, 6.7vw, 92px);
  font-weight: 600;

  line-height: 0.82;

  letter-spacing: -0.02em;
}

.cover-subtitle {
  margin: 1% 0 2.2%;

  text-align: center;

  font-family: var(--font-title);
  font-size: clamp(18px, 2.25vw, 32px);
  font-style: italic;

  line-height: 1;
}

.cover-main-photo {
  width: 100%;
  height: 47%;

  object-fit: cover;

  border-top: 3px solid var(--text);
  border-bottom: 3px solid var(--text);
}

.cover-bottom-grid {
  display: grid;

  grid-template-columns:
    1fr 1.35fr;

  gap: 3%;

  margin-top: 2.4%;

  min-height: 0;
}

.cover-quote {
  display: flex;
  flex-direction: column;
  justify-content: center;

  padding-right: 4%;

  border-right: 1px solid var(--line-light);

  font-family: var(--font-title);
  font-size: clamp(10px, 1.4vw, 19px);
  font-style: italic;

  line-height: 1.2;
}

.cover-quote-author {
  display: block;

  margin-top: 8%;

  font-family: var(--font-body);
  font-size: 0.6em;
  font-style: normal;

  text-align: right;
}

.cover-description {
  display: flex;
  align-items: center;

  margin: 0;

  font-family: var(--font-body);
  font-size: clamp(7px, 0.83vw, 12px);

  line-height: 1.48;

  text-align: justify;
}

.cover-footer-band {
  position: absolute;

  left: 4.4%;
  right: 4.4%;
  bottom: 2.7%;

  display: flex;
  align-items: center;
  justify-content: space-around;

  gap: 6px;

  padding: 0.8% 0;

  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);

  font-family: var(--font-sans);
  font-size: clamp(5px, 0.65vw, 9px);
  font-weight: 700;

  letter-spacing: 0.06em;

  text-transform: uppercase;
}


/* ============================================================
   MATRIMONIO
   ============================================================ */

.wedding-intro {
  margin-bottom: 2%;
}

.wedding-date-box {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 3%;

  margin: 1% 0 2.5%;

  padding: 1.5%;

  border-top: 3px double var(--text);
  border-bottom: 3px double var(--text);

  font-family: var(--font-title);
}

.wedding-date {
  font-size: clamp(14px, 1.9vw, 27px);
  font-weight: 700;
}

.wedding-time {
  color: var(--primary);

  font-size: clamp(14px, 1.9vw, 27px);
  font-weight: 700;
}

.location-grid {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 3%;

  margin: 1% 0 2.5%;
}

.location-card {
  min-width: 0;
}

.location-card img {
  width: 100%;
  height: 130px;

  object-fit: cover;

  margin-bottom: 2%;
}

.location-name {
  display: block;

  margin-bottom: 1%;

  color: var(--primary);

  font-family: var(--font-title);
  font-size: clamp(11px, 1.45vw, 21px);
  font-weight: 700;

  line-height: 1.05;

  text-decoration: underline;
  text-underline-offset: 2px;
}

.location-helper {
  color: var(--text-secondary);

  font-family: var(--font-body);
  font-size: clamp(6px, 0.63vw, 9px);
  font-style: italic;
}

.useful-info {
  margin-top: 1.5%;
}

.info-columns {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 4%;
}

.info-column {
  padding-top: 2%;

  border-top: 1px solid var(--text);
}

.info-column h3 {
  margin: 0 0 2%;

  font-family: var(--font-title);
  font-size: clamp(12px, 1.5vw, 21px);

  text-transform: uppercase;
}

.info-column p {
  margin: 0 0 2%;

  font-size: clamp(6px, 0.73vw, 10.5px);

  line-height: 1.45;

  text-align: justify;
}

.info-links {
  display: flex;
  flex-direction: column;

  gap: 4px;
}

.info-links a {
  color: var(--primary);

  font-size: clamp(6px, 0.73vw, 10.5px);
  font-weight: 700;

  text-decoration: underline;
}


/* ============================================================
   PAGINA DUE COLONNE
   ============================================================ */

.two-column-page {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 4%;

  height: 100%;
}

.two-column-section {
  min-width: 0;
}

.two-column-section + .two-column-section {
  padding-left: 4%;

  border-left: 1px solid var(--line-light);
}


/* ============================================================
   TIMELINE
   ============================================================ */

.timeline {
  position: relative;

  margin-top: 5%;
  padding-left: 13%;
}

.timeline::before {
  content: "";

  position: absolute;

  top: 2%;
  bottom: 2%;

  left: 4.5%;

  width: 1px;

  background: var(--primary);
}

.timeline-item {
  position: relative;

  margin-bottom: 8%;
}

.timeline-item::before {
  content: "";

  position: absolute;

  left: -11.3%;
  top: 4px;

  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--primary);
}

.timeline-time {
  margin-bottom: 0.5%;

  color: var(--primary);

  font-family: var(--font-sans);
  font-size: clamp(7px, 0.86vw, 12px);
  font-weight: 700;
}

.timeline-title {
  margin: 0;

  font-family: var(--font-title);
  font-size: clamp(11px, 1.38vw, 20px);
  font-weight: 700;

  line-height: 1.05;
}

.timeline-description {
  margin-top: 1%;

  color: var(--text-secondary);

  font-size: clamp(6px, 0.7vw, 10px);
}


/* ============================================================
   WEDDING TEAM
   ============================================================ */

.team-list {
  margin-top: 5%;
}

.team-group {
  margin-bottom: 5%;
}

.team-role {
  margin-bottom: 1%;

  color: var(--primary);

  font-family: var(--font-sans);
  font-size: clamp(6px, 0.71vw, 10px);
  font-weight: 700;

  letter-spacing: 0.08em;

  text-transform: uppercase;
}

.team-name {
  margin: 0;

  font-family: var(--font-title);
  font-size: clamp(11px, 1.35vw, 19px);

  line-height: 1.12;
}


/* ============================================================
   STORIA
   ============================================================ */

.story-layout {
  display: grid;

  grid-template-columns: 1.05fr 1fr;

  gap: 3%;

  margin-top: 1%;
}

.story-photo {
  width: 100%;
  height: 205px;

  object-fit: cover;
}

.story-copy {
  min-width: 0;
}

.story-copy .newspaper-text {
  font-size: clamp(6px, 0.72vw, 10.5px);
}

.story-brief {
  margin-top: 3%;

  padding-top: 2%;

  border-top: 2px solid var(--text);
}

.story-events {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 2%;
}

.story-event {
  text-align: center;
}

.story-event-icon {
  display: block;

  margin-bottom: 3%;

  font-size: clamp(13px, 1.8vw, 24px);
}

.story-event-label {
  display: block;

  margin-bottom: 2%;

  font-family: var(--font-sans);
  font-size: clamp(5px, 0.57vw, 8px);
  font-weight: 700;

  line-height: 1.2;

  text-transform: uppercase;
}

.story-event-value {
  display: block;

  color: var(--primary);

  font-family: var(--font-title);
  font-size: clamp(9px, 1.14vw, 16px);
  font-weight: 700;
}

.story-bottom {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 4%;

  margin-top: 3%;
}

.story-bottom-section {
  padding-top: 2%;

  border-top: 1px solid var(--text);
}


/* ============================================================
   RSVP NEL GIORNALE
   ============================================================ */

.rsvp-newspaper-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-top: 4%;

  padding: 9px 16px;

  border: 0;
  border-radius: 3px;

  background: var(--button-bg);

  color: var(--button-text);

  font-family: var(--font-sans);
  font-size: clamp(7px, 0.76vw, 11px);
  font-weight: 700;

  letter-spacing: 0.04em;

  text-transform: uppercase;

  cursor: pointer;

  transition:
    transform 0.16s ease,
    opacity 0.16s ease;
}

.rsvp-newspaper-button:active {
  transform: scale(0.97);
}


/* ============================================================
   GIFT / IBAN
   ============================================================ */

.gift-box {
  margin-top: 2%;
}

.iban-box {
  margin-top: 3%;

  padding: 3%;

  border: 1px solid var(--line);

  background: rgba(116, 141, 112, 0.07);

  cursor: pointer;
}

.iban-label {
  margin-bottom: 1%;

  color: var(--text-secondary);

  font-family: var(--font-sans);
  font-size: clamp(5px, 0.58vw, 8px);
  font-weight: 700;

  letter-spacing: 0.07em;

  text-transform: uppercase;
}

.iban-value {
  overflow-wrap: anywhere;

  font-family: var(--font-sans);
  font-size: clamp(6px, 0.7vw, 10px);
  font-weight: 700;
}


/* ============================================================
   FOTO FINALE
   ============================================================ */

.page-final-photo .page-inner {
  padding: 4%;
}

.final-quote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  height: 25%;

  padding: 1% 7% 3%;

  text-align: center;
}

.final-quote-text {
  margin: 0;

  font-family: var(--font-title);
  font-size: clamp(17px, 2.35vw, 34px);
  font-style: italic;

  line-height: 1.1;
}

.final-quote-author {
  margin-top: 3%;

  font-family: var(--font-body);
  font-size: clamp(7px, 0.8vw, 11px);
}

.final-photo {
  width: 100%;
  height: 70%;

  object-fit: cover;
}


/* ============================================================
   RETROCOPERTINA
   ============================================================ */

.page-back-cover .page-inner {
  align-items: center;
  justify-content: center;

  text-align: center;
}

.back-cover-logo {
  width: min(40%, 250px);
  max-height: 34%;

  object-fit: contain;
}

.back-cover-text {
  max-width: 75%;

  margin-top: 4%;

  font-family: var(--font-title);
  font-size: clamp(14px, 1.8vw, 26px);
}

.back-cover-credit {
  position: absolute;

  bottom: 4%;

  left: 0;
  right: 0;

  font-family: var(--font-sans);
  font-size: clamp(5px, 0.6vw, 9px);

  text-transform: uppercase;
}


/* ============================================================
   DRESS CODE
   ============================================================ */

.dresscode-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  flex: 1;

  text-align: center;
}

.dresscode-image {
  width: 70%;
  max-height: 58%;

  margin-top: 4%;

  object-fit: contain;
}


/* ============================================================
   GALLERY
   ============================================================ */

.gallery-grid {
  display: grid;

  grid-template-columns: 1fr 1fr;

  grid-template-rows: 1fr 1fr;

  gap: 2%;

  flex: 1;

  min-height: 0;

  margin-top: 3%;
}

.gallery-grid img {
  width: 100%;
  height: 100%;

  min-height: 0;

  object-fit: cover;
}


/* ============================================================
   LISTA LINK / HOTEL / TRASPORTI
   ============================================================ */

.link-list {
  margin-top: 4%;
}

.link-list-item {
  padding: 3% 0;

  border-top: 1px solid var(--line-light);
}

.link-list-item:last-child {
  border-bottom: 1px solid var(--line-light);
}

.link-list-title {
  margin: 0 0 1%;

  font-family: var(--font-title);
  font-size: clamp(12px, 1.5vw, 21px);
  font-weight: 700;
}

.link-list-description {
  margin: 0 0 1.5%;

  font-size: clamp(7px, 0.8vw, 11px);

  line-height: 1.45;
}


/* ============================================================
   NAVIGAZIONE FRECCE
   ============================================================ */

.navigation-btn {
  position: absolute;

  top: 50%;

  z-index: 2000;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 46px;
  height: 64px;

  padding: 0;

  border: 0;
  border-radius: 8px;

  background: rgba(255, 255, 255, 0.88);

  color: #222222;

  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.14);

  cursor: pointer;

  font-size: 26px;

  transform: translateY(-50%);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.navigation-prev {
  left: 10px;
}

.navigation-next {
  right: 10px;
}

.navigation-btn:hover {
  transform:
    translateY(-50%)
    scale(1.04);
}

.navigation-btn:active {
  transform:
    translateY(-50%)
    scale(0.94);
}

.navigation-btn:disabled {
  opacity: 0.2;
  pointer-events: none;
}


/* ============================================================
   INDICATORE PAGINE
   ============================================================ */

.page-indicator {
  position: fixed;

  left: 50%;
  bottom: max(8px, env(safe-area-inset-bottom));

  z-index: 1800;

  transform: translateX(-50%);

  padding: 5px 10px;

  border-radius: 999px;

  background: rgba(0, 0, 0, 0.62);

  color: #ffffff;

  font-family: var(--font-sans);
  font-size: 11px;
}


/* ============================================================
   MODAL GENERALE
   ============================================================ */

.modal,
.zoom-modal {
  position: fixed;
  inset: 0;

  z-index: 10000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding:
    max(20px, env(safe-area-inset-top))
    max(15px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(15px, env(safe-area-inset-left));
}

.modal-backdrop,
.zoom-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(0, 0, 0, 0.7);

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}


/* ============================================================
   RSVP MODAL
   ============================================================ */

.modal-panel {
  position: relative;

  z-index: 1;

  width: min(94vw, 560px);
  max-height: min(88vh, 820px);
  max-height: min(88dvh, 820px);

  overflow-x: hidden;
  overflow-y: auto;

  border-radius: 12px;

  background: #fffefb;

  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35);

  -webkit-overflow-scrolling: touch;
}

.rsvp-panel {
  padding: 34px 30px 30px;
}

.modal-close {
  position: absolute;

  top: 8px;
  right: 10px;

  z-index: 5;

  width: 40px;
  height: 40px;

  padding: 0;

  border: 0;
  background: transparent;

  color: #333333;

  font-family: Arial, sans-serif;
  font-size: 31px;
  font-weight: 300;

  line-height: 1;

  cursor: pointer;
}

.rsvp-header {
  margin-bottom: 24px;

  text-align: center;
}

.rsvp-kicker {
  margin: 0 0 5px;

  color: var(--primary);

  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;

  letter-spacing: 0.22em;

  text-transform: uppercase;
}

.rsvp-header h2 {
  margin: 0;

  font-family: var(--font-title);
  font-size: 34px;
  font-weight: 600;

  line-height: 1;
}

.rsvp-subtitle {
  margin: 10px 0 0;

  color: var(--text-secondary);

  font-family: var(--font-body);
  font-size: 13px;

  line-height: 1.5;
}

.rsvp-form {
  width: 100%;
}

.rsvp-fields {
  display: flex;
  flex-direction: column;

  gap: 16px;
}

.form-row {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;

  min-width: 0;
}

.form-label {
  margin-bottom: 6px;

  color: #333333;

  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
}

.required-star {
  color: #b04444;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;

  min-height: 45px;

  padding: 10px 12px;

  border: 1px solid #cfcfcf;
  border-radius: 7px;

  outline: none;

  background: #ffffff;

  color: #222222;

  font-family: var(--font-sans);
  font-size: 14px;

  transition:
    border 0.18s ease,
    box-shadow 0.18s ease;
}

.form-textarea {
  min-height: 95px;

  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);

  box-shadow:
    0 0 0 3px rgba(116, 141, 112, 0.12);
}

.form-input.has-error,
.form-select.has-error,
.form-textarea.has-error {
  border-color: #b04444;
}

.form-error {
  margin-top: 4px;

  color: #b04444;

  font-family: var(--font-sans);
  font-size: 11px;
}

.radio-group {
  display: flex;

  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;

  gap: 7px;

  flex: 1;

  padding: 10px 12px;

  border: 1px solid #d2d2d2;
  border-radius: 7px;

  background: #ffffff;

  cursor: pointer;
}

.radio-option input {
  accent-color: var(--primary);
}

.privacy-row {
  display: flex;
  align-items: flex-start;

  gap: 9px;

  margin-top: 4px;
}

.privacy-row input {
  margin-top: 3px;

  accent-color: var(--primary);
}

.privacy-row label {
  color: #555555;

  font-family: var(--font-sans);
  font-size: 11px;

  line-height: 1.45;
}

.rsvp-submit {
  width: 100%;

  min-height: 48px;

  margin-top: 22px;
  padding: 12px 20px;

  border: 0;
  border-radius: 7px;

  background: var(--button-bg);

  color: var(--button-text);

  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;

  letter-spacing: 0.05em;

  text-transform: uppercase;

  cursor: pointer;

  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.rsvp-submit:active {
  transform: scale(0.985);
}

.rsvp-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.rsvp-message {
  margin-top: 16px;
  padding: 11px 13px;

  border-radius: 6px;

  font-family: var(--font-sans);
  font-size: 12px;

  line-height: 1.4;
}

.rsvp-message.success {
  background: #eef6ec;

  color: #386336;
}

.rsvp-message.error {
  background: #faecec;

  color: #8d3333;
}


/* ============================================================
   ZOOM INTERATTIVO
   Rotellina / pinch + trascinamento con mano
   ============================================================ */

.zoom-modal {
  position: fixed;
  inset: 0;

  z-index: 11000;

  display: block;

  padding: 0;

  overflow: hidden;

  background: rgba(0, 0, 0, 0.72);

  touch-action: none;

  user-select: none;
  -webkit-user-select: none;
}


/* SFONDO */

.zoom-backdrop {
  position: absolute;
  inset: 0;

  z-index: 1;

  background: rgba(0, 0, 0, 0.72);

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}


/* AREA DI VISUALIZZAZIONE */

.zoom-content {
  position: absolute;
  inset: 0;

  z-index: 2;

  overflow: hidden;

  touch-action: none;

  cursor: grab;
}


/* quando stiamo trascinando */

.zoom-content.is-dragging {
  cursor: grabbing;
}


/*
   Il JS inserirà qui dentro
   la pagina o le due pagine visibili.

   È questo elemento che verrà:
   - ingrandito
   - rimpicciolito
   - trascinato
*/

.zoom-stage {
  position: absolute;

  top: 0;
  left: 0;

  display: flex;
  align-items: flex-start;
  justify-content: flex-start;

  gap: 0;

  width: max-content;
  height: 1273px;

  transform-origin: 0 0;

  will-change: transform;

  cursor: grab;
}


.zoom-stage.is-dragging {
  cursor: grabbing;
}


/* PAGINE DENTRO LO ZOOM */

.zoom-stage .newspaper-page {
  position: relative;

  display: block;

  flex: 0 0 900px;

  width: 900px;
  height: 1273px;

  min-width: 900px;
  min-height: 1273px;

  max-width: none;
  max-height: none;

  margin: 0;

  overflow: hidden;

  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45);

  pointer-events: auto;
}


/* ============================================================
   PULSANTE CHIUDI
   ============================================================ */

.zoom-close {
  position: fixed;

  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));

  z-index: 11020;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 46px;
  height: 46px;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.95);

  color: #222222;

  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.2);

  font-family: Arial, sans-serif;
  font-size: 32px;

  line-height: 1;

  cursor: pointer;

  user-select: none;
  -webkit-user-select: none;
}


.zoom-close:active {
  transform: scale(0.94);
}


/* ============================================================
   TOAST
   ============================================================ */

.toast {
  position: fixed;

  left: 50%;
  bottom: max(30px, calc(env(safe-area-inset-bottom) + 20px));

  z-index: 12000;

  transform: translateX(-50%);

  max-width: calc(100vw - 40px);

  padding: 10px 16px;

  border-radius: 999px;

  background: rgba(20, 20, 20, 0.92);

  color: #ffffff;

  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;

  text-align: center;

  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.25);
}


/* ============================================================
   ANIMAZIONE CAMBIO PAGINA
   ============================================================ */

@keyframes pageEnterRight {

  from {
    opacity: 0;
    transform:
      perspective(1600px)
      rotateY(-8deg)
      translateX(20px);
  }

  to {
    opacity: 1;
    transform:
      perspective(1600px)
      rotateY(0deg)
      translateX(0);
  }

}

@keyframes pageEnterLeft {

  from {
    opacity: 0;
    transform:
      perspective(1600px)
      rotateY(8deg)
      translateX(-20px);
  }

  to {
    opacity: 1;
    transform:
      perspective(1600px)
      rotateY(0deg)
      translateX(0);
  }

}

.page-enter-next {
  animation:
    pageEnterRight
    0.55s
    ease;
}

.page-enter-prev {
  animation:
    pageEnterLeft
    0.55s
    ease;
}


/* ============================================================
   DESKTOP GRANDE
   ============================================================ */

@media (min-width: 1101px) {

  .book.double-page {
    display: flex;
  }

}


/* ============================================================
   TABLET
   ============================================================ */

@media
  (min-width: 768px)
  and
  (max-width: 1100px) {

  .viewer {
    padding-left: 42px;
    padding-right: 42px;
  }

  .navigation-btn {
    width: 38px;
    height: 56px;

    font-size: 22px;
  }

  .navigation-prev {
    left: 3px;
  }

  .navigation-next {
    right: 3px;
  }

}


/* ============================================================
   MOBILE
   UNA PAGINA ALLA VOLTA
   ============================================================ */

@media (max-width: 767px) {

  body {
    background: #dcdcdc;
  }

  .viewer-toolbar {
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));

    gap: 6px;
  }

  .toolbar-btn {
    width: 37px;
    height: 37px;

    font-size: 16px;
  }

  .viewer {
    padding:
      max(52px, calc(env(safe-area-inset-top) + 44px))
      5px
      max(8px, env(safe-area-inset-bottom));
  }

  .book-viewport {
    width: 100%;
    height: 100%;
  }

  .book {
    width: 100%;
    height: 100%;

    gap: 0;
  }

  .newspaper-page {
  position: relative;

  display: none;

  flex: 0 0 900px;

  width: 900px;
  height: 1273px;

  min-width: 900px;
  min-height: 1273px;

  max-width: none;
  max-height: none;

  overflow: hidden;

  background: var(--paper);
  color: var(--text);

  border-radius: var(--page-radius);
  box-shadow: var(--page-shadow);

  font-family: var(--font-body);
}

.newspaper-page.is-visible {
  display: block;
}


  /* una sola pagina anche se il book possiede double-page */

  .book.double-page .newspaper-page {
    width: min(
      96vw,
      calc((100dvh - 70px) * 0.707)
    );
  }

  .navigation-btn {
    width: 38px;
    height: 52px;

    border-radius: 0;

    background: rgba(255, 255, 255, 0.55);

    box-shadow: none;

    font-size: 20px;
  }

  .navigation-prev {
    left: 0;

    border-radius: 0 8px 8px 0;
  }

  .navigation-next {
    right: 0;

    border-radius: 8px 0 0 8px;
  }

  .page-indicator {
    bottom: max(5px, env(safe-area-inset-bottom));

    font-size: 10px;
  }

  .rsvp-panel {
    width: min(96vw, 560px);

    padding:
      32px
      18px
      22px;
  }

  .rsvp-header h2 {
    font-size: 29px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

}


/* ============================================================
   MOBILE MOLTO PICCOLO
   ============================================================ */

@media (max-width: 390px) {

  .toolbar-btn {
    width: 34px;
    height: 34px;

    font-size: 15px;
  }

  .viewer {
    padding-top:
      max(
        47px,
        calc(env(safe-area-inset-top) + 39px)
      );
  }

  .newspaper-page {
    width: min(
      97vw,
      calc((100dvh - 60px) * 0.707)
    );

    max-height: calc(100dvh - 60px);
  }

}


/* ============================================================
   LANDSCAPE SMARTPHONE
   ============================================================ */

@media
  (max-height: 500px)
  and
  (orientation: landscape) {

  .viewer-toolbar {
    flex-direction: column;

    top: 8px;
    right: 8px;
  }

  .toolbar-btn {
    width: 32px;
    height: 32px;

    font-size: 14px;
  }

  .viewer {
    padding:
      5px
      45px;
  }

  .newspaper-page {
    width: auto;
    height: calc(100dvh - 10px);

    max-height: calc(100dvh - 10px);
  }

}


/* ============================================================
   DISPOSITIVI TOUCH
   ============================================================ */

@media (hover: none) {

  .toolbar-btn:hover,
  .navigation-btn:hover {
    transform: none;
  }

}


/* ============================================================
   ACCESSIBILITÀ
   ============================================================ */

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline:
    3px solid
    rgba(181, 120, 204, 0.55);

  outline-offset: 2px;
}


/* ============================================================
   RIDUZIONE ANIMAZIONI
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;
  }

}


/* ============================================================
   STAMPA
   ============================================================ */

@media print {

  body {
    overflow: visible;

    background: #ffffff;
  }

  .viewer-toolbar,
  .navigation-btn,
  .page-indicator {
    display: none !important;
  }

  .newspaper-app,
  .viewer,
  .book-viewport,
  .book {
    position: static;

    display: block;

    width: auto;
    height: auto;

    overflow: visible;
  }

  .newspaper-page {
    display: block !important;

    width: 210mm;
    height: 297mm;

    margin: 0 auto;

    box-shadow: none;

    page-break-after: always;
  }

}

/* ============================================================
   DIMENSIONI TIPOGRAFICHE DEL FOGLIO 900x1273

   Il foglio verrà poi scalato interamente da script.js.
   ============================================================ */

.newspaper-header-top {
  font-size: 11px;
}

.newspaper-name {
  font-size: 69px;
}

.newspaper-header-bottom {
  font-size: 10px;
}

.page-kicker {
  font-size: 11px;
}

.page-title {
  font-size: 70px;
}

.page-subtitle {
  font-size: 26px;
}

.section-title {
  font-size: 30px;
}

.newspaper-text {
  font-size: 12.5px;
}

.photo-caption {
  font-size: 9px;
}


/* COPERTINA */

.cover-breaking-news {
  font-size: 13px;
}

.cover-title {
  font-size: 92px;
}

.cover-subtitle {
  font-size: 32px;
}

.cover-quote {
  font-size: 19px;
}

.cover-description {
  font-size: 12px;
}

.cover-footer-band {
  font-size: 9px;
}


/* MATRIMONIO */

.wedding-date,
.wedding-time {
  font-size: 27px;
}

.location-name {
  font-size: 21px;
}

.location-helper {
  font-size: 9px;
}

.info-column h3 {
  font-size: 21px;
}

.info-column p,
.info-links a {
  font-size: 10.5px;
}


/* TIMELINE */

.timeline-time {
  font-size: 12px;
}

.timeline-title {
  font-size: 20px;
}

.timeline-description {
  font-size: 10px;
}


/* TEAM */

.team-role {
  font-size: 10px;
}

.team-name {
  font-size: 19px;
}


/* STORIA */

.story-copy .newspaper-text {
  font-size: 10.5px;
}

.story-event-icon {
  font-size: 24px;
}

.story-event-label {
  font-size: 8px;
}

.story-event-value {
  font-size: 16px;
}


/* PULSANTI */

.rsvp-newspaper-button {
  font-size: 11px;
}


/* IBAN */

.iban-label {
  font-size: 8px;
}

.iban-value {
  font-size: 10px;
}


/* FOTO FINALE */

.final-quote-text {
  font-size: 34px;
}

.final-quote-author {
  font-size: 11px;
}


/* RETROCOPERTINA */

.back-cover-text {
  font-size: 26px;
}

.back-cover-credit {
  font-size: 9px;
}


/* HOTEL / LINK */

.link-list-title {
  font-size: 21px;
}

.link-list-description {
  font-size: 11px;
}