/* ==========================================================================
   ayaalmomany.com — shared design system (base.css)
   Every page loads this first; page-specific styles live in their own file.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #07080c;
  --bg-2: #0c0e14;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-2: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #f5f5f7;
  --text-2: rgba(245, 245, 247, 0.68);
  --text-3: rgba(245, 245, 247, 0.44);

  /* Brand: iOS blue → violet */
  --blue: #0a84ff;
  --violet: #bf5af2;
  --pink: #ff6482;
  --mint: #63e6be;
  --brand: linear-gradient(120deg, #0a84ff 0%, #7d6bff 45%, #bf5af2 100%);

  /* Per-project accents */
  --hirely: #f51a2e;
  --hirely-2: #ff6b3d;
  --solace: #a78bfa;
  --solace-2: #5eead4;

  /* Type */
  --font: "Geist", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Instrument Serif", "New York", Georgia, serif;

  /* Layout */
  --max: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 24px;
  --radius-sm: 14px;
  --section: clamp(96px, 14vw, 180px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: rgba(10, 132, 255, 0.45); }

/* Subtle film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; position: relative; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; }
.display { font-size: clamp(48px, 8.4vw, 112px); font-weight: 600; letter-spacing: -0.05em; line-height: 0.95; }
.h2 { font-size: clamp(36px, 5.4vw, 68px); letter-spacing: -0.045em; line-height: 1.02; }
.h3 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.025em; line-height: 1.15; }
.lead { font-size: clamp(18px, 1.6vw, 22px); color: var(--text-2); line-height: 1.5; letter-spacing: -0.01em; }
.muted { color: var(--text-2); }
.serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -0.02em; }
.gradient-text { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.7; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 8, 12, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--stroke);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; font-size: 16px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 6px 20px -6px rgba(125, 107, 255, 0.8);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--text-2);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-cta { margin-left: 8px; }
.nav-links a.nav-cta, .nav-links a.nav-cta:hover, .nav-links a.nav-cta[aria-current="page"] { color: #000; background: var(--text); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--text); margin: 5px auto; transition: transform 0.3s var(--ease); }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--gutter) 24px; background: rgba(7, 8, 12, 0.96); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--stroke);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: all 0.3s var(--ease);
  }
  .nav-links a { padding: 14px 4px; font-size: 18px; border-radius: 0; border-bottom: 1px solid var(--stroke); background: none !important; }
  .nav-links a.nav-cta { margin: 16px 0 0; height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--text) !important; color: #000; font-size: 16px; }
  .nav.open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .nav.open { background: rgba(7, 8, 12, 0.96); }
  .nav.open .nav-toggle span:first-child { transform: translateY(3.25px) rotate(45deg); }
  .nav.open .nav-toggle span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
}

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em; cursor: pointer; white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--text); color: #000; }
.btn-primary:hover { box-shadow: 0 10px 40px -10px rgba(255, 255, 255, 0.45); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); border-color: var(--stroke-2); color: var(--text); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--stroke-2); background: var(--surface);
  font-size: 13px; color: var(--text-2); white-space: nowrap;
}
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(99, 230, 190, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(99, 230, 190, 0); } 100% { box-shadow: 0 0 0 0 rgba(99, 230, 190, 0); } }

/* ---------- Cards ---------- */
.card {
  position: relative; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--stroke); overflow: hidden;
}
.card::before { /* top hairline highlight */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 40%);
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}

/* ---------- iPhone frame ----------
   <div class="iphone"><div class="iphone-screen"><video|img></div></div>
   Width via --w (default 300px). Screen media is 1206×2622 (iPhone 17 Pro). */
.iphone {
  --w: 300px;
  position: relative; width: var(--w); aspect-ratio: 1206 / 2622;
  padding: calc(var(--w) * 0.035);
  border-radius: calc(var(--w) * 0.17);
  background: linear-gradient(145deg, #3a3a40, #1b1b1f 30%, #0d0d10 70%, #2b2b30);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.14),
    inset 0 0 0 calc(var(--w) * 0.012) #050506,
    0 50px 100px -30px rgba(0, 0, 0, 0.9),
    0 30px 60px -40px rgba(0, 0, 0, 0.8);
  flex-shrink: 0;
}
.iphone::before { /* side buttons */
  content: ""; position: absolute; left: -2px; top: 22%; width: 3px; height: 9%;
  border-radius: 2px; background: #2a2a2e; box-shadow: 0 calc(var(--w) * 0.2) 0 #2a2a2e;
}
.iphone::after {
  content: ""; position: absolute; right: -2px; top: 28%; width: 3px; height: 14%;
  border-radius: 2px; background: #2a2a2e;
}
.iphone-screen {
  position: relative; width: 100%; height: 100%; overflow: hidden; background: #000;
  border-radius: calc(var(--w) * 0.135);
}
.iphone-screen > img, .iphone-screen > video { width: 100%; height: 100%; object-fit: cover; }
.iphone-screen::after { /* glass reflection */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0%, transparent 35%);
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }
.static [data-reveal] { transition: none; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--stroke); padding: 40px 0 48px; color: var(--text-3); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Utilities ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.glow {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.45; pointer-events: none; z-index: 0;
}

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