/* AppFromScratch — MetaMicrosoft Software Platform
   Standalone stylesheet (no frameworks required) */

:root {
  --background: oklch(0.13 0.014 265);
  --foreground: oklch(0.97 0.005 250);
  --primary: oklch(0.79 0.13 226);
  --accent: oklch(0.84 0.16 88);
  --muted-foreground: oklch(0.72 0.02 255);
  --border: oklch(1 0 0 / 10%);
  --shadow-panel: 0 40px 120px -40px oklch(0 0 0 / 0.9);
  --font-latin: "Poppins", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-arabic: "IBM Plex Sans Arabic", "Cairo", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-latin);
  overflow-x: hidden;
  min-height: 100vh;
}

[dir="rtl"],
.font-arabic {
  font-family: var(--font-arabic);
}

::selection {
  background: oklch(0.79 0.13 226 / 0.3);
}

/* ---------- Backdrop ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(45rem 30rem at 50% -10%, oklch(0.79 0.13 226 / 0.16), transparent 70%),
    radial-gradient(35rem 25rem at 85% 100%, oklch(0.84 0.16 88 / 0.08), transparent 70%),
    radial-gradient(40rem 28rem at 10% 90%, oklch(0.79 0.13 226 / 0.08), transparent 70%);
}

.grid-field {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, oklch(1 0 0 / 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(1 0 0 / 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 20%, transparent 78%);
}

.glow {
  position: absolute;
  top: -10rem;
  left: 50%;
  height: 38rem;
  width: 38rem;
  transform: translateX(-50%);
  border-radius: 9999px;
  background: oklch(0.79 0.13 226 / 0.1);
  filter: blur(140px);
}

.top-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, oklch(0.79 0.13 226 / 0.4), transparent);
}

/* ---------- Layout ---------- */
.page {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.site-header {
  position: relative;
  z-index: 10;
  padding: 1.75rem 1.25rem 0;
}

@media (min-width: 640px) {
  .site-header {
    padding: 1.75rem 2.5rem 0;
  }
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: oklch(0.17 0.016 265 / 0.4);
  padding: 0.375rem 0.875rem;
  backdrop-filter: blur(12px);
  text-decoration: none;
  transition: border-color 0.3s;
}

.brand-badge:hover {
  border-color: oklch(0.79 0.13 226 / 0.4);
}

.dot {
  height: 0.375rem;
  width: 0.375rem;
  border-radius: 9999px;
  background: var(--primary);
}

.brand-text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  transition: color 0.3s;
}

.brand-badge:hover .brand-text {
  color: var(--foreground);
}

.site-main {
  position: relative;
  z-index: 10;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.25rem;
}

@media (min-width: 640px) {
  .site-main {
    padding: 5rem 2rem;
  }
}

/* ---------- Panel ---------- */
.panel {
  width: 100%;
  max-width: 48rem;
  border-radius: 1.75rem;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(
    160deg,
    oklch(1 0 0 / 0.06) 0%,
    oklch(1 0 0 / 0.02) 45%,
    oklch(1 0 0 / 0.04) 100%
  );
  border: 1px solid oklch(1 0 0 / 0.1);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-panel);
}

@media (min-width: 640px) {
  .panel {
    padding: 3.5rem 3rem;
  }
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}

.welcome {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  color: var(--primary);
}

.domain-tag {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.headline {
  margin: 2rem 0 0;
  font-size: 1.65rem;
  line-height: 1.75;
  font-weight: 600;
  text-wrap: balance;
}

@media (min-width: 640px) {
  .headline {
    font-size: 2.3rem;
    line-height: 1.7;
  }
}

.brand-inline {
  font-family: var(--font-latin);
  color: var(--primary);
}

.intro {
  margin: 1.5rem 0 0;
  max-width: 60ch;
  font-size: 1rem;
  line-height: 2.15;
  color: var(--muted-foreground);
}

@media (min-width: 640px) {
  .intro {
    font-size: 1.125rem;
    line-height: 2.2;
  }
}

/* ---------- Contact ---------- */
.contact {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-label {
  margin: 0;
  font-size: 0.875rem;
  line-height: 2;
  color: var(--muted-foreground);
}

.contact-label + .email-secondary,
.contact-label:has(+ .email-secondary) {
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .contact-label {
    font-size: 1rem;
  }
}

.email-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 0.3s;
}

.email-primary {
  border: 1px solid oklch(0.79 0.13 226 / 0.25);
  background: oklch(0.79 0.13 226 / 0.07);
  padding: 1rem;
}

.email-primary:hover {
  border-color: oklch(0.79 0.13 226 / 0.6);
  background: oklch(0.79 0.13 226 / 0.12);
}

.email-primary .email-text {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  word-break: break-all;
  color: var(--primary);
}

.email-primary .email-arrow {
  font-family: var(--font-mono);
  color: oklch(0.79 0.13 226 / 0.6);
  transition: transform 0.3s;
}

.email-primary:hover .email-arrow {
  transform: translateX(0.25rem);
}

.email-secondary {
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
}

.email-secondary:hover {
  border-color: oklch(0.84 0.16 88 / 0.5);
}

.email-secondary .email-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  word-break: break-all;
  color: var(--muted-foreground);
  transition: color 0.3s;
}

.email-secondary:hover .email-text {
  color: var(--foreground);
}

.email-secondary .email-arrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: oklch(0.72 0.02 255 / 0.6);
  transition: transform 0.3s;
}

.email-secondary:hover .email-arrow {
  transform: translateX(0.25rem);
}

@media (min-width: 640px) {
  .email-primary,
  .email-secondary {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .email-primary .email-text {
    font-size: 1rem;
  }
  .email-secondary .email-text {
    font-size: 0.875rem;
  }
}

.thanks {
  margin: 2.5rem 0 0;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  font-size: 0.875rem;
  color: oklch(0.72 0.02 255 / 0.8);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
}

@media (min-width: 640px) {
  .site-footer {
    padding: 1.5rem 2.5rem;
  }
}

.footer-inner {
  margin: 0 auto;
  display: flex;
  max-width: 48rem;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    text-align: start;
  }
}

.footer-text {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(0.72 0.02 255 / 0.7);
}

.footer-text.dim {
  color: oklch(0.72 0.02 255 / 0.5);
}

/* ---------- Animations ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateX(-50%) translate3d(0, 0, 0);
  }
  50% {
    transform: translateX(-50%) translate3d(0, -18px, 0);
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 oklch(0.79 0.13 226 / 0.5);
  }
  50% {
    opacity: 0.65;
    box-shadow: 0 0 0 6px oklch(0.79 0.13 226 / 0);
  }
}

.animate-rise {
  animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-drift {
  animation: drift 14s ease-in-out infinite;
}

.animate-dot {
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
