/* ============================================================
   HAYKAL — Base typography, buttons, utilities, animations
   ============================================================ */

/* ===== Prevent text selection ===== */
body {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.allow-select {
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

/* ===== Eyebrow (shared section label) ===== */
.eyebrow {
  font-family: var(--font-body); font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--burnt-deep); margin-bottom: 16px;
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600;
}
.eyebrow::before {
  content: ""; display: block;
  width: 6px; height: 6px;
  background: var(--ember); border-radius: 50%;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; font-family: var(--font-display); font-weight: 700;
  font-size: 15px; border: none; cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.btn-primary { background: var(--ink); color: var(--bg-paper); }
.btn-primary:hover { background: var(--burnt-deep); transform: translateY(-2px); }
.btn-ember { background: var(--ember); color: var(--ink); box-shadow: 0 8px 24px rgba(199,90,42,0.35); }
.btn-ember:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(199,90,42,0.45); }
.btn-cream { background: var(--bg-paper); color: var(--ink); }
.btn-cream:hover { transform: translateY(-2px); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink); padding: 14px 22px; font-weight: 600;
}
.btn-ghost:hover { background: var(--ink); color: var(--bg-paper); }
.btn-ghost-light {
  background: rgba(244,234,216,0.1); backdrop-filter: blur(8px);
  color: var(--bg-paper); border: 1.5px solid rgba(244,234,216,0.5);
  padding: 14px 22px; font-weight: 600;
}
.btn-ghost-light:hover { background: rgba(244,234,216,0.2); }

/* ===== Image placeholder (with AI prompt + meta) ===== */
.img-ph {
  background: var(--bg-cream);
  border: 1px solid rgba(26,20,16,0.15);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  line-height: 1.6;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(26,20,16,0.04) 14px 15px),
    radial-gradient(ellipse at 30% 20%, rgba(199, 90, 42, 0.08), transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(90, 107, 58, 0.06), transparent 60%);
  background-color: var(--bg-cream);
}
.img-ph::after {
  content: "";
  position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='150'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='5'/><feColorMatrix values='0 0 0 0 0.4, 0 0 0 0 0.25, 0 0 0 0 0.1, 0 0 0 0.12 0'/></filter><rect width='150' height='150' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  pointer-events: none;
  opacity: 0.6;
}
.img-ph .ph-tag {
  display: inline-block;
  background: var(--ink); color: var(--bg-paper);
  padding: 4px 10px; font-size: 10px;
  letter-spacing: 0.05em; text-transform: uppercase;
  align-self: flex-start; position: relative; z-index: 2;
}
.img-ph .ph-prompt { position: relative; z-index: 2; font-size: 12px; line-height: 1.7; color: var(--ink); max-width: 90%; font-family: var(--font-body); }
.img-ph .ph-meta { position: relative; z-index: 2; font-size: 9px; color: var(--ink-mid); border-top: 1px dashed var(--line-strong); padding-top: 8px; }

/* ===== Tape strip (decorative) ===== */
.tape {
  position: absolute;
  width: 70px; height: 18px;
  background: rgba(232, 149, 86, 0.55);
  border: 1px solid rgba(232, 149, 86, 0.3);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  z-index: 3;
}

/* ===== Reveal-on-scroll ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===== Animations ===== */
@keyframes float-gentle { 0%,100% { transform: translateY(0) rotate(4deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
.float-gentle { animation: float-gentle 4s ease-in-out infinite; }
@keyframes sway { 0%,100% { transform: rotate(-7deg); } 50% { transform: rotate(-5deg); } }
.sway { animation: sway 5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-33.33%); } }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* ===== Reduced-motion preference ===== */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-gentle, .sway, .marquee-track, .hero-pill .dot { animation: none !important; }
  html { scroll-behavior: auto; }
}
