@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Group CSS Variables */
:root {
	/* Colors */
	box-sizing: border-box;
	--dark-grey: rgba(30, 30, 30, 255);
	--grey: rgba(120, 120, 120, 255);
	--white: rgba(230, 230, 230, 255);
	--blue: rgba(0, 100, 200, 255);

	/* Layout */
	--width: 980px;
	--border-radius: 4px;
	--spacing-unit: 1rem;
	--transition-speed: 0.3s;
}

body,
html {
	background-color: var(--white);
	color: var(--dark-grey);
	font-family: Montserrat, Arial, Verdana, sans-serif;
}

a {
	color: var(--dark-grey);
	text-decoration: none;
}

a:visited {
	color: var(--dark-grey);
	text-decoration: underline;
}

a:hover {
	text-decoration: underline;
}

button {
	color: white;
	background: var(--dark-grey);
	border: 0;
	padding: 0.75rem;
}

button:hover {
	cursor: pointer;
}

button:active {
	background-color: var(--grey);
}

h1,
h2,
h3,
h4 {
	text-transform: uppercase;
	font-weight: 800;
	letter-spacing: 0.3rem;
	margin: 0;
	margin-bottom: 0.5rem;
}

h2,
h3,
h4 {
	color: var(--grey);
	letter-spacing: 0.2rem;
}

.app {
	display: flex;
	flex-direction: column;
}

.row {
	width: 100%;
}

.content {
	max-width: var(--width);
	margin-left: auto;
	margin-right: auto;
	margin-top: 4rem;
	margin-bottom: 4rem;
}

.header {
	display: flex;
	justify-content: center;
}

.header img {
	width: 100%;
	max-width: 500px;
}

.intro {
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: center;
}

.services {
	display: flex;
	flex-direction: column;
	justify-content: center;
	text-align: center;
}

.services-grid {
	content-visibility: auto;
	contain-intrinsic-size: 400px;
	margin-top: 4rem;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

.services-grid-item {
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: 70px auto;
	align-items: start;
	align-content: start;
	gap: 2rem;
}

.services-grid-item2 {
	display: grid;
	grid-template-columns: 1fr;
	grid-template-rows: 70px auto auto;
	align-items: start;
	align-content: start;
	gap: 2rem;
}

.services-grid-image {
	will-change: transform;
	transition: transform var(--transition-speed) ease;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	overflow: hidden;
	background-size: cover;
}

.services-grid-text {
	font-weight: 800;
	align-self: center;

}


.services-grid-image2 {
	width: 100%;
	max-height: 200px;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
	align-self: center;
}

.services-grid-text2 {
	font-weight: 600;
	color: var(--grey);
	align-self: start;
	align-content: start;
	align-items: start;
}

.about {
	background-image: url('../content/images/spinnaker_tower.jpg');
	aspect-ratio: 16 / 9;
	background-size: cover;
}

.column {
	padding: 2rem;
	max-width: 40%;
}

.column p {
	font-weight: 600;
	color: var(--white);
}

.column h2 {
	color: var(--white);
}

.contact {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	padding: 2rem 0;
}

.contact-col {
	width: 100%;
	max-width: 600px;
	/* Limits form width for better readability */
	margin: 0 auto;
	/* Centers the form */
}

.contact-email {
	text-transform: uppercase;
	font-weight: 800;
}

.contact-tel {
	text-transform: uppercase;
	font-weight: 800;
}

.contact-form {
	width: 100%;
}

.form-group input,
.form-group textarea {
	width: 100%;
	box-sizing: border-box;
}

.contact-form input,
textarea {
	border-radius: 0;
	border: 1px solid black;
	padding: 1rem;
	font-size: 12px;
	grid-column: span 2;
}

.contact-form textarea {
	height: 4rem;
}

.contact-submit {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}

.form-status {
	text-align: center;
	min-height: 24px;
	/* Prevents layout shift when message appears */
	width: 100%;
}

#submit-button {
	width: 200px;
	/* or your preferred width */
	padding: 10px 20px;
}

button,
.contact-submit button,
input[type="submit"] {
	min-height: 44px;
	min-width: 44px;
	padding: 0.75rem 1.5rem;
}

a,
button {
	padding: 0.5rem;
	margin: 0.25rem;
}

footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	color: var(--white);
	gap: 0.25rem;
}

/* Accessible skip link (reinforce & ensure present in main stylesheet) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}
.skip-link:focus,
.skip-link:active {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  background: #000;
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
}

/* Header background moved here */
.site-header {
  background-color: var(--dark-grey);
}

/* Hero image styling moved here */
.hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 2rem;
  object-fit: cover;
  display: block;
}

.footer-link {
	color: var(--white);
	font-weight: 400;
}

.row-footer {
	background-color: var(--dark-grey);
}

:focus-visible {
	outline: 3px solid var(--blue);
	outline-offset: 2px;
}

@media screen and (max-width: 980px) {
	.services-grid {
		margin-left: 1rem;
		margin-right: 1rem;
	}

	.contact {
		margin-left: 1rem;
		margin-right: 1rem;
	}
}

@media screen and (max-width: 640px) {
	.services-grid {
		grid-template-columns: 1fr;
	}

	.services-grid-image {
		border-radius: 0;
	}

	footer h1 {
		text-align: center;
	}

	.contact {
		grid-template-columns: 1fr;
	}

	.about {
		background-position: 0% 50%;
	}
}

@media screen and (max-width: 500px) {
	.header img {
		margin-left: 1rem;
		margin-right: 1rem;
	}
}

@media screen and (max-width: 480px) {
	.about {
		background-position: 20%;
	}
}

@media screen and (max-width: 420px) {
	.about {
		background-position: 30%;
	}
}

@media screen and (max-width: 320px) {
	.about {
		background-position: 40%;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

.form-group {
	position: relative;
	margin-bottom: 1.5rem;
}

.required::after {
	content: "*";
	color: #dc3545;
	margin-left: 4px;
}

.error-message {
	position: absolute;
	bottom: -20px;
	left: 0;
	font-size: 0.875rem;
	color: #dc3545;
}

.contact-submit button[disabled] {
	opacity: 0.7;
	cursor: not-allowed;
}

.hint-text {
	display: block;
	color: #6c757d;
	font-size: 0.875rem;
	margin-top: 0.25rem;
}

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
	border-color: #dc3545;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
	border-color: #28a745;
}

/* Accessibility focus styles */
input:focus,
textarea:focus,
button:focus {
	outline: 2px solid #007bff;
	outline-offset: 2px;
}