/*
Theme Name: Swissly.ch
Theme URI: https://swissly.ch
Author: Swissly.ch
Description: Premium mobile-first editorial theme for Swissly.ch event discovery in Switzerland.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.6
Text Domain: swissly-ch
*/

:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #66706a;
  --line: #e5e9e5;
  --paper: #fbfcf8;
  --surface: #ffffff;
  --mint: #b7f0d1;
  --blue: #8cc7ff;
  --coral: #ff9f8c;
  --yellow: #ffe27a;
  --violet: #c7b6ff;
  --green: #356e4a;
  --shadow: 0 24px 80px rgba(23, 32, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 54px);
  background: rgba(251, 252, 248, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

.desktop-nav a:hover {
  color: var(--ink);
}

.submit-link,
.primary-action,
.secondary-action,
.submit button,
.source-button {
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.submit-link,
.secondary-action,
.source-button {
  background: var(--surface);
}

.primary-action,
.submit button {
  background: var(--ink);
  color: var(--paper);
}

.submit-link:hover,
.primary-action:hover,
.secondary-action:hover,
.submit button:hover,
.source-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(23, 32, 27, 0.16);
}

main {
  padding-bottom: 88px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  min-height: calc(100vh - 68px);
  padding: clamp(46px, 8vw, 110px) clamp(18px, 5vw, 72px) 44px;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(48px, 9vw, 112px);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-copy > p:not(.kicker) {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}

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

.hero-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-self: stretch;
  min-height: 500px;
}

.date-tile,
.feature-strip {
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.date-tile {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--yellow);
}

.date-tile strong {
  font-size: clamp(88px, 14vw, 170px);
  line-height: 0.75;
  letter-spacing: 0;
}

.feature-strip {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: space-between;
}

.feature-strip.music {
  background: var(--blue);
}

.feature-strip.art {
  background: var(--violet);
}

.feature-strip.food {
  background: var(--coral);
}

.feature-strip span,
.date-tile span {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.feature-strip strong {
  font-size: clamp(26px, 4vw, 46px);
  line-height: 0.95;
}

.feature-strip small,
.date-tile small {
  color: rgba(23, 32, 27, 0.72);
  font-weight: 700;
}

.quick-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 clamp(18px, 5vw, 72px) 18px;
}

.tab {
  flex: 0 0 auto;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 0 16px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.tab.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.search-panel {
  margin: 0 clamp(18px, 5vw, 72px);
  padding: 16px;
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(23, 32, 27, 0.08);
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f5;
  color: var(--ink);
  padding: 0 12px;
}

textarea {
  min-height: 112px;
  padding-top: 12px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--mint);
  border-color: var(--ink);
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 72px clamp(18px, 5vw, 72px) 22px;
}

.section-heading h2,
.system-map h2,
.policy h2,
.submit h2,
.event-detail h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.94;
  letter-spacing: 0;
}

.section-heading > p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.event-grid,
.swissly-event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 clamp(18px, 5vw, 72px);
}

.event-card {
  position: relative;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px;
  box-shadow: 0 10px 32px rgba(23, 32, 27, 0.07);
  animation: fadeUp 420ms ease both;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.event-card:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
  box-shadow: var(--shadow);
}

.event-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  border-radius: 8px 8px 0 0;
  background: var(--accent, var(--mint));
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(23, 32, 27, 0.14);
  border-radius: 999px;
  padding: 0 10px;
  background: color-mix(in srgb, var(--accent) 34%, white);
  font-size: 12px;
  font-weight: 900;
}

.date-stack {
  text-align: right;
  font-weight: 900;
}

.date-stack small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.event-card h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 0.98;
  letter-spacing: 0;
}

.event-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-weight: 900;
}

.card-link::after {
  content: "->";
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0 clamp(18px, 5vw, 72px);
}

.path-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 22px;
  background: var(--mint);
  transition: transform 180ms ease;
}

.path-card:nth-child(2) {
  background: var(--blue);
}

.path-card:nth-child(3) {
  background: var(--yellow);
}

.path-card:hover {
  transform: translateY(-4px);
}

.path-number {
  font-weight: 900;
}

.path-card strong {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 0.98;
}

.path-card small {
  color: rgba(23, 32, 27, 0.7);
  font-weight: 700;
}

.system-map,
.policy,
.submit,
.event-detail {
  margin: 72px clamp(18px, 5vw, 72px) 0;
  border-radius: 8px;
  border: 1px solid var(--ink);
  padding: clamp(22px, 4vw, 42px);
}

.system-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  background: var(--ink);
  color: var(--paper);
}

.system-map .kicker,
.system-map p {
  color: rgba(251, 252, 248, 0.72);
}

.system-map ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

.policy,
.event-detail {
  background: var(--surface);
}

.policy p:not(.kicker),
.submit p:not(.kicker),
.event-detail p {
  max-width: 790px;
  color: var(--muted);
  line-height: 1.6;
}

.submit {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 24px;
  background: var(--yellow);
}

.submit form {
  display: grid;
  align-content: center;
  gap: 10px;
}

.event-detail {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
}

.event-facts {
  display: grid;
  gap: 10px;
  align-content: start;
}

.fact {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.fact span {
  color: var(--muted);
  font-weight: 800;
}

.fact strong {
  text-align: right;
}

.mobile-nav {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 30;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 6px;
  box-shadow: 0 18px 60px rgba(23, 32, 27, 0.22);
  backdrop-filter: blur(18px);
}

.mobile-nav a {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mobile-nav a:hover {
  background: var(--ink);
  color: var(--paper);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .hero,
  .search-panel,
  .system-map,
  .submit,
  .event-detail {
    grid-template-columns: 1fr;
  }

  .event-grid,
  .swissly-event-grid,
  .path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .desktop-nav,
  .submit-link {
    display: none;
  }

  .mobile-nav {
    display: grid;
  }

  .site-header {
    padding: 12px 16px;
  }

  .hero {
    min-height: auto;
    padding: 42px 16px 32px;
  }

  .hero-board {
    min-height: 430px;
    grid-template-columns: 1fr;
  }

  .date-tile {
    grid-row: auto;
    min-height: 190px;
  }

  .quick-tabs,
  .event-grid,
  .swissly-event-grid,
  .path-grid {
    padding-right: 16px;
    padding-left: 16px;
  }

  .search-panel,
  .system-map,
  .policy,
  .submit,
  .event-detail {
    margin-right: 16px;
    margin-left: 16px;
  }

  .filters,
  .event-grid,
  .swissly-event-grid,
  .path-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
    padding: 58px 16px 18px;
  }

  .section-heading > p {
    margin-top: 14px;
  }

  .event-card {
    min-height: 280px;
  }
}
