/* 
 * Eve Commissions (طلبات الرسم) - Premium Styling
 * Custom HSL colors, Glassmorphism, 3D overlapping layout, and smooth animations.
 */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg-dark: #0a080d;
  --text-white: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-dim: rgba(255, 255, 255, 0.5);

  /* Brand colors */
  --accent-red: #ff3355;
  /* Main bright crimson-red for tiers */
  --accent-pink: #fca5c7;
  /* Soft pink for headers and accents */
  --glass-bg: rgba(18, 14, 24, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 51, 85, 0.25);
  --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  --glow-shadow: 0 0 30px rgba(255, 51, 85, 0.15);

  /* Fonts */
  --font-en: 'Outfit', sans-serif;
  --font-ar: 'Cairo', sans-serif;
}

/* --- Base & Scrollbar --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-red) var(--bg-dark);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-red);
  border-radius: 99px;
}

body {
  font-family: var(--font-en);
  color: var(--text-white);
  background-color: var(--bg-dark);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
}

/* Blurred glassmorphic fixed background layer */
body::before {
  content: "";
  position: fixed;
  top: -20px;
  /* Offset to prevent unblurred edge bleed */
  left: -20px;
  right: -20px;
  bottom: -20px;
  z-index: -2;
  /* Keeps background behind everything including overlays */
  background:
    linear-gradient(180deg, rgba(10, 8, 13, 0.78) 0%, rgba(10, 8, 13, 0.94) 100%),
    url('IMG/bg.jpg') no-repeat center center;
  background-size: cover;
  filter: blur(6px);
  /* Premium, soft focus blur */
  pointer-events: none;
}

/* --- Layout Containers --- */
.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header Section --- */
header.hero {
  text-align: center;
  padding: 80px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.title-en {
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-white);
  line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.title-ar {
  font-family: var(--font-ar);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 900;
  color: var(--accent-pink);
  margin-top: -5px;
  direction: rtl;
  text-shadow: 0 4px 15px rgba(252, 165, 199, 0.3);
}

/* Social Support Buttons */
.social-buttons {
  display: flex;
  gap: 16px;
  margin-top: 15px;
  justify-content: center;
  flex-wrap: nowrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--text-white);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Ko-fi spacing exactly like mockup "K o - F I" */
.social-btn.kofi-btn {
  letter-spacing: 0.25em;
  padding-right: 20px;
  /* offset extra spacing at the end */
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-red);
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--glow-shadow), 0 10px 25px rgba(0, 0, 0, 0.4);
}

.social-btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* --- Commissions Wrapper --- */
.commissions-list {
  display: flex;
  flex-direction: column;
  gap: 80px;
  /* Spacious gaps to allow beautiful overlaps */
  padding: 60px 0 120px;
}

/* --- Card Styles (Glassmorphism & 3D Overlaps) --- */
.commission-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  padding: 45px 50px;
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 280px;
  overflow: visible;
  /* CRITICAL: Allows anime girls to overlap outside! */
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.commission-card:hover {
  border-color: var(--glass-border-hover);
  box-shadow: var(--glass-shadow), var(--glow-shadow);
}

/* Left / Right alternation on desktop */
.commission-card.image-right {
  flex-direction: row;
}

.commission-card.image-left {
  flex-direction: row-reverse;
}

/* Card Content / Details */
.card-info {
  position: relative;
  z-index: 4;
  /* Higher than character clipping container (z-index: 3) so text sits cleanly on top of images */
  flex: 1;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tier-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: var(--accent-red);
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-shadow: 0 4px 10px rgba(255, 51, 85, 0.25);
}

.price-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-item {
  display: flex;
  align-items: center;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.price-label {
  color: var(--text-white);
  margin-right: 8px;
}

.price-val {
  color: var(--text-white);
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

/* Card Image Wrapper (The popping 3D character layout spacer) */
.card-image-wrap {
  position: relative;
  width: 45%;
  height: 200px;
}

/* Precise Edge Clipping Container for Characters and Shadows */
.char-clip-wrap {
  position: absolute;
  top: -150px;
  /* Aligns high above so head doesn't clip */
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: 0 0 28px 28px;
  /* Curves bottom to match desktop card edges */
  z-index: 3;
}

/* Disable bottom clipping specifically for the Fullbody card so her legs can overflow beautifully */
#tier-fullbody .char-clip-wrap {
  overflow: visible;
  border-radius: 0;
}

.char-img {
  position: absolute;
  pointer-events: none;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
  transition: filter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Base positioning relative to full card (.char-clip-wrap) */
.headshot-img {
  bottom: -15px;
  right: -15px;
  height: 350px;
}

.commission-card:hover .headshot-img {
  filter: drop-shadow(-8px 2px 0 rgba(155, 125, 212, 0.95));
  /* Shift shadow left */
}

/* Card 2: Halfbody (Teal Girl on Left) */
.halfbody-img {
  bottom: -15px;
  left: -15px;
  height: 360px;
}

.commission-card:hover .halfbody-img {
  filter: drop-shadow(8px 2px 0 rgba(42, 157, 143, 0.95));
  /* Shift shadow right */
}

/* Card 3: Fullbody (Neko Girl on Right/Bottom) */
.fullbody-img {
  bottom: -60px;
  right: -55px;
  height: 420px;
}

.commission-card:hover .fullbody-img {
  filter: drop-shadow(-8px 2px 0 rgba(232, 120, 138, 0.95));
  /* Shift shadow left */
}

/* --- Scroll-Triggered Fade-In Animations --- */
.reveal-item {
  opacity: 0;
  transform: translateY(60px) scale(0.96);
  filter: blur(8px);
  transition: opacity 1s cubic-bezier(0.215, 0.61, 0.355, 1),
    transform 1s cubic-bezier(0.215, 0.61, 0.355, 1),
    filter 1s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* Alternate reveal directions for organic flow */
.reveal-item.image-right {
  transform: translateX(40px) translateY(40px) scale(0.97);
}

.reveal-item.image-left {
  transform: translateX(-40px) translateY(40px) scale(0.97);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
  filter: blur(0);
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 80px 24px 60px;
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  background: linear-gradient(to bottom, transparent, rgba(10, 8, 13, 0.5));
}

footer p {
  margin-bottom: 8px;
}

footer a {
  color: var(--accent-pink);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--accent-red);
}

/* --- Responsive Media Queries (Mobile & PC optimization) --- */

/* For smaller laptops / tablets */
@media (max-width: 600px) {
  .commission-card {
    padding: 30px 35px;
  }

  .headshot-img {
    right: -10px;
    bottom: -10px;
    height: 310px;
  }

  .halfbody-img {
    left: -10px;
    bottom: -10px;
    height: 320px;
  }

  .fullbody-img {
    right: -40px;
    bottom: -120px;
    height: 420px;
  }
}

/* High-fidelity optimization for Mobile / Phone */
@media (max-width: 600px) {
  header.hero {
    padding: 50px 16px 30px;
  }

  .social-buttons {
    gap: 8px;
    width: 100%;
    justify-content: center;
  }

  .social-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
    gap: 8px;
  }

  .title-en {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .title-ar {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .commissions-list {
    gap: 55px;
    /* Enough space for overlapping images between cards */
    padding-top: 20px;
    padding-bottom: 80px;
  }

  /* Keep horizontal row layout! Characters overlap just like desktop */
  .commission-card {
    padding: 22px 20px;
    min-height: 180px;
    border-radius: 20px;
  }

  /* Adjust clipping wrapper border radius to match card rounded corners on mobile */
  .char-clip-wrap {
    border-radius: 0 0 20px 20px;
  }

  .card-info {
    max-width: 55%;
    gap: 12px;
  }

  .tier-title {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .price-item {
    font-size: clamp(0.95rem, 3.8vw, 1.15rem);
  }

  .card-image-wrap {
    width: 45%;
    height: 160px;
  }

  /* Scale down the character images for mobile but keep absolute overlapping */
  .headshot-img {
    right: -8px;
    bottom: -8px;
    height: 240px;
  }

  .halfbody-img {
    left: -8px;
    bottom: -8px;
    height: 250px;
  }

  .fullbody-img {
    right: -22px;
    bottom: -85px;
    height: 273px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .social-buttons {
    gap: 6px;
  }

  .social-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
    gap: 6px;
  }

  .commissions-list {
    gap: 50px;
  }

  .commission-card {
    padding: 18px 16px;
    min-height: 160px;
    border-radius: 18px;
  }

  /* Adjust clipping wrapper border radius to match tiny card rounded corners */
  .char-clip-wrap {
    border-radius: 0 0 18px 18px;
  }

  .card-info {
    max-width: 55%;
    gap: 10px;
  }

  .tier-title {
    font-size: clamp(1.6rem, 7.5vw, 2.2rem);
  }

  .price-item {
    font-size: clamp(0.85rem, 3.5vw, 1.05rem);
  }

  .price-label {
    margin-right: 4px;
  }

  .card-image-wrap {
    width: 45%;
    height: 140px;
  }

  .headshot-img {
    right: -6px;
    bottom: -6px;
    height: 210px;
  }

  .halfbody-img {
    left: -6px;
    bottom: -6px;
    height: 220px;
  }

  .fullbody-img {
    right: -22px;
    bottom: -90px;
    height: 273px;
  }
}