/* تخطيطُ الصفحة — لا تعريفاتٍ هنا ولا مكوّناتٍ جديدة، فقط ترتيب ما سبق على الصفحة.
   يقابل core/theme في تطبيق دفتري: يقرأ الأرقام من tokens.css ولا يكتبها. */

* { box-sizing: border-box; }
body {
  font-family: var(--font);
  background: var(--bg); color: var(--ink); line-height: 1.9; margin: 0;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
  overflow-x: hidden;
}
h1, h2, h3, h4 { line-height: 1.4; }
a { color: var(--brand); }
.wrap { width: 100%; max-width: 900px; margin: 0 auto; padding: 28px 20px 60px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.hero {
  position: relative; overflow: hidden; color: #fff; padding: 76px 0 112px;
  background:
    radial-gradient(620px 420px at 80% 5%, rgba(59, 130, 246, .45), transparent 65%),
    radial-gradient(520px 380px at 5% 95%, rgba(245, 158, 11, .16), transparent 65%),
    linear-gradient(160deg, var(--night) 0%, var(--night-2) 50%, var(--brand-dark) 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 55% 40%, #000 25%, transparent 72%);
}
.hero::after {
  content: ''; position: absolute; inset-inline: 0; bottom: -1px; height: 56px;
  background: var(--bg); clip-path: ellipse(70% 100% at 50% 100%);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-copy > * { animation: rise .8s var(--ease-out) both; }
.hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-copy > :nth-child(3) { animation-delay: .16s; }
.hero-copy > :nth-child(4) { animation-delay: .24s; }
.hero h1 { margin: 0 0 18px; font-size: clamp(2rem, 1.2rem + 2.4vw, 3rem); font-weight: 800; line-height: 1.3; }
.hero p { margin: 0 0 30px; color: rgba(255, 255, 255, .82); font-size: 1.12rem; line-height: 2; max-width: 52ch; }
.tag {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  padding: 5px 14px; border-radius: 999px; font-size: .84rem; backdrop-filter: blur(4px);
}
.tag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(245, 158, 11, .2); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta .btn { padding: 12px 26px; }
.hero-cta .btn.ghost { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, .45); }
.hero-cta .btn.ghost:hover { background: rgba(255, 255, 255, .1); }

.hero-visual { position: relative; height: 420px; display: flex; align-items: center; justify-content: center; animation: rise 1s var(--ease-out) .2s both; }
.brand-hero-mark { width: 100%; max-width: 300px; height: auto; overflow: visible; filter: drop-shadow(0 0 28px rgba(147, 197, 253, .35)); }
.brand-hero-glow { animation: glow-pulse 3s ease-in-out 2s infinite; }
.brand-hero-ring { stroke-dasharray: 440; animation: hero-ring-draw 1.6s var(--ease-out) .3s both; }
.brand-hero-spin { transform-origin: 100px 96px; animation: turn 5s linear 1.9s infinite; }
.brand-hero-emblem { transform-origin: 100px 110px; animation: hero-pop 1.1s cubic-bezier(.2, .8, .3, 1.2) .9s both; }
.brand-hero-flag { transform-origin: 100px 55px; animation: flag-wave 2.6s ease-in-out 1.9s infinite; }
@keyframes hero-ring-draw { from { stroke-dashoffset: 440; } to { stroke-dashoffset: 0; } }
@keyframes hero-pop { 0% { transform: scale(0) rotate(-8deg); opacity: 0; } 65% { transform: scale(1.12) rotate(2deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes flag-wave { 0%, 100% { transform: scaleX(1) skewY(0deg); } 25% { transform: scaleX(.9) skewY(3deg); } 50% { transform: scaleX(1.06) skewY(-2deg); } 75% { transform: scaleX(.95) skewY(1.5deg); } }
@keyframes glow-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

.section { padding: var(--section-y) 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); margin: 0; }
.eyebrow {
  display: inline-block; margin-bottom: 10px; padding: 3px 12px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: .8rem; font-weight: 700;
}
section { scroll-margin-top: 76px; }
h2 { font-size: 1.25rem; margin: 0 0 16px; color: var(--ink); font-weight: 800; }
.wrap section { margin-bottom: 34px; }
.grid { display: grid; gap: var(--gap-md); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; align-items: start; }

.site-footer { margin-top: auto; background: var(--night); color: rgba(255, 255, 255, .66); padding-top: 56px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.footer-col h4 { color: #fff; font-size: .95rem; margin: 0 0 6px; }
.footer-col p { margin: 0; }
.footer-col a { color: rgba(255, 255, 255, .72); text-decoration: none; transition: color var(--transition); padding-block: 8px; }
.footer-col a:hover { color: #fff; }
.footer-col .footer-brand { color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 4px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 18px; text-align: center; font-size: .82rem; color: rgba(255, 255, 255, .48); }

@keyframes rise { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
@keyframes turn { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-visual, .brand-hero-glow, .brand-hero-ring, .brand-hero-spin, .brand-hero-emblem, .brand-hero-flag { animation: none; }
}

@media (max-width: 900px) {
  .hero-inner, .contact-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 400px; max-width: 460px; width: 100%; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --section-y: 56px; }
  .wrap { padding: 18px 16px 48px; }
  .container { padding: 0 16px; }
  .site-nav-inner { position: relative; flex-wrap: wrap; row-gap: 2px; padding: 10px 16px 8px; }
  .site-nav .nav-login { position: absolute; top: 10px; left: 16px; padding: 2px 14px; }
  .site-nav .brand { white-space: nowrap; }
  .site-nav .links { width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 16px; scrollbar-width: none; font-size: .86rem; }
  .site-nav .links a { white-space: nowrap; flex: none; }
  section { scroll-margin-top: 92px; }
  .hero { padding: 40px 0 80px; }
  .hero p { font-size: 1rem; }
  .hero-visual { height: 260px; }
  .brand-hero-mark { max-width: 210px; }
  .section-head { margin-bottom: 24px; }
  .card { padding: 16px; }
  .work { padding: 18px; }
  .shots img { height: 280px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
