/* bal.lu — Evento-inspired theme (modern CSS, no Sass pipeline) */

:root {
  --bg: #ffffff;
  --bg-muted: #f7f8fa;
  --ink: #1f2328;
  --muted: #6b7280;
  --line: #e8e8e8;
  --header-border: #111827;
  --accent: #0f6e6a;
  --accent-hover: #0c5855;
  --accent-soft: rgba(15, 110, 106, 0.12);
  --footer-bg: #353e48;
  --footer-ink: #d2d2d2;
  --card-radius: 3px;
  --cover-h: 320px;
  --max: 900px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0f1419;
  --bg-muted: #161c22;
  --ink: #e8eef2;
  --muted: #9aa7b2;
  --line: #2a333c;
  --header-border: #4fd1c5;
  --accent: #4fd1c5;
  --accent-hover: #7ee7dc;
  --accent-soft: rgba(79, 209, 197, 0.16);
  --footer-bg: #0a0e12;
  --footer-ink: #aeb8c0;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1419;
    --bg-muted: #161c22;
    --ink: #e8eef2;
    --muted: #9aa7b2;
    --line: #2a333c;
    --header-border: #4fd1c5;
    --accent: #4fd1c5;
    --accent-hover: #7ee7dc;
    --accent-soft: rgba(79, 209, 197, 0.16);
    --footer-bg: #0a0e12;
    --footer-ink: #aeb8c0;
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 16px/1.55 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

/* Header — Evento style */
.site-header {
  border-top: 5px solid var(--header-border);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
}

.site-title {
  font-size: 1.45rem;
  font-weight: 300;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}

.site-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem 0.9rem;
}

.page-link {
  color: var(--ink);
  font-size: 0.95rem;
  text-decoration: none;
}

.page-link:hover {
  text-decoration: underline;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-btn,
.theme-toggle,
.tag-pill {
  font: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
}

.lang-btn {
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.lang-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.theme-toggle {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}

.theme-icon::before {
  content: "◐";
  color: var(--ink);
  font-size: 0.9rem;
}

/* Primary button — Evento CTA shape, teal accent (not legacy purple) */
.button {
  display: inline-block;
  border-radius: 6px;
  padding: 0.55rem 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.button.button-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 0 0 color-mix(in srgb, var(--ink) 35%, transparent);
  text-decoration: none;
}

.button.button-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

[data-theme="dark"] .button.button-primary,
:root:not([data-theme="light"]) .button.button-primary {
  color: #062423;
  box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .button.button-primary {
    color: #fff;
  }
}

/* Full-bleed cover — Evento blog-cover */
.blog-cover {
  height: var(--cover-h);
  background-size: cover;
  background-position: center center;
  border-bottom: 1px solid var(--line);
  animation: cover-in 0.7s ease both;
}

.blog-cover--post {
  height: 280px;
}

@media (max-width: 800px) {
  .blog-cover {
    height: 250px;
  }
  .blog-cover--post {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .blog-cover {
    height: 180px;
  }
}

.page-content {
  padding: 1.5rem 0 3rem;
  position: relative;
  flex: 1;
}

/* Home controls */
.controls {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
  animation: fade-up 0.55s ease both;
}

.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-muted);
  color: var(--ink);
  border-radius: 6px;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  font: inherit;
  outline: none;
}

.search-input:focus {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg);
}

.tag-pill:hover {
  color: var(--ink);
}

.tag-pill.is-active {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

[data-theme="dark"] .tag-pill.is-active,
:root:not([data-theme="light"]) .tag-pill.is-active {
  color: #062423;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .tag-pill.is-active {
    color: #fff;
  }
}

/* Section headings — Evento */
.event-time-heading {
  margin: 1.5rem 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.event-time-heading.fix-top {
  margin-top: 0.25rem;
}

.results-meta {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-inline {
  color: var(--muted);
  grid-column: 1 / -1;
}

/* Event tiles — Evento event-square, modern grid */
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  margin-bottom: 0.5rem;
}

.event-square {
  position: relative;
  display: block;
  height: 180px;
  border-radius: var(--card-radius);
  background-color: #333;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  animation: fade-up 0.5s ease both;
}

.event-square:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  text-decoration: none;
  color: #fff;
}

.event-square--past {
  filter: saturate(0.85);
}

.event-square h2 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  margin: 0;
  padding: 0.85rem 0.75rem;
  font-size: 1.1rem;
  font-weight: 650;
  line-height: 1.2;
  color: #fff;
}

.event-square h2 span {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.92;
  margin-top: 0.2rem;
}

.event-square-overlay {
  z-index: 2;
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    rgba(15, 20, 31, 0) 0%,
    rgba(15, 20, 31, 0.1) 25%,
    rgba(15, 20, 31, 0.82) 100%
  );
  pointer-events: none;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 6px;
}

@media (max-width: 800px) {
  .event-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .event-grid {
    grid-template-columns: 1fr;
  }

  .site-nav .button.button-primary {
    display: none;
  }
}

/* Post detail — Evento */
.post {
  position: relative;
  padding-top: 0.25rem;
  animation: fade-up 0.45s ease both;
}

.back-link {
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

.back-link a {
  font-weight: 600;
  text-decoration: none;
}

.post-title {
  margin: 0;
  padding: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  width: min(100%, 75%);
  word-wrap: break-word;
}

.post-organisers-name,
.post-time,
.post-location,
.post-price {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-weight: 400;
}

.post-organisers-name {
  margin-top: 0.55rem;
  font-size: 1.05rem;
}

.post-date {
  margin: 0.65rem 0 0;
  font-size: 1.2rem;
  font-weight: 500;
}

.post-time {
  line-height: 1.3;
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1rem 0 0;
  padding: 0;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: lowercase;
}

.author {
  position: absolute;
  top: -90px;
  right: 0;
  height: 160px;
  width: 160px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
  overflow: hidden;
}

.author-initial {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), #1e5a8c);
  color: #fff;
  font-size: 3.5rem;
  font-weight: 300;
}

.author-initial span {
  line-height: 1;
}

@media (max-width: 800px) {
  .author {
    height: 120px;
    width: 120px;
    top: -70px;
  }

  .post-title {
    width: 70%;
  }
}

@media (max-width: 480px) {
  .author {
    height: 88px;
    width: 88px;
    top: -44px;
    font-size: 2.2rem;
  }

  .author-initial {
    font-size: 2.2rem;
  }

  .post-title {
    width: 65%;
    font-size: 1.6rem;
  }
}

.post-content {
  margin: 1.5rem 0 1.25rem;
  max-width: 40rem;
}

.prose p {
  margin: 0 0 1rem;
}

.post-actions {
  margin-top: 1.5rem;
}

.about-page {
  max-width: 40rem;
  animation: fade-up 0.45s ease both;
}

.about-page h1 {
  margin-top: 0;
  letter-spacing: -0.02em;
}

/* Footer — Evento dark bar */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 2rem 0;
  margin-top: auto;
  border-top: none;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
}

.footer-brand {
  margin: 0 0 0.35rem;
  font-weight: 650;
  color: #fff;
}

.footer-note {
  margin: 0;
  max-width: 28rem;
  font-size: 0.92rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  align-items: flex-start;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
}

.site-footer a:hover {
  text-decoration: underline;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cover-in {
  from {
    opacity: 0.65;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
