/* ===== sHouse — static build ===== */

:root {
  --bg-dark: #121212;
  --bg-darker: #0f0f14;
  --accent-cyan: #00F5FF;
  --accent-blue: #00B4D8;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0A0;
  --text-muted: #6b7280;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --max-width: 72rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[dir="rtl"] body {
  font-family: "Segoe UI", Tahoma, system-ui, sans-serif;
}

a { text-decoration: none; color: inherit; }

section { scroll-margin-top: 5rem; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: 1.5rem;
}
.center { text-align: center; }

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  font-size: 1rem;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(to right, var(--accent-cyan), var(--accent-blue));
  color: var(--bg-dark);
  font-weight: 700;
}
.btn-primary:hover { box-shadow: 0 0 20px rgba(0, 245, 255, 0.4); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  font-weight: 500;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.25); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: var(--max-width);
  z-index: 50;
  border-radius: 9999px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  transition: background 0.3s ease, border-radius 0.3s ease;
  animation: navDrop 0.6s ease-out both;
}
.navbar.scrolled { background: rgba(18, 18, 18, 0.7); }
.navbar.menu-open { border-radius: 2rem; }
@keyframes navDrop { from { transform: translate(-50%, -140%); } to { transform: translate(-50%, 0); } }

.navbar-inner {
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar-brand { font-weight: 700; font-size: 1.25rem; color: var(--text-primary); }

.navbar-desktop { display: none; align-items: center; gap: 2rem; }
.nav-link { color: var(--text-primary); font-size: 0.875rem; transition: color 0.2s; }
.nav-link:hover { color: var(--accent-cyan); }

.lang-toggle {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-cyan);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}
.lang-toggle:hover { background: rgba(255, 255, 255, 0.2); }

.navbar-mobile-controls { display: flex; align-items: center; gap: 1rem; }
.menu-btn { background: none; border: none; color: var(--text-primary); cursor: pointer; padding: 0.25rem; display: flex; }
.menu-icon { width: 1.5rem; height: 1.5rem; }
.menu-icon .icon-close { display: none; }
.navbar.menu-open .menu-icon .icon-open { display: none; }
.navbar.menu-open .menu-icon .icon-close { display: inline; }

.navbar-mobile-menu {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
.navbar-mobile-menu > * { min-height: 0; }
.navbar-mobile-list { padding: 0 1.5rem; }
.navbar.menu-open .navbar-mobile-menu { grid-template-rows: 1fr; opacity: 1; }
.navbar.menu-open .navbar-mobile-list { padding: 0.25rem 1.5rem 0.75rem; }
.mobile-link { display: block; color: var(--text-primary); padding: 0.5rem 0; transition: color 0.2s; }
.mobile-link:hover { color: var(--accent-cyan); }

/* ===== Hero ===== */
.hero {
  background: var(--bg-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero-content { max-width: 56rem; margin: 0 auto; padding-inline: 1.5rem; position: relative; z-index: 10; }
.hero-tag {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 1rem;
}
.hero-title {
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 1.5rem;
  background: linear-gradient(to right, var(--accent-cyan), var(--accent-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 42rem;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-cta { display: flex; flex-direction: column; gap: 1rem; justify-content: center; align-items: center; }

.hero-glows { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.glow { position: absolute; width: 400px; height: 400px; border-radius: 50%; filter: blur(120px); }
.glow-a { top: -10%; left: -5%; background: rgba(0, 245, 255, 0.1); animation: floatA 10s linear infinite; }
.glow-b { bottom: -10%; right: -5%; background: rgba(0, 180, 216, 0.1); animation: floatB 12s linear infinite; animation-delay: 1s; }
@keyframes floatA { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px, 50px); } }
@keyframes floatB { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-30px, -50px); } }

/* ===== Sections ===== */
.section { padding: 6rem 0; }
.section-dark { background: var(--bg-darker); }
.section-darker { background: var(--bg-dark); }

.section-head { text-align: center; margin-bottom: 4rem; }
.section-title { font-size: 1.875rem; font-weight: 700; margin: 0 0 0.75rem; }
.section-subtitle { color: var(--text-secondary); margin: 0; }

/* ===== Cards ===== */
.card { border-radius: 0.75rem; padding: 2rem; }
.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
}
.card-icon svg { width: 1.75rem; height: 1.75rem; }
.card-title { font-size: 1.125rem; font-weight: 600; margin: 0 0 0.5rem; }
.card-desc { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.7; margin: 0; }

/* ===== Services ===== */
.services-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.services-grid .card { transition: background 0.3s, box-shadow 0.3s; }
.services-grid .card:hover { background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 15px rgba(0, 245, 255, 0.2); }

/* ===== About ===== */
.about { position: relative; overflow: hidden; }
.about-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.1;
  background-image: radial-gradient(var(--accent-cyan) 1px, transparent 1px);
  background-size: 30px 30px;
}
.about .container { position: relative; z-index: 10; }
.about-layout { display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: center; }
.about-label { font-size: 0.875rem; color: var(--accent-cyan); text-transform: uppercase; letter-spacing: 0.15em; margin: 0 0 0.75rem; }
.about-title { font-size: 1.875rem; font-weight: 700; margin: 0 0 1.5rem; }
.about-desc { color: var(--text-secondary); line-height: 1.7; margin: 0 0 2.5rem; }
.mission-card { padding: 2rem; }

.about-visual-frame {
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.ring { position: absolute; border-radius: 50%; }
.ring-outer { inset: 2rem; border: 2px solid rgba(0, 245, 255, 0.2); animation: spin 20s linear infinite; }
.ring-mid { width: 6rem; height: 6rem; border: 3px solid rgba(0, 245, 255, 0.3); animation: pulseSpin 10s linear infinite; }
.ring-inner { width: 8rem; height: 8rem; border: 2px solid rgba(0, 245, 255, 0.2); animation: pulseSpinAlt 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseSpin { 0%,100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.1) rotate(90deg); } }
@keyframes pulseSpinAlt { 0%,100% { transform: scale(1.1) rotate(90deg); } 50% { transform: scale(1) rotate(0deg); } }

/* ===== Projects ===== */
.projects-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.project-card { padding: 0; overflow: hidden; transition: box-shadow 0.3s; }
.project-card:hover { box-shadow: 0 0 15px rgba(0, 245, 255, 0.2); }
.project-thumb { height: 10rem; }
.thumb-1 { background: linear-gradient(135deg, #1a1a2e, #16213e); }
.thumb-2 { background: linear-gradient(135deg, #0f3460, #16213e); }
.thumb-3 { background: linear-gradient(135deg, #1b1b2f, #16213e); }
.project-body { padding: 1.25rem; text-align: start; }
.project-body .card-title { margin-bottom: 0.25rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 1rem; }
.tag {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-cyan);
  border: 1px solid var(--glass-border);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
}
.project-link { color: var(--accent-cyan); font-size: 0.875rem; font-weight: 500; display: inline-flex; }
.project-link span { position: relative; }
.project-link span::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  height: 1px;
  width: 0;
  background: var(--accent-cyan);
  transition: width 0.3s;
}
.project-card:hover .project-link span::after { width: 100%; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 4rem; }
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-info-title { font-weight: 600; margin: 0 0 0.5rem; }
.contact-detail { display: flex; align-items: flex-start; gap: 1rem; }
.contact-detail-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
}
.contact-detail-icon svg { width: 1.25rem; height: 1.25rem; }
.contact-detail-label { font-size: 0.875rem; font-weight: 500; margin: 0 0 0.25rem; }

.contact-form { border-radius: 1rem; padding: 2rem; }
.form-fields { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form textarea { resize: none; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 1px var(--accent-cyan);
}
.form-success {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  animation: popIn 0.3s ease;
}
.form-success-title { font-size: 1.125rem; font-weight: 600; margin: 0 0 0.5rem; }
@keyframes popIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* ===== Footer ===== */
.footer { background: var(--bg-dark); padding: 2rem 0; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.footer-inner { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-copy { color: var(--text-secondary); font-size: 0.875rem; margin: 0; }
.footer-links { display: flex; align-items: center; gap: 1.5rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.875rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-cyan); }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.reveal-x-start { transform: translateX(-40px); }
.reveal.reveal-x-end { transform: translateX(40px); }
[dir="rtl"] .reveal.reveal-x-start { transform: translateX(40px); }
[dir="rtl"] .reveal.reveal-x-end { transform: translateX(-40px); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }

/* ===== Responsive ===== */
@media (min-width: 640px) {
  .hero-cta { flex-direction: row; }
}
@media (min-width: 768px) {
  .navbar-desktop { display: flex; }
  .navbar-mobile-controls { display: none; }
  .navbar-mobile-menu { display: none; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .about-layout { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: row; }
}

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