/* Colours are sampled from the hero photo so the page continues it seamlessly. */
:root {
  --bg: #1c1915;
  --bg-raised: #25211c;
  --text: #f4efe6;
  --muted: #b3a995;
  --accent: #e0bf86;
  --line: rgba(244, 239, 230, 0.12);
  --radius: 10px;
  --gutter: 20px;
  --bleed: 20px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: rgba(244, 239, 230, 0.35);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

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

/* Hero */

.hero {
  position: relative;
  min-height: 460px;
  height: 78vh;
  max-height: 780px;
  display: grid;
  place-items: center;
  padding: 72px var(--gutter) 96px;
  background:
    linear-gradient(to bottom, rgba(28, 25, 21, 0.55) 0%, rgba(28, 25, 21, 0.45) 45%, var(--bg) 100%),
    url('/media/bg-zinatnu-akademija.jpg') center 30% / cover no-repeat,
    var(--bg);
}

.hero-inner {
  max-width: 920px;
  text-align: center;
}

.hero-logo {
  display: block;
  width: 116px;
  height: auto;
  margin: 0 auto 28px;
  padding: 11px;
  border-radius: 20px;
  background: var(--text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

h1 {
  margin: 0 0 36px;
  font-size: clamp(26px, 4.6vw, 50px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 2px 32px rgba(0, 0, 0, 0.45);
}

.topbar {
  position: absolute;
  top: 16px;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.lang {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(28, 25, 21, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lang button {
  min-width: 44px;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: 600 13px/1 inherit;
  font-family: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.lang button[aria-pressed='true'] {
  background: var(--text);
  color: var(--bg);
}

.button {
  display: inline-block;
  padding: 14px 28px;
  border: 2px solid var(--text);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease-out, color 0.2s ease-out;
}

a.button:hover {
  background: var(--text);
  color: var(--bg);
}

.button--soon {
  border-color: rgba(244, 239, 230, 0.35);
  background: rgba(28, 25, 21, 0.45);
  color: var(--text);
  font-size: 17px;
  cursor: default;
}

/* Content */

.content {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--gutter) 72px;
}

.facts {
  list-style: none;
  margin: -24px 0 28px;
  padding: 0;
  display: grid;
  gap: 18px;
}

/* Key facts as cards: 4 across on desktop, 2×2 on phones */
.details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 20px;
}

.detail {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.detail dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail dd {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.notice {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.section {
  margin-top: 56px;
}

.facts li,
.notice,
.contact {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  opacity: 0.85;
}

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(224, 191, 134, 0.4);
  text-underline-offset: 3px;
  cursor: pointer;
}

.link:hover {
  text-decoration-color: currentColor;
}

/* Date and calendar link: the gap only applies side by side, so a wrapped link starts flush left */
.date-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2px 16px;
}

.date-time > span {
  white-space: nowrap;
}

/* Add-to-calendar menu */

.cal {
  position: relative;
  display: inline-block;
}

.cal summary {
  display: inline;
  list-style: none;
}

.cal summary::-webkit-details-marker {
  display: none;
}

.cal-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  left: 6px;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.cal-menu a,
.cal-menu button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.cal-menu a:hover,
.cal-menu button:hover {
  background: rgba(244, 239, 230, 0.08);
}

h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
}

/* Programme */

.program {
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
}

.slot {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.slot--cont {
  border-top-style: dashed;
}

.slot-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
  padding-top: 1px;
}

.slot-section {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.slot-subtitle {
  margin: 0 0 2px;
  font-style: italic;
  color: var(--muted);
}

.slot-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: pretty;
}

.slot-speakers {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 15px;
}

.slot-speakers strong {
  color: var(--text);
  font-weight: 600;
}

.slot-speakers li + li {
  margin-top: 4px;
}

.tbc {
  font-style: italic;
  opacity: 0.8;
}

.slot--break {
  /* Background bleeds past the column so the time stays aligned with the other rows */
  margin: 4px calc(-1 * var(--bleed));
  padding: 16px var(--bleed);
  border-top: 0;
  border-radius: var(--radius);
  background: var(--bg-raised);
  align-items: baseline;
}

.slot--break .slot-time {
  padding-top: 0;
}

.slot--break .slot-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
}

.slot--break + .slot {
  border-top: 0;
}

.cta-bottom {
  margin-bottom: 40px;
  text-align: center;
}

.contact {
  margin: 16px 0 0;
}

.contact a {
  color: var(--accent);
}

/* Footer: organiser and project support logos sit on white, as their logos require */

.footer {
  padding: 48px var(--gutter) 56px;
  background: #fff;
  color: #3a342c;
  font-size: 14px;
  line-height: 1.5;
}

.footer-inner {
  /* Same text column as the main content */
  max-width: calc(880px - 2 * var(--gutter));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 2fr;
  gap: 40px 56px;
}

.footer-label {
  margin: 0 0 16px;
  color: #7a6f60;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer p {
  margin: 0 0 8px;
}

.organiser-logo {
  display: block;
  width: auto;
  height: 60px;
  margin-bottom: 14px;
}

.organiser-name {
  font-size: 13px;
  font-weight: 500;
}

.support-project {
  color: #7a6f60;
  font-size: 12px;
}

.support-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  margin-top: 24px;
}

.support-logos img {
  display: block;
  width: auto;
  max-width: 100%;
}

/* Phones: time moves above the title so the text gets the full width */

@media (max-width: 560px) {
  :root {
    --gutter: 16px;
    --bleed: 12px;
  }

  .hero {
    height: 72vh;
    padding-bottom: 72px;
  }

  .hero-logo {
    width: 92px;
    margin-bottom: 22px;
    padding: 9px;
    border-radius: 16px;
  }

  .details {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail dd {
    font-size: 16px;
  }

  .section {
    margin-top: 44px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .button {
    font-size: 17px;
    padding: 12px 22px;
  }

  .button--soon {
    font-size: 15px;
  }

  .facts {
    font-size: 15px;
  }

  /* Phones: date, time and calendar link each on their own line */
  .date-line {
    flex-direction: column;
  }

  .date-time > span {
    display: block;
  }

  .date-time .sep {
    display: none;
  }

  h2 {
    font-size: 24px;
  }

  .slot {
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    padding: 18px 0;
  }

  /* Flatten the body so time and section label can share the first row */
  .slot-body {
    display: contents;
  }

  .slot-time,
  .slot-section {
    grid-row: 1;
  }

  .slot-section {
    align-self: center;
    margin: 0;
  }

  .slot-subtitle,
  .slot-title,
  .slot-speakers {
    grid-column: 1 / -1;
  }

  .slot-time {
    font-size: 14px;
    color: var(--muted);
  }

  .slot-title {
    font-size: 17px;
  }

  .slot--break {
    padding-block: 12px;
  }

  .slot--break .slot-title {
    grid-column: 2;
    grid-row: 1;
  }
}
