/*
Theme Name: Vil·la Maria — Còdol
Theme URI: https://www.codolvillamaria.cat/
Author: Intergrid
Description: Landing «coming soon» de Vil·la Maria (Còdol, Reus). Tema a mida.
Version: 1.0
Text Domain: codolvm
*/

@font-face {
  font-family: "Nexa";
  src: url("assets/Nexa-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --gold: #d99b53;
  --gold-deep: #c07d38;
  --green: #4f6b45;
  --ink: #2a2620;
  --paper: #fbf7f0;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body.codol-landing {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: #fff;
  background: #1c1a17;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Escena de fons ---------- */
.scene {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 118px 20px 64px;
  background-image:
    linear-gradient(180deg, rgba(18,16,13,.35) 0%, rgba(18,16,13,.15) 32%, rgba(18,16,13,.55) 72%, rgba(18,16,13,.86) 100%),
    image-set(url("assets/bg.webp") type("image/webp"), url("assets/bg.jpg") type("image/jpeg"));
  background-image:
    linear-gradient(180deg, rgba(18,16,13,.35) 0%, rgba(18,16,13,.15) 32%, rgba(18,16,13,.55) 72%, rgba(18,16,13,.86) 100%),
    url("assets/bg.jpg");
  background-size: cover;
  background-position: center 38%;
  background-attachment: fixed;
}
@media (max-width: 820px) { .scene { background-attachment: scroll; } }

/* ---------- Contingut ---------- */
.wrap {
  width: 100%;
  max-width: 620px;
  text-align: center;
  animation: rise .9s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* Aparició diferida: deixa veure el fons un instant abans del formulari/social/footer */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.reveal { opacity: 0; animation: fadeUp .85s ease both; }
.reveal.card   { animation-delay: 1s; }
.reveal.social { animation-delay: 1.13s; }
.reveal.footer { animation-delay: 1.23s; }

@media (prefers-reduced-motion: reduce) {
  .wrap { animation: none; }
  .reveal { opacity: 1; animation: none; }
}

/* ---------- Capçalera amb el logo (futur lloc del menú) ---------- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 26px 36px;
  animation: rise .9s ease both;
}
.site-header a { display: inline-block; line-height: 0; }
.logo {
  width: 180px;
  max-width: 46vw;
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.45));
}
@media (max-width: 600px) {
  .site-header { padding: 18px 20px; }
  .logo { width: 140px; }
}

.headline {
  font-family: "Nexa", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 5.4vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: .5px;
  margin: 0 0 10px;
  text-shadow: 0 3px 20px rgba(0,0,0,.55);
}
.headline .grow { color: #fff; }

.lede {
  font-size: clamp(1rem, 2.6vw, 1.22rem);
  font-weight: 300;
  margin: 0 0 30px;
  opacity: .95;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}

/* ---------- Formulari compacte (barra «pill») ---------- */
.card { max-width: 520px; margin: 0 auto; text-align: center; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.pill {
  display: flex; align-items: center;
  background: rgba(251, 247, 240, .96);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 16px 44px rgba(0,0,0,.38);
}
.pill input {
  border: none; background: transparent; outline: none;
  font-size: .98rem; color: var(--ink);
  padding: 12px 4px; min-width: 0;
  font-family: inherit;
}
.pill input::placeholder { color: #8d8375; }
.pill input#mce-FNAME { flex: 0 1 30%; }
.pill input#mce-EMAIL { flex: 1 1 auto; }
.pill-sep { width: 1px; align-self: stretch; margin: 9px 14px; background: #d9d0c2; }
.pill-go {
  flex: 0 0 auto; width: 46px; height: 46px;
  border: none; border-radius: 50%;
  background: var(--gold-deep); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s, transform .06s;
}
.pill-go svg { width: 22px; height: 22px; }
.pill-go:hover { background: #a96a2c; }
.pill-go:active { transform: translateY(1px); }
.pill-go:disabled { opacity: .55; cursor: default; }
.pill-go.sending svg { animation: nudge .8s ease infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }

@media (max-width: 480px) {
  .pill { flex-wrap: wrap; border-radius: 26px; padding: 8px 8px 8px 16px; }
  .pill input#mce-FNAME { flex: 1 1 100%; border-bottom: 1px solid #e4dccd; }
  .pill-sep { display: none; }
  .pill input#mce-EMAIL { flex: 1 1 60%; }
}

/* Desplegable de camps opcionals */
.more-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 14px auto 0; padding: 4px 10px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: .86rem; color: #fff; opacity: .85;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.more-toggle:hover { opacity: 1; text-decoration: underline; }
.more-toggle .chev { display: inline-block; transition: transform .2s; }
.more-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }

.more {
  background: rgba(251, 247, 240, .96);
  color: var(--ink);
  border-radius: 16px;
  padding: 18px 18px 12px;
  margin-top: 12px;
  text-align: left;
  box-shadow: 0 16px 44px rgba(0,0,0,.35);
  animation: fadeUp .3s ease both;
}
.field { margin-bottom: 12px; }
.field input[type=text],
.field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d9d0c2;
  border-radius: 9px;
  background: #fff;
  font-size: .93rem;
  color: var(--ink);
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #8d8375; }
.field select:invalid, .field select option[value=""] { color: #8d8375; }
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217,155,83,.22);
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; gap: 0; } }

.groups { margin: 4px 0 6px; }
.groups > span { display:block; font-size:.82rem; font-weight:600; color:#5a5348; margin-bottom:8px; }
.groups label {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: .9rem; font-weight: 400; color: var(--ink);
  margin-bottom: 7px; cursor: pointer;
}
.groups input[type=checkbox] { margin-top: 3px; accent-color: var(--gold-deep); }

/* Línia legal discreta + text complet desplegable */
.legal-line {
  font-size: .74rem; margin: 12px 0 0;
  color: #fff; opacity: .75; text-align: center;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.legal-toggle {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; color: inherit; text-decoration: underline;
}
.legal-full {
  font-size: .72rem; line-height: 1.5; text-align: left;
  color: rgba(255,255,255,.85);
  background: rgba(18,16,13,.55);
  border-radius: 10px; padding: 12px 14px; margin-top: 10px;
  animation: fadeUp .3s ease both;
}
.legal-full p { margin: 0; }
.legal-full a { color: var(--gold); }

.mc-response { font-size: .85rem; margin: 12px 2px 0; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
#mce-error-response { color: #ffb3a7; }
#mce-success-response { color: #cde3c3; }

/* Missatge d'agraïment (substitueix el formulari en enviar-lo) */
.mc-thanks { text-align: center; padding: 10px 12px; animation: fadeUp .5s ease both; }
.mc-thanks .check {
  width: 64px; height: 64px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--green); color: #fff;
  font-size: 2rem; line-height: 1;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.mc-thanks h2 {
  font-family: "Nexa", Arial, sans-serif; font-weight: 400;
  font-size: clamp(1.4rem, 3.8vw, 1.85rem); line-height: 1.15;
  color: #fff; margin: 0 0 10px;
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
}
.mc-thanks p { font-size: 1.05rem; color: #fff; margin: 0; opacity: .85; text-shadow: 0 1px 8px rgba(0,0,0,.5); }

/* ---------- Instagram / social ---------- */
.social { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.social a {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
  font-size: 1rem; font-weight: 600; letter-spacing: .3px;
  padding: 11px 20px; border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(6px);
  transition: background .18s, transform .18s;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}
.social a:hover { background: rgba(255,255,255,.22); transform: translateY(-2px); }
.social svg { width: 22px; height: 22px; fill: currentColor; }

.footer { margin-top: 26px; font-size: .74rem; opacity: .7; text-align:center; text-shadow:0 1px 6px rgba(0,0,0,.5); }
.footer a { color: #fff; }
