/* ---------- Font: Bionik ---------- */
@font-face {
  font-family: "Bionik";
  src: url("../fonts/Bionik-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bionik";
  src: url("../fonts/Bionik-Light-Italic.otf") format("opentype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Bionik";
  src: url("../fonts/Bionik-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: "Bionik", Georgia, serif;
  font-weight: 300;
  line-height: 1.38;
  letter-spacing: 0.025em;
  color: #fff;
  background: #b9a37a url("../img/bg_desktop.jpg") center / cover no-repeat;
}

h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; font-style: italic; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Layout DESKTOP (default) ---------- */
.page {
  --fs: clamp(12px, 0.92vw, 24px);
  font-size: var(--fs);

  min-height: 100vh;
  min-height: 100svh;
  padding: 4vh 6vw clamp(24px, 4.2vh, 60px) 12vw;

  display: grid;
  grid-template-columns: 46.5vw 12.8vw auto;
  grid-template-rows: auto auto;
  align-content: end;            /* il blocco sta sempre in basso, come nel layout */
  justify-content: start;
}

.intro    { grid-column: 1; grid-row: 1; align-self: end; }
.contatti { grid-column: 2; grid-row: 1; align-self: start; margin-top: 2vw; font-size:.75em}
.librerie { grid-column: 3; grid-row: 1; align-self: start; margin-top: 2vw; white-space: nowrap; font-size:.75em}
.firma    { grid-column: 1; grid-row: 2; margin-top: 2.4vw; }

.titolo img { width: 28.6vw; }
.intro p   { margin-top: 0.9em; }
.titolo + p { margin-top: 1.6em; }

.label {
  font-size: 0.66em;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 2.6em;
}

.mail a { display: inline-block; }
.mail { line-height: 1.5; }

.librerie li + li { margin-top: 0.75em; }
.librerie li { display: flex; flex-direction: column; }
.librerie strong {
  font-weight: 800;
  font-size: 1.04em;
  margin-bottom: 0.1em;
}

.firma img { width: 4.4vw; min-width: 64px; }

/* ---------- TABLET ---------- */
@media (min-width: 600px) and (max-width: 1199px),
       (min-width: 1200px) and (max-aspect-ratio: 4/3) {
  body { background-image: url("../img/bg_tablet.jpg"); }

  .page {
    --fs: clamp(14px, 1.4vw, 22px);
    padding: 7vw 5vw 3vh 7vw;
    grid-template-columns: 20.4vw 1fr;
    grid-template-rows: auto 1fr auto auto;
    align-content: stretch;
  }

  .intro    { grid-column: 1 / -1; grid-row: 1; align-self: start; }
  .contatti { grid-column: 1;      grid-row: 3; align-self: start; margin-top: 0; }
  .librerie { grid-column: 2;      grid-row: 3; align-self: start; margin-top: 0; }
  .firma    { grid-column: 1 / -1; grid-row: 4; margin-top: 6vh; }

  .contatti, .librerie { font-size: 0.88em; }
  .label { margin-bottom: 2.4em; }
  .titolo img { width: 45.5vw; }
  .firma img  { width: 7vw; min-width: 78px; }
}

/* ---------- MOBILE ---------- */
@media (max-width: 599px) {
  body { background-image: url("../img/bg_mobile.jpg"); }

  .page {
    --fs: clamp(13px, 3.6vw, 17px);
    padding: 12svh 7vw 3svh 9.3vw;
    display: flex;
    flex-direction: column;
    align-content: normal;
  }

  .intro    { order: 1; align-self: auto; }
  .librerie { order: 2; margin-top: 11svh; white-space: normal; align-self: auto;}
  .contatti { order: 3; margin-top: 6svh; align-self: auto; }
  .firma    { order: 4; margin-top: auto; padding-top: 5svh; }

  .contatti, .librerie { font-size: 0.92em; }
  .titolo img { width: 73vw; }
  .firma img  { width: 70px; }
}

/* schermi molto grandi */
@media (min-width: 2000px) {
  .page { --fs: clamp(13px, 0.97vw, 30px); }
}
