/* ==========================================================================
   DIWB v3.0 — Design tokens
   ========================================================================== */
:root {
	--teal-300: #5eead4;
	--teal-400: #2dd4bf;
	--teal-500: #14b8a6;
	--teal-600: #0d9488;
	--indigo-400: #818cf8;

	--bg-950: #05070a;
	--bg-900: #0a0e13;
	--bg-800: #10161d;
	--surface: rgba(255, 255, 255, 0.045);
	--surface-strong: rgba(255, 255, 255, 0.07);
	--border: rgba(255, 255, 255, 0.09);
	--border-strong: rgba(255, 255, 255, 0.16);

	--text-primary: #f4f7f8;
	--text-secondary: #9aa7b0;
	--text-muted: #6b7680;

	--font-head: "Space Grotesk", "Inter", sans-serif;
	--font-body: "Inter", sans-serif;

	--container: 1180px;
	--radius: 18px;
	--radius-sm: 10px;
	--ease: cubic-bezier(.22, 1, .36, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg-950);
	color: var(--text-primary);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; margin: 0 0 .5em; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--text-secondary); }
button { font-family: inherit; cursor: pointer; }
input, textarea {
	font-family: inherit;
	font-size: 1rem;
	color: var(--text-primary);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: .8em 1em;
	width: 100%;
	transition: border-color .2s var(--ease), background .2s var(--ease);
}
input:focus, textarea:focus {
	outline: none;
	border-color: var(--teal-400);
	background: var(--surface-strong);
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

.eyebrow {
	font-family: var(--font-head);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .16em;
	color: var(--teal-400);
	margin: 0 0 1rem;
}

/* Cursor glow */
#cursor-glow {
	position: fixed;
	width: 420px;
	height: 420px;
	border-radius: 50%;
	pointer-events: none;
	z-index: 0;
	background: radial-gradient(circle, rgba(45, 212, 191, .10), transparent 70%);
	transform: translate(-50%, -50%);
	left: -999px;
	top: -999px;
	transition: opacity .3s var(--ease);
	will-change: left, top;
}
@media (max-width: 900px), (hover: none) {
	#cursor-glow { display: none; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	padding: .9em 1.7em;
	border-radius: 999px;
	font-weight: 600;
	font-size: .95rem;
	border: 1px solid transparent;
	transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
	white-space: nowrap;
}
.btn--primary {
	background: linear-gradient(135deg, var(--teal-400), var(--teal-600));
	color: #04211d;
	box-shadow: 0 8px 24px -8px rgba(45, 212, 191, .55);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(45, 212, 191, .7); }
.btn--ghost {
	background: transparent;
	border-color: var(--border-strong);
	color: var(--text-primary);
}
.btn--ghost:hover { border-color: var(--teal-400); color: var(--teal-300); }
.btn--small { padding: .6em 1.3em; font-size: .85rem; }
.btn--block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 100;
	padding: 1.1rem 0;
	transition: background .3s var(--ease), padding .3s var(--ease), border-color .3s var(--ease);
	border-bottom: 1px solid transparent;
}
.header.is-scrolled {
	background: rgba(5, 7, 10, .75);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	padding: .7rem 0;
	border-bottom-color: var(--border);
}
.header__inner { display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .6rem; margin-right: auto; }
.brand__logo { width: 34px; height: 34px; border-radius: 50%; }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }

.nav { display: flex; gap: 1.9rem; }
.nav a {
	font-size: .93rem;
	font-weight: 500;
	color: var(--text-secondary);
	position: relative;
	transition: color .2s;
}
.nav a:hover { color: var(--text-primary); }
.nav a::after {
	content: "";
	position: absolute;
	left: 0; bottom: -6px;
	width: 0; height: 2px;
	background: var(--teal-400);
	transition: width .25s var(--ease);
}
.nav a:hover::after { width: 100%; }

.header__cta { flex-shrink: 0; }

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px; height: 40px;
	background: transparent;
	border: 1px solid var(--border-strong);
	border-radius: 8px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text-primary); margin: 0 auto; transition: transform .25s var(--ease), opacity .25s var(--ease); }

@media (max-width: 860px) {
	.nav { position: fixed; top: 0; right: 0; bottom: 0; width: min(78vw, 320px);
		background: var(--bg-900); border-left: 1px solid var(--border);
		flex-direction: column; padding: 6rem 2rem 2rem; gap: 1.6rem;
		transform: translateX(100%); transition: transform .35s var(--ease); z-index: 99; }
	.nav.is-open { transform: translateX(0); }
	.nav a { font-size: 1.05rem; }
	.header__cta { display: none; }
	.nav-toggle { display: flex; z-index: 101; }
	.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
	.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	padding: 8rem 0 6rem;
	overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(90px);
	opacity: .55;
	animation: drift 22s ease-in-out infinite;
}
.blob--a {
	width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
	background: radial-gradient(circle, var(--teal-500), transparent 70%);
	top: -10%; left: -8%;
}
.blob--b {
	width: 38vw; height: 38vw; max-width: 520px; max-height: 520px;
	background: radial-gradient(circle, var(--indigo-400), transparent 70%);
	bottom: -15%; right: -6%;
	animation-delay: -9s;
	opacity: .35;
}
@keyframes drift {
	0%, 100% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(4%, 5%) scale(1.08); }
}
.grid-overlay {
	position: absolute; inset: 0;
	background-image:
		linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}

.hero__inner { position: relative; z-index: 1; max-width: 820px; }
.hero__motto {
	font-family: var(--font-head);
	font-style: italic;
	font-size: clamp(1.05rem, 1.8vw, 1.3rem);
	color: var(--teal-300);
	margin-bottom: .9em;
}
.hero__title {
	font-size: clamp(2.3rem, 5.4vw, 4rem);
	margin-bottom: .55em;
}
.text-strike { position: relative; color: var(--text-muted); }
.text-strike::after {
	content: "";
	position: absolute; left: -2%; right: -2%; top: 48%;
	height: 2px;
	background: linear-gradient(90deg, var(--teal-400), var(--indigo-400));
	transform: rotate(-3deg);
}
.hero__subtitle { font-size: clamp(1.02rem, 1.6vw, 1.2rem); max-width: 700px; }
.hero__subtitle strong { color: var(--text-primary); font-weight: 600; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; margin: 2rem 0 3rem; }

.hero__proof span { display: block; font-size: .8rem; color: var(--text-muted); margin-bottom: .8rem; letter-spacing: .02em; }
.tech-pills { display: flex; flex-wrap: wrap; gap: .6rem; }
.tech-pills span {
	font-size: .82rem; font-weight: 500;
	padding: .4em 1em;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text-secondary);
}

.scroll-cue {
	position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
	width: 26px; height: 42px; border: 1px solid var(--border-strong); border-radius: 999px;
	display: flex; justify-content: center; padding-top: 8px; z-index: 1;
}
.scroll-cue span { width: 4px; height: 8px; border-radius: 999px; background: var(--teal-400); animation: scrollcue 1.8s ease-in-out infinite; }
@keyframes scrollcue { 0% { opacity: 1; transform: translateY(0); } 70% { opacity: 0; transform: translateY(14px); } 100% { opacity: 0; } }

/* ==========================================================================
   Sections (shared)
   ========================================================================== */
.section { position: relative; padding: clamp(4.5rem, 8vw, 7rem) 0; }
.section--alt { background: linear-gradient(180deg, transparent, var(--bg-900) 12%, var(--bg-900) 88%, transparent); }

.section-head { max-width: 680px; margin: 0 auto 3.2rem; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.section-head__desc { font-size: 1.03rem; }

/* ==========================================================================
   About
   ========================================================================== */
.about { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
.about__text h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.check-list { margin-top: 1.5rem; display: flex; flex-direction: column; gap: .7rem; }
.check-list li { position: relative; padding-left: 1.8rem; color: var(--text-primary); font-size: .96rem; }
.check-list li::before {
	content: "";
	position: absolute; left: 0; top: .32em;
	width: 16px; height: 16px; border-radius: 6px;
	background: linear-gradient(135deg, var(--teal-400), var(--teal-600));
}
.check-list li::after {
	content: "";
	position: absolute; left: 5px; top: .56em;
	width: 7px; height: 3.5px;
	border-left: 2px solid #04211d; border-bottom: 2px solid #04211d;
	transform: rotate(-45deg);
}

.glass-card {
	position: relative;
	background: linear-gradient(160deg, var(--surface-strong), var(--surface));
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 2.4rem 2rem 2rem;
	backdrop-filter: blur(6px);
	overflow: hidden;
}
.glass-card::before {
	content: "";
	position: absolute; inset: -40% -40% auto auto; width: 60%; padding-top: 60%;
	background: radial-gradient(circle, rgba(45,212,191,.18), transparent 70%);
}
.glass-card__mascot {
	width: 108px;
	margin: 0 auto 1.6rem;
	position: relative;
	border-radius: 50%;
	box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .6);
}
.glass-card__stats { display: flex; flex-direction: column; gap: 1.4rem; position: relative; }
.stat { display: flex; align-items: baseline; gap: 1rem; }
.stat strong {
	font-family: var(--font-head);
	font-size: 1.6rem;
	color: var(--teal-300);
	min-width: 2.4ch;
}
.stat span { font-size: .88rem; color: var(--text-secondary); }

/* ==========================================================================
   Bento / services
   ========================================================================== */
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.card--service {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 2rem;
	transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.card--service:hover {
	transform: translateY(-4px);
	border-color: var(--border-strong);
	background: var(--surface-strong);
}
.card__icon {
	width: 46px; height: 46px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 12px;
	background: linear-gradient(135deg, rgba(45,212,191,.18), rgba(129,140,248,.14));
	color: var(--teal-300);
	margin-bottom: 1.2rem;
}
.card__icon svg { width: 24px; height: 24px; }
.card--service h3 { font-size: 1.15rem; }
.card--service ul { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.card--service ul li { font-size: .87rem; color: var(--text-secondary); padding-left: 1.1rem; position: relative; }
.card--service ul li::before { content: "—"; position: absolute; left: 0; color: var(--teal-400); }

/* ==========================================================================
   Timeline
   ========================================================================== */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; counter-reset: step; }
.timeline__item {
	position: relative;
	padding: 1.8rem 1.5rem 1.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}
.timeline__index {
	display: inline-block;
	font-family: var(--font-head);
	font-size: .85rem;
	font-weight: 600;
	color: var(--bg-950);
	background: linear-gradient(135deg, var(--teal-400), var(--teal-600));
	padding: .25em .7em;
	border-radius: 999px;
	margin-bottom: 1rem;
}
.timeline__item h3 { font-size: 1.05rem; }
.timeline__item p { font-size: .89rem; margin-bottom: 0; }

/* ==========================================================================
   Differentiators
   ========================================================================== */
.diff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.diff {
	padding: 1.8rem;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: linear-gradient(160deg, var(--surface-strong), transparent);
}
.diff h3 { font-size: 1.02rem; color: var(--teal-300); }
.diff p { font-size: .89rem; margin: 0; }

/* ==========================================================================
   Portfolio (external GitHub Pages showcase)
   ========================================================================== */
.portfolio { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
.portfolio__text h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.portfolio__text .btn { margin-top: .5rem; }

.browser-card {
	display: block;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: var(--surface);
	overflow: hidden;
	transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.browser-card:hover {
	transform: translateY(-4px);
	border-color: var(--border-strong);
	background: var(--surface-strong);
}
.browser-card__bar {
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .8rem 1rem;
	border-bottom: 1px solid var(--border);
	background: var(--bg-900);
}
.browser-card__dot {
	width: 9px; height: 9px;
	border-radius: 50%;
	background: var(--border-strong);
}
.browser-card__url {
	margin-left: .5rem;
	font-size: .8rem;
	color: var(--text-muted);
	font-family: var(--font-body);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.browser-card__body { padding: 1.8rem; }
.browser-card__stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.2rem;
	margin-bottom: 1.5rem;
}
.browser-card__stat strong {
	display: block;
	font-family: var(--font-head);
	font-size: 1.4rem;
	color: var(--teal-300);
}
.browser-card__stat span { font-size: .8rem; color: var(--text-secondary); }
.browser-card__body .tech-pills { margin-bottom: 1.6rem; }
.browser-card__cta {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	font-family: var(--font-head);
	font-weight: 600;
	font-size: .92rem;
	color: var(--teal-300);
}

/* ==========================================================================
   Clients / logo grid
   ========================================================================== */
.logo-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.2rem;
}
.logo-card {
	aspect-ratio: 3 / 2;
	display: flex; align-items: center; justify-content: center;
	padding: 1.6rem;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: var(--surface);
	transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.logo-card img { max-height: 100%; width: auto; }
.logo-card:hover {
	border-color: var(--border-strong);
	background: var(--surface-strong);
	transform: translateY(-3px);
}

/* Brands whose mark is white/light — sit directly on a dark tinted chip */
.logo-card--dark {
	background: linear-gradient(160deg, #0f2b27, #0a1017);
}
.logo-card--dark img { max-height: 55%; opacity: .92; }
.logo-card--dark:hover img { opacity: 1; }

/* Brands with a full-color mark — give them a neutral light badge so the
   logo reads correctly regardless of its own background/transparency */
.logo-card__badge {
	background: #f5f6f4;
	border-radius: 10px;
	padding: .9rem 1.3rem;
	display: flex; align-items: center; justify-content: center;
	width: 100%; height: 100%;
}
.logo-card__badge img { max-height: 100%; max-width: 100%; }
.logo-card__badge--round { padding: 0; border-radius: 50%; width: 74px; height: 74px; overflow: hidden; }
.logo-card__badge--round img { width: 100%; height: 100%; object-fit: cover; }

/* Clients without a graphic logo — a styled text lockup instead */
.logo-card--text { flex-direction: column; gap: .3rem; text-align: center; }
.logo-card--text strong {
	font-family: var(--font-head);
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--text-primary);
}
.logo-card--text span { font-size: .74rem; color: var(--text-muted); letter-spacing: .04em; text-transform: uppercase; }

/* ==========================================================================
   CTA banner
   ========================================================================== */
.cta-banner {
	position: relative;
	margin: 0 clamp(1rem, 4vw, 2.5rem);
	border-radius: 28px;
	overflow: hidden;
	background: linear-gradient(135deg, #0c2622, #0a1a2b);
	border: 1px solid var(--border);
}
.cta-banner::before {
	content: "";
	position: absolute; inset: 0;
	background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(45,212,191,.25), transparent 70%);
}
.cta-banner__inner { position: relative; text-align: center; padding: clamp(3rem, 7vw, 5rem) 1rem; max-width: 640px; margin: 0 auto; }
.cta-banner h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; }
.contact__info h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.contact-list { margin-top: 1.8rem; display: flex; flex-direction: column; gap: 1rem; }
.contact-list li { display: flex; align-items: center; gap: .8rem; font-size: .93rem; }
.contact-list svg { width: 19px; height: 19px; color: var(--teal-400); flex-shrink: 0; }
.contact-list a:hover { color: var(--teal-300); }

.contact-form {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 2rem;
	display: flex; flex-direction: column; gap: 1.2rem;
}
.field { display: flex; flex-direction: column; gap: .45rem; }
.field label { font-size: .82rem; color: var(--text-secondary); font-weight: 500; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; text-align: center; }
.footer__tagline { font-family: var(--font-head); color: var(--text-primary); font-size: 1rem; margin: 0; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem; }
.footer__nav a { font-size: .88rem; color: var(--text-secondary); }
.footer__nav a:hover { color: var(--teal-300); }
.footer__copy { font-size: .8rem; color: var(--text-muted); margin: 0; }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
	position: fixed;
	bottom: 1.6rem; left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: var(--bg-800);
	border: 1px solid var(--border-strong);
	color: var(--text-primary);
	padding: .9em 1.4em;
	border-radius: 999px;
	font-size: .9rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s var(--ease), transform .3s var(--ease);
	z-index: 200;
	box-shadow: 0 12px 30px -10px rgba(0,0,0,.5);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-success { border-color: var(--teal-500); }
.toast.is-error { border-color: #f87171; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
/* Content is visible by default. The pre-animation "hidden" state only
   applies once JS confirms it successfully set up the reveal observer
   (html.js-anim, set in main.js) — so a blocked/broken/absent script never
   leaves real content invisible. See docs/REUSABLE-DIAGNOSTIC-PROMPT.md. */
html.js-anim .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js-anim .reveal.in-view { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
	.about, .contact, .portfolio { grid-template-columns: 1fr; }
	.bento { grid-template-columns: 1fr 1fr; }
	.timeline { grid-template-columns: 1fr 1fr; }
	.diff-grid { grid-template-columns: 1fr 1fr; }
	.logo-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
	.bento { grid-template-columns: 1fr; }
	.timeline { grid-template-columns: 1fr; }
	.diff-grid { grid-template-columns: 1fr; }
	.logo-grid { grid-template-columns: repeat(2, 1fr); }
	.hero__actions { flex-direction: column; align-items: stretch; }
}
