:root{
  --bg: #0b1220;
  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.08);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.70);
  --line: rgba(255,255,255,0.12);
  --shadow: 0 18px 55px rgba(0,0,0,0.35);
  --accent: #3aa3ff;
  --accent2: #7c4dff;
  --radius: 18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Cairo", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1000px 700px at 85% 15%, rgba(58,163,255,0.22), transparent 55%),
              radial-gradient(900px 650px at 10% 85%, rgba(124,77,255,0.18), transparent 60%),
              var(--bg);
  color:var(--text);
  overflow-x:hidden;
}

a{color:inherit; text-decoration:none}
.container{width:min(1120px, 92%); margin-inline:auto}

.bg-grid{
  position:fixed; inset:0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 40%, black 40%, transparent 72%);
  opacity:0.35;
  pointer-events:none;
}

/* Topbar */
.topbar{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(12px);
  background: rgba(11,18,32,0.55);
  border-bottom: 1px solid var(--line);
}
.topbar__inner{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 0;
  gap: 12px;
}
.brand{display:flex; align-items:center; gap:12px; min-width: 230px}
.brand__logo{
  width:44px; height:44px; border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.brand__name{font-weight:700; font-size:14px; line-height:1.15}
.brand__sub{font-size:12px; color:var(--muted); margin-top:3px}

.nav{display:flex; gap: 18px; align-items:center}
.nav__link{
  font-weight:600;
  color: rgba(255,255,255,0.78);
  padding: 8px 10px;
  border-radius: 12px;
}
.nav__link:hover{background: rgba(255,255,255,0.06); color: var(--text)}

.topbar__actions{display:flex; gap:10px; align-items:center}
.burger{
  display:none;
  width:44px; height:44px; border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  cursor:pointer;
}
.burger span{
  display:block; height:2px; width:18px; margin:4px auto;
  background: rgba(255,255,255,0.78);
  border-radius:999px;
}

/* Drawer */
.drawer{
  display:none;
  border-top: 1px solid var(--line);
  background: rgba(11,18,32,0.85);
  padding: 10px 0 14px;
}
.drawer__link{
  display:block;
  padding: 12px 4%;
  color: rgba(255,255,255,0.86);
  font-weight:600;
}
.drawer__link:hover{background: rgba(255,255,255,0.06)}
.drawer__cta{padding: 10px 4% 0}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  gap: 8px;
  font-weight:700;
  transition: transform 120ms ease, background 120ms ease, border 120ms ease;
  user-select:none;
}
.btn:active{transform: translateY(1px)}
.btn--primary{
  background: linear-gradient(135deg, rgba(58,163,255,0.95), rgba(124,77,255,0.92));
  border-color: transparent;
  box-shadow: 0 14px 40px rgba(58,163,255,0.18);
}
.btn--primary:hover{filter: brightness(1.03)}
.btn--ghost{
  background: rgba(255,255,255,0.05);
}
.btn--ghost:hover{background: rgba(255,255,255,0.08)}
.btn--block{width:100%}

/* Hero */
.hero{padding: 40px 0 26px}
.hero__grid{
  display:grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 26px;
  align-items:center;
}
.badge{
  display:inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.85);
  font-weight:700;
  margin-bottom: 14px;
}
.hero h1{
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.15;
  margin: 0 0 12px 0;
}
.lead{
  margin:0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
  max-width: 48ch;
}
.hero__cta{display:flex; gap:10px; margin-top: 18px; flex-wrap:wrap}
.hero__meta{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}
.meta{
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 12px 12px;
}
.meta__k{font-size:12px; color: var(--muted)}
.meta__v{font-weight:800; margin-top: 6px; display:block; direction:ltr; text-align:right}

.hero__visual .panel{
  position:relative;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  box-shadow: var(--shadow);
  overflow:hidden;
  min-height: 420px;
  padding: 18px;
}
.circuit{
  width:100%;
  height:auto;
  stroke: rgba(255,255,255,0.45);
  fill: rgba(255,255,255,0.72);
}
.floating-card{
  position:absolute;
  right: 16px;
  bottom: 18px;
  width:min(250px, 75%);
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(11,18,32,0.75);
  padding: 12px 12px;
}
.floating-card--alt{
  right: auto;
  left: 16px;
  top: 18px;
  bottom: auto;
  background: rgba(11,18,32,0.70);
}
.floating-card__title{font-weight:900; margin-bottom: 6px}
.floating-card__txt{color: var(--muted); font-size: 13px; line-height: 1.7}

/* Sections */
.section{padding: 34px 0}
.section--soft{
  background: rgba(255,255,255,0.03);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 18px;
  margin-bottom: 16px;
}
.section__head h2{
  margin:0;
  font-size: 26px;
}
.section__head p{
  margin:0;
  color: var(--muted);
  max-width: 56ch;
  line-height: 1.85;
}

/* Cards */
.cards{
  display:grid;
  gap: 12px;
}
.cards--2{grid-template-columns: repeat(2, minmax(0, 1fr))}
.cards--3{grid-template-columns: repeat(3, minmax(0, 1fr))}

.card{
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  border-radius: 22px;
  padding: 16px 14px;
  box-shadow: 0 14px 45px rgba(0,0,0,0.25);
}
.card__icon{
  width:44px; height:44px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  margin-bottom: 10px;
  font-size: 18px;
}
.card h3{margin: 0 0 8px 0; font-size: 18px}
.card p{margin:0; color: var(--muted); line-height: 1.85}

.note{
  margin-top: 14px;
  border: 1px dashed rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.04);
  border-radius: 22px;
  padding: 14px;
  display:flex;
  gap: 12px;
  align-items:flex-start;
}
.note__title{font-weight:900}
.note__txt{color: var(--muted); line-height: 1.85}

/* Highlights */
.highlights{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
}
.highlight{
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,0.05);
  padding: 14px;
}
.highlight__k{font-weight:900}
.highlight__v{margin-top: 8px; color: var(--muted); line-height: 1.75}

/* Contact */
.contact-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items:start;
}
.contact-card, .form{
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 18px 55px rgba(0,0,0,0.28);
}
.contact-card h3, .form h3{margin:0 0 12px 0}
.info{
  display:flex; justify-content:space-between; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.info:last-of-type{border-bottom:none; padding-bottom: 6px}
.info__k{color: var(--muted)}
.info__v{font-weight:900; direction:ltr; text-align:right}
.map{
  margin: 12px 0;
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,0.10);
  min-height: 240px;
}
.map iframe{
  width:100%;
  height: 280px;
  border:0;
  filter: saturate(1.1) contrast(1.05);
}

/* Form */
.form__row{display:flex; flex-direction:column; gap: 8px; margin-bottom: 12px}
label{font-weight:700; color: rgba(255,255,255,0.86)}
input, textarea{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(11,18,32,0.55);
  color: var(--text);
  border-radius: 16px;
  padding: 12px 12px;
  outline:none;
  font-family: inherit;
}
input::placeholder, textarea::placeholder{color: rgba(255,255,255,0.45)}
input:focus, textarea:focus{border-color: rgba(58,163,255,0.55)}
.form__status{
  margin-top: 10px;
  font-weight:800;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.78);
}
.form__status--ok{
  border-color: rgba(58,163,255,0.45);
}
.form__status--err{
  border-color: rgba(255,120,120,0.45);
}

/* Footer */
.footer{
  border-top: 1px solid var(--line);
  background: rgba(11,18,32,0.65);
  padding: 16px 0;
}
.footer__inner{
  display:flex; justify-content:space-between; align-items:center; gap: 12px;
}
.footer__brand{display:flex; align-items:center; gap: 10px}
.footer__brand img{
  width:40px; height:40px; border-radius: 14px;
  border: 1px solid var(--line);
  object-fit: cover;
}
.footer__name{font-weight:900}
.footer__sub{color: var(--muted); font-size: 12px; margin-top: 2px}
.to-top{
  width:42px; height:42px;
  border-radius: 16px;
  border: 1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,0.05);
}
.to-top:hover{background: rgba(255,255,255,0.08)}

/* Responsive */
/* Mobile: hide navigation menu entirely (no burger / drawer) */
@media (max-width: 980px){
  .hero__grid{grid-template-columns: 1fr; }
  .hero__visual .panel{min-height: 360px}
  .hero__meta{grid-template-columns: 1fr; }
  .section__head{flex-direction:column; align-items:flex-start}
  .cards--3{grid-template-columns: 1fr}
  .cards--2{grid-template-columns: 1fr}
  .highlights{grid-template-columns: 1fr 1fr}
  .contact-grid{grid-template-columns: 1fr}
  .nav{display:none}
  .burger{display:none}
  .drawer{display:none}
}
@media (max-width: 520px){
  .highlights{grid-template-columns: 1fr}
}


/* ===========================
   Altawafuk V3 Enhancements
   =========================== */

html{
  scroll-behavior:smooth;
  scroll-padding-top: 88px;
}

.snap{ scroll-margin-top: 88px; }

/* Scroll lock (drawer open) */
body.no-scroll{
  position: fixed;
  inset: 0;
  overflow: hidden;
  width: 100%;
}

/* Backdrop */
.backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: 40; /* under topbar (50) and drawer (60) */
  pointer-events: none;
}
.backdrop.backdrop--show{
  opacity: 1;
  pointer-events: auto;
}

/* Progress bar */
.progress{
  height: 2px;
  background: rgba(255,255,255,0.06);
}
.progress__bar{
  display:block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(58,163,255,1), rgba(124,77,255,1));
}

/* Active states */
.nav__link.is-active{
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.10);
}
.drawer__link.is-active{
  background: rgba(255,255,255,0.08);
}

/* Burger to X */
.burger{ position: relative; }
.burger.is-open span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.burger.is-open span:nth-child(2){ opacity: 0; }
.burger.is-open span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }
.burger span{
  transition: transform 160ms ease, opacity 160ms ease;
}

/* Drawer animation */
@media (max-width: 980px){
  .drawer{
    position: relative;
    z-index: 60;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 180ms ease, opacity 180ms ease;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
  }
  .drawer.drawer--open{
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* Premium hover micro-interactions */
.meta, .card, .highlight, .contact-card, .form, .to-top, .btn{
  will-change: transform;
}
.meta, .card, .highlight, .contact-card, .form{
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}
.meta:hover, .card:hover, .highlight:hover, .contact-card:hover, .form:hover{
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 22px 70px rgba(0,0,0,0.34);
}

.btn:hover{ transform: translateY(-1px); }

/* Subtle gradient sheen */
.card, .highlight, .meta, .contact-card, .form{
  position: relative;
  overflow: hidden;
}
.card::after, .highlight::after, .meta::after, .contact-card::after, .form::after{
  content:"";
  position:absolute;
  inset: -2px;
  background:
    radial-gradient(700px 220px at 30% 0%, rgba(58,163,255,0.12), transparent 55%),
    radial-gradient(700px 220px at 70% 100%, rgba(124,77,255,0.10), transparent 55%);
  pointer-events:none;
  opacity: 0.85;
}

/* Reveal animation */
.reveal{
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  filter: blur(10px);
  transition: opacity 700ms ease, transform 700ms ease, filter 700ms ease;
}
.reveal.is-inview{
  opacity: 1;
  transform: none;
  filter: none;
}

/* Hero extra glow + circuit animation */
.hero__visual .panel::before{
  content:"";
  position:absolute;
  inset:-120px;
  background:
    radial-gradient(520px 300px at 70% 20%, rgba(58,163,255,0.18), transparent 60%),
    radial-gradient(520px 300px at 30% 80%, rgba(124,77,255,0.14), transparent 60%);
  pointer-events:none;
}
.circuit g path{
  stroke-dasharray: 820;
  stroke-dashoffset: 820;
  animation: draw 1.6s ease forwards;
}
@keyframes draw{
  to{ stroke-dashoffset: 0; }
}
.floating-card{ animation: float 6s ease-in-out infinite; }
.floating-card--alt{ animation-delay: -2.2s; }
@keyframes float{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-8px); }
}

/* Scroll snap (soft) - desktop only */
@media (min-width: 1100px){
  html{ scroll-snap-type: y proximity; }
  .snap{ scroll-snap-align: start; }
}

/* Nice scrollbar */
@media (min-width: 980px){
  ::-webkit-scrollbar{ width: 10px; }
  ::-webkit-scrollbar-track{ background: rgba(255,255,255,0.04); }
  ::-webkit-scrollbar-thumb{
    background: rgba(255,255,255,0.14);
    border-radius: 999px;
    border: 2px solid rgba(11,18,32,0.8);
  }
  ::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,0.18); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .reveal{ opacity: 1; transform:none; filter:none; transition:none; }
  .floating-card, .circuit g path{ animation: none; }
  html{ scroll-snap-type: none; }
  *{ transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
