/* ==========================================================================
   Ali Awidat portfolio – front page + single project
   Scoped to body.aad so other Blocksy pages are untouched.
   ========================================================================== */

body.aad {
	--bg: #08090d;
	--surface: rgba(255, 255, 255, .035);
	--surface-2: rgba(255, 255, 255, .06);
	--line: rgba(255, 255, 255, .09);
	--line-2: rgba(255, 255, 255, .16);
	--text: #eef0f6;
	--muted: #9aa0b4;
	--a1: #5eead4;   /* mint */
	--a2: #818cf8;   /* indigo */
	--grad: linear-gradient(100deg, var(--a1), var(--a2));
	--max: 1200px;
	--gutter: clamp(16px, 4vw, 40px);
	--radius: 18px;
	--font: "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "JetBrains Mono", "Readex Pro", ui-monospace, SFMono-Regular, Menlo, monospace;
	--ease: cubic-bezier(.2, .7, .2, 1);

	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

body.aad *, body.aad *::before, body.aad *::after { box-sizing: border-box; }
:where(body.aad) a { color: inherit; text-decoration: none; }
:where(body.aad) img { max-width: 100%; height: auto; display: block; }
:where(body.aad) svg { width: 1em; height: 1em; flex: none; }
:where(body.aad) :is(h1, h2, h3, p) { margin: 0; }
:where(body.aad) :is(h1, h2, h3) { font-family: var(--font); color: var(--text); line-height: 1.15; letter-spacing: -.02em; }
body.aad ::selection { background: var(--a1); color: #05110f; }
body.aad :focus-visible { outline: 2px solid var(--a1); outline-offset: 3px; border-radius: 6px; }
html:has(body.aad) { scroll-behavior: smooth; scroll-padding-top: 90px; background: #08090d; }

.aad-skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.aad-skip:focus { width: auto; height: auto; clip-path: none; inset-inline-start: 16px; top: 16px; z-index: 100; background: var(--a1); color: #000; padding: 8px 14px; border-radius: 8px; }

/* Background --------------------------------------------------------------- */
.aad-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aad-bg__canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100vh; height: 100lvh; }
.aad-bg__grid {
	position: absolute; inset: 0;
	background-image:
		linear-gradient(var(--line) 1px, transparent 1px),
		linear-gradient(90deg, var(--line) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
	opacity: .45;
}
/* Soft glows: a radial gradient instead of filter: blur(90px), so the drift
   animation only moves a pre-painted layer on the GPU. */
.aad-bg__glow { position: absolute; width: 64vmax; height: 64vmax; border-radius: 50%; opacity: .3; will-change: transform; backface-visibility: hidden; }
.aad-bg__glow--a { background: radial-gradient(closest-side, var(--a1), rgba(94, 234, 212, .35) 40%, rgba(94, 234, 212, .1) 70%, rgba(94, 234, 212, 0)); top: -27vmax; inset-inline-start: -19vmax; animation: aad-drift-a 22s ease-in-out infinite alternate; }
.aad-bg__glow--b { background: radial-gradient(closest-side, var(--a2), rgba(129, 140, 248, .35) 40%, rgba(129, 140, 248, .1) 70%, rgba(129, 140, 248, 0)); bottom: -31vmax; inset-inline-end: -21vmax; animation: aad-drift-b 26s ease-in-out infinite alternate; }
@keyframes aad-drift-a { to { transform: translate3d(18vw, 22vh, 0) scale(1.15); } }
@keyframes aad-drift-b { to { transform: translate3d(-16vw, -26vh, 0) scale(.9); } }

/* Scroll progress ---------------------------------------------------------- */
.aad-progress { position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 60; background: var(--grad); transform-origin: left; transform: scaleX(var(--p, 0)); will-change: transform; }
[dir="rtl"] .aad-progress { transform-origin: right; }

/* Nav ---------------------------------------------------------------------- */
.aad-nav { position: sticky; top: 0; z-index: 50; transition: background-color .3s, border-color .3s; border-bottom: 1px solid transparent; }
.aad-nav.is-scrolled { background: rgba(8, 9, 13, .8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: var(--line); }
.aad-nav__inner { max-width: var(--max); margin: 0 auto; padding: 16px var(--gutter); display: flex; align-items: center; gap: 24px; }
.aad-logo { font-family: var(--mono); font-weight: 600; font-size: 16px; letter-spacing: -.02em; white-space: nowrap; }
.aad-logo__bracket { color: var(--muted); }
.aad-logo__dot { color: var(--a1); }
.aad-nav__links { display: flex; gap: 6px; margin-inline-start: auto; }
.aad-nav__links a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 15px; transition: color .2s, background .2s; }
.aad-nav__links a:hover { color: var(--text); background: var(--surface-2); }
.aad-nav__end { display: flex; align-items: center; gap: 10px; }
.aad-lang { padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; transition: border-color .2s, color .2s; }
.aad-lang:hover { border-color: var(--a1); color: var(--a1); }
@media (max-width: 720px) {
	.aad-nav__links { display: none; }
	.aad-nav__end { margin-inline-start: auto; }
}

/* Layout ------------------------------------------------------------------- */
.aad-main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.aad-section { padding: clamp(72px, 11vw, 140px) 0; }
.aad-section__head { margin-bottom: clamp(36px, 5vw, 56px); }
.aad-kicker { font-family: var(--mono); font-size: 13px; color: var(--a1); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px !important; }
.aad-h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 600; display: flex; align-items: center; gap: .3em; }
.aad-accent { color: var(--a1); display: inline-flex; font-size: .8em; }
.aad-gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons ------------------------------------------------------------------ */
.aad-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: 14px 24px; border-radius: 999px; font-weight: 500; font-size: 16px; font-family: var(--font);
	background: var(--text); color: var(--bg) !important; border: 1px solid var(--text); cursor: pointer;
	transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s, color .25s;
}
.aad-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(94, 234, 212, .55); background: var(--a1); border-color: var(--a1); }
.aad-btn svg { transition: transform .25s var(--ease); }
.aad-btn:hover svg { transform: translateX(3px); }
[dir="rtl"] .aad-btn svg, [dir="rtl"] .aad-card__more svg { transform: scaleX(-1); }
[dir="rtl"] .aad-btn:hover svg { transform: scaleX(-1) translateX(3px); }
.aad-btn--ghost { background: transparent; color: var(--text) !important; border-color: var(--line-2); }
.aad-btn--ghost:hover { background: var(--surface-2); border-color: var(--a1); box-shadow: none; }
.aad-btn--sm { padding: 10px 18px; font-size: 14px; }

/* Hero --------------------------------------------------------------------- */
.aad-hero {
	position: relative; min-height: calc(100svh - 70px);
	display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(32px, 5vw, 72px);
	padding: 48px 0 96px;
}
@media (max-width: 960px) { .aad-hero { grid-template-columns: 1fr; padding-top: 32px; } }
.aad-eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; color: var(--muted); background: var(--surface); margin-bottom: 26px !important; }
[dir="rtl"] .aad-eyebrow { padding: 6px 10px 6px 14px; }
/* Pulse ring is a scaled pseudo-element (transform + opacity) rather than an
   animated box-shadow, which repainted every frame. */
.aad-pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--a1); }
.aad-pulse::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; opacity: .6; animation: aad-pulse 2s ease-out infinite; }
.aad-eyebrow--limited .aad-pulse { background: #fbbf24; }
.aad-eyebrow--booked .aad-pulse { background: #6b7280; }
.aad-eyebrow--booked .aad-pulse::after { display: none; }
@keyframes aad-pulse { 70%, 100% { transform: scale(3.5); opacity: 0; } }
.aad-hero__name { display: flex; align-items: center; gap: .35em; font-size: clamp(44px, 7.4vw, 92px); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.aad-hero__avatar { width: .9em; height: .9em; border-radius: 50%; object-fit: cover; border: 2px solid var(--line-2); flex: none; filter: grayscale(.2); }
.aad-hero__role { font-size: clamp(20px, 2.6vw, 28px); font-weight: 500; margin: 18px 0 16px !important; line-height: 1.3; }
.aad-hero__tagline { color: var(--muted); max-width: 52ch; font-size: clamp(16px, 1.6vw, 18px); }
.aad-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.aad-scroll-cue { position: absolute; bottom: 24px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 1.5px solid var(--line-2); border-radius: 14px; display: flex; justify-content: center; padding-top: 8px; }
.aad-scroll-cue span { width: 3px; height: 8px; border-radius: 2px; background: var(--a1); animation: aad-cue 1.8s var(--ease) infinite; }
@keyframes aad-cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 960px) { .aad-scroll-cue { display: none; } }

/* Terminal ----------------------------------------------------------------- */
.aad-terminal {
	position: relative; border-radius: var(--radius); background: rgba(12, 14, 20, .78);
	border: 1px solid var(--line-2); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset;
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	font-family: var(--mono); font-size: 14px; line-height: 1.7; overflow: hidden; text-align: start;
}
.aad-terminal::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(94, 234, 212, .55), transparent 40%, transparent 60%, rgba(129, 140, 248, .55)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.aad-terminal__bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.aad-terminal__bar span { width: 11px; height: 11px; border-radius: 50%; background: #3a3f4d; }
.aad-terminal__bar span:nth-child(1) { background: #ff5f57; }
.aad-terminal__bar span:nth-child(2) { background: #febc2e; }
.aad-terminal__bar span:nth-child(3) { background: #28c840; }
.aad-terminal__bar p { margin-inline-start: auto !important; unicode-bidi: isolate; color: var(--muted); font-size: 12px; }
.aad-terminal__body { padding: 18px 18px 6px; height: 290px; scrollbar-color: #2a2f3d transparent; overflow-y: auto; scrollbar-width: thin; color: #cfd3e0; }
.aad-terminal__body p { white-space: pre-wrap; word-break: break-word; }
.aad-terminal__body .cmd { color: var(--text); }
.aad-terminal__body .cmd::before { content: "❯ "; color: var(--a1); }
.aad-terminal[dir="rtl"] .aad-terminal__body .cmd::before { content: "❮ "; }
.aad-terminal__body .out { color: var(--muted); margin-bottom: 10px; }
.aad-terminal__body .ok { color: var(--a1); }
.aad-terminal__body .err { color: #fb7185; }
.aad-caret { display: inline-block; width: .55em; height: 1.1em; vertical-align: -.2em; background: var(--a1); animation: aad-blink 1s steps(1) infinite; }
@keyframes aad-blink { 50% { opacity: 0; } }
.aad-terminal__form { display: flex; align-items: center; gap: 8px; padding: 10px 18px 16px; }
.aad-terminal__prompt { color: var(--a1); }
.aad-terminal__form input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font: inherit; padding: 4px 0; caret-color: var(--a1); box-shadow: none; }
.aad-terminal__form input::placeholder { color: #5b6175; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Marquee ------------------------------------------------------------------ */
/* The track is its own GPU layer, and each item carries its own trailing space
   (instead of flex gap) so -50% lands exactly on the copy: no jump at the loop. */
.aad-marquee { overflow: hidden; contain: paint; border-block: 1px solid var(--line); padding: 18px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); margin-inline: calc(var(--gutter) * -1); }
.aad-marquee__track { display: flex; width: max-content; align-items: center; animation: aad-marquee 36s linear infinite; will-change: transform; backface-visibility: hidden; font-size: clamp(18px, 2.2vw, 24px); font-weight: 500; color: var(--muted); white-space: nowrap; }
.aad-marquee__track > * { flex: none; margin-inline-end: 28px; }
.aad-marquee__track i { color: var(--a1); font-style: normal; font-size: .7em; }
.aad-marquee:hover .aad-marquee__track, .aad-marquee.is-off .aad-marquee__track { animation-play-state: paused; }
@keyframes aad-marquee { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
[dir="rtl"] .aad-marquee__track { animation-name: aad-marquee-rtl; }
@keyframes aad-marquee-rtl { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(50%, 0, 0); } }
@media (max-width: 720px) { .aad-marquee__track { animation-duration: 28s; } }

/* Intro -------------------------------------------------------------------- */
.aad-intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(40px, 6vw, 96px); }
@media (max-width: 860px) { .aad-intro { grid-template-columns: 1fr; } }
.aad-intro__lead { font-size: clamp(20px, 2.3vw, 26px); line-height: 1.55; font-weight: 400; }
.aad-steps { list-style: none; margin: 0; padding: 0; }
.aad-steps li { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.aad-steps li:first-child { padding-top: 4px; }
.aad-steps span { font-family: var(--mono); font-size: 13px; color: var(--a2); padding-top: 4px; }

/* Services ----------------------------------------------------------------- */
.aad-services { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .aad-services { grid-template-columns: repeat(2, 1fr); } .aad-service:last-child { grid-column: span 2; } }
@media (min-width: 1000px) { .aad-services { grid-template-columns: repeat(3, 1fr); } .aad-service:first-child { grid-column: span 2; } }
.aad-service {
	position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
	overflow: hidden; isolation: isolate; transition: border-color .3s, transform .4s var(--ease);
}
.aad-service::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(94, 234, 212, .12), transparent 60%); }
.aad-service:hover { border-color: var(--line-2); }
.aad-service:hover::before { opacity: 1; }
.aad-service__num { font-family: var(--mono); font-size: 13px; color: var(--muted); display: block; margin-bottom: 36px; }
.aad-service h3 { font-size: 21px; font-weight: 600; margin-bottom: 12px; letter-spacing: -.01em; }
.aad-service p { color: var(--muted); font-size: 16px; }

/* Projects ----------------------------------------------------------------- */
.aad-projects { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .aad-projects { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .aad-projects { grid-template-columns: repeat(3, 1fr); } }
.aad-card { perspective: 1000px; }
.aad-card__link {
	display: block; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line);
	transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease), border-color .3s, box-shadow .3s;
	transform-style: preserve-3d;
}
.aad-card:hover .aad-card__link { border-color: var(--line-2); box-shadow: 0 30px 60px -30px rgba(129, 140, 248, .45); }
.aad-card__media { overflow: hidden; background: #111; }
.aad-card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; transition: transform .8s var(--ease); }
.aad-card:hover .aad-card__media img { transform: scale(1.05); }
.aad-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.aad-card__link { height: 100%; display: flex !important; flex-direction: column; }
.aad-card__more { margin-top: auto; }
.aad-card__title { font-size: clamp(19px, 2vw, 23px); font-weight: 600; }
.aad-card__more { display: inline-flex; align-items: center; gap: .4em; font-size: 14px; color: var(--muted); white-space: nowrap; transition: color .2s; }
.aad-card:hover .aad-card__more { color: var(--a1); }

/* Contact ------------------------------------------------------------------ */
.aad-contact { text-align: center; }
.aad-contact__title { font-size: clamp(40px, 8vw, 104px); font-weight: 600; letter-spacing: -.045em; line-height: 1.25; background: linear-gradient(180deg, var(--text) 40%, rgba(238, 240, 246, .35)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-block: .05em .2em; }
[dir="rtl"] .aad-contact__title { letter-spacing: 0; line-height: 1.4; }
.aad-contact__label { color: var(--muted); margin: 22px 0 26px !important; font-size: 18px; }
.aad-contact__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; }
.aad-contact__mail { display: inline-flex; align-items: center; gap: .55em; font-size: clamp(18px, 2.6vw, 26px); font-weight: 500; padding: 12px 24px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); transition: border-color .2s, color .2s; }
.aad-contact__mail:hover { border-color: var(--a1); color: var(--a1); }

/* Footer ------------------------------------------------------------------- */
.aad-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.aad-footer__inner { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 36px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.aad-socials { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; }
.aad-socials a { display: inline-flex; padding: 9px; border-radius: 50%; border: 1px solid var(--line); font-size: 17px; transition: color .2s, border-color .2s; }
.aad-socials a:hover { color: var(--a1); border-color: var(--a1); }

/* Single project ----------------------------------------------------------- */
.aad-single .aad-section { padding-top: clamp(40px, 7vw, 80px); }
.aad-single__back { display: inline-flex; align-items: center; gap: .5em; color: var(--muted); font-size: 15px; margin-bottom: 28px; transition: color .2s; }
.aad-single__back:hover { color: var(--a1); }
.aad-single__back svg { transform: scaleX(-1); }
[dir="rtl"] .aad-single__back svg { transform: none; }
.aad-single__title { font-size: clamp(36px, 6vw, 72px); font-weight: 600; letter-spacing: -.035em; margin-bottom: 20px !important; }
.aad-single__lead { color: var(--muted); max-width: 60ch; margin-bottom: 40px !important; font-size: 18px; }
.aad-single__content > * { margin-block: 0 24px; }
.aad-single__content .wp-block-gallery { display: grid !important; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-top: 40px; }
.aad-single__content .wp-block-gallery figure { margin: 0 !important; width: auto !important; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.aad-single__content .wp-block-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in; transition: transform .6s var(--ease); }
.aad-single__content .wp-block-gallery figure:hover img { transform: scale(1.04); }

/* Case study ------------------------------------------------------------- */
.aad-case__hero { padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.aad-case__title { font-size: clamp(40px, 7.5vw, 96px); font-weight: 600; letter-spacing: -.04em; line-height: 1.02; max-width: 14ch; }
.aad-case__subtitle { font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; margin-top: 18px !important; display: inline-block; }
.aad-case__lead { color: var(--muted); font-size: clamp(18px, 2vw, 22px); max-width: 58ch; margin: 24px 0 40px !important; }
.aad-case__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.aad-case__meta div { background: var(--bg); padding: 18px 22px; }
.aad-case__meta dt { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.aad-case__meta dd { margin: 0; font-weight: 500; }
.aad-case__apps-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.aad-case__apps-nav a { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); transition: border-color .2s, color .2s; }
.aad-case__apps-nav a:hover { border-color: var(--a1); color: var(--a1); }
.aad-case__apps-nav span { font-family: var(--mono); font-size: 12px; color: var(--a2); }

.aad-app { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 88px); padding: clamp(72px, 10vw, 130px) 0; border-bottom: 1px solid var(--line); align-items: start; }
.aad-app--flip .aad-app__info { order: 2; }
@media (max-width: 900px) { .aad-app { grid-template-columns: 1fr; } .aad-app--flip .aad-app__info { order: 0; } }
.aad-app__sticky { position: sticky; top: 110px; }
.aad-app__num { font-family: var(--mono); font-size: 13px; color: var(--a1); display: flex; align-items: center; gap: 12px; margin-bottom: 18px !important; }
.aad-app__num .aad-draft { color: #fbbf24; border-color: rgba(251, 191, 36, .5); }
.aad-app__num span { color: var(--muted); padding: 3px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; }
.aad-app__name { font-size: clamp(34px, 4.6vw, 56px); font-weight: 600; letter-spacing: -.03em; margin-bottom: 18px !important; }
[dir="rtl"] .aad-app__name { text-align: right; }
.aad-app__summary { color: var(--muted); font-size: 18px; margin-bottom: 28px !important; }
.aad-app__features { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.aad-app__features li { display: flex; gap: 12px; align-items: flex-start; }
.aad-app__check { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(94, 234, 212, .12); color: var(--a1); font-size: 13px; margin-top: 3px; }
.aad-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.aad-tags li { font-family: var(--mono); font-size: 12px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }

.aad-app__media { display: grid; gap: 24px; }
.aad-app__shot { margin: 0; border-radius: calc(var(--radius) + 4px); padding: 10px; background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); border: 1px solid var(--line-2); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9); translate: 0 var(--py, 0px); }
.aad-app__shot:nth-child(2) { width: 82%; margin-inline-start: auto; margin-top: -12%; position: relative; z-index: 1; }
.aad-app__shot a { display: block; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.aad-app__shot img { width: 100%; transition: transform .8s var(--ease); }
.aad-app__shot:hover img { transform: scale(1.03); }
@media (max-width: 900px) { .aad-app__shot:nth-child(2) { width: 100%; margin-top: 0; } }

.aad-case__end { padding: clamp(72px, 10vw, 120px) 0; display: grid; gap: 20px; }
.aad-case__cta { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(28px, 4vw, 48px); border-radius: calc(var(--radius) + 6px); background: var(--surface); border: 1px solid var(--line-2); }
.aad-case__cta::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(129, 140, 248, .16), transparent 60%); }
.aad-case__cta:hover::before { opacity: 1; }
.aad-case__cta-text { font-size: clamp(24px, 3.4vw, 40px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; max-width: 22ch; }
.aad-case__next { display: flex; flex-direction: column; padding: 24px 28px; border-radius: var(--radius); border: 1px solid var(--line); transition: border-color .2s; }
.aad-case__next .aad-kicker { margin-bottom: 6px !important; }
.aad-case__next-title { display: inline-flex; align-items: center; gap: .4em; font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; }
.aad-case__next:hover { border-color: var(--a1); }
.aad-case__next:hover .aad-case__next-title { color: var(--a1); }
[dir="rtl"] .aad-case__next-title svg { transform: scaleX(-1); }
[dir="rtl"] :is(.aad-case__title, .aad-case__cta-text) { letter-spacing: 0; line-height: 1.3; }

/* Website frames */
.aad-site { position: relative; display: grid; gap: 20px; }
.aad-browser { margin: 0; border-radius: 14px; overflow: hidden; background: #15171f; border: 1px solid var(--line-2); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9); translate: 0 var(--py, 0px); }
.aad-browser__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.aad-browser__bar span { width: 9px; height: 9px; border-radius: 50%; background: #3a3f4d; }
.aad-browser__bar p { flex: 1; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-inline-end: 33px !important; }
.aad-browser a, .aad-phone a { display: block; cursor: zoom-in; }
.aad-browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.aad-browser--sub { width: calc(50% - 10px); display: inline-block; }
.aad-site:has(.aad-browser--sub) { grid-template-columns: 1fr 1fr; }
.aad-site > .aad-browser:first-child { grid-column: 1 / -1; }
.aad-phone { margin: 0; position: absolute; width: 24%; min-width: 120px; top: 14%; inset-inline-end: -3%; border-radius: 26px; padding: 6px; background: #0d0f14; border: 1px solid var(--line-2); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .95); translate: 0 var(--py, 0px); z-index: 2; }
.aad-phone img { border-radius: 20px; width: 100%; aspect-ratio: 9 / 19; object-fit: cover; object-position: top; }
.aad-site .aad-browser--sub { width: auto; }
.aad-site > .aad-phone + .aad-browser--sub:last-child { grid-column: 1 / -1; }
@media (max-width: 900px) { .aad-phone { inset-inline-end: 4%; width: 30%; } }
.aad-app__visit { display: inline-flex; gap: .4em; align-items: center; margin-top: 22px; color: var(--a1); font-size: 15px; }
.aad-app__visit span { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.aad-app__visit:hover span { color: var(--a1); }

/* Lightbox ----------------------------------------------------------------- */
.aad-lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.aad-lightbox[open] { animation: aad-fade .25s var(--ease); }
.aad-lightbox::backdrop { background: rgba(5, 6, 9, .9); backdrop-filter: blur(6px); }
.aad-lightbox__inner { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px 64px; }
.aad-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.aad-lightbox button { position: absolute; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 50%; color: #fff; width: 46px; height: 46px; font-size: 24px; cursor: pointer; line-height: 1; display: grid; place-items: center; }
.aad-lightbox button:hover { border-color: var(--a1); color: var(--a1); }
.aad-lightbox__close { top: 14px; right: 14px; }
.aad-lightbox__prev { left: 12px; top: 50%; translate: 0 -50%; }
.aad-lightbox__next { right: 12px; top: 50%; translate: 0 -50%; }
@keyframes aad-fade { from { opacity: 0; } }

/* Scroll reveal ------------------------------------------------------------ */
/* Reveal uses only opacity + transform (the old blur(6px) filter was
   re-rasterising every revealing block, the main cause of jank on phones). */
.aad-js [data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.aad-js [data-reveal].is-in { opacity: 1; transform: none; }
@media (max-width: 720px) {
	.aad-js [data-reveal] { transform: translate3d(0, 18px, 0); transition-duration: .6s; }
}
.aad-hero [data-reveal]:nth-child(2) { --d: 80ms; }
.aad-hero [data-reveal]:nth-child(3) { --d: 160ms; }
.aad-hero [data-reveal]:nth-child(4) { --d: 240ms; }
.aad-hero [data-reveal]:nth-child(5) { --d: 320ms; }
.aad-hero .aad-terminal[data-reveal] { --d: 300ms; }

[dir="rtl"] :is(.aad-hero__name, .aad-h2, .aad-single__title) { letter-spacing: 0; line-height: 1.3; }

/* Back to top ------------------------------------------------------------ */
.aad-totop {
	position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 55;
	width: 52px; height: 52px; border-radius: 50%; padding: 0; cursor: pointer;
	display: grid; place-items: center; color: var(--text);
	background: rgba(12, 14, 20, .72); border: 1px solid var(--line-2);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .8);
	opacity: 0; visibility: hidden; transform: translateY(14px) scale(.9);
	transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s, color .2s, border-color .2s, box-shadow .25s;
}
.aad-totop.is-visible { opacity: 1; visibility: visible; transform: none; }
.aad-totop:hover { color: var(--a1); border-color: transparent; box-shadow: 0 14px 34px -12px rgba(94, 234, 212, .45); }
.aad-totop__ring { position: absolute; inset: -1px; width: calc(100% + 2px) !important; height: calc(100% + 2px) !important; transform: rotate(-90deg); pointer-events: none; }
.aad-totop__ring circle { fill: none; stroke: var(--a1); stroke-width: 2; stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.aad-totop__arrow { width: 20px !important; height: 20px !important; transition: transform .25s var(--ease); }
.aad-totop:hover .aad-totop__arrow { transform: translateY(-3px); }
@media (max-width: 640px) { .aad-totop { bottom: 16px; inset-inline-end: 16px; width: 46px; height: 46px; } }

/* Blocksy leftovers on these templates */
body.aad .ct-back-to-top { display: none !important; }

/* Phones and tablets ----------------------------------------------------- */
/* backdrop-filter re-blurs the animated background on every frame, so touch
   screens get slightly more opaque panels instead. */
@media (max-width: 960px), (pointer: coarse) {
	.aad-nav.is-scrolled { background: rgba(8, 9, 13, .92); backdrop-filter: none; -webkit-backdrop-filter: none; }
	.aad-terminal { background: rgba(12, 14, 20, .94); backdrop-filter: none; -webkit-backdrop-filter: none; }
	.aad-totop { background: rgba(12, 14, 20, .92); backdrop-filter: none; -webkit-backdrop-filter: none; }
	.aad-bg__glow { opacity: .24; }
	.aad-bg__grid { opacity: .3; }
	.aad-card__link { transform: none; transform-style: flat; }
}

@media (prefers-reduced-motion: reduce) {
	html:has(body.aad) { scroll-behavior: auto; }
	body.aad *, body.aad *::before, body.aad *::after { animation: none !important; transition: none !important; }
	.aad-js [data-reveal] { opacity: 1; transform: none; }
	.aad-bg__canvas { display: none; }
	.aad-app__shot, .aad-browser, .aad-phone { translate: none; }
}
