/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
	color: #222;
	font-size: 1em;
	line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
	background: #b3d4fc;
	text-shadow: none;
}

::selection {
	background: #b3d4fc;
	text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
	display: block;
	height: 1px;
	border: 0;
	border-top: 1px solid #ccc;
	margin: 1em 0;
	padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
	vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
	border: 0;
	margin: 0;
	padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
	resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
	display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
	border: 0;
	clip: rect(0, 0, 0, 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
	/* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
	clip: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	position: static;
	white-space: inherit;
	width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
	visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
	content: "";
	display: table;
}

.clearfix::after {
	clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
	/* Style adjustments for viewports that meet the condition */
}

@media print, (-webkit-min-device-pixel-ratio: 1.25),
	(min-resolution: 1.25dppx), (min-resolution: 120dpi) {
	/* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
	*,
	*::before,
	*::after {
		background: #fff !important;
		color: #000 !important;
		/* Black prints faster */
		box-shadow: none !important;
		text-shadow: none !important;
	}

	a,
	a:visited {
		text-decoration: underline;
	}

	a[href]::after {
		content: " (" attr(href) ")";
	}

	abbr[title]::after {
		content: " (" attr(title) ")";
	}

	/*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
	a[href^="#"]::after,
	a[href^="javascript:"]::after {
		content: "";
	}

	pre {
		white-space: pre-wrap !important;
	}

	pre,
	blockquote {
		border: 1px solid #999;
		page-break-inside: avoid;
	}

	tr,
	img {
		page-break-inside: avoid;
	}

	p,
	h2,
	h3 {
		orphans: 3;
		widows: 3;
	}

	h2,
	h3 {
		page-break-after: avoid;
	}
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
		Arial, sans-serif;
	background: #f9fafb;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	overflow: hidden;
	position: relative;
}

/* Use Tajawal for Arabic for better legibility and aesthetics */
html[lang="ar"] body {
	font-family:
		"Tajawal", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
}

/* Animations */
@keyframes float {
	0%,
	100% {
		transform: translateY(0px);
	}
	50% {
		transform: translateY(-20px);
	}
}

@keyframes slide-right {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}

/* Slow, subtle rotation for decorative lines */
@keyframes rotate-slow {
	0% {
		transform: rotate(25deg);
	}
	100% {
		transform: rotate(385deg);
	}
}

@keyframes fade-in {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Background elements */
.dots {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(
		circle,
		oklch(55% 61% 263deg) 1px,
		transparent 1px
	);
	background-size: 40px 40px;
	opacity: 0.1;
	pointer-events: none;
}

.line-container {
	position: absolute;
	inset: 0;
	overflow: hidden;
	opacity: 0.12;
	pointer-events: none;
	transform-origin: 50% 50%;
	animation: rotate-slow 120s linear infinite;
}

.line {
	position: absolute;
	height: 2px;
	width: 220%;
	left: -10%;
	background: linear-gradient(
		90deg,
		transparent,
		oklch(55% 61% 263deg),
		transparent
	);
	/* Remove horizontal slide to keep motion subtle; rotation on container provides movement */
	animation: none;
}

.line:nth-child(1) {
	top: 20%;
	animation-delay: 0s;
}
.line:nth-child(2) {
	top: 40%;
	animation-delay: -5s;
	animation-duration: 20s;
}
.line:nth-child(3) {
	top: 60%;
	animation-delay: -10s;
	animation-duration: 18s;
}
.line:nth-child(4) {
	top: 80%;
	animation-delay: -7s;
	animation-duration: 22s;
}

/* Language selector */
.language-selector {
	position: absolute;
	top: 1.5rem;
	right: 1.5rem;
	z-index: 20;
}

select {
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	background: white;
	color: #374151;
	font-size: 0.875rem;
	font-weight: 500;
	border: 1px solid #d1d5db;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	cursor: pointer;
	transition: all 0.2s;
}

select:focus {
	outline: none;
	ring: 2px;
	ring-color: oklch(55% 61% 263deg);
}

/* Main container */
.container {
	position: relative;
	z-index: 10;
	text-align: center;
	max-width: 48rem;
	margin: 0 auto;
}

/* Logo */
.logo {
	animation: float 3s ease-in-out infinite;
	margin-bottom: 2rem;
	animation: fade-in 0.8s ease-out forwards;
}

.logo-box {
	margin: 0 auto;
	border-radius: 1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: oklch(55% 61% 263deg);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.logo img {
	width: 240px;
	filter: invert(1) brightness(7);
}

/* Typography */
h1 {
	font-size: 3.5rem;
	font-weight: bold;
	color: #111827;
	margin-bottom: 1rem;
	animation: fade-in 0.8s ease-out 0.2s forwards;
	opacity: 0;
}

.subtitle {
	font-size: 1.5rem;
	color: #4b5563;
	margin-bottom: 3rem;
	max-width: 42rem;
	margin-left: auto;
	margin-right: auto;
	animation: fade-in 0.8s ease-out 0.4s forwards;
	opacity: 0;
}

/* Form */
.form-container {
	animation: fade-in 0.8s ease-out 0.6s forwards;
	opacity: 0;
}

.email-form {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	max-width: 28rem;
	margin: 0 auto 2rem;
}

input[type="email"] {
	flex: 1;
	padding: 1rem 1.5rem;
	border-radius: 0.5rem;
	background: white;
	color: #111827;
	border: 1px solid #d1d5db;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	font-size: 1rem;
	transition: all 0.2s;
}

input[type="email"]::placeholder {
	color: #9ca3af;
}

input[type="email"]:focus {
	outline: none;
	ring: 2px;
	ring-color: oklch(55% 61% 263deg);
	border-color: transparent;
}

button {
	padding: 1rem 2rem;
	border-radius: 0.5rem;
	font-weight: 600;
	color: white;
	background: oklch(55% 61% 263deg);
	border: none;
	cursor: pointer;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	transition: all 0.2s;
	font-size: 1rem;
}

button:hover {
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
	transform: scale(1.05);
}

/* Feature tags */
.features {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 2rem;
}

.feature-tag {
	padding: 0.5rem 1rem;
	background: white;
	border-radius: 9999px;
	font-size: 0.875rem;
	color: #374151;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	border: 1px solid #e5e7eb;
}

/* Social links */
.social-links {
	display: flex;
	justify-content: center;
	gap: 1.5rem;
}

.social-link {
	width: 3rem;
	height: 3rem;
	border-radius: 9999px;
	background: white;
	border: 1px solid #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #4b5563;
	text-decoration: none;
	transition: all 0.2s;
}

.social-link:hover {
	color: #111827;
	border-color: #d1d5db;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
	transform: scale(1.1);
}

.social-link i {
	font-size: 1.25rem;
}

/* Responsive */
@media (min-width: 640px) {
	.email-form {
		flex-direction: row;
	}
}

@media (min-width: 768px) {
	h1 {
		font-size: 4.5rem;
	}

	.subtitle {
		font-size: 1.5rem;
	}
}
