/* ==========================================================================
   Bialma — proposta 2 "Velluto"
   Due prospettive: schermo diviso, colori presi dalla poltrona e dall'ulivo.
   ========================================================================== */

:root {
  --sabbia: #EFE6DA;
  --sabbia-scura: #E4D6C4;
  --prugna: #4B1E2D;
  --oliva: #6E6F4C;
  --cipria: #D8B4A6;
  --inchiostro: #2A2125;

  --font-display: "Bodoni Moda", "Didot", "Bodoni 72", serif;
  --font-text: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 5vw, 72px);
  --max: 1280px;
  --header-h: 76px;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --ease-out: cubic-bezier(.2, .7, .1, 1);
}

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

html { scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--sabbia);
  color: var(--inchiostro);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--oliva); outline-offset: 4px; }
::selection { background: var(--prugna); color: var(--sabbia); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: .6rem 1rem;
  background: var(--prugna); color: var(--sabbia);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* Pulsanti: rettangoli netti, come un'etichetta sartoriale */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .8em 1.7em;
  border: 1px solid transparent;
  font-family: var(--font-text);
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out), border-color .35s var(--ease-out);
}
.btn--line { border-color: currentColor; }
.btn--line:hover { background: var(--prugna); border-color: var(--prugna); color: var(--sabbia); }
.btn--light { border-color: rgba(239, 230, 218, .6); color: var(--sabbia); }
.btn--light:hover { background: var(--sabbia); color: var(--oliva); }
.btn--solid { background: var(--prugna); color: var(--sabbia); }
.btn--solid:hover { background: var(--inchiostro); }
.btn--cipria { background: var(--cipria); color: var(--prugna); }
.btn--cipria:hover { background: var(--sabbia); }

/* --------------------------------------------------------------------------
   Header: navigazione a sinistra, marchio al centro, contatto a destra
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-inline: var(--gutter);
  background: var(--sabbia);
  border-bottom: 1px solid rgba(75, 30, 45, .14);
  color: var(--prugna);
}

.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.85rem;
  line-height: 1;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 2rem;
  font-size: .95rem;
}

.site-nav a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size .4s var(--ease-out);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { background-size: 100% 1px; }

.site-nav__cta { display: none; }

.header-cta { justify-self: end; padding: .6em 1.3em; }

.menu-toggle { display: none; justify-self: end; font-size: .95rem; }

@media (max-width: 819px) {
  .site-header { grid-template-columns: 1fr auto; }
  .header-cta { display: none; }
  .menu-toggle { display: block; }
  .wordmark { grid-column: 1; grid-row: 1; }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.75rem var(--gutter) 2.25rem;
    background: var(--prugna);
    color: var(--sabbia);
    font-family: var(--font-display);
    font-size: 1.6rem;
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .5s var(--ease), visibility 0s .5s;
  }
  .site-nav__cta { display: inline; }
  .site-header.is-menu-open .site-nav {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path .5s var(--ease);
  }
}

/* --------------------------------------------------------------------------
   Apertura divisa: le due metà si aprono dalla linea centrale
   -------------------------------------------------------------------------- */

.split-hero {
  display: grid;
}

.split-hero__panel {
  display: flex;
  align-items: flex-end;
  padding: clamp(2.5rem, 6vw, 5.5rem) var(--gutter);
  background: var(--prugna);
  color: var(--sabbia);
}

.split-hero__photo {
  order: -1;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--cipria);
}

.split-hero--page .split-hero__photo { aspect-ratio: 4 / 5; }

.split-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 4.6vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.headline span { display: block; }

.headline--page { font-size: clamp(3.2rem, 7vw, 7.5rem); }

.split-hero__lead {
  max-width: 34rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
  color: rgba(239, 230, 218, .82);
}

.page-index {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  margin-top: 2.5rem;
}
.page-index a {
  text-decoration: none;
  color: var(--cipria);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .4s var(--ease-out);
}
.page-index a:hover { background-size: 100% 1px; }

@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .split-hero {
    min-height: max(560px, calc(100vh - var(--header-h)));
    min-height: max(560px, calc(100svh - var(--header-h)));
    grid-template-columns: 1fr min(calc(100svh - var(--header-h)), 58vw);
  }
  .split-hero--page { grid-template-columns: 1fr 44vw; }
  .split-hero__photo { order: 0; aspect-ratio: auto; }
  .split-hero--page .split-hero__photo { aspect-ratio: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  .split-hero__panel { animation: seam-left 1.4s var(--ease) both; }
  .split-hero__photo { animation: seam-right 1.4s var(--ease) both; }
  .split-hero__text > * { animation: rise 1s .9s var(--ease-out) both; }
  .split-hero__text > :nth-child(2) { animation-delay: 1.1s; }
}

@keyframes seam-left  { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0); } }
@keyframes seam-right { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* --------------------------------------------------------------------------
   Contenuti della homepage
   -------------------------------------------------------------------------- */

.approach { padding-block: clamp(5rem, 11vw, 10rem); }

.statement {
  max-width: 24em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.7rem, 3.4vw, 3.1rem);
  line-height: 1.2;
  color: var(--prugna);
  text-wrap: pretty;
}

.approach__grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
  margin-top: clamp(3rem, 7vw, 6rem);
}
@media (min-width: 900px) {
  .approach__grid { grid-template-columns: 7fr 5fr; }
}

.approach__text { max-width: 34rem; }
.approach__text p + p { margin-top: 1.25rem; }

.photo {
  overflow: hidden;
  background: var(--cipria);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--tall { aspect-ratio: 3 / 4; }

.goal {
  background: var(--oliva);
  color: var(--sabbia);
  text-align: center;
  padding-block: clamp(5rem, 12vw, 10rem);
}
.goal__text {
  max-width: 19em;
  margin-inline: auto;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3.6rem);
  line-height: 1.15;
  text-wrap: balance;
}
.goal .btn { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

/* Chi siamo: due colonne separate da una linea, come le due schiene */

.people { padding-block: clamp(5rem, 11vw, 9rem); }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  color: var(--prugna);
}
.people .section-title {
  text-align: center;
  margin-bottom: clamp(3rem, 7vw, 6rem);
}

.people__grid {
  position: relative;
  display: grid;
  gap: 5rem clamp(3rem, 8vw, 8rem);
}

@media (min-width: 900px) {
  .people__grid { grid-template-columns: 1fr 1fr; }
  .people__grid::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(75, 30, 45, .2);
  }
}

.person__photo { aspect-ratio: 4 / 5; }

.person__name {
  margin-top: 1.75rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  line-height: 1.05;
  color: var(--prugna);
}

.person__role {
  margin-top: .4rem;
  font-size: .95rem;
  letter-spacing: .04em;
  color: var(--oliva);
}

.person__bio { margin-top: 1.75rem; font-size: 1rem; }
.person__bio p + p { margin-top: 1rem; }

/* --------------------------------------------------------------------------
   Perché Bialma
   -------------------------------------------------------------------------- */

.pair { padding-block: clamp(5rem, 10vw, 9rem); }

.pair__grid {
  position: relative;
  display: grid;
  gap: 5rem clamp(3rem, 8vw, 8rem);
}
@media (min-width: 900px) {
  .pair__grid { grid-template-columns: 1fr 1fr; }
  .pair__grid::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: 1px;
    background: rgba(75, 30, 45, .2);
  }
}

.pair__title {
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .04em;
  color: var(--oliva);
}

.pair__lead {
  margin: 1rem 0 2rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.7rem, 2.8vw, 2.5rem);
  line-height: 1.15;
  color: var(--prugna);
  text-wrap: balance;
}

.pair__col p:not(.pair__lead) + p { margin-top: 1rem; }

.values {
  background: var(--sabbia-scura);
  padding-block: clamp(5rem, 10vw, 9rem);
}

.values__grid {
  display: grid;
  gap: 3rem clamp(3rem, 8vw, 8rem);
  align-items: start;
}
@media (min-width: 900px) {
  .values__grid { grid-template-columns: 5fr 7fr; }
  .values__side { position: sticky; top: calc(var(--header-h) + 2rem); }
}

.values__photo { margin-top: 2.5rem; max-width: 24rem; }

.accordion__item { border-top: 1px solid rgba(75, 30, 45, .25); }
.accordion__item:last-child { border-bottom: 1px solid rgba(75, 30, 45, .25); }

.accordion button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 0;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  line-height: 1.15;
  color: var(--prugna);
}

.accordion__icon {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  transition: transform .5s var(--ease);
}
.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: currentColor;
}
.accordion__icon::after { transform: rotate(90deg); transition: transform .5s var(--ease); }
.accordion button[aria-expanded="true"] .accordion__icon::after { transform: rotate(0); }

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .55s var(--ease);
}
.accordion__panel > div { overflow: hidden; min-height: 0; }
.accordion__panel p { max-width: 34rem; padding-bottom: 1.6rem; }
.accordion h3:has(button[aria-expanded="true"]) + .accordion__panel { grid-template-rows: 1fr; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */

.split-hero--404 .split-hero__panel { justify-content: center; align-items: center; }

.code404 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(8rem, 24vw, 20rem);
  line-height: .9;
}

.notfound {
  align-self: center;
  padding: clamp(3rem, 6vw, 5rem) var(--gutter);
}
.notfound__title {
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  color: var(--prugna);
}
.notfound__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }

@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .split-hero--404 { grid-template-columns: 1fr 1fr; }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  overflow: hidden;
  background: var(--prugna);
  color: var(--sabbia);
  padding-bottom: 2rem;
}

.site-footer__mark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26vw;
  line-height: .85;
  text-align: center;
  color: var(--cipria);
  opacity: .35;
  padding-top: .12em;
  margin-bottom: clamp(1rem, 3vw, 2.5rem);
}

.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 2.5rem;
}
.site-footer:has(.site-footer__mark) .site-footer__bar { border-top: 1px solid rgba(216, 180, 166, .25); }

.albo {
  display: grid;
  gap: 1.25rem 3rem;
  font-size: .9rem;
  line-height: 1.5;
  color: rgba(239, 230, 218, .72);
}
@media (min-width: 700px) {
  .albo { grid-template-columns: repeat(2, minmax(0, 17rem)); }
}
.albo__name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--sabbia);
}

.site-footer__legal {
  margin-top: 2.5rem;
  font-size: .85rem;
  color: rgba(239, 230, 218, .55);
}

/* --------------------------------------------------------------------------
   Movimento allo scorrimento
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  /* le foto si aprono dal centro, come le due metà dell'apertura */
  .js .photo img {
    clip-path: inset(0 50% 0 50%);
    transform: translateY(var(--py, 0px)) scale(1.12);
    transition: clip-path 1.3s var(--ease);
  }
  .js .photo.is-in img { clip-path: inset(0); }

  .js .statement,
  .js .goal__text,
  .js .pair__lead {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  }
  .js .statement.is-in,
  .js .goal__text.is-in,
  .js .pair__lead.is-in { opacity: 1; transform: none; }

  .js .site-footer__mark {
    transform: translateY(30%);
    transition: transform 1.6s var(--ease-out);
  }
  .js .site-footer__mark.is-in { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
