/* =========================================================
   Public event pages — events.swissvivo.ch/<slug>

   Sits on top of the site's own style.css + luxe.css, so type,
   colour and shadow all come from swissvivo.ch. --ev-accent is
   set per event, so a page can be tinted without a code change.
   ========================================================= */

:root {
  --ev-accent: #c6a24c;
  --ev-ink: var(--ink-900, #10161f);
  --ev-tx: var(--tx, #313c4f);
  --ev-soft: var(--tx-soft, #566072);
  --ev-faint: var(--tx-faint, #8b93a1);
  --ev-line: rgba(22, 32, 52, 0.10);
  --ev-line-soft: rgba(22, 32, 52, 0.06);
  --ev-paper: #ffffff;
  --ev-tint: #fbfaf7;
  --ev-mint: rgb(234, 243, 236);
}

body.ev-body {
  margin: 0; background: var(--ev-paper); color: var(--ev-tx);
  font-family: var(--f-body); font-size: 16.5px; line-height: 1.65;
  padding-top: 0; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.ev-body .site-header, body.ev-body .site-footer { display: none; }

.ev-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 56px); }
.ev-narrow { max-width: 820px; }

h1, h2, h3 { font-family: var(--lx-serif); font-weight: 700; color: var(--ev-ink);
  letter-spacing: -0.03em; line-height: 1.1; margin: 0; }

.ev-eyebrow { display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--ev-accent); }
.ev-eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: 0.65; }
.ev-eyebrow--light { color: rgba(255, 255, 255, 0.9); }
.ev-lead { font-size: 1.08rem; color: var(--ev-soft); margin: 16px 0 0; max-width: 62ch; }
.ev-muted { color: var(--ev-faint); }
.ev-note { font-size: 0.85rem; margin-top: 14px; }

/* Buttons — the site's pill */
.ev-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 30px; border-radius: 100px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; white-space: nowrap;
  transition: transform 0.35s var(--ease-out, ease), box-shadow 0.35s, background 0.3s, color 0.2s; }
/* Dark ink on the gold, not white: white on #c6a24c is about 2.2:1 and the
   label on the main button of the page has to be readable outdoors, on a
   phone, by someone in a hurry. */
.ev-btn--solid { background: var(--ev-accent); color: #23180a; font-weight: 700;
  letter-spacing: 0.01em; }
.ev-btn--solid:hover { color: #23180a; transform: translateY(-2px); filter: brightness(1.04);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16); }
.ev-btn--lg { height: 58px; padding: 0 34px; font-size: 1rem; }
.ev-btn--sm { height: 40px; padding: 0 20px; font-size: 0.85rem; }
.ev-btn--full { width: 100%; }

/* Preview banner for unpublished events */
.ev-preview { background: #e8412c; color: #fff; text-align: center;
  padding: 9px 16px; font-size: 0.86rem; font-weight: 600; }

/* Nav */
.ev-nav { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--ev-line-soft); }
.ev-nav__in { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 74px; }
.ev-logo img { width: 100%; max-width: 190px; height: auto; display: block; }
.ev-nav__right { display: flex; align-items: center; gap: 14px; }
.ev-lang { display: inline-flex; border: 1px solid var(--ev-line); border-radius: 100px; overflow: hidden; }
.ev-lang a { padding: 6px 13px; font-size: 0.78rem; font-weight: 600; color: var(--ev-soft); }
.ev-lang a:hover { background: rgba(22, 32, 52, 0.05); }
.ev-lang a.on { background: var(--ev-accent); color: #fff; }

/* Hero */
.ev-hero { position: relative; min-height: min(76vh, 720px); display: flex; align-items: center;
  padding: clamp(70px, 12vh, 130px) 0 clamp(56px, 8vw, 96px); background: #0d1b2e; overflow: hidden; }
.ev-hero::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: var(--ev-hero); background-size: cover; background-position: center 40%; }
.ev-hero__scrim { position: absolute; inset: 0; z-index: 1; background:
  linear-gradient(103deg, rgba(11,16,26,0.94) 0%, rgba(11,16,26,0.78) 44%, rgba(11,16,26,0.36) 100%),
  linear-gradient(0deg, rgba(11,16,26,0.72) 0%, rgba(11,16,26,0) 58%); }
.ev-hero__in { position: relative; z-index: 2; }
.ev-hero h1 { color: #fff; font-size: clamp(2.2rem, 5.4vw, 3.9rem); margin-top: 18px; max-width: 16ch; }
.ev-hero .ev-lead { color: rgba(255, 255, 255, 0.84); }
.ev-hero .ev-btn { margin-top: 30px; }

.ev-facts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.ev-fact { background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px; padding: 12px 18px; backdrop-filter: blur(6px); }
.ev-fact span { display: block; font-size: 0.64rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.ev-fact b { display: block; color: #fff; font-size: 0.96rem; margin-top: 3px; }

/* Sections */
.ev-sec { padding: clamp(60px, 9vw, 118px) 0; }
.ev-sec--tint { background: var(--ev-tint); }
.ev-head { max-width: 720px; margin-bottom: clamp(30px, 5vw, 52px); }
.ev-head h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); margin-top: 16px; }

.ev-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.ev-card { background: var(--ev-paper); border: 1px solid var(--ev-line-soft);
  border-radius: var(--radius, 18px); padding: 28px 26px; box-shadow: var(--sh-sm);
  transition: transform 0.4s var(--ease-out, ease), box-shadow 0.4s; }
.ev-card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.ev-card h3 { font-size: 1.12rem; }
.ev-card p { margin: 10px 0 0; color: var(--ev-soft); font-size: 0.95rem; }

.ev-agenda { list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; gap: 2px; }
.ev-agenda li { counter-increment: step; display: flex; align-items: baseline; gap: 18px;
  padding: 18px 22px; background: var(--ev-paper); border: 1px solid var(--ev-line-soft); }
.ev-agenda li:first-child { border-radius: var(--radius, 18px) var(--radius, 18px) 0 0; }
.ev-agenda li:last-child { border-radius: 0 0 var(--radius, 18px) var(--radius, 18px); }
.ev-agenda li::before { content: counter(step); flex: none; width: 30px; height: 30px;
  border-radius: 50%; background: var(--ev-mint); color: var(--ev-accent);
  font-family: var(--lx-serif); font-weight: 700; font-size: 0.85rem;
  display: grid; place-items: center; }
.ev-agenda b { font-family: var(--lx-serif); color: var(--ev-ink); flex: none; min-width: 62px; }

.ev-rich { color: var(--ev-soft); }
.ev-rich h3 { margin: 28px 0 8px; font-size: 1.15rem; }
.ev-rich p { margin: 0 0 14px; }
.ev-rich ul, .ev-rich ol { margin: 0 0 16px; padding-left: 20px; }
.ev-rich li { margin-bottom: 6px; }
.ev-rich a { color: var(--ev-accent); text-decoration: underline; text-underline-offset: 3px; }

.ev-figure { margin: 0; }
.ev-figure img { width: 100%; height: auto; border-radius: var(--radius, 18px); display: block; }
.ev-figure figcaption { color: var(--ev-faint); font-size: 0.86rem; margin-top: 12px; text-align: center; }

.ev-quote { margin: 0; font-family: var(--lx-serif); font-size: clamp(1.3rem, 2.8vw, 1.9rem);
  line-height: 1.35; color: var(--ev-ink); letter-spacing: -0.02em; }
.ev-quote cite { display: block; margin-top: 18px; font-family: var(--f-body);
  font-size: 0.9rem; font-style: normal; color: var(--ev-faint); }

.ev-faq { border-bottom: 1px solid var(--ev-line-soft); padding: 4px 0; }
.ev-faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--ev-ink);
  list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.ev-faq summary::-webkit-details-marker { display: none; }
.ev-faq summary::after { content: "+"; color: var(--ev-accent); font-size: 1.3rem; line-height: 1; flex: none; }
.ev-faq[open] summary::after { content: "–"; }
.ev-faq p { margin: 0 0 18px; color: var(--ev-soft); }

.ev-cta { background: var(--ev-tint); text-align: center; }
.ev-cta h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.ev-cta .ev-lead { margin-inline: auto; }
.ev-cta .ev-btn { margin-top: 28px; }

/* Registration */
.ev-reg { background: var(--ev-tint); }
.ev-reg__grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 5vw, 64px); align-items: start; }
/* The facts stay beside the form while it is filled in — on a tall form the
   left column would otherwise scroll away into empty space. */
@media (min-width: 901px) {
  .ev-reg__intro { position: sticky; top: 104px; }
}
.ev-reg__facts { list-style: none; margin: 30px 0 0; padding: 0; }
.ev-reg__facts li { position: relative; padding: 15px 0 15px 22px;
  border-bottom: 1px solid var(--ev-line-soft); }
/* A gold tick of a marker, so the facts read as a list without bullets. */
.ev-reg__facts li::before { content: ""; position: absolute; left: 0; top: 22px;
  width: 9px; height: 1.5px; background: var(--ev-accent); }
.ev-reg__facts b { display: block; color: var(--ev-ink); }
.ev-reg__facts span { display: block; color: var(--ev-faint); font-size: 0.88rem; margin-top: 2px; }

/* Further dates in a series: booked at a glance, without leaving the form. */
.ev-reg__more { margin: 22px 0 0; font-size: 0.88rem; color: var(--ev-faint); }
.ev-reg__more b { display: block; font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ev-faint); margin-bottom: 8px; }
.ev-reg__more a { color: var(--ev-ink); text-decoration: none;
  border-bottom: 1px solid var(--ev-line); }
.ev-reg__more a:hover { border-bottom-color: var(--ev-accent); }

.ev-reg__card { position: relative; background: var(--ev-paper);
  border: 1px solid var(--ev-line-soft); border-radius: var(--radius-lg, 26px);
  padding: clamp(22px, 3.4vw, 34px); overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 22, 31, 0.04), 0 18px 50px -22px rgba(16, 22, 31, 0.28); }
/* A band of accent along the top edge marks the card as the thing to do. */
.ev-reg__card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background: linear-gradient(90deg, var(--ev-accent), color-mix(in srgb, var(--ev-accent) 35%, transparent) 62%, transparent); }

/* Card header: a filled navy band, so the card announces what it is before
   anyone reads a label — and so the form has a head rather than starting
   abruptly on an input. */
.ev-reg__cardhead { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin: calc(clamp(22px, 3.4vw, 34px) * -1) calc(clamp(22px, 3.4vw, 34px) * -1) 26px;
  padding: 22px clamp(22px, 3.4vw, 34px); background: #0d1b2e; }
.ev-reg__kicker { display: block; font-size: 0.66rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ev-accent); font-weight: 700; }
.ev-reg__cardhead b { display: block; margin-top: 6px; font-family: var(--lx-serif);
  font-size: 1.3rem; color: #fff; letter-spacing: -0.02em; }
.ev-reg__price { flex: none; align-self: flex-start; padding: 7px 14px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #0d1b2e; background: var(--ev-accent); }

/* How the evening reaches them after the button — three real steps. */
.ev-steps { counter-reset: ev-step; list-style: none; margin: 26px 0 0; padding: 0; }
.ev-steps li { counter-increment: ev-step; position: relative; padding: 0 0 18px 42px; }
.ev-steps li::before { content: counter(ev-step); position: absolute; left: 0; top: -1px;
  width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.76rem; font-weight: 700; color: #0d1b2e;
  background: color-mix(in srgb, var(--ev-accent) 28%, transparent);
  border: 1px solid color-mix(in srgb, var(--ev-accent) 55%, transparent); }
/* A line joining the steps, stopping at the last one. */
.ev-steps li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 30px;
  bottom: 6px; width: 1px; background: var(--ev-line); }
.ev-steps b { display: block; color: var(--ev-ink); font-size: 0.97rem; }
.ev-steps span { display: block; color: var(--ev-faint); font-size: 0.87rem; margin-top: 1px; }

.ev-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ev-field { display: block; margin-bottom: 16px; }
/* Label and its "optional" tag on one line: the tag used to wrap under a long
   label and read as a field of its own. */
.ev-field > span { display: flex; align-items: baseline; gap: 6px; flex-wrap: nowrap;
  font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ev-faint); font-weight: 700; margin-bottom: 7px; }
.ev-field > span i { flex: none; font-style: normal; text-transform: none; letter-spacing: 0.02em;
  font-weight: 400; font-size: 0.72rem; color: var(--ev-faint); opacity: 0.75; }
/* Fields sit in a tint rather than white-on-white: on a white card an
   outlined empty input is hard to see at a glance, and the filled shape
   makes the form read as a set of things to complete. */
.ev-field input, .ev-field select {
  width: 100%; padding: 14px 16px; border: 1px solid transparent;
  border-radius: 12px; background: #f5f2ec; color: var(--ev-tx);
  font-family: inherit; font-size: 0.98rem; -webkit-appearance: none; appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.ev-field input::placeholder { color: var(--ev-faint); opacity: 0.7; }
.ev-field input:hover, .ev-field select:hover { background: #f0ece4; }
/* A ring rather than the default outline, so focus matches the card's radius. */
.ev-field input:focus, .ev-field select:focus { outline: none; border-color: var(--ev-accent);
  background: var(--ev-paper); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ev-accent) 22%, transparent); }
/* A caret drawn in the accent, since appearance:none removes the native one. */
.ev-field select { padding-right: 42px; background-repeat: no-repeat;
  background-position: right 15px center; background-size: 11px 7px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' fill='none' stroke='%23c6a24c' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ev-field.bad input, .ev-field.bad select { border-color: #e8412c; background: rgba(232, 65, 44, 0.03); }
.ev-field.bad input:focus, .ev-field.bad select:focus {
  box-shadow: 0 0 0 3px rgba(232, 65, 44, 0.18); }
/* Honeypot: off-screen rather than display:none, which smarter bots skip. */
.ev-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.ev-check { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0 20px; cursor: pointer; }
.ev-check input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--ev-accent); flex: none; }
.ev-check span { font-size: 0.88rem; color: var(--ev-soft); line-height: 1.5; }
/* The privacy link has to look like one — it is the only link in the card. */
.ev-check a { color: var(--ev-ink); text-decoration: underline;
  text-decoration-color: var(--ev-accent); text-underline-offset: 3px; }
.ev-check a:hover { color: var(--ev-accent); }
.ev-check.bad span { color: #e8412c; }
.ev-alert { background: rgba(232, 65, 44, 0.08); border: 1px solid rgba(232, 65, 44, 0.26);
  color: #b4291a; border-radius: 12px; padding: 12px 15px; font-size: 0.88rem; margin: 0 0 16px; }

.ev-reg__card .ev-btn { margin-top: 4px; }
.ev-reg__note { margin: 14px 0 0; text-align: center; font-size: 0.78rem;
  letter-spacing: 0.04em; color: var(--ev-faint); }

/* Submitting: the button says so, and the form stops accepting clicks. */
form.loading { pointer-events: none; }
form.loading .ev-btn { opacity: 0.65; }
form.loading .ev-btn::after { content: ""; display: inline-block; vertical-align: -2px;
  width: 13px; height: 13px; margin-left: 10px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent; animation: ev-spin 0.7s linear infinite; }
@keyframes ev-spin { to { transform: rotate(360deg); } }

.ev-ok { text-align: center; padding: 22px 0; animation: ev-rise 0.45s var(--ease-out, ease) both; }
.ev-ok__tick { width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--ev-accent); color: #fff; font-size: 28px; display: grid; place-items: center;
  box-shadow: 0 8px 26px color-mix(in srgb, var(--ev-accent) 38%, transparent); }
.ev-ok h3 { font-size: 1.4rem; }
.ev-ok p { color: var(--ev-soft); margin-top: 10px; }
@keyframes ev-rise { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  .ev-ok { animation: none; }
  form.loading .ev-btn::after { animation-duration: 2s; }
}

/* Index of events */
.ev-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.ev-item { display: block; background: var(--ev-paper); border: 1px solid var(--ev-line-soft);
  border-radius: var(--radius, 18px); padding: 30px 28px; box-shadow: var(--sh-sm);
  transition: transform 0.4s var(--ease-out, ease), box-shadow 0.4s; }
.ev-item:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.ev-item h2 { font-size: 1.35rem; }
.ev-item .ev-when { color: var(--ev-accent); font-weight: 600; font-size: 0.86rem;
  letter-spacing: 0.06em; margin: 0 0 10px; }
.ev-item p { color: var(--ev-soft); margin: 12px 0 0; font-size: 0.95rem; }

/* Footer */
.ev-foot { background: #0d1b2e; color: rgba(255, 255, 255, 0.72); padding: clamp(44px, 6vw, 70px) 0;
  text-align: center; font-size: 0.9rem; }
.ev-foot__logo { width: 190px; height: auto; margin: 0 auto 22px; display: block; filter: brightness(0) invert(1) opacity(0.9); }
.ev-foot p { margin: 6px 0; }
.ev-foot a { color: var(--ev-accent); }
.ev-foot__legal { color: rgba(255, 255, 255, 0.45); font-size: 0.82rem; margin-top: 18px; }

@media (max-width: 900px) {
  .ev-reg__grid { grid-template-columns: 1fr; }
}
/* The nav could not shrink below ~520px: logo, language switch and a no-wrap
   CTA side by side pushed the whole page wider than the screen, and
   overflow-x:hidden then cut every section off at the right edge. */
@media (max-width: 760px) {
  .ev-nav__in, .ev-nav__right { min-width: 0; }
  .ev-logo { min-width: 0; flex: 0 1 auto; }
}
@media (max-width: 560px) {
  /* Below this the three items cannot coexist. The hero's own button is a few
     centimetres further down, so the nav one goes rather than the language
     switch, which has nowhere else to live. */
  .ev-nav__in > .ev-nav__right > .ev-btn { display: none; }
}
@media (max-width: 640px) {
  body.ev-body { font-size: 16px; }
  .ev-nav__in { height: 64px; }
  .ev-logo img { max-width: 150px; }
  /* 16px keeps iOS Safari from zooming in when a field is focused. */
  .ev-field input, .ev-field select { font-size: 16px; padding: 13px 14px; }
  .ev-reg__cardhead { flex-wrap: wrap; gap: 10px; }
  .ev-reg__card { border-radius: 20px; }
  .ev-hero { min-height: auto; padding-top: 64px; }
  .ev-hero h1 { font-size: 2rem; }
  .ev-row { grid-template-columns: 1fr; gap: 0; }
  .ev-facts { gap: 8px; }
  .ev-fact { padding: 10px 14px; flex: 1 1 calc(50% - 8px); }
  .ev-agenda li { flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
  .ev-btn--lg { width: 100%; }
}

/* ── hero text over a photo ─────────────────────────────────────────────
   The site stylesheet sets `body.luxe h1 { color: var(--lx-ink) }`, which is
   more specific than `.ev-hero h1` and so wins, painting the heading near-black
   on a dark image. Matching that specificity here — and loading after it — puts
   the heading back to white. The shadow keeps it legible over a bright photo. */
body.ev-body .ev-hero h1,
body.luxe .ev-hero h1 {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}
body.ev-body .ev-hero .ev-lead,
body.luxe .ev-hero .ev-lead {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.5);
}
