/* Òptica Badia — proposta Renoveia
   Rojo pupil·la #BB0921 mostrejat del rètol real (fotografia de la façana).
   Contrastos: vermell/perla 5,59:1 · tinta/perla 15,84:1 · secundari/perla 4,94:1
   · perla/atzabeja 15,84:1 · secundari clar/atzabeja 8,44:1 — tot AA.
   El vermell NOMÉS com a microaccent: punts de separadors, pupil·la del logo, subratllats. */

:root {
  --perla: #EAECEE;
  --blanc: #FFFFFF;
  --tinta: #101215;
  --secundari: #5C6670;
  --secundari-clar: #A6AFB8;
  --linia: #D2D7DB;
  --vermell: #BB0921;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--perla);
  color: var(--tinta);
  font-family: 'Epilogue', sans-serif;
  font-weight: 400;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, .score-num, .wordmark, .phone a {
  font-family: 'Newsreader', serif;
  font-weight: 600;
}

section[id] { scroll-margin-top: 92px; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 4rem 1.25rem;
}

.center { text-align: center; }

/* ─── Pupil·la (microaccent) ─── */
.pupil {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vermell);
  margin-left: .45rem;
  vertical-align: super;
}

.pupil-gran {
  width: 14px;
  height: 14px;
  vertical-align: baseline;
  margin-left: .8rem;
}

/* ─── Separador de lent ─── */
.sep {
  position: relative;
  height: 0;
  border-top: 1px solid var(--linia);
  max-width: 1040px;
  margin: 0 auto;
}

.sep::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vermell);
}

/* ─── Cinta ─── */
.ribbon {
  background: var(--tinta);
  color: var(--perla);
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
  padding: .45rem .75rem;
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(234, 236, 238, .86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linia);
}

.header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: .65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-size: 1.45rem;
  color: var(--tinta);
  text-decoration: none;
  letter-spacing: .015em;
  padding: .5rem 0;           /* tap target */
}

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--linia);
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 11px;
  cursor: pointer;
}

.burger span {
  width: 20px;
  height: 2px;
  background: var(--tinta);
}

.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--blanc);
  border-bottom: 1px solid var(--linia);
  padding: .5rem 1.25rem 1.1rem;
  flex-direction: column;
  gap: .1rem;
}

.nav.open { display: flex; }

.nav a {
  color: var(--tinta);
  text-decoration: none;
  font-weight: 600;
  padding: .7rem 0;            /* tap target ≥44px */
}

.nav a:hover { color: var(--vermell); }

.nav .btn-primary,
.nav .btn-primary:hover { color: var(--perla); }

.nav .btn-primary { padding: .8rem 1.35rem; }   /* guanya a .nav a; ≥44px */

/* ─── Botons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 999px;
  padding: .8rem 1.6rem;       /* simètric; alçada ≥44px */
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--tinta);
  color: var(--perla);
}

.btn-primary:hover { background: #23262B; }

.btn-ghost {
  border: 1px solid var(--tinta);
  color: var(--tinta);
}

.btn-ghost:hover { background: rgba(16, 18, 21, .06); }

.btn-nav {
  padding: .8rem 1.35rem;      /* equilibrat: el centrat el fa el flex; ≥44px */
  margin-top: .5rem;
  align-self: flex-start;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.8rem;
}

/* ─── Hero ─── */
.hero {
  max-width: 1040px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.kicker {
  color: var(--vermell);
  font-weight: 600;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.3rem);
  line-height: 1.05;
  margin-bottom: 1.1rem;
}

.hero-sub {
  color: var(--secundari);
  font-size: 1.12rem;
  max-width: 33rem;
}

.hero-art { display: flex; justify-content: center; }

.lens {
  width: min(100%, 420px);     /* mai per sobre dels 720 px naturals */
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px var(--tinta),
    0 22px 60px rgba(16, 18, 21, .16);
}

/* ─── Seccions ─── */
.blanc { background: var(--blanc); }
.perla { background: var(--perla); }
.fosc { background: var(--tinta); color: var(--perla); }

h2 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin-bottom: 1.8rem;
}

/* ─── Serveis ─── */
.section-sub {
  color: var(--secundari);
  margin: -1.2rem 0 2rem;
}

.servei-principal {
  background: var(--blanc);
  border: 1px solid var(--linia);
  border-top: 3px solid var(--vermell);
  border-radius: 12px;
  padding: 1.8rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.sp-text h3 {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 4.5vw, 2.1rem);
  line-height: 1.15;
  margin-bottom: .5rem;
}

.sp-text p { color: var(--secundari); }

/* motiu de la lent: tres cercles concèntrics fins + pupil·la */
.lent-motiu,
.anell-2,
.anell-3 {
  display: grid;
  place-items: center;
  border: 1.5px solid var(--tinta);
  border-radius: 50%;
}

.lent-motiu { width: 120px; height: 120px; margin: 0 auto; }
.anell-2 { width: 84px; height: 84px; }
.anell-3 { width: 50px; height: 50px; }

.pupila-centre {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--vermell);
}

.serveis-llista {
  list-style: none;
  margin-top: 1.4rem;
}

.serveis-llista li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem .25rem;
  border-bottom: 1px solid var(--linia);
}

.serveis-llista li:last-child { border-bottom: 0; }

.serveis-llista .nom {
  font-weight: 600;
  color: var(--tinta);
}

.marca {
  flex: none;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--tinta);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.marca.amb-punt::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--vermell);
}

.nota {
  color: var(--secundari);
  font-size: .9rem;
  margin-top: 1.4rem;
}

/* ─── L'òptica ─── */
.optica-grid {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.optica-text {
  font-size: 1.15rem;
  max-width: 30rem;
}

.optica-photo img {
  width: min(100%, 620px);     /* mai per sobre dels 960 px naturals */
  border: 1px solid var(--linia);
  border-radius: 10px;
  background: var(--blanc);
  padding: 8px;
}

/* ─── Opinions ─── */
.score {
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-num {
  font-size: clamp(4.2rem, 13vw, 6.5rem);
  line-height: 1;
  color: var(--perla);
}

.score-sub {
  color: var(--secundari-clar);
  margin-top: .5rem;
}

.quotes {
  margin-top: 2.4rem;
  display: grid;
  gap: 1.8rem;
  justify-items: center;
}

.quote p {
  font-family: 'Newsreader', serif;
  font-weight: 500;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  line-height: 1.5;
  max-width: 38rem;
}

.quote footer {
  color: var(--secundari-clar);
  font-family: 'Epilogue', sans-serif;
  font-size: .84rem;
  margin-top: .6rem;
}

/* ─── On som ─── */
.place-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.address {
  font-weight: 600;
  font-size: 1.12rem;
}

.phone { margin: .6rem 0 .4rem; }

.phone a {
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  color: var(--tinta);
  text-decoration: none;
  letter-spacing: .01em;
}

.phone a:hover { color: var(--vermell); }

.mail a {
  color: var(--tinta);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--vermell);
  text-underline-offset: 3px;
  display: inline-block;
  padding: .4rem 0;            /* tap target */
}

.hours {
  list-style: none;
  max-width: 27rem;
}

.hours li {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .32rem 0;
}

.hours .fill {
  flex: 1;
  border-bottom: 1px solid var(--linia);
  transform: translateY(-4px);
  min-width: 1rem;
}

.hours li span:last-child { white-space: nowrap; color: var(--secundari); }

/* ─── Footer ─── */
.site-footer {
  background: var(--tinta);
  color: var(--secundari-clar);
  text-align: center;
  padding: 2.2rem 1.25rem 2.6rem;
  font-size: .92rem;
}

.site-footer a {
  color: var(--secundari-clar);
  text-decoration: underline;
}

.site-footer a:hover { color: var(--perla); }

.credit { margin-top: .4rem; }

/* ─── Escriptori ─── */
@media (min-width: 840px) {
  .burger { display: none; }

  .nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    background: none;
    border: 0;
    padding: 0;
  }

  .nav a { padding: .65rem 0; }

  .btn-nav { margin-top: 0; align-self: auto; }

  .hero {
    flex-direction: row;
    align-items: center;
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .hero-text { flex: 1.1; }
  .hero-art { flex: .9; }

  .servei-principal {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2.2rem 2.4rem;
  }

  .lent-motiu { margin: 0 1rem 0 0; }

  .serveis-llista {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 3.5rem;
  }

  .serveis-llista li:nth-last-child(2) { border-bottom: 0; }

  .optica-grid {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
  }

  .optica-text { flex: 1; }
  .optica-photo { flex: 1.2; }

  .place-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
  }
}
