/* Sky & cloud theme — complements banner.jpg (blue / white clouds) */

:root {
	--sky-deep: #2a5278;
	--sky-mid: #4a8fc7;
	--sky-light: #87ceeb;
	--sky-pale: #e8f4fc;
	--cloud-white: #f7fbff;
	--text-primary: #2a4058;
	--text-muted: #5a7189;
	--accent: #2563a8;
	--accent-hover: #1a4d85;
	--card-bg: #ffffff;
	--card-border: rgba(74, 143, 199, 0.28);
	--section-alt: #eef6fc;
	--shadow-soft: 0 4px 18px rgba(42, 64, 88, 0.08);
	--shadow-hover: 0 10px 28px rgba(42, 64, 88, 0.12);
	--container-max: 90rem;
	--card-img: 5rem;
	--card-row-min: 10.5rem;
}

/* Prevent horizontal scroll on small screens */
html {
	overflow-x: hidden;
}

#page-wrapper {
	overflow: visible;
	width: 100%;
}

/* Typography & base colors */
body,
input,
textarea,
select {
	color: var(--text-muted);
	font-size: clamp(0.95rem, 1.1vw, 1.05rem);
	line-height: 1.65;
}

h1, h2, h3, h4, h5, h6,
strong, b {
	color: var(--text-primary);
}

a {
	color: var(--accent);
}

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

/* Wider, responsive content area on desktop */
@media screen and (min-width: 981px) {
	.container {
		width: min(var(--container-max), calc(100% - 3rem));
		max-width: var(--container-max);
	}
}

@media screen and (max-width: 736px) {
	.container {
		width: calc(100% - 1.5rem);
	}
}

/* Header — lighter overlay so clouds read through */
#header::before {
	background: linear-gradient(
		180deg,
		rgba(42, 82, 120, 0.25) 0%,
		rgba(135, 206, 235, 0.2) 45%,
		rgba(247, 251, 255, 0.35) 100%
	);
}

.homepage #header {
	height: clamp(18rem, 42vh, 32rem);
}

#logo h1 a {
	color: #fff;
	text-shadow: 0 2px 12px rgba(42, 64, 88, 0.45);
}

#nav > ul {
	background: rgba(42, 82, 120, 0.35);
	backdrop-filter: blur(6px);
}

#nav > ul > li > a:hover,
#nav > ul > li.active > a {
	color: var(--sky-pale);
}

/* Section wrappers */
.wrapper.style1 {
	background: linear-gradient(165deg, var(--sky-mid) 0%, var(--sky-light) 55%, var(--sky-pale) 100%);
	color: rgba(255, 255, 255, 0.92);
}

/* Tab sits below header clouds — sky blue, white text */
#intro.wrapper.style1 > .title {
	background: #87ceeb !important;
	background-image: none !important;
	color: #fff !important;
}

.wrapper.style1 h1,
.wrapper.style1 h2,
.wrapper.style1 h3,
.wrapper.style1 h4,
.wrapper.style1 h5,
.wrapper.style1 h6,
.wrapper.style1 strong,
.wrapper.style1 b,
.wrapper.style1 a {
	color: #fff;
}

.wrapper.style2 {
	background: var(--cloud-white);
}

#main.wrapper.style2 > .title {
	background: #f7fbff !important;
	background-image: none !important;
	color: #2a4058 !important;
}

.wrapper.style3 {
	background: var(--section-alt);
}

#explorations.wrapper.style3 > .title {
	background: #eef6fc !important;
	background-image: none !important;
	color: #2a4058 !important;
}

/* Websites section — darker blue (tab must contrast with section below) */
.wrapper.style-websites {
	background: linear-gradient(180deg, var(--sky-deep) 0%, #1e3d5c 100%);
	color: rgba(255, 255, 255, 0.8);
	padding-top: 6em;
	padding-bottom: 4em;
	overflow: visible;
	position: relative;
	z-index: 2;
}

/* Tab sits on light Explorations — dark blue tab, white text */
#websites.wrapper.style-websites > .title {
	background: #2a5278 !important;
	background-image: none !important;
	color: #fff !important;
	z-index: 25;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.wrapper.style-websites #features header.style1 p,
.wrapper.style-websites .feature-list header p {
	color: rgba(255, 255, 255, 0.9);
}

.wrapper.style-websites > .container > .feature-list a,
.wrapper.style-websites header a {
	color: #b8d9f5;
}

.wrapper.style-websites > .container > .feature-list a:hover,
.wrapper.style-websites header a:hover {
	color: #fff;
}

.wrapper.style-websites .site-card a {
	color: var(--accent);
}

.wrapper.style-websites .site-card a:hover {
	color: var(--accent-hover);
}


/* About intro */
#intro {
	padding: 3em 0 4em;
	text-align: left;
}

#intro .container {
	max-width: 52em;
}

#intro p.style1 {
	font-size: clamp(1.05rem, 2vw, 1.35rem);
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.95);
	letter-spacing: 0.02em;
}

/* Section headers */
#features header.style1 p,
.feature-list header p {
	color: var(--text-muted);
	font-size: 1.05em;
	max-width: 42em;
}

/* Card grid — override template .row gutters (50px padding breaks layout) */
.cards-grid.row {
	display: grid !important;
	flex-wrap: unset !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-rows: auto;
	gap: 1.25rem;
	margin: 0 !important;
	margin-left: 0 !important;
	margin-top: 0 !important;
	width: 100%;
	align-items: start;
	justify-items: stretch;
}

.cards-grid.row > [class*="col-"] {
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	display: block;
	min-width: 0;
	height: auto;
	align-self: start;
}

.cards-grid.row > [class*="col-"] > section {
	display: block;
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

@media screen and (max-width: 1280px) {
	.cards-grid.row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 736px) {
	.cards-grid.row {
		grid-template-columns: minmax(0, 1fr);
		gap: 1rem;
		justify-items: center;
		max-width: 24rem;
		margin-left: auto !important;
		margin-right: auto !important;
	}

	.cards-grid.row > [class*="col-"] {
		width: 100% !important;
		max-width: 24rem;
	}
}

/*
 * Card = HTML table (matches requested layout exactly)
 *   | Image | Title        |
 *   | Description (colspan 2) |
 */
.cards-grid .site-card {
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: 12px;
	padding: 1.15rem 1.25rem;
	width: 100%;
	box-sizing: border-box;
	box-shadow: var(--shadow-soft);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	vertical-align: top;
}

.cards-grid .site-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-hover);
	border-color: rgba(74, 143, 199, 0.45);
}

.cards-grid .card-layout {
	width: 100%;
	border: 0;
	border-collapse: collapse;
	border-spacing: 0;
	table-layout: fixed;
}

.cards-grid .card-layout tr {
	vertical-align: top;
}

.cards-grid .card-layout td {
	vertical-align: top;
	border: 0;
	padding: 0;
	text-align: left;
}

.cards-grid .card-layout__img {
	width: var(--card-img);
	padding: 0 1rem 0 0;
}

.cards-grid .card-layout__img img {
	display: block;
	width: var(--card-img);
	height: var(--card-img);
	object-fit: contain;
	border-radius: 8px;
}

.cards-grid .card-layout__img a {
	display: block;
	line-height: 0;
}

.cards-grid .card-layout__title {
	width: auto;
	vertical-align: top;
}

.cards-grid .card-layout__title h3 {
	margin: 0;
	padding: 0;
	font-size: 1.12em;
	font-weight: 700;
	line-height: 1.35;
	color: var(--text-primary) !important;
	letter-spacing: normal !important;
}

.cards-grid .card-layout__title h3:before {
	display: none !important;
	content: none !important;
}

.cards-grid .card-layout__title h3 a {
	color: var(--text-primary);
	text-decoration: none;
	font-weight: 700;
}

.cards-grid .card-layout__title h3 a:hover {
	color: var(--accent);
	text-decoration: underline;
}

.cards-grid .card-layout__desc {
	padding-top: 0.75rem;
	border-top: 1px solid var(--card-border);
	line-height: 1.5;
	font-size: 0.92em;
	color: var(--text-muted);
	vertical-align: top;
}

/* Buttons & form accents */
input[type="submit"],
input[type="reset"],
input[type="button"],
button,
.button {
	background: linear-gradient(180deg, var(--sky-mid) 0%, var(--sky-deep) 100%) !important;
	color: #fff !important;
	border-radius: 0.35em;
}

input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
button:hover,
.button:hover {
	background: linear-gradient(180deg, var(--accent) 0%, var(--sky-deep) 100%) !important;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--sky-mid);
}

/* Site copyright bar */
.site-copyright {
	text-align: center;
	padding: 1.5em 1em;
	background: #1e3d5c;
	color: rgba(255, 255, 255, 0.7);
}

.site-copyright ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Contact page */
#contact-page .container {
	max-width: 36em;
}

.contact-form label {
	display: block;
	margin-top: 1em;
	margin-bottom: 0.35em;
	font-weight: 700;
	color: var(--text-primary);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
	width: 100%;
	max-width: 100%;
}

.contact-form .g-recaptcha {
	margin: 1.25em 0;
}

.contact-notice {
	padding: 0.75em 1em;
	border-radius: 0.35em;
	margin-bottom: 1em;
}

.contact-notice--success {
	background: #e8f4fc;
	color: var(--sky-deep);
}

.contact-notice--error {
	background: #fde8e8;
	color: #8b2e2e;
}

/* Legacy coral accents → sky theme */
.icon.featured {
	color: var(--sky-mid) !important;
}

#intro p.style2 {
	color: #fff;
}

.wrapper > .title {
	letter-spacing: 0.05em;
	max-width: calc(100vw - 2rem);
	box-sizing: border-box;
	background-image: none !important;
}

/* Shadow ears on tabs — tint for dark vs light tabs */
#intro.wrapper.style1 > .title::before,
#intro.wrapper.style1 > .title::after {
	opacity: 0.85;
}

#websites.wrapper.style-websites > .title::before,
#websites.wrapper.style-websites > .title::after {
	filter: brightness(0.7);
}

.feature-list {
	width: 100%;
	max-width: none !important;
}

/* No inner <section> on cards — feature-list section rules must not apply */
.cards-grid .feature-list section {
	border-top: none !important;
	padding: 0 !important;
	margin: 0 !important;
	position: static !important;
}

.wrapper.style2 .container,
.wrapper.style3 .container,
.wrapper.style-websites .container {
	padding-top: 0.5em;
	padding-bottom: 2.5em;
}

/* Section tab headers — consistent on mobile */
@media screen and (max-width: 736px) {
	.wrapper {
		padding: 3.5em 0 5em 0;
	}

	.wrapper .title {
		font-size: 0.8em;
		width: min(18em, calc(100vw - 2rem));
		margin-left: calc(min(18em, calc(100vw - 2rem)) / -2);
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		padding-left: 0.5em;
		padding-right: 0.5em;
	}

	#intro {
		padding: 2.5em 0 3.5em;
		text-align: center;
	}

	#intro .container {
		margin: 0 auto;
	}

	#features header.style1 {
		padding-bottom: 2em;
		text-align: center;
	}

	#features header.style1 p {
		margin-left: auto;
		margin-right: auto;
	}

	.cards-grid .site-card {
		min-height: 11rem;
		padding: 1.1rem 1rem;
	}

	.cards-grid .card-layout__title h3 {
		font-size: 1em;
	}

	.homepage #header {
		height: clamp(14rem, 38vh, 22rem);
	}

	#logo {
		top: -3em;
		padding: 0 1em;
	}

	#logo h1 {
		font-size: 1.35em;
		letter-spacing: 0.12em;
	}

	#nav {
		top: 1.5em;
	}

	.g-recaptcha {
		transform-origin: left top;
		max-width: 100%;
	}
}

@media screen and (max-width: 480px) {
	#nav > ul {
		padding: 0 0.5em;
	}

	#nav > ul > li {
		padding: 0 0.65em;
	}

	#nav > ul > li > a {
		font-size: 0.65em;
		letter-spacing: 0.12em;
	}
}

/* Subpages: responsive media */
#page-wrapper video {
	max-width: 100%;
	height: auto;
}

#page-wrapper .gallery {
	max-width: 100%;
}

/* Mobile nav touch targets */
@media screen and (max-width: 980px) {
	#nav > ul > li > a {
		min-height: 44px;
		line-height: 44px;
		height: auto;
		padding: 0.5em 0;
	}
}

/* Contact page mobile */
@media screen and (max-width: 736px) {
	#contact-page .container {
		width: calc(100% - 1.5rem);
	}
}
