/* ============================================
   VÀLUA IMMOBILIÀRIA — valorarimmoble.cat
   Clean SaaS / shadcn aesthetic
   White base, brand accent #462b13
   ============================================ */

:root {
  --brand:       #462b13;
  --brand-hover: #5a3519;
  --brand-pale:  #f7f0e8;
  --black:       #09090b;
  --dark:        #18181b;
  --mid:         #71717a;
  --muted:       #a1a1aa;
  --border:      #e4e4e7;
  --bg:          #ffffff;
  --bg-gray:     #fafafa;
  --white:       #ffffff;

  --font-sans:    'Inter', -apple-system, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.1);
  --transition: 0.2s ease;
  --max-w: 1160px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); font-size: 15px; color: var(--dark); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { line-height: 1.7; color: var(--mid); }

/* ---- TYPOGRAPHY ---- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; color: var(--black); }
h1 { font-size: clamp(2.6rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: 1.15rem; margin-bottom: .5rem; }
h1 em { font-style: italic; color: var(--brand); }

.label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-pale);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .6rem 1.2rem;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.btn--primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--outline:hover { background: var(--brand-pale); }
.btn--outline-dark { background: transparent; color: var(--white); border-color: rgba(255,255,255,.35); }
.btn--outline-dark:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }
.btn--sm { padding: .45rem 1rem; font-size: 13px; }

/* ---- LAYOUT ---- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 80px 0; }
.section--gray { background: var(--bg-gray); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin: .5rem 0 .75rem; }
.section-header p { max-width: 520px; margin: 0 auto; font-size: .9rem; }

/* ---- NAV ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 1.5rem; height: 60px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nav.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav__inner { max-width: var(--max-w); margin: 0 auto; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav__logo img { height: 32px; width: auto; }
.nav__right { display: flex; align-items: center; gap: 1rem; }
.nav__link { font-size: 13.5px; color: var(--mid); transition: color var(--transition); }
.nav__link:hover { color: var(--dark); }

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  padding-top: 60px;
  background: var(--bg);
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
}
.hero__inner {
  max-width: var(--max-w); margin: 0 auto; padding: 3rem 1.5rem;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; align-items: center;
}

.hero__badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: 11.5px; font-weight: 500; letter-spacing: .06em;
  color: var(--mid);
  border: 1px solid var(--border);
  padding: .3rem .9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}
.badge__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34,197,94,.2);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 2px rgba(34,197,94,.2); }
  50%      { box-shadow: 0 0 0 5px rgba(34,197,94,.1); }
}

.hero__copy h1 { margin-bottom: 1rem; }
.hero__desc { font-size: .95rem; margin-bottom: 1.5rem; max-width: 420px; }

.hero__checks { list-style: none; margin-bottom: 2rem; display: flex; flex-direction: column; gap: .5rem; }
.hero__checks li { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--dark); }
.hero__checks li i { color: var(--brand); font-size: .8rem; }

.hero__agent {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  background: var(--bg-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: fit-content;
}
.hero__agent img {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border);
}
.hero__agent strong { display: block; font-size: .8rem; font-weight: 500; color: var(--dark); }
.hero__agent span { font-size: .72rem; color: var(--muted); }

/* ---- WIDGET CARD ---- */
.hero__widget { position: relative; }
.widget-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg);
}
.widget-card__header {
  display: flex; align-items: center; gap: .6rem;
  padding: .75rem 1rem;
  background: var(--bg-gray);
  border-bottom: 1px solid var(--border);
}
.widget-card__dots { display: flex; gap: 5px; }
.widget-card__dots span {
  width: 10px; height: 10px; border-radius: 50%;
}
.widget-card__dots span:nth-child(1) { background: #ff5f57; }
.widget-card__dots span:nth-child(2) { background: #febc2e; }
.widget-card__dots span:nth-child(3) { background: #28c840; }
.widget-card__label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.widget-card__label i { color: var(--brand); }

.widget-card iframe { display: block; }

/* ---- STATS BAR ---- */
.stats-bar {
  background: var(--black);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.stats-bar__inner {
  max-width: var(--max-w); margin: 0 auto; padding: 1.25rem 1.5rem;
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap;
}
.stats-bar__item {
  display: flex; flex-direction: column; align-items: center;
  padding: .25rem 2.5rem; text-align: center;
}
.stats-bar__item strong { font-size: .9rem; font-weight: 600; color: #fff; }
.stats-bar__item span { font-size: .72rem; color: rgba(255,255,255,.45); margin-top: 1px; }
.stats-bar__sep { width: 1px; height: 28px; background: rgba(255,255,255,.1); }

/* ---- STEPS ---- */
.steps { display: flex; align-items: flex-start; justify-content: center; gap: 0; }
.step {
  flex: 1; max-width: 280px; text-align: center; padding: 2rem 1.5rem;
  border-radius: var(--radius); transition: background var(--transition);
}
.step:hover { background: var(--bg-gray); }
.step__num { font-family: var(--font-display); font-size: 3rem; font-weight: 400; color: rgba(70,43,19,.1); line-height: 1; margin-bottom: .75rem; }
.step__icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-pale); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .9rem; font-size: 1rem;
}
.step h3 { font-size: 1rem; margin-bottom: .4rem; }
.step p { font-size: .85rem; }
.step__arrow { display: flex; align-items: center; justify-content: center; padding-top: 5rem; color: var(--border); font-size: 1.1rem; flex-shrink: 0; }

/* ---- ABOUT ---- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.about__img-wrap {
  border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/5; box-shadow: var(--shadow-lg);
}
.about__img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.about__img-wrap:hover img { transform: scale(1.03); }
.about__img-col { position: relative; }
.about__stat {
  position: absolute; bottom: -1rem; left: -1rem;
  background: var(--brand); color: #fff;
  padding: 1.2rem 1.5rem; border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(70,43,19,.3);
}
.about__stat-num { font-family: var(--font-display); font-size: 2.5rem; line-height: 1; display: block; }
.about__stat-label { font-size: .72rem; color: rgba(255,255,255,.7); display: block; margin-top: .2rem; line-height: 1.4; }

.about__text h2 { margin: .5rem 0 1rem; }
.about__lead { font-size: .95rem; color: var(--dark); margin-bottom: .8rem; }
.about__text p { margin-bottom: .8rem; font-size: .875rem; }
.about__api {
  display: flex; align-items: center; gap: .75rem;
  padding: .9rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius); margin: 1.25rem 0 1.5rem;
  background: var(--bg-gray);
}
.about__api img { height: 32px; width: auto; opacity: .75; }
.about__api strong { display: block; font-size: .82rem; font-weight: 500; color: var(--dark); }
.about__api span { font-size: .75rem; color: var(--muted); }

/* ---- SERVICES ---- */
.services { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
.service-card {
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.service-card:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(70,43,19,.1); transform: translateY(-3px); }
.service-card__icon { width: 40px; height: 40px; background: var(--brand-pale); color: var(--brand); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; font-size: .95rem; }
.service-card h3 { font-size: .95rem; margin-bottom: .4rem; }
.service-card p { font-size: .82rem; }

/* ---- CTA ---- */
.cta-section { padding: 60px 0; background: var(--brand); }
.cta-box {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.cta-box__left h2 { color: #fff; font-size: clamp(1.5rem,3vw,2rem); margin-bottom: .5rem; }
.cta-box__left p { color: rgba(255,255,255,.65); font-size: .875rem; }
.cta-box__right { display: flex; gap: .75rem; flex-shrink: 0; flex-wrap: wrap; }
.cta-section .btn--primary { background: #fff; color: var(--brand); border-color: #fff; }
.cta-section .btn--primary:hover { background: var(--brand-pale); }

/* ---- FOOTER ---- */
.footer { background: var(--black); color: rgba(255,255,255,.55); padding: 4rem 0 2rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.07); }
.footer__logo { height: 30px; width: auto; margin-bottom: 1rem; opacity: .85; }
.footer__brand p { font-size: .82rem; line-height: 1.65; max-width: 240px; color: rgba(255,255,255,.4); margin-bottom: 1.2rem; }
.footer__social { display: flex; gap: .6rem; }
.footer__social a { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem; color: rgba(255,255,255,.4); transition: var(--transition); }
.footer__social a:hover { border-color: rgba(255,255,255,.4); color: #fff; }
.footer__col h4 { font-family: var(--font-sans); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.3); margin-bottom: 1rem; }
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: .55rem; font-size: .82rem; }
.footer__col a:hover { color: #fff; }
.footer__contact-list li { display: flex; align-items: flex-start; gap: .5rem; }
.footer__contact-list i { color: var(--brand); font-size: .75rem; margin-top: .2rem; flex-shrink: 0; }
.footer__contact-list a:hover { color: #fff; }
.footer__api { height: 28px; width: auto; opacity: .3; filter: brightness(10); margin-top: 1.25rem; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 1.5rem; font-size: .78rem; color: rgba(255,255,255,.25); flex-wrap: wrap; gap: .75rem; }
.footer__legal { display: flex; gap: 1.25rem; }
.footer__legal a:hover { color: rgba(255,255,255,.5); }

/* ---- ANIMATIONS ---- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .services { grid-template-columns: repeat(2,1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1/-1; }
}

@media (max-width: 820px) {
  .hero__inner { grid-template-columns: 1fr; padding: 2rem 1.5rem; }
  .hero { min-height: auto; padding-top: 80px; }
  .widget-card iframe { height: 460px; }
  .about { grid-template-columns: 1fr; gap: 2.5rem; }
  .about__img-col { order: -1; }
  .about__stat { left: 1rem; }
  .steps { flex-direction: column; align-items: center; }
  .step__arrow { padding: 0; transform: rotate(90deg); }
  .cta-box { flex-direction: column; text-align: center; }
  .cta-box__right { justify-content: center; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
  .stats-bar__item { padding: .25rem 1.2rem; }
  .services { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; }
}
