/*
 * Envision Era site styles (moved out of layout/main.blade.php so browsers can cache them).
 * Loaded before public/css/app.css (Tailwind), exactly where the old inline <style> was.
 */

@font-face {
  font-family: 'Clayo';
  src: url('../fonts/CLAYO.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Clayo';
  src: url('../fonts/CLAYO-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Clayo';
  src: url('../fonts/CLAYO-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Clayo';
  src: url('../fonts/CLAYO-Medium Italic.otf') format('opentype');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Clayo';
  src: url('../fonts/CLAYO-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

html, body {
  font-family: 'Clayo', sans-serif;
  background-color: #ffffff;
  overflow-x: hidden;
  width: 100%;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

/* overflow-y must be set explicitly alongside overflow-x: per the CSS
   overflow spec, pairing a non-visible overflow-x with a visible
   overflow-y silently computes overflow-y to "auto", which turned any
   section containing an oversized decorative background image into a
   scrollable box with its own visible scrollbar. */
header, section, footer {
  overflow-x: hidden;
  overflow-y: hidden;
}

nav {
  overflow: visible;
}

/* Prevent long headings/text from breaking layout on small screens */
h1, h2, h3, h4, h5, h6, p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.floating-title {
  font-size: clamp(36px, 14vw, 140px);
  line-height: 1;
  white-space: normal;
}

.carousel-viewport {
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 16px;
  transition: transform 0.7s ease-in-out;
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 calc(100% / 3);
}

.carousel-btn {
  width: 40px;
  height: 40px;
  line-height: 0;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#sliderTracks {
  scroll-snap-type: x mandatory;
}
#sliderTracks .service-card {
  scroll-snap-align: start;
}

#mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.hero-responsive h1 {
  font-size: clamp(36px, 8vw, 60px);
  line-height: 1.1;
}

.portfolio-section {
  position: relative;
  overflow: hidden;
  perspective: 1200px;
}

.portfolio-section .floating-title {
  pointer-events: none;
  white-space: nowrap;
}

.portfolio-logo {
  animation: floatY 6s ease-in-out infinite alternate;
  will-change: transform;
  display: block;
  max-width: 100%;
  height: auto;
  transform-origin: center;
  transform-style: preserve-3d;
}

@keyframes floatY {
  0% {
    transform: translateY(0) rotateY(0deg) rotateX(0deg);
  }
  50% {
    transform: translateY(-12px) rotateY(10deg) rotateX(4deg);
  }
  100% {
    transform: translateY(10px) rotateY(-10deg) rotateX(-4deg);
  }
}

@keyframes floatX {
  0% {
    transform: translateX(0) rotateX(0deg) rotateY(0deg);
  }
  50% {
    transform: translateX(12px) rotateX(8deg) rotateY(-6deg);
  }
  100% {
    transform: translateX(-8px) rotateX(-8deg) rotateY(6deg);
  }
}

@keyframes floatDiag1 {
  0% {
    transform: translate(0, 0) rotate3d(1, 1, 0, 0deg);
  }
  50% {
    transform: translate(-10px, 10px) rotate3d(1, 1, 0, 10deg);
  }
  100% {
    transform: translate(8px, -8px) rotate3d(1, 1, 0, -10deg);
  }
}

@keyframes floatDiag2 {
  0% {
    transform: translate(0, 0) rotate3d(1, -1, 0, 0deg);
  }
  50% {
    transform: translate(10px, -10px) rotate3d(1, -1, 0, 10deg);
  }
  100% {
    transform: translate(-8px, 8px) rotate3d(1, -1, 0, -10deg);
  }
}

@media (max-width: 1024px) {
  .carousel-slide {
    flex: 0 0 calc(100% / 2);
  }

  .portfolio-section .floating-title-wrapper {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin: 2rem 0 1.5rem;
  }

  .portfolio-section .floating-title {
    font-size: clamp(48px, 18vw, 120px);
    line-height: 1;
  }

  .portfolio-section .bottom-logo-row {
    position: relative;
    margin-top: 2rem;
    padding-bottom: 2rem;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .carousel-slide {
    flex: 0 0 100%;
  }

  .hero-responsive {
    text-align: center;
    padding-top: 2rem;
  }

  .portfolio-section .portfolio-inner {
    padding: 2rem 1.5rem 3rem;
  }
}

@media (max-width: 640px) {
  .portfolio-section .portfolio-logo {
    width: 120px;
  }

  .portfolio-section .floating-title {
    font-size: clamp(32px, 20vw, 64px);
  }
}

.carousel-viewport{
  overflow: hidden;
  width: 100%;
}
.carousel-track{
  display: flex;
  gap: 24px;
  transition: transform .45s ease;
  will-change: transform;
}
.carousel-slide{
  flex: 0 0 calc((100% - (24px * 2)) / 3);
}

@media (max-width:1024px){
  .carousel-slide{
    flex-basis: calc((100% - 24px) / 2);
  }
}
@media (max-width:768px){
  .carousel-slide{
    flex-basis: 100%;
  }
}

/* Global entrance animations (disabled: opacity/filter start state caused
   content to stay invisible when the reveal observer never fired) */
.animate-base{
  --start-transform: translateY(0) scale(1);
  --end-transform: translateY(0) scale(1);
  --start-filter: blur(0);
  --end-filter: blur(0);
  opacity: 1;
  transform: var(--end-transform);
  filter: var(--end-filter);
}
.animate-visible{
  opacity: 1;
  transform: var(--end-transform);
  filter: var(--end-filter);
}
.hover-lift{
  transition: transform .25s ease, box-shadow .25s ease;
}
.hover-lift:hover{
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
}
/* Variant presets */
.anim-slide-right{ --start-transform: translateX(36px) scale(.96); }
.anim-slide-left{ --start-transform: translateX(-36px) scale(.96); }
.anim-slide-up{ --start-transform: translateY(36px) scale(.97); }
.anim-zoom-rotate{ --start-transform: scale(.85) rotate(-3deg); }
.anim-zoom-in{ --start-transform: scale(.86); }
.anim-rise-soft{ --start-transform: translateY(40px) scale(.96); --start-filter: blur(14px); }
.anim-float-in{ --start-transform: translateY(26px) scale(1.05); }
.anim-tilt-up{ --start-transform: translateY(32px) rotate(-2deg); }
.anim-pop{ --start-transform: scale(.9); --end-transform: scale(1); }
.anim-fade-left{ --start-transform: translateX(-28px); --start-filter: blur(8px); }
.anim-fade-right{ --start-transform: translateX(28px); --start-filter: blur(8px); }
.anim-skew-up{ --start-transform: translateY(30px) skewY(-2deg); }
.anim-rotate-in{ --start-transform: rotate(-5deg) scale(.9); }
.anim-drop-in{ --start-transform: translateY(-40px) scale(1.04); }
.anim-flip-in{ --start-transform: rotateX(15deg) translateY(24px) scale(.94); }
.anim-pulse-in{ --start-transform: scale(.92); --end-transform: scale(1.02); }
.anim-spin-in{ --start-transform: rotate(-12deg) scale(.8); --end-transform: rotate(0deg) scale(1); }
.anim-bounce-up{ --start-transform: translateY(60px) scale(.9); --end-transform: translateY(-6px) scale(1); }
.anim-overshoot{ --start-transform: translateY(32px) scale(1.08); --end-transform: translateY(0) scale(.98); }
.anim-zoom-blur{ --start-transform: scale(1.12); --start-filter: blur(14px); }
@keyframes gradientShift{
  0%{ background-position: 0% 50%; }
  100%{ background-position: 100% 50%; }
}
.text-gradient-anim{
  background: linear-gradient(120deg,#6ab7ff,#c084fc,#22d3ee,#60a5fa);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 6s ease-in-out infinite alternate;
}
@keyframes underlineDraw{
  0%{ transform: scaleX(0); }
  100%{ transform: scaleX(1); }
}
.underline-draw{
  position: relative;
  display: inline-block;
}
.underline-draw::after{
  content:"";
  position:absolute;
  left:0; bottom:-6px;
  width:100%; height:3px;
  background: linear-gradient(90deg,#60a5fa,#22d3ee,#c084fc);
  transform-origin:left center;
  transform: scaleX(0);
  animation: underlineDraw .8s ease forwards;
}
@keyframes blurClear{
  0%{ opacity:0; filter: blur(8px); transform: translateY(10px); }
  100%{ opacity:1; filter: blur(0); transform: translateY(0); }
}
.blur-clear{
  animation: blurClear .7s ease forwards;
}
.split-char, .split-word{
  display:inline-block;
  opacity:0;
  animation: blurClear .6s ease forwards;
}
.tilt-card{
  transition: transform .2s ease, box-shadow .2s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
  position: relative;
  will-change: transform, box-shadow;
}
.tilt-glare{
  position:absolute;
  inset:0;
  pointer-events:none;
  mix-blend-mode: screen;
  opacity:0;
  transition: opacity .2s ease;
  border-radius: inherit;
}

/* Disable animation effects globally */

/* Hero-specific motion + typing */
@keyframes heroFloat {
  0% { transform: translateY(0) rotate(0deg) scale(1); }
  30% { transform: translateY(-10px) rotate(1deg) scale(1.01); }
  60% { transform: translateY(6px) rotate(-1deg) scale(.995); }
  100% { transform: translateY(0) rotate(0deg) scale(1); }
}
.hero-float{
  animation: heroFloat 12s ease-in-out infinite alternate;
  will-change: transform;
}
.typing-active{
  position: relative;
}
.typing-active::after{
  content: '|';
  position: absolute;
  right: -10px;
  top: 0;
  animation: blink 1s steps(2, start) infinite;
  color: currentColor;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up{
  animation: fadeInUp .8s ease forwards;
}
@keyframes heroBounce {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}
.hero-bounce{
  animation: heroBounce 2.2s ease-in-out infinite;
}

/* ---- Cinematic interaction layer (GSAP-driven; everything here has a
   fully-visible fallback if JS never runs, learned the hard way from
   the old opacity:0-by-default reveal system) ---- */

@keyframes glowPulse{
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}
.blur-3xl{
  animation: glowPulse 5s ease-in-out infinite;
}

.gsap-word{
  display: inline-block;
  will-change: transform, opacity;
}

.tilt-card{
  transition: transform .2s ease, box-shadow .25s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
  position: relative;
  will-change: transform;
}
.tilt-card:hover{
  box-shadow: 0 0 0 1.5px rgba(0,150,255,.55), 0 24px 50px rgba(0,90,255,.22);
}
.tilt-glare{
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity .2s ease;
  border-radius: inherit;
  z-index: 2;
}
.tilt-grid:has(.tilt-card:hover) .tilt-card:not(:hover){
  filter: blur(2px) brightness(.9);
  transition: filter .3s ease;
}
.tilt-card{
  transition: transform .2s ease, box-shadow .25s ease, filter .3s ease;
}

.magnetic-btn{
  display: inline-flex;
  position: relative;
  will-change: transform;
}
.magnetic-btn .btn-aura{
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle, rgba(0,150,255,.55), rgba(0,150,255,0) 70%);
  opacity: 0;
  transform: scale(.4);
  z-index: -1;
}

/* WhatsApp CTA attention-ping */
.wa-btn{
  position: relative;
}
.wa-btn::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(0,255,214,.7);
  opacity: 0;
  pointer-events: none;
  animation: waPing 2.6s ease-out infinite;
}
@keyframes waPing{
  0% { opacity: .65; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.3); }
}
@media (prefers-reduced-motion: reduce){
  .wa-btn::after{ animation: none; }
}

/* Gemini floating widget (decorative only) */
.gemini-fab{
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9998;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0055FF, #00C3FF);
  box-shadow: 0 8px 28px rgba(0,85,255,.45);
  cursor: pointer;
  animation: geminiFloat 3.4s ease-in-out infinite;
  border: none;
}
@keyframes geminiFloat{
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.gemini-fab svg{
  width: 26px;
  height: 26px;
  transition: transform .5s ease;
  position: relative;
  z-index: 1;
}
.gemini-fab:hover svg{
  transform: rotate(180deg);
}
.gemini-ring{
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid rgba(0,163,255,.6);
  opacity: 0;
  pointer-events: none;
}
.gemini-fab:hover .gemini-ring{
  animation: geminiRing 1.1s ease-out infinite;
}
@keyframes geminiRing{
  0% { opacity: .8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.7); }
}
.gemini-panel{
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 9999;
  width: min(340px, calc(100vw - 44px));
  max-height: 65vh;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,20,60,.28);
  overflow: hidden;
  transform-origin: bottom right;
  display: flex;
  flex-direction: column;
}
@media (prefers-reduced-motion: reduce){
  .blur-3xl, .gemini-fab, .gemini-fab:hover .gemini-ring{
    animation: none !important;
  }
}

@media (hover: hover) and (pointer: fine){
  html.has-custom-cursor, html.has-custom-cursor *{
    cursor: none !important;
  }
  /* Keep the normal cursor (text caret / arrow) over form fields. */
  html.has-custom-cursor input,
  html.has-custom-cursor textarea,
  html.has-custom-cursor select,
  html.has-custom-cursor [contenteditable="true"]{
    cursor: auto !important;
  }
  .cursor-dot, .cursor-ring{
    position: fixed;
    top: 0; left: 0;
    border-radius: 999px;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
  }
  .cursor-dot{
    width: 8px;
    height: 8px;
    background: #00C3FF;
  }
  .cursor-ring{
    width: 34px;
    height: 34px;
    border: 1.5px solid rgba(0,150,255,.55);
    transition: width .2s ease, height .2s ease, border-color .2s ease, background-color .2s ease;
  }
  .cursor-ring.is-active{
    width: 58px;
    height: 58px;
    background: rgba(0,150,255,.14);
    border-color: rgba(0,150,255,.9);
  }
}

[hidden] { display: none !important; }
html { scroll-padding-top: 100px; }
:focus-visible { outline: 3px solid #0ea5e9; outline-offset: 4px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 10001; padding: 12px 20px; background: #fff; color: #0f172a; border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
#navbar details > summary { list-style: none; }
#navbar details > summary::-webkit-details-marker { display: none; }
#navbar details > summary::after { content: ' \25BE'; }
#navbar details[open] > summary::after { content: ' \25B4'; }
#main-content > :first-child { scroll-margin-top: 100px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Visitors who ask their device for reduced motion get (almost) no animation.
   Durations are shortened rather than removed so animations that end in a
   visible state (fill-mode: forwards) still end there. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Page loader (shown on the first page view of a visit only) ---- */
.global-loader{
  position:fixed;
  inset:0;
  display:none;
  place-items:center;
  background: rgba(2,6,23,.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index:9999;
  transition: opacity .75s cubic-bezier(.22,1,.36,1), visibility .75s ease, transform .75s cubic-bezier(.22,1,.36,1), filter .75s ease;
  overflow:hidden;
}
html.show-loader .global-loader{
  display:grid;
}
html.show-loader body{
  overflow:hidden;
}
html.show-loader body *:not(.global-loader):not(.global-loader *){
  animation-play-state: paused !important;
}
.global-loader.hide{
  opacity:0;
  visibility:hidden;
  transform: scale(1.08);
  filter: blur(8px);
}
.loader-card{
  width: clamp(260px, 46vw, 420px);
  padding: 30px;
  border-radius: 26px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 24px 70px rgba(0,0,0,.38);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.loader-card::after,
.loader-card::before{
  content:"";
  position:absolute;
  inset:-55%;
  background: conic-gradient(from 120deg, rgba(14,165,233,.35), rgba(59,130,246,.35), transparent 35%);
  animation: loader-spin 9s linear infinite;
  filter: blur(38px);
  opacity: .32;
  z-index:0;
}
.loader-card::before{
  animation-duration: 12s;
  animation-direction: reverse;
  opacity:.22;
}
.loader-content{
  position: relative;
  z-index: 2;
  text-align: center;
  color: #e2e8f0;
}
.logo-ring{
  width: 128px;
  height: 128px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  display: grid;
  place-items: center;
  position: relative;
  animation: loader-float 3.6s ease-in-out infinite;
  box-shadow: 0 18px 44px rgba(14,165,233,.3);
  background: transparent;
}
.logo-ring::before{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.32);
  animation: loader-spin 6s linear infinite reverse;
}
.logo{
  width: 82px;
  height: 82px;
  border-radius: 18px;
  background: transparent;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 36px rgba(14,165,233,.4);
  overflow: hidden;
  position: relative;
}
.logo::after{
  content:"";
  position:absolute;
  inset:-30%;
  background: radial-gradient(circle, rgba(255,255,255,.35) 0%, transparent 50%);
  animation: loader-spin 7s linear infinite;
  opacity:.5;
}
.logo img{
  width: 60%;
  height: 60%;
  animation: loader-pulse 2.4s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.35));
}
.progress{
  height: 8px;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  overflow: hidden;
  margin: 18px 0 8px;
}
.progress span{
  display: block;
  height: 100%;
  width: 38%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #2563eb, #38bdf8);
  animation: loader-slide 1.4s ease-in-out infinite;
}
.tagline{
  font-weight: 700;
  letter-spacing: 0.8px;
  font-size: 14px;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  overflow: hidden;
}
.sub{
  color: rgba(226,232,240,.7);
  font-size: 13px;
  margin-top: 6px;
}
.orbit{
  position:absolute;
  inset: -10%;
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 50%;
  animation: loader-spin 14s linear infinite;
  pointer-events: none;
}
.wave{
  display: inline-block;
  animation: wave 1.8s ease-in-out infinite;
  transform-origin: 70% 70%;
}
.typing{
  display: inline-flex;
  gap: 2px;
  align-items: center;
  min-height: 18px;
  font-family: 'Clayo', sans-serif;
  letter-spacing: 0.4px;
}
.cursor{
  display: inline-block;
  width: 2px;
  height: 16px;
  background: #e2e8f0;
  animation: blink 1s steps(2, start) infinite;
  margin-left: 2px;
}
@keyframes wave{
  0%,60%,100%{ transform: rotate(0deg); }
  20%{ transform: rotate(18deg); }
  40%{ transform: rotate(-10deg); }
}
@keyframes blink{
  0%,50%{ opacity:1; }
  51%,100%{ opacity:0; }
}
@keyframes loader-spin{ to{ transform: rotate(360deg); } }
@keyframes loader-float{ 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-12px); } }
@keyframes loader-pulse{ 0%,100%{ transform: scale(1); opacity:1; } 50%{ transform: scale(1.08); opacity:.92; } }
@keyframes loader-slide{ 0%{ transform: translateX(-30%); } 50%{ transform: translateX(55%); } 100%{ transform: translateX(120%); } }
