:root {
  --bg: #edf2f5;
  --bg-soft: #e1e9f0;
  --surface: rgba(250, 252, 255, 0.84);
  --surface-strong: #fcfdff;
  --ink: #203342;
  --ink-soft: #5d7284;
  --line: rgba(32, 51, 66, 0.12);
  --accent: #3f6f98;
  --accent-strong: #2b5478;
  --accent-warm: #7c99b1;
  --shadow: 0 18px 45px rgba(32, 51, 66, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --max-width: 1140px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  font-family: "Source Sans 3", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(63, 111, 152, 0.16), transparent 30%),
    linear-gradient(180deg, #f4f7fa 0%, var(--bg) 100%);
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("images/hois.png") center center / cover no-repeat;
  opacity: 0.09;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

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

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

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(244, 247, 250, 0.84);
  border-bottom: 1px solid rgba(32, 51, 66, 0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  font-family: "Fraunces", serif;
  font-size: calc(1.05rem + 6pt);
  font-weight: 700;
  color: #10212e;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.25rem;
}

.site-nav a {
  color: #203342;
  font-size: calc(0.98rem + 2pt);
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  color: var(--accent);
}

/* ── Hero ── */

.hero {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 0 3rem;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 2rem;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.card,
.programme-item {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  padding: clamp(0.8rem, 2vw, 1.5rem) clamp(2rem, 4vw, 4rem) clamp(2rem, 4vw, 4rem) clamp(2rem, 4vw, 4rem);
  border-radius: calc(var(--radius-lg) + 8px);
  background: linear-gradient(160deg, rgba(252, 253, 255, 0.96), rgba(239, 244, 248, 0.9));
  color: #142533;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/wbm.png") center bottom / contain no-repeat;
  opacity: 0.09;
  pointer-events: none;
  border-radius: inherit;
}

.hero-copy > * {
  position: relative;
  z-index: 1;
}

.hero-panel {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: rgba(63, 111, 152, 0.08);
  display: grid;
  gap: 1rem;
  align-content: start;
}

.eyebrow,
.panel-label {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  font-size: calc(0.84rem + 4pt);
}

#contact .eyebrow,
#about .eyebrow,
#venue .eyebrow,
#speakers .eyebrow,
#programme .eyebrow,
#apply .eyebrow {
  font-size: calc(0.84rem + 6pt);
}

.hero-panel .panel-label {
  font-size: calc(0.84rem + 4pt);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 600;
  line-height: 1.08;
}

h1 {
  max-width: 14ch;
  font-size: calc(clamp(1.9rem, 3.35vw, 3.1rem) + 4pt);
}

h2 {
  max-width: 22ch;
  font-size: clamp(2rem, 3vw, 3rem);
}

h3 {
  font-size: 1.35rem;
}

.hero-summary,
.section-content p,
.card p,
.programme-copy p,
.footer-wrap p {
  font-size: calc(1.08rem + 2pt);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff9f2;
  background: var(--accent);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-strong);
}

.button-secondary {
  color: var(--ink);
  background: transparent;
  border-color: rgba(32, 51, 66, 0.16);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--accent);
}

.button-block {
  width: 100%;
  margin-top: 1rem;
}

.text-link {
  display: block;
  font-weight: 600;
}

.detail-block {
  padding-top: 0.9rem;
  border-top: 1px solid rgba(32, 51, 66, 0.12);
}

.detail-title {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-panel .detail-title {
  font-size: calc(0.82rem + 4pt);
}

.detail-text,
.muted {
  color: var(--ink-soft);
}

.hero-panel .detail-text,
.hero-panel .muted,
.hero-panel .text-link,
.hero-panel .button {
  font-size: calc(1rem + 4pt);
  color: var(--ink);
}

/* ── Logos section ── */

.logos-section {
  position: relative;
  padding: 2.5rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 252, 255, 0.6);
  overflow: hidden;
}

.logos-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/725236_IconesGuiaBenvinguda4-UIB.jpg") center center / min(216vw, 2280px) no-repeat;
  opacity: 0.32;
  pointer-events: none;
}

.logos-section .container {
  position: relative;
  z-index: 1;
}

.logos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.logos-row img {
  height: 252px;
  width: auto;
  opacity: 0.85;
}

/* ── Sections ── */

.section {
  padding: 2rem 0 4rem;
}

.section-tinted {
  background: linear-gradient(180deg, rgba(225, 233, 240, 0.52), rgba(225, 233, 240, 0.22));
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
}

.section-heading.narrow {
  margin-bottom: 2rem;
}

.section-content {
  display: grid;
  gap: 0.35rem;
}

.section-content p {
  margin: 0;
}

#about .section-content {
  padding-top: 2.3rem;
}

#about .section-content p {
  color: #203342;
  font-weight: 500;
}

#about .about-bullets {
  margin: 0.25rem 0 0;
  padding-left: 1.25rem;
  color: #203342;
}

#about .about-bullets li + li {
  margin-top: 0.35rem;
}

/* ── Cards ── */

.cards {
  display: grid;
  gap: 1.25rem;
}

.cards-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  padding: 1.6rem;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.card > * + * {
  margin-top: 0.9rem;
}

.card-accent {
  background: linear-gradient(180deg, rgba(63, 111, 152, 0.1), rgba(250, 252, 255, 0.92));
}

/* ── Speakers ── */

.speakers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.speakers-grid .speaker-card:nth-child(9) {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 52%);
}

.speaker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.45rem 1.35rem 1.3rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  gap: 0;
}

.speaker-photo {
  width: 106px;
  height: 106px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--bg-soft);
  margin-bottom: 0.85rem;
  box-shadow: 0 4px 16px rgba(32, 51, 66, 0.12);
}

.speaker-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.speaker-name {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
  line-height: 1.15;
}

.speaker-name a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

.speaker-name a:hover,
.speaker-name a:focus-visible {
  color: var(--accent);
}

.speaker-affiliation {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.65rem;
}

.speaker-bio {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.45;
  text-align: left;
}

.speaker-card:nth-child(9) .speaker-affiliation {
  white-space: pre-line;
}

/* ── Programme table ── */

.programme-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.programme-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--surface-strong);
  font-size: 0.98rem;
}

.programme-table thead tr {
  background: rgba(63, 111, 152, 0.08);
  border-bottom: 2px solid rgba(63, 111, 152, 0.2);
}

.programme-table th {
  padding: 1rem 1.1rem;
  text-align: left;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  white-space: nowrap;
}

.programme-table th .day-date {
  display: block;
  font-family: "Source Sans 3", sans-serif;
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

.programme-table .col-time {
  width: 112px;
}

.programme-table th:nth-child(2),
.programme-table td:nth-child(2),
.programme-table th:nth-child(3),
.programme-table td:nth-child(3),
.programme-table th:nth-child(4),
.programme-table td:nth-child(4),
.programme-table th:nth-child(5),
.programme-table td:nth-child(5) {
  width: 24%;
}

.programme-table td {
  padding: 0.9rem 1.1rem;
  vertical-align: top;
  border-top: 1px solid var(--line);
  line-height: 1.45;
  word-break: normal;
  overflow-wrap: anywhere;
}

.programme-table .row-span-4 td,
.programme-table .row-span-3 td {
  text-align: center;
}

.programme-table .row-span-4 td[colspan],
.programme-table .row-span-3 td[colspan] {
  text-align: center;
  font-weight: 600;
}

.programme-table .row-span-4 td:not(.time-cell),
.programme-table .row-span-3 td:not(.time-cell) {
  vertical-align: middle;
}

.programme-table th:nth-child(2),
.programme-table td:nth-child(2) {
  padding-right: 0.25rem;
}

.programme-table th:nth-child(3),
.programme-table td:nth-child(3) {
  padding-left: 0.25rem;
}

.programme-table th:nth-child(4),
.programme-table td:nth-child(4),
.programme-table th:nth-child(5),
.programme-table td:nth-child(5) {
  padding-left: 0.25rem;
}

.programme-table tbody tr:hover {
  background: rgba(63, 111, 152, 0.03);
}

.time-cell {
  font-family: "Fraunces", serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-warm);
  white-space: nowrap;
}

.prog-type {
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-style: italic;
}

.break-row td {
  background: rgba(32, 51, 66, 0.03);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  text-align: center;
  padding: 0.6rem 1.1rem;
  border-top: 1px dashed var(--line);
}

.break-row .time-cell {
  text-align: left;
}

/* ── Apply ── */

#apply .card p {
  font-size: 1.08rem;
}

/* ── Contact ── */

#contact .card:last-child p {
  font-size: calc(1.08rem + 4pt);
}

#contact .card:last-child li {
  font-size: calc(1rem + 3pt);
}

.support-logo {
  display: block;
  max-width: 510px;
  width: 100%;
  margin: 1rem 0 0;
}

/* ── Footer ── */

.site-footer {
  padding: 1rem 0 2.5rem;
}

.footer-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(32, 51, 66, 0.12);
  color: var(--ink-soft);
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .hero-grid,
  .section-grid,
  .cards-two {
    grid-template-columns: 1fr;
  }

  .speakers-grid {
    grid-template-columns: 1fr;
  }

  .speakers-grid .speaker-card:nth-child(9) {
    width: 100%;
  }

  #about .section-content {
    padding-top: 0;
  }

  h1 {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
  }

  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 0;
  }

  .site-nav {
    gap: 0.85rem 1rem;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero-copy,
  .hero-panel,
  .card {
    padding: 1.35rem;
  }

  .logos-row img {
    height: 120px;
  }

  .logos-row {
    gap: 2.5rem;
  }

  .logos-section {
    padding: 1.75rem 0 1.75rem;
  }

  .programme-table th,
  .programme-table td {
    padding: 0.7rem 0.75rem;
    font-size: 0.88rem;
  }
}
