/* ===========================================================
   Odin Proje — shared styles
   =========================================================== */
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: #111c2c; background: #f9f9ff; overflow-x: hidden; }
h1,h2,h3,h4,.font-heading { font-family: 'Montserrat', sans-serif; }
::selection { background: #115cb9; color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #e7eeff; }
::-webkit-scrollbar-thumb { background: #115cb9; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #1a2b4c; }

/* ---------- Glassmorphism ---------- */
.glass {
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.65);
}
.glass-dark {
  background: rgba(3,22,54,0.42);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.14);
}

/* ---------- Placeholder imagery (glass / architecture feel) ---------- */
.ph { position: relative; overflow: hidden; }
.ph::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(125deg, rgba(255,255,255,0.10) 0 2px, transparent 2px 26px),
    repeating-linear-gradient(35deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 40px);
  mix-blend-mode: overlay;
}
.ph-label {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.9);
  background: rgba(11,22,38,.42);
  border: 1px solid rgba(255,255,255,.25);
  padding: 4px 9px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.sky-1 { background: linear-gradient(160deg, #e6f0ff 0%, #659dfe 42%, #115cb9 100%); }
.sky-2 { background: linear-gradient(160deg, #dee8ff 0%, #4e5e82 48%, #1a2b4c 100%); }
.sky-3 { background: linear-gradient(160deg, #f0f3ff 0%, #8293ba 46%, #115cb9 100%); }
.sky-4 { background: linear-gradient(160deg, #d8e3fa 0%, #44474e 52%, #031636 100%); }
.sky-5 { background: linear-gradient(160deg, #e7eeff 0%, #659dfe 46%, #1a2b4c 100%); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }

/* ---------- Floating + WhatsApp ---------- */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.floaty { animation: floaty 5s ease-in-out infinite; }
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); }
  70% { box-shadow: 0 0 0 18px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}
.wa-pulse { animation: pulseRing 2.2s infinite; }

/* ---------- Mega menu ---------- */
.has-mega .mega {
  position: fixed;
  left: 50%;
  top: 96px;
  width: min(980px, calc(100vw - 32px));
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: all .3s ease;
}
.has-mega:hover .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- Card hover ---------- */
.prod-card { transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s ease; }
.prod-card:hover { transform: translateY(-10px) scale(1.015); box-shadow: 0 30px 60px -20px rgba(3,22,54,.40); }
.prod-card:hover .prod-img .bg { transform: scale(1.12); }
.prod-img .bg { transition: transform .7s cubic-bezier(.2,.7,.2,1); }

/* ---------- Accordion ---------- */
.acc-body { max-height: 0; overflow: hidden; transition: max-height .45s ease, padding .45s ease; }
.acc-item.open .acc-body { max-height: 360px; }
.acc-item.open .acc-icon { transform: rotate(45deg); }
.acc-icon { transition: transform .35s ease; }

/* ---------- Mobile menu (real CSS so no FOUC before Tailwind hydrates) ---------- */
#mobileMenu { transform: translateX(100%); transition: transform .4s cubic-bezier(.2,.7,.2,1); }
#mobileMenu.open { transform: translateX(0); }
#mobileOverlay { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
#mobileOverlay.open { opacity: 1; pointer-events: auto; }

/* ---------- Underline grow ---------- */
.underline-grow { position: relative; }
.underline-grow::after { content:""; position:absolute; left:0; bottom:-6px; height:2px; width:0; background:#659dfe; transition:width .3s ease; }
.underline-grow:hover::after, .underline-grow.active-link::after { width:100%; }

/* ---------- Inner-page hero ---------- */
.inner-hero { position: relative; overflow: hidden; }
.inner-hero .bg { position:absolute; inset:0; }
.crumb a { transition: color .25s; }
.crumb a:hover { color: #fff; }

/* ---------- Lightbox (CSS only) ---------- */
.lb { position: fixed; inset: 0; z-index: 90; background: rgba(3,22,54,.85); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s; }
.lb:target { opacity: 1; pointer-events: auto; }
.lb-inner { width: min(90vw, 1000px); aspect-ratio: 16/10; border-radius: 1rem; box-shadow: 0 40px 100px -20px rgba(0,0,0,.6); }
.lb-close { position: absolute; top: 28px; right: 28px; width: 48px; height: 48px; border-radius: 999px; color:#fff; display:flex; align-items:center; justify-content:center; font-size: 22px; }

/* ---------- Project filter ---------- */
.filter-btn { transition: all .3s ease; }
.proj-item { transition: opacity .4s ease, transform .4s ease; }
.proj-item.hide { display: none; }

/* ---------- Generic entrance for hero content ---------- */
.hero-up { opacity: 0; transform: translateY(24px); animation: heroUp .8s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-up.d1 { animation-delay:.12s; } .hero-up.d2 { animation-delay:.24s; } .hero-up.d3 { animation-delay:.36s; }
@keyframes heroUp { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-up { opacity: 1 !important; transform: none !important; animation: none !important; }
}
