/* TEDxVaasa site — scoped under .txv so Divi's styles don't leak in (or out). */

.txv {
	--txv-paper: #F4F1EA;
	--txv-ink: #141414;
	--txv-red: #E62B1E;
	--txv-red-text: #B3170C;
	--txv-coral: #FF6A5C;
	--txv-grey: #5C5C5C;
	--txv-grey-dark: #A3A3A3;
	--txv-display: 'Space Grotesk', Inter, system-ui, sans-serif;
	background: var(--txv-paper);
	color: var(--txv-ink);
	font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
	font-size: 16px;
	line-height: 1.5;
	min-height: 100vh;
	overflow: hidden;
	-webkit-font-smoothing: antialiased;
}
.txv *, .txv *::before, .txv *::after { box-sizing: border-box; }

/* Neutralise Divi defaults inside the component */
.txv p, .txv h1, .txv h2 { margin: 0; padding: 0; color: inherit; font-family: inherit; }
.txv h1, .txv h2 { line-height: 1; }
.txv a { color: inherit; text-decoration: none; transition: none; }
.txv button { font: inherit; letter-spacing: inherit; text-transform: none; }

.txv-wrap { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.txv .txv-muted { color: var(--txv-grey); }
.txv .txv-small { font-size: 0.875rem; }
.txv .txv-coral { color: var(--txv-coral); }
.txv .txv-red { color: var(--txv-red-text); }
.txv .txv-eyebrow { display: block; font-family: var(--txv-display); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.txv .txv-h2 { font-size: 2.25rem; font-weight: 900; letter-spacing: -0.03em; }
.txv .txv-inline { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.txv .txv-inline:hover { color: var(--txv-red-text); }

/* Header */
.txv-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 2rem 0 1.5rem; }
.txv .txv-logo { font-size: 1.75rem; letter-spacing: -0.02em; color: var(--txv-ink); }
.txv-logo__ted { font-weight: 900; color: var(--txv-red); }
.txv-logo__name { font-weight: 300; }

/* Ticker */
.txv-ticker { background: var(--txv-ink); color: var(--txv-paper); padding: 0.875rem 0; overflow: hidden; white-space: nowrap; transform: rotate(-1.2deg); margin: 0 -2rem; box-shadow: 0 10px 0 var(--txv-red); }
.txv-ticker__track { display: inline-flex; font-family: var(--txv-display); font-size: 1.125rem; font-weight: 700; letter-spacing: 0.18em; white-space: pre; animation: txv-marquee 38s linear infinite; }
@keyframes txv-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Hero ticket */
.txv-hero { padding: 5rem 0; perspective: 1600px; }
.txv-ticket {
	--rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
	position: relative; display: flex; flex-wrap: wrap;
	background: var(--txv-ink); color: #fff; border-radius: 20px;
	transform-style: preserve-3d;
	transform: rotate(-1deg) rotateX(var(--rx)) rotateY(var(--ry));
	transition: transform 600ms cubic-bezier(.2, .8, .2, 1);
	box-shadow: 0 30px 60px -30px rgba(20, 20, 20, .55);
}
.txv-ticket.is-tilting { transition-duration: 90ms; }
.txv-ticket__sheen { position: absolute; inset: 0; border-radius: 20px; pointer-events: none; z-index: 2; opacity: 0; transition: opacity 300ms ease; background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 40%); }
.txv-ticket.is-tilting .txv-ticket__sheen { opacity: 1; }
.txv-ticket__main { flex: 999 1 520px; min-width: 0; padding: 3rem; display: flex; flex-direction: column; gap: 2rem; position: relative; }
.txv-ticket__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-family: var(--txv-display); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.txv-ticket__top .txv-muted, .txv-ticket .txv-muted { color: var(--txv-grey-dark); }
.txv .txv-ticket__title { font-size: clamp(3rem, 8vw, 7.5rem); line-height: .9; font-weight: 900; letter-spacing: -0.045em; color: #fff; }
.txv .txv-ticket__lead { font-size: 1.25rem; font-weight: 300; color: #D4D4D4; max-width: 34rem; }
.txv-ticket__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #3A3A3A; }
.txv .txv-label { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--txv-grey-dark); }
.txv .txv-fact { margin-top: .375rem; font-family: var(--txv-display); font-size: 1.375rem; font-weight: 700; line-height: 1.2; }
.txv-barcode { display: flex; align-items: flex-end; gap: 1.25rem; flex-wrap: wrap; }
.txv-barcode__bars { display: flex; align-items: stretch; gap: 3px; height: 44px; }
.txv-barcode__bars span { display: block; background: var(--txv-paper); }
.txv-barcode__bars span.is-accent { background: var(--txv-red); }
.txv-barcode__code { font-family: var(--txv-display); font-size: .8125rem; letter-spacing: .24em; }

/* Tear-off stub */
.txv-stub {
	flex: 1 1 320px; position: relative; padding: 3rem 2.5rem;
	background: var(--txv-red); color: var(--txv-ink);
	border-radius: 0 20px 20px 0; border-left: 3px dashed var(--txv-ink);
	display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem;
	transform-origin: 0% 100%;
	transition: transform 320ms cubic-bezier(.3, 1.4, .5, 1);
}
@media (hover: hover) and (pointer: fine) {
	.txv-stub:hover { transform: translateX(14px) rotate(2.5deg); }
}
.txv-notch { position: absolute; left: -18px; width: 34px; height: 34px; border-radius: 50%; background: var(--txv-paper); }
.txv-notch--a { top: -18px; }
.txv-notch--b { bottom: -18px; }
.txv-scissors { position: absolute; left: -13px; top: 50%; margin-top: -12px; width: 24px; height: 24px; border-radius: 50%; background: var(--txv-ink); color: #fff; display: flex; align-items: center; justify-content: center; }
.txv .txv-stub__label { margin-bottom: 1rem; font-family: var(--txv-display); font-size: .8125rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.txv-stamp { position: absolute; right: 2.5rem; top: 13rem; padding: .875rem 1.25rem; border: 4px solid var(--txv-coral); border-radius: 12px; color: var(--txv-coral); font-family: var(--txv-display); font-size: 1.375rem; font-weight: 700; line-height: 1.1; letter-spacing: .12em; text-transform: uppercase; text-align: center; transform: rotate(-11deg); opacity: .92; pointer-events: none; }
.txv-punch { position: absolute; top: 1.5rem; right: 1.5rem; width: 24px; height: 24px; border-radius: 50%; background: var(--txv-paper); box-shadow: inset 0 2px 4px rgba(20, 20, 20, .45); }
.txv .txv-stub__note { margin-top: .75rem; font-size: 1.0625rem; font-weight: 600; }
.txv .txv-nowplaying { display: flex; align-items: center; gap: 1.25rem; color: var(--txv-ink); }
.txv-nowplaying__btn { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 50%; background: var(--txv-ink); color: #fff; box-shadow: 0 0 0 8px rgba(20, 20, 20, .15); transition: transform 200ms ease; }
.txv .txv-nowplaying:hover .txv-nowplaying__btn { transform: scale(1.06); }
.txv-nowplaying__text { font-family: var(--txv-display); font-size: 1.75rem; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.txv .txv-credit { color: var(--txv-ink); font-weight: 700; }
.txv .txv-credit:hover { color: var(--txv-red-text); }
.txv .txv-stub__big { font-family: var(--txv-display); font-size: 2.75rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.txv-clock { display: grid; grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr)); gap: .5rem; text-align: center; }
.txv-clock__tile { position: relative; padding: .625rem 0; background: var(--txv-ink); color: #fff; border-radius: 8px; font-family: var(--txv-display); font-size: 1.75rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; box-shadow: inset 0 -3px 0 rgba(255, 255, 255, .08); }
.txv-clock__tile i { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(244, 241, 234, .25); }
.txv-clock__label { margin-top: .375rem; font-size: .6875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.txv-stack { display: flex; flex-direction: column; gap: .75rem; }

/* Buttons */
.txv .txv-btn { display: inline-flex; justify-content: center; align-items: center; gap: .625rem; min-height: 3.5rem; padding: 0 1.75rem; border-radius: 999px; font-size: 1.125rem; font-weight: 800; line-height: 1.1; cursor: pointer; transition: transform 150ms ease, background-color 150ms ease, color 150ms ease; }
.txv .txv-btn:hover { transform: translateY(-2px); }
.txv .txv-btn--dark { background: var(--txv-ink); color: #fff; border: 2px solid var(--txv-ink); }
.txv .txv-btn--dark:hover { color: #fff; background: #000; }
.txv .txv-btn--outline { background: transparent; color: var(--txv-ink); border: 2px solid var(--txv-ink); font-weight: 700; }
.txv .txv-btn--outline:hover { background: var(--txv-ink); color: #fff; }
.txv-stack .txv-btn { width: 100%; font-size: 1.0625rem; padding: 0 1.25rem; white-space: nowrap; }
.txv a:focus-visible, .txv button:focus-visible { outline: 3px solid var(--txv-ink); outline-offset: 3px; }
.txv-ticket a:focus-visible, .txv-card__back a:focus-visible, .txv-card__back button:focus-visible { outline-color: #fff; }

/* Past events */
.txv-past { padding: 1rem 0 6rem; }
.txv-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2.5rem; }
.txv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2rem; }

.txv .txv-ghost { display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; min-height: 320px; padding: 2rem; border: 2px dashed var(--txv-red); border-radius: 16px; color: var(--txv-ink); transition: background-color 200ms ease; }
.txv .txv-ghost:hover { background: rgba(230, 43, 30, .06); }
.txv-ghost__year { display: block; font-size: 4.5rem; font-weight: 900; letter-spacing: -0.05em; line-height: .9; color: transparent; -webkit-text-stroke: 2px var(--txv-ink); }
.txv-ghost__cta { display: block; margin-top: .75rem; font-size: 1.125rem; font-weight: 700; }

.txv-card { --tilt: 1.6deg; perspective: 1200px; min-height: 320px; }
.txv-card--alt { --tilt: -1.3deg; }
.txv-card__inner { position: relative; height: 320px; transform-style: preserve-3d; transform: rotate(var(--tilt)); transition: transform 650ms cubic-bezier(.2, .8, .2, 1); }
@media (hover: hover) and (pointer: fine) {
	.txv-card:not(.is-flipped):hover .txv-card__inner { transform: translateY(-8px) rotate(0deg); }
}
.txv-card.is-flipped .txv-card__inner { transform: rotate(0deg) rotateY(180deg); }
.txv .txv-card__front, .txv-card__back { position: absolute; inset: 0; border-radius: 16px; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.txv .txv-card__front { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 2rem; margin: 0; width: 100%; background: #fff; color: var(--txv-ink); border: 2px dashed var(--txv-ink); text-align: left; cursor: pointer; box-shadow: 0 18px 30px -22px rgba(20, 20, 20, .5); }
.txv .txv-card__front > .txv-eyebrow { padding-right: 2.25rem; }
.txv-hole { position: absolute; top: 1.5rem; right: 1.5rem; width: 22px; height: 22px; border-radius: 50%; background: var(--txv-paper); box-shadow: inset 0 2px 4px rgba(20, 20, 20, .35); }
.txv-card__year { display: block; font-size: 4.5rem; font-weight: 900; letter-spacing: -0.05em; line-height: .9; }
.txv-card__theme { display: block; margin-top: .5rem; font-size: 1.625rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: var(--txv-red-text); }
.txv-card__back { display: flex; flex-direction: column; justify-content: space-between; gap: 1.25rem; padding: 1.75rem 2rem 2rem; background: var(--txv-ink); color: #fff; transform: rotateY(180deg); cursor: pointer; }
.txv-card__backtop { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.txv .txv-card__undo { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -.5rem -.75rem -.5rem 0; padding: 0; background: transparent; color: var(--txv-grey-dark); border: 0; border-radius: 50%; cursor: pointer; }
.txv .txv-card__undo:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.txv .txv-card__backtheme { margin-top: .625rem; font-size: 1.625rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.txv .txv-card__meta { margin-top: .375rem; color: #D4D4D4; }
.txv-card__links { display: flex; flex-direction: column; gap: .625rem; }
.txv .txv-pill { white-space: nowrap; font-size: .9375rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 1.25rem; border-radius: 999px; font-weight: 700; color: var(--txv-ink); }
.txv .txv-pill--light { background: #fff; }
.txv .txv-pill--accent { background: var(--txv-red); }
.txv .txv-pill:hover { color: var(--txv-ink); filter: brightness(.94); }
.txv-pill__in { display: inline-flex; align-items: center; gap: .5rem; }

/* Contact */
.txv-contact-wrap { padding: 0 0 6rem; }
.txv-contact { position: relative; display: flex; flex-direction: column; gap: 2rem; padding: 3rem; background: #fff; border: 2px dashed var(--txv-ink); border-radius: 20px; }
.txv-contact__notch { position: absolute; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; background: var(--txv-paper); }
.txv-contact__notch--l { left: -18px; border-right: 2px dashed var(--txv-ink); }
.txv-contact__notch--r { right: -18px; border-left: 2px dashed var(--txv-ink); }
.txv-contact__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.txv-contact__text { flex: 1 1 320px; min-width: 0; }
.txv-social { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; padding-top: 1.75rem; border-top: 2px dashed #D6D1C4; }
.txv-social__links { display: flex; flex-wrap: wrap; gap: .75rem; }
.txv .txv-social__link { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 1.125rem; border: 2px solid var(--txv-ink); border-radius: 999px; color: var(--txv-ink); font-weight: 700; transition: background-color 150ms ease, color 150ms ease; }
.txv .txv-social__link:hover { background: var(--txv-ink); color: #fff; }
.txv-contact__text .txv-h2 { margin-top: .75rem; }
.txv .txv-contact__lead { margin-top: .5rem; font-size: 1.0625rem; }
.txv-contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.txv .txv-copy { min-width: 7.5rem; font-size: 1rem; }

/* Footer */
.txv-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 2rem 0 3rem; border-top: 1px solid #D6D1C4; font-size: .875rem; color: var(--txv-grey); }

/* Phones and small tablets */
@media (max-width: 860px) {
	.txv-wrap { padding: 0 1.25rem; }
	.txv-hero { padding: 3.5rem 0; }
	.txv-ticket__main { padding: 2rem 1.5rem; }
	.txv-ticket__facts { grid-template-columns: 1fr 1fr; }
	.txv-stub { border-left: 0; border-top: 3px dashed var(--txv-ink); border-radius: 0 0 20px 20px; padding: 2rem 1.5rem; flex-basis: 100%; }
	.txv-notch--a { left: -18px; top: -18px; }
	.txv-notch--b { left: auto; right: -18px; top: -18px; bottom: auto; }
	.txv-scissors { left: 50%; top: -13px; margin: 0 0 0 -12px; }
	.txv-contact { padding: 2rem 1.5rem; }
	.txv-stamp { right: 1.25rem; top: auto; bottom: 2.25rem; font-size: 0.9375rem; padding: .625rem .875rem; }
	.txv .txv-h2 { font-size: 1.875rem; }
}

@media (prefers-reduced-motion: reduce) {
	.txv-ticker__track { animation: none; }
	.txv-ticket, .txv-stub, .txv-card__inner, .txv .txv-btn { transition: none; }
}
