/*
 * SoftviaTech New – base styles
 * Tokens, fonts, reset, typography, layout helpers, buttons and forms.
 * Written from scratch for this theme.
 */

/* ------------------------------------------------------------------
 * Fonts (self-hosted, SIL Open Font License – see assets/fonts)
 * ---------------------------------------------------------------- */
@font-face {
	font-family: "Urbanist";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/urbanist-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Urbanist";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/urbanist-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "DM Sans";
	font-style: normal;
	font-weight: 100 1000;
	font-display: swap;
	src: url("../fonts/dm-sans-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "DM Sans";
	font-style: normal;
	font-weight: 100 1000;
	font-display: swap;
	src: url("../fonts/dm-sans-latin-ext-wght-normal.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------
 * Design tokens
 * ---------------------------------------------------------------- */
:root {
	--primary: #4a81d3;
	--primary-rgb: 74, 129, 211;
	--secondary: #514a9d;
	--grad: linear-gradient(45deg, var(--primary), var(--secondary));

	--dark-1: #12132c;
	--dark-2: #191b36;
	--dark-3: #222e66;
	--dark-card: linear-gradient(0deg, var(--dark-3) 0%, var(--dark-2) 100%);
	--mobile-bar: #111013;

	--light: #f3f3f4;
	--ink: #111013;
	--text: #797a8c;
	--text-on-dark: rgba(255, 255, 255, 0.75);
	--line-dark: rgba(255, 255, 255, 0.12);

	--font-body: "DM Sans", Helvetica, Arial, sans-serif;
	--font-head: "Urbanist", Helvetica, Arial, sans-serif;

	--radius: 10px;
	--radius-btn: 8px;
	--container: 1280px;
	--gutter: 24px;

	--section-pad: 100px;
	--header-h: 124px;
	--topbar-h: 42px;

	--hex-url: url("../images/hex-pattern.svg");
	--bg-hero: linear-gradient(180deg, #0d1730 0%, #132445 55%, #1b3a63 100%);
	--bg-hex: linear-gradient(155deg, #0f1b3a 0%, #123a52 46%, #1b5f66 100%);

	--ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.no-topbar {
	--header-h: 82px;
}

/* ------------------------------------------------------------------
 * Reset
 * ---------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

#page {
	overflow-x: clip;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.9;
	color: var(--text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--primary);
	text-decoration: none;
	transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

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

ul,
ol {
	margin: 0;
	padding: 0;
}

p {
	margin: 0 0 20px;
}

hr {
	border: 0;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 12px 20px;
	clip: auto;
	background: #fff;
	color: var(--ink);
	border-radius: 6px;
}

/* ------------------------------------------------------------------
 * Typography
 * ---------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 15px;
	font-family: var(--font-head);
	font-weight: 600;
	color: var(--ink);
	line-height: 1.2;
}

h1 {
	font-size: 60px;
	line-height: 1.15;
	letter-spacing: -1.2px;
}

h2 {
	font-size: 48px;
	line-height: 1.2;
	letter-spacing: -0.72px;
}

h3 {
	font-size: 26px;
	line-height: 1.5;
	margin-bottom: 10px;
}

h4 {
	font-size: 20px;
	line-height: 1.6;
	margin-bottom: 10px;
}

h5 {
	font-size: 18px;
	line-height: 1.6;
	margin-bottom: 20px;
}

.lead {
	font-size: 19px;
	line-height: 1.68;
	letter-spacing: -0.2px;
}

.eyebrow {
	display: inline-block;
	margin: 0 0 8px;
	padding: 6px 0 3px;
	font-family: var(--font-head);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 5px;
	text-transform: uppercase;
	color: var(--primary);
}

.text-center {
	text-align: center;
}

/* On dark backgrounds text flips to light. */
.section-dark,
.section-dark-2,
.section-hex,
.section-brand,
.on-dark,
.site-footer {
	color: var(--text-on-dark);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark-2 h1,
.section-dark-2 h2,
.section-dark-2 h3,
.section-dark-2 h4,
.section-hex h1,
.section-hex h2,
.section-hex h3,
.section-hex h4,
.section-brand h1,
.section-brand h2,
.section-brand h3,
.section-brand h4,
.on-dark h1,
.on-dark h2,
.on-dark h3,
.on-dark h4,
.site-footer h5 {
	color: #fff;
}

/* ------------------------------------------------------------------
 * Layout
 * ---------------------------------------------------------------- */
.container {
	width: min(100% - 2 * var(--gutter), var(--container));
	margin-inline: auto;
}

.section {
	position: relative;
	padding-block: var(--section-pad);
}

.section-dark {
	background: var(--dark-1);
}

.section-dark-2 {
	background: var(--dark-2);
}

.section-light {
	background: var(--light);
}

.section-hex {
	background-color: #0f1b3a;
	background-image: var(--hex-url), var(--bg-hex);
	background-size: 320px auto, cover;
	background-position: top center, center;
}

.section-brand {
	background: var(--grad);
	color: #fff;
}

.section-head {
	max-width: 100%;
	margin: 0 auto 40px;
}

.section-head.narrow {
	max-width: 720px;
}

.section-head p {
	margin-bottom: 0;
}

.section-head .lead {
	margin-top: 8px;
}

.grid {
	display: grid;
	gap: 24px;
}

.grid.gap-lg {
	gap: 32px 48px;
}

.grid-tight {
	gap: 16px;
}

.grid-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 48px;
}

.split-center {
	align-items: center;
}

.split-start {
	align-items: start;
}

.narrow-content {
	max-width: 800px;
	margin-inline: auto;
}

.narrow-content.wide {
	max-width: 1040px;
}

@media (max-width: 991px) {
	:root {
		--section-pad: 80px;
	}

	.grid-2,
	.split {
		grid-template-columns: minmax(0, 1fr);
	}

	.grid-3,
	.grid-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.split {
		gap: 40px;
	}
}

@media (max-width: 767px) {
	:root {
		--section-pad: 40px;
		--gutter: 20px;
	}

	body {
		font-size: 17px;
	}

	h1 {
		font-size: 40px;
	}

	h2 {
		font-size: 36px;
		letter-spacing: -0.54px;
	}

	h3 {
		font-size: 24px;
	}

	.grid-3,
	.grid-4 {
		grid-template-columns: minmax(0, 1fr);
	}

	.section-head {
		margin-bottom: 28px;
	}

	.lead {
		font-size: 18px;
	}
}

/* ------------------------------------------------------------------
 * Buttons
 * ---------------------------------------------------------------- */
.btn {
	position: relative;
	display: inline-block;
	overflow: hidden;
	margin: 0 0 16px;
	padding: 6px 20px;
	font-family: var(--font-body);
	font-size: 15px;
	font-weight: 600;
	line-height: 32px;
	color: #fff;
	text-align: center;
	background: var(--primary);
	border: 0;
	border-radius: var(--radius-btn);
	cursor: pointer;
	isolation: isolate;
	transition: color 0.3s var(--ease);
}

/* Slide-in fill on hover. */
.btn::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--dark-1);
	transform: translateX(-101%);
	transition: transform 0.35s var(--ease);
}

.btn:hover,
.btn:focus-visible {
	color: #fff;
}

.btn:hover::before,
.btn:focus-visible::before {
	transform: translateX(0);
}

.btn-dark {
	background: var(--dark-1);
}

.btn-dark::before {
	background: var(--primary);
}

.section-brand .btn-dark::before {
	background: var(--secondary);
}

.btn-line,
.btn-outline {
	background: transparent;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.btn-line::before {
	background: #fff;
}

.btn-line:hover,
.btn-line:focus-visible {
	color: var(--dark-1);
}

.btn-outline {
	box-shadow: inset 0 0 0 2px var(--primary);
	color: var(--primary);
}

.btn-outline::before {
	background: var(--primary);
}

.btn-outline:hover,
.btn-outline:focus-visible {
	color: #fff;
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-top: 24px;
}

.btn-row .btn {
	margin: 0;
}

/* ------------------------------------------------------------------
 * Forms
 * ---------------------------------------------------------------- */
.field {
	margin-bottom: 20px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea,
.search-form .search-field {
	display: block;
	width: 100%;
	height: 46px;
	padding: 6px 12px;
	font-size: 16px;
	line-height: 1.5;
	color: #111;
	background: #fff;
	border: 1px solid transparent;
	border-radius: 4px;
	transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
	appearance: none;
}

.contact-form select {
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

.contact-form textarea {
	height: 70px;
	min-height: 70px;
	resize: vertical;
}

.contact-form ::placeholder {
	color: #8a8b99;
	opacity: 1;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.35);
}

.contact-form .is-invalid {
	border-color: #e5484d;
	box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.25);
}

.field-error {
	display: block;
	margin-top: 4px;
	font-size: 14px;
	line-height: 1.4;
	color: #ff9aa0;
}

.hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-actions .btn {
	margin-bottom: 0;
}

.form-actions .btn[disabled] {
	opacity: 0.7;
	cursor: progress;
}

.form-status {
	margin-top: 16px;
}

.notice {
	margin: 0;
	padding: 12px 16px;
	font-size: 15px;
	line-height: 1.5;
	border-radius: 6px;
}

.notice-success {
	color: #d7f5df;
	background: rgba(46, 160, 90, 0.25);
	border: 1px solid rgba(46, 160, 90, 0.6);
}

.notice-error {
	color: #ffd5d7;
	background: rgba(229, 72, 77, 0.22);
	border: 1px solid rgba(229, 72, 77, 0.6);
}

.search-form {
	display: flex;
	gap: 8px;
}

.search-form .search-field {
	border-color: rgba(0, 0, 0, 0.15);
}

.search-form .search-submit {
	padding: 0 20px;
	color: #fff;
	background: var(--primary);
	border: 0;
	border-radius: 4px;
	font-weight: 600;
}

/* ------------------------------------------------------------------
 * Motion
 * ---------------------------------------------------------------- */
/* Reveal-on-scroll: only hidden once JS has opted in, so content is never lost. */
.reveal-ready [data-reveal] {
	opacity: 0;
	transition: opacity 0.7s var(--ease) var(--reveal-delay, 0s), transform 0.7s var(--ease) var(--reveal-delay, 0s);
}

.reveal-ready [data-reveal="up"] {
	transform: translateY(32px);
}

.reveal-ready [data-reveal="right"] {
	transform: translateX(48px);
}

.reveal-ready [data-reveal="zoom"] {
	transform: scale(0.92);
}

.reveal-ready [data-reveal].is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.reveal-ready [data-reveal] {
		opacity: 1;
		transform: none;
		transition: none;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}
