/* ===================================================================
   AARAAMAM — PREMIUM CRAFT LAYER
   Film grain · custom cursor · magnetic CTAs · cinematic reveals
   creed section · mobile menu · scroll progress
   =================================================================== */

/* 1. FILM GRAIN */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9998;
  pointer-events: none; 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='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* 2. CUSTOM CURSOR */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; border-radius: 50%;
  pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.3s;
}
.cursor-dot { width: 6px; height: 6px; background: var(--ember); }
.cursor-ring {
  width: 38px; height: 38px; border: 1.5px solid rgba(196, 87, 42, 0.55);
  transition: width 0.25s cubic-bezier(0.22,1,0.36,1), height 0.25s cubic-bezier(0.22,1,0.36,1), background 0.25s, border-color 0.25s, opacity 0.3s;
}
body.cursor-ready.cursor-active .cursor-dot,
body.cursor-ready.cursor-active .cursor-ring { opacity: 1; }
body.cursor-ready.cursor-hover .cursor-ring { width: 64px; height: 64px; background: rgba(196, 87, 42, 0.10); border-color: rgba(196, 87, 42, 0.8); }
@media (hover: hover) and (pointer: fine) { body.cursor-ready, body.cursor-ready a, body.cursor-ready button { cursor: none; } }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none !important; } }

/* 3. MAGNETIC BUTTONS */
.magnetic { will-change: transform; transition: transform 0.25s cubic-bezier(0.22,1,0.36,1); }

/* 4. CLIP REVEAL */
[data-clip] { clip-path: inset(0 0 100% 0); transition: clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1); will-change: clip-path; }
[data-clip].is-revealed { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { [data-clip] { clip-path: none; } }

/* 5. KEN BURNS HERO */
.hero-bg.kenburns { animation: kenburns 22s ease-in-out infinite alternate; transform-origin: 68% 42%; }
@keyframes kenburns { from { transform: scale(1.0); } to { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .hero-bg.kenburns { animation: none; } }

/* 6. CREED SECTION */
.creed {
  background: var(--charcoal); color: var(--cream);
  padding: clamp(7rem, 15vw, 12rem) 0; position: relative; overflow: hidden;
}
.creed::before {
  content: "\201C"; position: absolute; top: -2rem; left: 50%; transform: translateX(-50%);
  font-family: var(--serif); font-size: clamp(16rem, 34vw, 34rem); line-height: 1;
  color: var(--ember); opacity: 0.12; pointer-events: none;
}
.creed::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(196,87,42,0.16), transparent 60%);
  pointer-events: none;
}
.creed-inner { max-width: 28ch; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.creed-ml {
  font-family: var(--malayalam); font-size: clamp(1.2rem, 2.8vw, 2rem); line-height: 1.8;
  color: var(--saffron); margin-bottom: 2.2rem; font-weight: 500; opacity: 0.92;
}
.creed-en {
  font-family: var(--serif); font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.18; font-weight: 400; letter-spacing: -0.02em; color: var(--cream);
}
.creed-en em { font-style: italic; color: var(--saffron); }
.creed-attr { margin-top: 2.8rem; font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(250,243,226,0.5); }

/* 7. SCROLL PROGRESS BAR */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--ember), var(--saffron));
  z-index: 9997; transition: width 0.1s linear;
}

/* 8. MOBILE MENU */
.mobile-order { display: none; }
.menu-toggle { transition: transform 0.3s; z-index: 120; }
body.nav-open .menu-toggle { transform: rotate(90deg); }
@media (max-width: 880px) {
  .nav-links {
    display: flex !important; flex-direction: column; align-items: stretch; gap: 0;
    position: fixed; top: 0; left: 0; right: 0;
    padding: 6.5rem var(--pad-x) 2.5rem;
    background: rgba(250, 243, 226, 0.99);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 60px -20px rgba(0,0,0,0.25);
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); z-index: 110;
  }
  body.nav-open .nav-links { transform: translateY(0); }
  .nav-links a { font-family: var(--serif); font-size: 1.6rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .mobile-order {
    display: inline-block !important; margin-top: 1.6rem;
    background: var(--ember); color: var(--cream) !important;
    font-family: var(--sans) !important; font-size: 0.95rem !important;
    text-align: center; padding: 1rem 1.5rem !important;
    border-radius: 999px; border-bottom: none !important;
  }
  body.nav-open { overflow: hidden; }
}

/* 9. ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  .btn::after { display: none; }
  .hero-bg { transform: none !important; }
}
