/* ==========================================================================
   Bialma — proposta 3 "Ascolto"
   Forme morbide e onde concentriche che partono dal puntino del logo.
   ========================================================================== */

:root {
  --nebbia: #E9EEEC;
  --bianco: #F8FAF9;
  --petrolio: #1D4346;
  --petrolio-scuro: #12302F;
  --salvia: #A3B8A8;
  --salvia-scura: #4F6B5B;
  --albicocca: #E8A06A;
  --notte: #132426;

  --font: "Manrope", "Avenir Next", "Segoe UI", sans-serif;

  --gutter: clamp(16px, 5vw, 64px);
  --max: 1240px;
  --r-l: 36px;
  --r-m: 24px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

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

html { scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }

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

body {
  margin: 0;
  background: var(--nebbia);
  color: var(--notte);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  -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(--albicocca); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--albicocca); color: var(--notte); }

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

.dot {
  display: inline-block;
  width: .28em;
  height: .28em;
  margin-left: .08em;
  border-radius: 50%;
  background: var(--albicocca);
}

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

/* Pulsanti a capsula */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75em 1.5em;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--accent { background: var(--albicocca); color: var(--notte); }
.btn--accent:hover { background: #F0B484; }
.btn--dark { background: var(--petrolio); color: var(--nebbia); }
.btn--dark:hover { background: var(--petrolio-scuro); }
.btn--ghost { border-color: rgba(233, 238, 236, .5); color: var(--nebbia); }
.btn--ghost:hover { background: var(--nebbia); color: var(--petrolio); }

/* --------------------------------------------------------------------------
   Header: una capsula sospesa
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 20;
  width: min(calc(100% - 2 * clamp(12px, 3vw, 32px)), 1180px);
  height: 60px;
  translate: -50% 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 8px 0 24px;
  border-radius: 999px;
  background: rgba(233, 238, 236, .84);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(19, 36, 38, .14);
  color: var(--petrolio);
}

.wordmark {
  font-weight: 750;
  font-size: 1.35rem;
  letter-spacing: -.03em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  font-weight: 550;
  font-size: .95rem;
}
.site-nav a:not(.btn) { text-decoration: none; padding: .4rem 0; opacity: .8; transition: opacity .2s; }
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] { opacity: 1; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--albicocca); text-decoration-thickness: 2px; }

.menu-toggle {
  display: none;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  background: var(--petrolio);
  color: var(--nebbia);
  font-weight: 600;
  font-size: .9rem;
}

@media (max-width: 759px) {
  .menu-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    padding: 1rem;
    border-radius: var(--r-m);
    background: var(--bianco);
    box-shadow: 0 16px 40px rgba(19, 36, 38, .18);
    font-size: 1.15rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.98);
    transform-origin: top center;
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
  }
  .site-nav a:not(.btn) { padding: .7rem .5rem; }
  .site-nav .btn { margin-top: .5rem; }
  .site-header.is-menu-open .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
  }
}

/* --------------------------------------------------------------------------
   Apertura
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 clamp(4rem, 8vw, 6rem);
  border-radius: 0 0 var(--r-l) var(--r-l);
  background: var(--petrolio);
  color: var(--nebbia);
}

.hero__inner {
  display: grid;
  gap: 3rem clamp(3rem, 6vw, 6rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero:not(.hero--404) { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
  .hero__inner { grid-template-columns: 6fr 5fr; }
  .hero--page { min-height: 0 !important; }
}

.hero__text { position: relative; z-index: 2; }

.headline {
  font-weight: 300;
  font-size: clamp(2.6rem, 5.2vw, 5.4rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.hero__lead {
  max-width: 32rem;
  margin-top: 2rem;
  font-size: clamp(1.05rem, 1.3vw, 1.15rem);
  color: #C6D4CC;
}

.hero__visual { position: relative; }

.hero__photo {
  position: relative;
  z-index: 0;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: var(--r-l);
}
.hero__photo--portrait { aspect-ratio: 4 / 5; max-width: 30rem; margin-left: auto; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }

/* onde concentriche centrate sul puntino arancione della foto */
.ripples {
  position: absolute;
  left: 82.9%;
  top: 24%;
  z-index: 1;
  width: 0;
  height: 0;
  pointer-events: none;
}
.ripples--center { left: 50%; top: 42%; }

.ripples span {
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--albicocca);
  border-radius: 50%;
  translate: -50% -50%;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .ripples span { animation: ripple 8s linear infinite; }
  .ripples span:nth-child(2) { animation-delay: 2s; }
  .ripples span:nth-child(3) { animation-delay: 4s; }
  .ripples span:nth-child(4) { animation-delay: 6s; }

  .hero__photo { animation: open-circle 1.6s var(--ease) both; }
  .hero__text > * { animation: rise 1s var(--ease) both; }
  .hero__text > :nth-child(2) { animation-delay: .2s; }
}

@media (prefers-reduced-motion: reduce) {
  .ripples span { opacity: .35; }
  .ripples span:nth-child(2) { width: 200px; height: 200px; }
  .ripples span:nth-child(3) { width: 420px; height: 420px; }
  .ripples span:nth-child(4) { width: 680px; height: 680px; }
}

@keyframes ripple {
  0%   { width: 24px; height: 24px; opacity: 0; }
  8%   { opacity: .9; }
  100% { width: 1500px; height: 1500px; opacity: 0; }
}

@keyframes open-circle {
  from { clip-path: circle(8% at 82.9% 24%); }
  to   { clip-path: circle(150% at 82.9% 24%); }
}

@keyframes rise { from { opacity: 0; transform: translateY(20px); } }

/* --------------------------------------------------------------------------
   Approccio
   -------------------------------------------------------------------------- */

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

.statement {
  max-width: 24em;
  font-weight: 300;
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--petrolio);
  text-wrap: pretty;
}

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

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

.photo {
  overflow: hidden;
  border-radius: var(--r-l);
  background: var(--salvia);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.approach__photo { aspect-ratio: 4 / 5; max-width: 30rem; }

/* --------------------------------------------------------------------------
   Obiettivo: il cerchio si allarga con lo scorrimento (--s, da JS)
   -------------------------------------------------------------------------- */

.goal {
  --s: 1;
  position: relative;
  overflow: hidden;
  padding-block: clamp(7rem, 16vw, 13rem);
  text-align: center;
}

.goal__circle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150vmax;
  height: 150vmax;
  border-radius: 50%;
  background: var(--albicocca);
  translate: -50% -50%;
  transform: scale(var(--s));
}

.goal__inner { position: relative; }

.goal__text {
  max-width: 20em;
  margin-inline: auto;
  font-weight: 400;
  font-size: clamp(1.8rem, 3.8vw, 3.4rem);
  line-height: 1.18;
  letter-spacing: -.025em;
  color: var(--petrolio-scuro);
  text-wrap: balance;
}
.goal .btn { margin-top: 2.5rem; }

/* --------------------------------------------------------------------------
   Chi siamo
   -------------------------------------------------------------------------- */

.people {
  background: var(--bianco);
  padding-block: clamp(5rem, 11vw, 9rem) calc(clamp(5rem, 11vw, 9rem) + var(--r-l));
}

.section-title {
  font-weight: 200;
  font-size: clamp(3rem, 9vw, 7.5rem);
  line-height: 1;
  letter-spacing: -.05em;
  color: var(--petrolio);
}
.people .section-title { margin-bottom: clamp(3rem, 7vw, 5rem); }

.people__grid {
  display: grid;
  gap: 5rem clamp(3rem, 7vw, 7rem);
  align-items: start;
}
@media (min-width: 900px) {
  .people__grid { grid-template-columns: 1fr 1fr; }
}

.person__photo {
  overflow: hidden;
  width: min(100%, 20rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--salvia);
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }

.person__name {
  margin-top: 2rem;
  font-weight: 600;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  letter-spacing: -.025em;
  color: var(--petrolio);
}

.person__role {
  display: inline-block;
  margin-top: .6rem;
  padding: .2em .9em;
  border-radius: 999px;
  background: rgba(163, 184, 168, .35);
  font-weight: 600;
  font-size: .85rem;
  color: var(--petrolio-scuro);
}

.person__intro { margin-top: 1.5rem; max-width: 34rem; }

.person__more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .6s var(--ease);
}
.person__more > div { overflow: hidden; min-height: 0; max-width: 34rem; }
.person__more p { margin-top: 1rem; }
.person__more.is-open { grid-template-rows: 1fr; }

.more-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.25rem;
  font-weight: 650;
  font-size: .95rem;
  color: var(--petrolio);
}
.more-toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .4s var(--ease);
}
.more-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }

/* --------------------------------------------------------------------------
   Perché Bialma: schede
   -------------------------------------------------------------------------- */

.about { padding-block: clamp(4rem, 8vw, 6rem) calc(clamp(5rem, 10vw, 8rem) + var(--r-l)); }

.segmented {
  position: relative;
  display: inline-flex;
  padding: 6px;
  border-radius: 999px;
  background: var(--bianco);
  box-shadow: inset 0 0 0 1px rgba(29, 67, 70, .08);
}

.segmented button {
  position: relative;
  z-index: 1;
  padding: .7em clamp(1.1rem, 3vw, 1.8rem);
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--petrolio);
  transition: color .35s var(--ease);
}
.segmented button[aria-selected="true"] { color: var(--nebbia); }

.segmented__thumb {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: var(--x, 6px);
  width: var(--w, 0);
  border-radius: 999px;
  background: var(--petrolio);
  transition: left .45s var(--ease), width .45s var(--ease);
}

.pane {
  display: grid;
  gap: 1.5rem clamp(3rem, 7vw, 6rem);
  align-content: start;
  padding-top: clamp(3rem, 6vw, 4.5rem);
}
.pane[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .pane { animation: rise .6s var(--ease) both; }
}

.pane__title {
  font-weight: 650;
  font-size: 1rem;
  color: var(--salvia-scura);
}

.pane__lead {
  max-width: 15em;
  font-weight: 300;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--petrolio);
}

.pane__body { display: grid; gap: 1.1rem; max-width: 36rem; }

@media (min-width: 900px) {
  .pane:not(.pane--values) { grid-template-columns: 5fr 7fr; }
  .pane:not(.pane--values) .pane__title,
  .pane:not(.pane--values) .pane__lead { grid-column: 1; }
  .pane__body { grid-column: 2; grid-row: 1 / span 2; }
  .pane--values { grid-template-columns: 4fr 8fr; align-items: start; }
}

.values__photo { aspect-ratio: 3 / 4; max-width: 20rem; margin-top: 1.5rem; }
.values__photo img { object-position: 50% 45%; }

.values {
  display: grid;
  gap: 2.5rem 3rem;
}
@media (min-width: 640px) {
  .values { grid-template-columns: 1fr 1fr; }
}
.values h3 {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .4rem;
  font-weight: 650;
  font-size: 1.15rem;
  color: var(--petrolio);
}
.values h3::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--albicocca);
}
.values p { font-size: 1rem; }

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

.hero--404 {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
}
.notfound { position: relative; z-index: 2; }
.code404 {
  font-weight: 200;
  font-size: clamp(7rem, 20vw, 15rem);
  line-height: .9;
  letter-spacing: -.06em;
}
.notfound__title { margin-top: 1.5rem; font-weight: 400; font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -.02em; }
.notfound__text { margin-top: .75rem; color: #C6D4CC; }
.notfound__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }

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

.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: calc(-1 * var(--r-l));
  padding: clamp(4rem, 8vw, 6rem) 0 2rem;
  border-radius: var(--r-l) var(--r-l) 0 0;
  background: var(--petrolio-scuro);
  color: var(--nebbia);
}
.site-footer--compact { margin-top: 0; padding-top: 3rem; border-radius: 0; }

.site-footer__rings {
  position: absolute;
  right: -160px;
  top: -160px;
  width: 0;
  height: 0;
}
.site-footer__rings span {
  position: absolute;
  border: 1px solid rgba(163, 184, 168, .22);
  border-radius: 50%;
  translate: -50% -50%;
}
.site-footer__rings span:nth-child(1) { width: 420px; height: 420px; }
.site-footer__rings span:nth-child(2) { width: 700px; height: 700px; }
.site-footer__rings span:nth-child(3) { width: 980px; height: 980px; }

.site-footer__mark {
  position: relative;
  font-weight: 800;
  font-size: clamp(3.5rem, 13vw, 10rem);
  line-height: .9;
  letter-spacing: -.06em;
}

.site-footer__bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 2rem;
  border-top: 1px solid rgba(163, 184, 168, .25);
}
.site-footer--compact .site-footer__bar { margin-top: 0; padding-top: 0; border-top: 0; }

.albo {
  display: grid;
  gap: 1.25rem 3rem;
  font-size: .9rem;
  line-height: 1.5;
  color: #B9C9C0;
}
@media (min-width: 700px) {
  .albo { grid-template-columns: repeat(2, minmax(0, 17rem)); }
}
.albo__name { display: block; font-weight: 650; color: var(--nebbia); }

.site-footer__legal { margin-top: 2rem; font-size: .85rem; color: rgba(233, 238, 236, .55); }

/* --------------------------------------------------------------------------
   Comparsa allo scorrimento: le foto si aprono da un cerchio
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js .photo img,
  .js .person__photo img {
    clip-path: circle(12% at 50% 50%);
    transform: scale(1.08);
    transition: clip-path 1.4s var(--ease), transform 1.6s var(--ease);
  }
  .js .photo.is-in img,
  .js .person__photo.is-in img {
    clip-path: circle(75% at 50% 50%);
    transform: none;
  }

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

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