/* === Variables === */
:root {
    --primary: #1a1a2e;
    --primary-light: #2d2d4a;
    --accent: #e94560;
    --accent-soft: #ff6b81;
    --teal: #0f3460;
    --text: #1e1e1e;
    --text-light: #666;
    --text-muted: #999;
    --bg: #fafafa;
    --white: #fff;
    --border: #e8e8e8;
    --radius: 10px;
    --shadow: 0 2px 20px rgba(0,0,0,.06);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --max-width: 1100px;
    --nav-h: 70px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* === Layout === */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.section-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); margin-bottom: 12px; }
.section-title { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; color: var(--primary); margin-bottom: 16px; }
.section-sub { font-size: 1.05rem; color: var(--text-light); max-width: 820px; line-height: 1.7; }

/* === Nav === */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--nav-h); max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
}
.nav-logo { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 32px; position: relative; }
.nav-links a { font-size: .88rem; font-weight: 500; color: var(--text-light); transition: color .2s; position: relative; }
.nav-links a:hover { color: var(--primary); }
.nav-links a.nav-cta { position: relative; }
.nav-bar { position: absolute; bottom: -6px; height: 2px; background: var(--accent); border-radius: 2px; transition: left .3s ease, width .3s ease; pointer-events: none; }
.nav-links .nav-cta {
    background: var(--accent); color: var(--white); padding: 8px 22px; border-radius: 6px;
    font-weight: 600; transition: all .2s;
}
.nav-links .nav-cta:hover { background: var(--accent-soft); transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--primary); margin: 5px 0; transition: all .3s; border-radius: 2px; }

/* === Buttons === */
.btn {
    display: inline-block; padding: 14px 32px; border-radius: 8px; font-size: .9rem;
    font-weight: 600; cursor: pointer; border: none; transition: all .25s; font-family: var(--font);
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-soft); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(233,69,96,.3); }
.btn-outline { background: transparent; border: 2px solid rgba(255,255,255,.4); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.7); }
.btn-dark-outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn-dark-outline:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* === Footer === */
.footer { background: var(--primary); color: rgba(255,255,255,.6); padding: 50px 0 30px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-display); font-size: 1.2rem; color: var(--white); margin-bottom: 8px; }
.footer-brand span { color: var(--accent); }
.footer-tagline { font-size: .85rem; max-width: 300px; line-height: 1.6; }
.footer-links { display: flex; gap: 40px; }
.footer-links a { font-size: .85rem; transition: color .2s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; }
.footer-social { display: flex; justify-content: center; gap: 16px; margin-bottom: 16px; }
.footer-social a { color: rgba(255,255,255,.5); transition: color .2s, transform .2s; }
.footer-social a:hover { color: var(--accent); transform: translateY(-2px); }
.footer-social svg { width: 20px; height: 20px; display: block; }

/* === Animations === */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* === Mobile === */
@media (max-width: 768px) {
    .nav-links { display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; background: var(--white); flex-direction: column; justify-content: center; gap: 24px; text-align: center; }
    .nav-links.open { display: flex; }
    .nav-links a { font-size: 1.1rem; }
    .nav-toggle { display: block; }
    .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
    .section { padding: 70px 0; }
    .footer-inner { flex-direction: column; gap: 24px; }
    .footer-links { flex-direction: column; gap: 12px; }
}

/* === Hero === */
.hero {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(233,69,96,.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(15,52,96,.2) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 100%, rgba(233,69,96,.1) 0%, transparent 50%),
        linear-gradient(160deg, #0f0f23 0%, var(--primary) 40%, var(--teal) 100%);
    color: var(--white); padding: 120px 0 100px; position: relative; overflow: hidden;
}
.hero::before {
    content:''; position:absolute; inset:0; opacity:.03;
    background-image:url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0v60M0 30h60' stroke='%23fff' stroke-width='.5' fill='none'/%3E%3C/svg%3E");
    pointer-events:none;
}
.hero-content { position: relative; z-index: 1; max-width: 680px; }
.hero-label { font-size: 1rem; opacity: .7; margin-bottom: 16px; font-weight: 500; }
.hero-title { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.1; margin-bottom: 20px; }
.hero-title em { font-style: normal; color: var(--accent-soft); }
.hero-sub { font-size: 1.1rem; opacity: .8; line-height: 1.7; margin-bottom: 36px; max-width: 540px; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }

/* === Section Alt === */
.section-alt { background: var(--white); }

/* === Features === */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.feature-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 28px; transition: all .3s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-icon { width: 44px; height: 44px; color: var(--accent); margin-bottom: 18px; }
.feature-icon svg { width: 100%; height: 100%; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--primary); }
.feature-card p { font-size: .88rem; color: var(--text-light); line-height: 1.6; }

/* === Demo === */
.demo-wrap { margin-top: 48px; }
.demo-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.demo-tab {
    padding: 10px 24px; border-radius: 6px; border: 1.5px solid var(--border); background: transparent;
    font-family: var(--font); font-size: .85rem; font-weight: 600; color: var(--text-light);
    cursor: pointer; transition: all .2s;
}
.demo-tab:hover { border-color: var(--primary); color: var(--primary); }
.demo-tab.active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.demo-browser { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.demo-browser-bar { background: #f0f0f0; padding: 12px 16px; display: flex; gap: 8px; }
.demo-browser-bar span { width: 12px; height: 12px; border-radius: 50%; background: #ddd; }
.demo-browser-bar span:first-child { background: #ff5f57; }
.demo-browser-bar span:nth-child(2) { background: #ffbd2e; }
.demo-browser-bar span:nth-child(3) { background: #28c840; }
.demo-screen { background: #f8f8f8; min-height: 360px; }
.demo-panel { display: none; }
.demo-panel.active { display: block; }
.demo-placeholder { padding: 60px 40px; text-align: center; color: var(--text-light); }
.demo-placeholder-title { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.demo-placeholder p { max-width: 440px; margin: 0 auto; font-size: .95rem; line-height: 1.6; }

/* === Work === */
.work-heading { font-family: var(--font-display); font-size: 1.3rem; color: var(--primary); margin: 48px 0 20px; }
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.app-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); transition: all .3s; }
.app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.app-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .85rem; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.app-card h4 { font-size: .9rem; color: var(--primary); margin-bottom: 0; line-height: 1.2; }
.app-card p { font-size: .78rem; color: var(--text-light); line-height: 1.3; }

.yasseen-callout {
    margin: 48px 0; border-radius: 16px; overflow: hidden; position: relative;
    background: linear-gradient(135deg, #0f0f23 0%, var(--primary) 40%, var(--teal) 100%);
    color: var(--white); padding: 0;
}
.yasseen-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.yasseen-badge {
    font-size: .72rem; font-weight: 700; padding: 6px 14px; border-radius: 20px;
    background: rgba(255,255,255,.1); backdrop-filter: blur(4px); letter-spacing: .3px;
}
.yasseen-grid { display: grid; grid-template-columns: 1fr 360px; align-items: stretch; }
.yasseen-text { padding: 40px; }
.yasseen-text h3 { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.3; margin-bottom: 14px; }
.yasseen-text p { font-size: .92rem; opacity: .85; line-height: 1.7; margin-bottom: 16px; }
.yasseen-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; opacity: .5; margin-bottom: 12px; }
.yasseen-quote {
    font-family: var(--font-display); font-style: italic; font-size: 1.15rem; line-height: 1.5;
    padding: 18px 0 18px 20px; border-left: 3px solid var(--accent); margin: 20px 0;
}
.yasseen-quote span { display: block; font-size: .78rem; font-style: normal; opacity: .6; margin-top: 8px; font-family: var(--font); }
.yasseen-link {
    display: inline-block; font-size: .88rem; font-weight: 600; color: var(--accent-soft);
    padding: 10px 24px; border: 1.5px solid rgba(255,255,255,.2); border-radius: 8px;
    transition: all .25s;
}
.yasseen-link:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); transform: translateY(-2px); }
.yasseen-photo { overflow: hidden; }
.yasseen-photo img {
    width: 100%; height: 100%; object-fit: cover;
}
@media (max-width: 768px) {
    .yasseen-grid { grid-template-columns: 1fr; gap: 0; }
    .yasseen-photo { order: -1; padding: 24px 24px 0; }
    .yasseen-photo img { width: 100%; height: auto; border-radius: 12px; object-fit: cover; }
    .yasseen-callout { padding: 0; }
    .yasseen-text { padding: 24px; }
    .yasseen-text h3 { font-size: 1.3rem; }
}

.clients-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.client-card { display: flex; align-items: center; gap: 14px; padding: 20px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); transition: all .3s; }
.client-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.client-card strong { display: block; font-size: 1rem; color: var(--primary); margin-bottom: 0; line-height: 1.2; }
.client-card span { font-size: .82rem; color: var(--text-light); }
.client-icon { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }

/* === About === */
.about-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; align-items: center; }
.about-photo { overflow: hidden; border-radius: var(--radius); }
.about-photo-placeholder {
    width: 100%; aspect-ratio: 3/4; background: var(--border); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: .9rem;
}
.about-text p { color: var(--text-light); margin-bottom: 16px; font-size: .95rem; }
.about-stats { display: flex; gap: 36px; margin-top: 32px; flex-wrap: wrap; }
.about-stat strong { display: block; font-size: 1.8rem; color: var(--accent); font-family: var(--font-display); }
.about-stat span { font-size: .78rem; color: var(--text-light); }

/* === Contact === */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-form { background: var(--white); padding: 36px; border-radius: var(--radius); box-shadow: var(--shadow); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: 8px;
    font-family: var(--font); font-size: .9rem; transition: border-color .2s; background: var(--bg);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { min-height: 120px; resize: vertical; }

/* === Mobile overrides === */
@media (max-width: 768px) {
    .features-grid { grid-template-columns: 1fr; }
    .apps-grid { grid-template-columns: 1fr; }
    .clients-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; gap: 30px; }
    .about-photo { order: -1; }
    .contact-grid { grid-template-columns: 1fr; gap: 30px; }
    .hero { padding: 80px 0 60px; }
    .demo-placeholder { padding: 40px 20px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .apps-grid { grid-template-columns: repeat(2, 1fr); }
    .clients-grid { grid-template-columns: repeat(2, 1fr); }
}

/* === Blog === */
.blog-back { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--accent); margin-bottom: 20px; transition: all .2s; padding: 8px 16px; border: 1.5px solid var(--border); border-radius: 8px; }
.blog-back:hover { border-color: var(--accent); background: rgba(233,69,96,.04); }
.blog-back-caret { font-size: 1.2rem; line-height: 1; }
.blog-cat { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent); background: rgba(233,69,96,.08); padding: 4px 10px; border-radius: 4px; }
.blog-content { font-size: .95rem; line-height: 1.8; color: var(--text-light); }
.blog-content p { margin-bottom: 1.2em; }
.blog-content h2 { font-size: 1.3rem; color: var(--primary); margin: 2em 0 .5em; }
.blog-content code { background: rgba(26,26,46,.08); color: var(--accent); padding: 2px 6px; border-radius: 4px; font-size: .85em; }
.blog-content pre { background: var(--primary); color: #e0e0e0; padding: 20px; border-radius: var(--radius); overflow-x: auto; margin: 1.5em 0; font-size: .85rem; }
.blog-content pre code { background: none; color: inherit; padding: 0; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 40px; }
.blog-card { display: flex; flex-direction: column; gap: 10px; padding: 28px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); transition: all .3s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.blog-card h3 { font-size: 1.05rem; color: var(--primary); line-height: 1.4; }
.blog-card p { font-size: .88rem; color: var(--text-light); line-height: 1.6; flex: 1; }
.blog-date { font-size: .78rem; color: var(--text-muted); }

.blog-nav { display: flex; justify-content: space-between; align-items: stretch; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); gap: 16px; }
.blog-nav-link { text-decoration: none; width: 260px; max-width: 45%; display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border: 1.5px solid var(--border); border-radius: 10px; transition: all .25s; overflow: hidden; }
.blog-nav-link:hover { border-color: var(--accent); background: rgba(233,69,96,.03); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.blog-nav-right { align-items: flex-end; text-align: right; margin-left: auto; }
.blog-nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; }
.blog-nav-caret { font-size: 1.2rem; line-height: 1; }
.blog-nav-label span.blog-nav-text { margin-top: 2px; }
.blog-nav-title { font-size: .9rem; font-weight: 600; color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; display: block; transition: color .2s; }
.blog-nav-link:hover .blog-nav-title { color: var(--accent); }

/* === Accessibility === */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* === Hero auto-animate (no scroll needed) === */
.hero .fade-up { animation: heroFadeUp .8s ease forwards; opacity: 0; }
.hero .fade-up:nth-child(1) { animation-delay: .1s; }
.hero .fade-up:nth-child(2) { animation-delay: .25s; }
.hero .fade-up:nth-child(3) { animation-delay: .4s; }
.hero .fade-up:nth-child(4) { animation-delay: .55s; }
@keyframes heroFadeUp { to { opacity: 1; transform: translateY(0); } }

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
    .fade-up { opacity: 1; transform: none; }
}

/* === Blog Tags === */
.blog-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 28px 0 0; }
.blog-tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 6px 16px; border-radius: 20px; border: 1.5px solid var(--border); color: var(--text-light); transition: all .25s; }
.blog-tag:hover { border-color: var(--accent); color: var(--accent); background: rgba(233,69,96,.04); }
.blog-tag-active { background: var(--primary); color: var(--white); border-color: var(--primary); }
.blog-tag-active:hover { background: var(--primary-light); border-color: var(--primary-light); color: var(--white); }

/* Topics section at bottom of article */
.blog-topics { margin-top: 3rem; padding: 28px 0; border-top: 1px solid var(--border); }
.blog-topics-label { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 14px; }
.blog-topics-list { display: flex; gap: 8px; flex-wrap: wrap; }
.blog-topic-pill {
    font-size: .8rem; font-weight: 600; padding: 8px 20px; border-radius: 24px;
    background: linear-gradient(135deg, rgba(26,26,46,.04), rgba(233,69,96,.06));
    color: var(--primary); border: 1px solid rgba(233,69,96,.12);
    transition: all .25s;
}
.blog-topic-pill:hover { background: var(--primary); color: var(--white); border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(26,26,46,.15); }
