/*
	ddalabs — design system
	Teal primary, orange CTA-accent, dark grey on white text.
*/

:root {
	--teal-900: #0b2e2c;
	--teal-800: #0f3d39;
	--teal-700: #145049;
	--teal-600: #1a6960;
	--teal-500: #1f8177;
	--teal-100: #e4f1ef;

	--orange-600: #d9631f;
	--orange-500: #e97a34;
	--orange-100: #fdead9;

	--ink: #232323;
	--ink-soft: #55605e;
	--paper: #ffffff;
	--mist: #f4f6f5;
	--line: #e2e6e5;

	--container: 1120px;
	--radius: 14px;
	--shadow: 0 20px 45px rgba(11, 46, 44, 0.16);
	--shadow-sm: 0 6px 16px rgba(11, 46, 44, 0.10);
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background-color: var(--paper);
	color: var(--ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

main { display: block; }

img { max-width: 100%; display: block; }

a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--teal-500); }

h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.2; margin: 0 0 0.6em; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}

.visually-hidden {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Header / nav ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--teal-900);
	border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
}
.brand img { height: 26px; width: auto; }

.nav-toggle {
	display: none;
	background: none;
	border: 0;
	color: #fff;
	font-size: 1.4rem;
	line-height: 1;
	padding: 8px;
	cursor: pointer;
}

.site-nav {
	display: flex;
	align-items: center;
}

.site-nav ul {
	list-style: none;
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 0;
}

.site-nav a {
	color: rgba(255,255,255,0.82);
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.01em;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: #fff; }
.site-nav a[aria-current="page"] { border-bottom: 2px solid var(--orange-500); padding-bottom: 4px; }

.lang-switch {
	display: flex;
	align-items: center;
	gap: 2px;
	margin-left: 20px;
	padding-left: 20px;
	border-left: 1px solid rgba(255,255,255,0.16);
}

.lang-btn {
	background: none;
	border: 0;
	color: rgba(255,255,255,0.55);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 6px 8px;
	cursor: pointer;
	border-radius: 6px;
}
.lang-btn:hover { color: #fff; }
.lang-btn.is-active {
	color: #fff;
	background: rgba(255,255,255,0.12);
}

@media (max-width: 760px) {
	.nav-toggle { display: inline-flex; align-items: center; }
	.site-nav {
		position: absolute;
		top: 64px;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		background: var(--teal-900);
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.25s ease;
	}
	.site-nav ul {
		flex-direction: column;
		gap: 0;
		padding: 8px 24px 20px;
	}
	.site-nav li { border-top: 1px solid rgba(255,255,255,0.08); }
	.site-nav a { display: block; padding: 14px 0; }
	.site-header.nav-open .site-nav { max-height: 420px; }

	.lang-switch {
		justify-content: center;
		margin: 8px 0 4px;
		padding: 14px 0 0;
		border-left: 0;
		border-top: 1px solid rgba(255,255,255,0.08);
	}
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 1rem 2rem; /* py-4 px-8 */
	border-radius: 999px;
	font-weight: 700;
	font-size: 1rem;
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-cta {
	background: var(--orange-500);
	color: #fff;
	box-shadow: var(--shadow-sm);
}
.btn-cta:hover { background: var(--orange-600); color: #fff; }

.btn-primary {
	background: var(--teal-600);
	color: #fff;
}
.btn-primary:hover { background: var(--teal-500); color: #fff; }

.btn-outline {
	background: transparent;
	border-color: var(--teal-600);
	color: var(--teal-700);
}
.btn-outline:hover { background: var(--teal-100); color: var(--teal-700); }

.btn-ghost {
	background: transparent;
	border-color: rgba(255,255,255,0.35);
	color: #fff;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }

.btn[disabled], .btn.is-disabled {
	opacity: 0.55;
	cursor: default;
	transform: none !important;
}

.badge-soon {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--orange-100);
	color: var(--orange-600);
	font-weight: 700;
	font-size: 0.78rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 6px 14px;
	border-radius: 999px;
}

/* ---------- Hero ---------- */

.hero {
	background: linear-gradient(160deg, var(--teal-900) 0%, var(--teal-700) 100%);
	color: #fff;
	padding: 72px 0;
}

.hero .container {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 48px;
	align-items: center;
}

.hero-eyebrow {
	color: var(--orange-500);
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 14px;
}

.hero h1 {
	color: #fff;
	font-size: clamp(2.25rem, 1.7rem + 2.4vw, 3.4rem); /* text-4xl minimum */
	margin-bottom: 0.4em;
}

.hero-lede {
	color: rgba(255,255,255,0.86);
	font-size: 1.15rem;
	max-width: 46ch;
	margin-bottom: 1.6em;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.hero-media {
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	background: rgba(255,255,255,0.04);
}
.hero-media img { width: 100%; height: auto; }

.hero-tile {
	aspect-ratio: 4 / 3;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	display: flex;
	align-items: center;
	justify-content: center;
}

@media (max-width: 900px) {
	.hero .container { grid-template-columns: 1fr; }
	.hero { padding: 48px 0; }
}

/* ---------- Hero carousel (multiple apps, one hero) ---------- */

/* Overrides the generic 2-column ".hero .container" rule above: the
   carousel's own container only has two direct children (the viewport
   and the controls row), which must stack, not sit side by side. This
   grid instead reserves a right-hand track matching the slide's image
   column, so the controls can be pinned directly under the screenshot. */
.hero-carousel.hero .container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	align-items: start;
}

.hero-carousel .carousel-viewport {
	grid-column: 1 / -1;
	overflow: hidden;
}

.hero-carousel .carousel-track {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	transition: transform 0.5s ease;
}

.hero-carousel .carousel-slide {
	min-width: 100%;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: center;
}

@media (max-width: 900px) {
	.hero-carousel .carousel-slide { grid-template-columns: 1fr; }
}

.hero-carousel .carousel-controls {
	grid-column: 2;
	justify-self: center;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 22px;
	margin-top: 32px;
}

@media (max-width: 900px) {
	.hero-carousel.hero .container { grid-template-columns: 1fr; }
	.hero-carousel .carousel-viewport { grid-column: 1; }
	.hero-carousel .carousel-controls { grid-column: 1; }
}

.hero-carousel .carousel-arrow {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: rgba(255,255,255,0.1);
	border: 1px solid rgba(255,255,255,0.28);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s ease;
}
.hero-carousel .carousel-arrow:hover { background: rgba(255,255,255,0.2); }

.hero-carousel .carousel-dots {
	display: flex;
	gap: 10px;
}
.hero-carousel .carousel-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255,255,255,0.35);
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}
.hero-carousel .carousel-dot.is-active {
	background: var(--orange-500);
	transform: scale(1.25);
}

.carousel-media { position: relative; }
.carousel-media.is-placeholder img {
	filter: grayscale(55%);
	opacity: 0.5;
}
.carousel-media.is-placeholder::after {
	content: "Preview coming soon";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 0 20px;
	background: rgba(11,46,44,0.45);
	color: #fff;
	font-weight: 700;
	font-size: 0.85rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: inherit;
}

/* ---------- Sections ---------- */

.section {
	padding: 72px 0;
}
.section + .section { border-top: 1px solid var(--line); }
.section-alt { background: var(--mist); }

.section-head {
	max-width: 640px;
	margin: 0 auto 44px;
	text-align: center;
}
.section-head p { font-size: 1.05rem; }

/* ---------- Cards / grids ---------- */

.grid-3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}
.grid-2 {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 28px;
}
@media (max-width: 900px) {
	.grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 32px;
}

.card-icon {
	width: 48px; height: 48px;
	border-radius: 12px;
	background: var(--teal-100);
	color: var(--teal-600);
	display: flex; align-items: center; justify-content: center;
	font-size: 1.3rem;
	margin-bottom: 18px;
}

.app-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 32px;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
a.app-card { color: inherit; }
a.app-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }

.app-card-head {
	display: flex;
	align-items: center;
	gap: 16px;
}
.app-card-head img,
.app-card-head .app-tile {
	width: 56px; height: 56px;
	border-radius: 14px;
	flex-shrink: 0;
}
.app-tile {
	display: flex; align-items: center; justify-content: center;
	color: #fff;
	font-weight: 700;
	font-size: 1.1rem;
	background: linear-gradient(135deg, var(--teal-600), var(--orange-500));
}
.app-card h3 { margin-bottom: 2px; }
.app-card p { margin-bottom: 0; }

/* ---------- Screenshot gallery ---------- */

.gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
@media (max-width: 900px) {
	.gallery {
		grid-auto-flow: column;
		grid-auto-columns: 82%;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: 8px;
		grid-template-columns: none;
	}
	.gallery figure { scroll-snap-align: start; }
}

.gallery figure {
	margin: 0;
	background: var(--mist);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}
.gallery img { width: 100%; height: auto; display: block; }
.gallery figcaption {
	padding: 16px 18px 20px;
	font-size: 0.92rem;
	color: var(--ink-soft);
}

/* ---------- Support list ---------- */

.support-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.support-list a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink);
	font-weight: 600;
	font-size: 0.92rem;
}
.support-list a:hover { border-color: var(--teal-600); color: var(--teal-600); }

/* ---------- Policy blurb ---------- */

.policy-note {
	background: var(--mist);
	border: 1px solid var(--line);
	border-left: 4px solid var(--teal-600);
	border-radius: 10px;
	padding: 20px 24px;
	margin-top: 24px;
}

/* ---------- Footer ---------- */

.site-footer {
	background: var(--teal-900);
	color: rgba(255,255,255,0.72);
	padding: 40px 0;
	font-size: 0.9rem;
}
.site-footer .container {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
}
.footer-links {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0;
	padding: 0;
}
.footer-links a { color: rgba(255,255,255,0.72); }
.footer-links a:hover { color: #fff; }

/* ---------- Utility ---------- */

.mt-lg { margin-top: 40px; }
.text-center { text-align: center; }
