/* ==========================================================================
   DJ0SH custom theme: light background, cyan accent
   Toggle: comment out the <link> to css/dj0sh.css in index.html to revert.
   Loads after slides.min.css, before the inline <style> block in index.html.
   ========================================================================== */

:root {
	--dj-bg:          #eef3f7;   /* slide base colour behind the photo        */
	--dj-ink:         #1c2330;   /* headings, callsign                         */
	--dj-ink-soft:    #2a3341;   /* body copy                                  */
	--dj-cyan:        #0e9fc4;   /* accent on light ground (links, morse line) */
	--dj-cyan-bright: #19c3ea;   /* hover / active                             */
	--dj-card:        #ffffff;
}

/* --- Slide ground -------------------------------------------------------- */
.slides,
.slide {
	background: var(--dj-bg) !important;
	color: var(--dj-ink) !important;
}

/* The framework's .fade-4 paints rgba(0,0,0,.4) over the photo; replace it
   with a light, slightly cyan-tinted gradient so the grey photo reads as a
   bright, cool sky instead of fog. */
.slide.fade-4 .content {
	background: linear-gradient(
		180deg,
		rgba(205, 233, 244, 0.62) 0%,
		rgba(240, 247, 251, 0.45) 45%,
		rgba(255, 255, 255, 0.55) 100%
	) !important;
}

/* --- Typography ---------------------------------------------------------- */
body.slides h1.callsign-title {
	color: var(--dj-ink) !important;
}
body.slides h1.morse-title {
	color: var(--dj-cyan) !important;
}
.slide h1,
.slide h2,
.slide h3,
.slide h4 {
	color: var(--dj-ink);
}
.slide h1.subtitle {
	color: var(--dj-ink);
	font-weight: 400;
	text-shadow:
		0 0 10px rgba(255, 255, 255, 0.95),
		0 0 3px rgba(255, 255, 255, 0.95);
}
.slide p,
.slide p.tiny,
.slide .gridinfo {
	color: var(--dj-ink-soft);
}
.slide h3 {
	font-weight: 500;
	letter-spacing: 0.01em;
}

/* --- Links --------------------------------------------------------------- */
.slide a {
	color: var(--dj-cyan);
}
.slide p a,
.slide p.tiny a {
	color: var(--dj-cyan);
	font-weight: 500;
	text-decoration: none;
	border-bottom: 1px solid rgba(14, 159, 196, 0.35);
	transition: color .15s, border-color .15s;
}
.slide p a:hover,
.slide p.tiny a:hover {
	color: var(--dj-cyan-bright);
	border-bottom-color: var(--dj-cyan-bright);
	opacity: 1;
}

/* Call-to-action line under a tile text: bold, no underline, arrow prefix */
.slide p.tiny a.tile-link {
	display: inline-block;
	margin-top: 6px;
	font-weight: 700;
	white-space: nowrap;
	text-decoration: none;
	border-bottom: none;
	opacity: 1;
}
.slide p.tiny a.tile-link:hover {
	color: var(--dj-cyan-bright);
}
/* A link line placed below the card (outside the white box), centred */
section.slide ul.flex > li[class*="col-"].has-below::before,
section.slide ul.flex > li[class*="col-"].slide2-tile::before {
	bottom: 44px;   /* all cards of the row end at the same height; the link sits in the band below */
}
.slide ul.flex > li[class*="col-"].has-below p.tile-below {
	margin: 0;
	padding: 0;
	height: 44px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	text-align: center;
}
.slide ul.flex > li[class*="col-"].has-below p.tile-below a.tile-link {
	margin: 0 0 6px;
}

/* --- Project tiles as white cards --------------------------------------- */
/* The whole tile (image + heading + text) sits on one white card. The card
   is drawn with a pseudo-element on the <li>, inset by the grid gutter, so
   the HTML stays untouched. */
.slide ul.flex > li[class*="col-"]:not(.col-3-8) {
	position: relative;
	padding-top: 12px !important;
	padding-bottom: 4px !important;
	margin-bottom: 28px;
}
.slide ul.flex > li[class*="col-"]:not(.col-3-8)::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 14px;
	right: 14px;
	background: var(--dj-card);
	border-radius: 14px;
	box-shadow:
		0 1px 2px rgba(28, 35, 48, 0.06),
		0 8px 24px rgba(28, 35, 48, 0.12);
	transition: box-shadow .25s ease;
	z-index: 0;
}
.slide ul.flex > li[class*="col-"]:not(.col-3-8):hover::before {
	box-shadow:
		0 2px 4px rgba(28, 35, 48, 0.06),
		0 14px 32px rgba(14, 159, 196, 0.28);
}
.slide ul.flex > li[class*="col-"]:not(.col-3-8) > * {
	position: relative;
	z-index: 1;
}
/* Image: flush inside the card, no separate frame any more */
.slide .button.empty.rounded {
	display: block;
	margin: 0 12px 14px !important;
	padding: 0 !important;
	background-color: transparent !important;
	border-radius: 9px !important;
	box-shadow: none;
	overflow: hidden;
}
.slide .button.empty.rounded img.wide {
	display: block;
	border-radius: 9px;
}
.slide .button.empty.rounded:hover {
	opacity: 0.92;
}
/* Heading and copy get the same side inset as the image */
.slide ul.flex > li[class*="col-"] h3,
.slide ul.flex > li[class*="col-"] p.tiny {
	padding-left: 12px;
	padding-right: 12px;
	box-sizing: border-box;
}
/* The trailing <br><br> in every tile text only adds air; trim it */
.slide ul.flex > li[class*="col-"] p.tiny br:nth-last-of-type(-n+2) {
	display: none;
}

/* --- Side navigation dots ------------------------------------------------ */
.side.pole .navigation li:after {
	background: rgba(28, 35, 48, 0.28);
}
.side.pole .navigation li.selected:after,
.side.pole .navigation li.active:after,
.side.pole .navigation li:hover:after {
	background: var(--dj-cyan);
}

/* --- Footer / logo ------------------------------------------------------- */
.site-logo {
	opacity: 0.75;
}

/* --- Selection ----------------------------------------------------------- */
::selection {
	background: rgba(25, 195, 234, 0.35);
	color: var(--dj-ink);
}

/* ==========================================================================
   Responsive fixes (iPhone / iPad)
   ========================================================================== */

/* Morse line and callsign must never wrap. */
body.slides h1.callsign-title,
body.slides h1.morse-title {
	white-space: nowrap;
}

/* The framework's grid spacer <li> (class col-3-8 does not exist in the CSS)
   gets 50% width on tablet via col-tablet-1-2 and breaks the two-column
   layout. Hide it on tablet and phone. */
@media (max-width: 1024px) {
	.slide li.col-3-8 {
		display: none !important;
	}
}

/* Header in normal flow instead of absolute positioning on tablet, phone and
   on short desktop viewports (e.g. iPad landscape), so the tiles always start
   below the header instead of colliding with it. */
@media (max-width: 1024px), (max-height: 860px) {
	.slide .slide1-header {
		position: static !important;
		margin: 0 auto 10px !important;
	}
	.slide .slide1-content {
		margin-top: 0 !important;
	}
	.slide .slide1-content > br {
		display: none;
	}
	.slide .slide1-header .gridinfo {
		margin-bottom: 28px;
	}
}

/* Short desktop viewports (iPad landscape, small laptops): scale the title. */
@media (min-width: 1025px) and (max-height: 860px) {
	body.slides h1.callsign-title {
		font-size: 104px;
		letter-spacing: 14px;
	}
	body.slides h1.morse-title {
		font-size: 44px;
		letter-spacing: 5px;
		margin-top: -30px !important;
	}
}

/* Tablet portrait */
@media (max-width: 1024px) {
	body.slides h1.morse-title {
		font-size: clamp(22px, 4.4vw, 36px);
		letter-spacing: 0.1em;
	}
	.slide h3,
	.slide p.tiny {
		text-align: center;
	}
}

/* Phone: fluid title sizes, stronger white veil over the photo so the mast
   does not run through the text. */
@media (max-width: 640px) {
	body.slides h1.callsign-title {
		font-size: clamp(48px, 17vw, 80px);
		letter-spacing: 0.12em;
	}
	body.slides h1.morse-title {
		font-size: clamp(24px, 8vw, 36px);
		letter-spacing: 0.05em;
		margin-top: -6px !important;
		margin-bottom: 14px;
		color: var(--dj-cyan) !important;
		-webkit-text-stroke: 1.6px var(--dj-cyan);  /* Neuropol has one weight; thicken the dots and dashes */
	}
	.slide .slide1-header .subtitle {
		font-size: 28px;
	}
	.slide .slide1-header .gridinfo {
		font-size: 14px;
		margin-bottom: 26px;
	}
	.slide.fade-4 .content {
		background: linear-gradient(
			180deg,
			rgba(205, 233, 244, 0.78) 0%,
			rgba(240, 247, 251, 0.74) 45%,
			rgba(255, 255, 255, 0.78) 100%
		) !important;
	}
	.slide h1.subtitle {
		font-size: 30px;
	}
}

/* Phone: the framework pads every slide's .wrap with 120px at the top, which
   pushes the callsign far down the first screen. Tighten it. */
@media (max-width: 640px) {
	.slide .container .wrap {
		padding-top: 36px !important;
	}
}

/* Slide 1: three tiles at 25% are too narrow for their headings
   ("Contact: on air or by email" wrapped). Widen them on desktop. */
@media (min-width: 1025px) {
	section.slide:first-of-type ul.flex > li.col-3-12 {
		width: 31% !important;
		max-width: 31% !important;
	}
}

/* Last slide: with the framework's 120px top/bottom padding the content is
   taller than a 900px viewport and the privacy line scrolls. Tighten. */
@media (min-width: 1025px) {
	section.slide:last-of-type .container .wrap {
		padding-top: 48px !important;
		padding-bottom: 32px !important;
	}
	section.slide:last-of-type .site-logo {
		max-width: 200px;
		margin-top: 64px;
	}
	section.slide:last-of-type ul.flex > li[class*="col-"]:not(.col-3-8) {
		margin-bottom: 12px;
	}
}
@media (min-width: 1025px) and (max-height: 820px) {
	section.slide:last-of-type .container .wrap {
		padding-top: 24px !important;
		padding-bottom: 16px !important;
	}
	section.slide:last-of-type .site-logo {
		max-width: 150px;
		margin-top: 0;
	}
	section.slide:last-of-type h1.subtitle {
		margin-bottom: 8px;
	}
}

/* Cards fade in together with their content. The framework reveals ae-N
   elements once the slide gets .animate, with per-class delays; the card
   pseudo-element follows the first element of its tile (ae-6 on slide 1,
   ae-3 on the other slides). */
.slides.animated .slide ul.flex > li[class*="col-"]:not(.col-3-8)::before {
	opacity: 0;
	transform: translate3d(0, 50px, 0);
	transition: opacity .8s cubic-bezier(.25, .1, .2, 1), transform .8s cubic-bezier(.25, .1, .2, 1), box-shadow .25s ease;
}
.slides.animated .slide.animate ul.flex > li[class*="col-"]:not(.col-3-8)::before {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	transition-delay: 310ms, 310ms, 0s;
}
.slides.animated .slide.animate:first-of-type ul.flex > li[class*="col-"]:not(.col-3-8)::before {
	transition-delay: 760ms, 760ms, 0s;
}
/* Mobile (simplifiedMobile): the framework shows everything at once */
.mobile .slides.simplifiedMobile .slide ul.flex > li[class*="col-"]:not(.col-3-8)::before {
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
}

/* Slide 1 subtitle and grid line sit over the antenna photo: heavier weight,
   full ink colour and a soft white halo so the mast does not cut through. */
.slide .slide1-header h1.subtitle {
	font-weight: 400;
	color: var(--dj-ink);
	text-shadow:
		0 0 10px rgba(255, 255, 255, 0.95),
		0 0 3px rgba(255, 255, 255, 0.95);
}
.slide .slide1-header .gridinfo {
	color: var(--dj-ink);
	font-weight: 500;
	text-shadow:
		0 0 8px rgba(255, 255, 255, 0.95),
		0 0 3px rgba(255, 255, 255, 0.95);
}
.slide .slide1-header .gridinfo .opacity-8 {
	opacity: 1 !important;
}
