/* ============================================================
   I3F CONSULTORES — Landing Page
   Colors extrets del Manual d'Imatge Corporativa:
   Granate principal : #891536
   Granate fosc      : #5E011C
   Gris clar         : #F2F2F2
   Text fosc         : #282828
   Text gris         : #606060
   Tipografia        : Liberation Sans → Arial → sans-serif
============================================================ */

/* ── Reset & base ─────────────────────────────────────── */

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

:root {
  --garnet:        #891536;
  --garnet-dark:   #5E011C;
  --garnet-light:  #a81a43;
  --gray-bg:       #F2F2F2;
  --gray-mid:      #e0e0e0;
  --text-dark:     #282828;
  --text-mid:      #606060;
  --white:         #ffffff;

  --font-main: 'Liberation Sans', Arial, Helvetica, sans-serif;

  --max-width: 1120px;
  --section-gap: 96px;
  --radius: 4px;
  --transition: 200ms ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}


/* ── Layout helpers ───────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-gap) 0;
}

.section-header {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.25;
}

.section-header p {
  color: var(--text-mid);
  font-size: 1.0625rem;
}

.section-header--light h2,
.section-header--light p {
  color: var(--white);
}

.section-header--light p {
  opacity: 0.82;
}


/* ── Buttons ──────────────────────────────────────────── */

.btn {
  display: inline-block;
  font-family: var(--font-main);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--garnet);
  color: var(--white);
  border-color: var(--garnet);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--garnet-dark);
  border-color: var(--garnet-dark);
}

.btn-outline {
  background: transparent;
  color: var(--garnet);
  border-color: var(--garnet);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--garnet);
  color: var(--white);
}

/* Outline blanc (sobre fons fosc) */
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline-white:hover,
.btn-outline-white:focus-visible {
  background: var(--white);
  color: var(--garnet);
}


/* ── Header ───────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-mid);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo-link {
  flex-shrink: 0;
}

.logo-img {
  height: 36px;
  width: auto;
}

/* Nav desktop */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: color var(--transition);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--garnet);
  border-bottom-color: var(--garnet);
}

.nav-cta {
  background: var(--garnet);
  color: var(--white) !important;
  border-bottom: none !important;
  padding: 8px 20px !important;
  border-radius: var(--radius);
  transition: background var(--transition) !important;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--garnet-dark) !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 36px;
  height: 36px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ── Hero ─────────────────────────────────────────────── */

.hero {
  background: var(--garnet);
  color: var(--white);
  padding: 100px 0 96px;
  position: relative;
  overflow: hidden;
}

/* Marca d'aigua subtil al hero */
.hero::after {
  content: '';
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 480px;
  height: 480px;
  background: url('../assets/logo-symbol.png') center/contain no-repeat;
  opacity: 0.06;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 640px;
}

.hero-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--white);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  line-height: 1.6;
  opacity: 0.88;
  margin-bottom: 40px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero .btn-primary {
  background: var(--white);
  color: var(--garnet);
  border-color: var(--white);
}

.hero .btn-primary:hover,
.hero .btn-primary:focus-visible {
  background: var(--gray-bg);
  border-color: var(--gray-bg);
}

.hero .btn-outline {
  color: var(--white);
  border-color: rgba(255,255,255,0.55);
}

.hero .btn-outline:hover,
.hero .btn-outline:focus-visible {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}


/* ── Serveis ──────────────────────────────────────────── */

.servicios {
  background: var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 36px 32px;
  border-top: 3px solid var(--garnet);
  transition: box-shadow var(--transition), transform var(--transition);
}

.service-card:hover {
  box-shadow: 0 8px 28px rgba(137, 21, 54, 0.10);
  transform: translateY(-3px);
}

.service-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  color: var(--garnet);
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.service-card p {
  font-size: 0.9375rem;
  color: var(--text-mid);
  line-height: 1.6;
}


/* ── Sobre ────────────────────────────────────────────── */

.sobre {
  background: var(--gray-bg);
}

.sobre-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
}

.sobre-text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
  line-height: 1.25;
}

.sobre-text p {
  font-size: 1.0625rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 16px;
}

.sobre-text p:last-of-type {
  margin-bottom: 32px;
}

.sobre-aside {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sobre-symbol {
  width: 160px;
  height: 160px;
  opacity: 0.18;
}


/* ── Contacte ─────────────────────────────────────────── */

.contacto {
  background: var(--garnet);
  color: var(--white);
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-item dt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
}

.contact-item dt svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.contact-item dd {
  font-size: 1rem;
  line-height: 1.6;
}

.contact-item dd a {
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.35);
  transition: border-color var(--transition);
}

.contact-item dd a:hover,
.contact-item dd a:focus-visible {
  border-bottom-color: var(--white);
}

/* Placeholder formulari */
.form-pending {
  background: rgba(255,255,255,0.08);
  border: 1px dashed rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 40px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.form-pending p {
  color: rgba(255,255,255,0.5);
  font-size: 0.9375rem;
  text-align: center;
}


/* ── Footer ───────────────────────────────────────────── */

.site-footer {
  background: var(--garnet-dark);
  color: var(--white);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.footer-legal p {
  font-size: 0.8125rem;
  opacity: 0.65;
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.875rem;
  opacity: 0.65;
  transition: opacity var(--transition);
}

.footer-nav a:hover {
  opacity: 1;
}

.footer-copy {
  font-size: 0.8125rem;
  opacity: 0.5;
}


/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 768px) {

  :root {
    --section-gap: 64px;
  }

  /* Nav mòbil */
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-mid);
    overflow: hidden;
    max-height: 0;
    transition: max-height 300ms ease;
  }

  .main-nav.is-open {
    max-height: 300px;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0 16px;
  }

  .main-nav ul li {
    width: 100%;
  }

  .main-nav a {
    display: block;
    padding: 12px 24px;
    border-bottom: none;
  }

  .nav-cta {
    margin: 8px 24px 0 !important;
    padding: 10px 20px !important;
    text-align: center;
  }

  /* Hero */
  .hero {
    padding: 72px 0 64px;
  }

  .hero::after {
    display: none;
  }

  /* Serveis */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Sobre */
  .sobre-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sobre-aside {
    display: none;
  }

  /* Contacte */
  .contacto-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}


/* ── Focus visible (accessibilitat) ──────────────────── */

:focus-visible {
  outline: 3px solid var(--garnet);
  outline-offset: 3px;
}
