/* =============================================================
   owntus.css  —  Owntus Media Design System
   All custom styles, animations & utilities for the frontend.
   Linked from: resources/views/frontend/layouts/app.blade.php
   ============================================================= */

/* ─────────────────────────────────────────
   1. DESIGN TOKENS (CSS Custom Properties)
   ───────────────────────────────────────── */
:root {
  /* Text colours */
  --heading:   #ffffff;
  --heading-2: #e5e7eb;
  --body:      #9ca3af;
  --light:     #6b7280;

  /* Brand palette */
  --accent:    #8b5cf6;
  --accent-2:  #22d3ee;
  --warm:      #fbbf24;

  /* Surface colours */
  --ink:       #0a0a0f;
  --surface:   #121218;
  --surface-2: #191922;
  --hairline:  rgba(255, 255, 255, 0.07);
}


/* ─────────────────────────────────────────
   2. GLOBAL RESETS & BASE
   ───────────────────────────────────────── */
* {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

body {
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  height: 8px;
  width:  8px;
}
::-webkit-scrollbar-track {
  background: var(--surface);
}
::-webkit-scrollbar-thumb {
  background:    #2b2b36;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3a3a4a;
}


/* ─────────────────────────────────────────
   3. TYPOGRAPHY SYSTEM
   ───────────────────────────────────────── */
.h1-hero {
  font-family:    'Plus Jakarta Sans', sans-serif;
  font-weight:    800;
  font-size:      clamp(42px, 5.4vw, 72px);
  line-height:    1.1;
  letter-spacing: -2px;
  color:          var(--heading);
}

.h2-section {
  font-family:    'Plus Jakarta Sans', sans-serif;
  font-weight:    700;
  font-size:      clamp(34px, 4.2vw, 52px);
  line-height:    1.2;
  letter-spacing: -1px;
  color:          var(--heading);
}

.h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size:   clamp(28px, 2.8vw, 36px);
  line-height: 1.3;
  color:       var(--heading);
}

.h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size:   28px;
  color:       var(--heading);
}

.h5 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size:   22px;
  color:       var(--heading);
}

.h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size:   18px;
  color:       var(--heading);
}

.body-text {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size:   clamp(16px, 1.1vw, 18px);
  line-height: 1.8;
  color:       var(--body);
}

.small-text {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size:   15px;
  color:       var(--body);
}

.caption {
  font-family:    'Inter', sans-serif;
  font-weight:    500;
  font-size:      13px;
  letter-spacing: 0.3px;
  color:          var(--light);
}

.nav-text {
  font-family:    'Plus Jakarta Sans', sans-serif;
  font-weight:    500;
  font-size:      16px;
  letter-spacing: 0.3px;
}

.btn-text {
  font-family:    'Plus Jakarta Sans', sans-serif;
  font-weight:    600;
  font-size:      16px;
  letter-spacing: 0.2px;
}

.card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size:   24px;
  color:       var(--heading);
}

.card-desc {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size:   17px;
  line-height: 1.75;
  color:       var(--body);
}

.blog-title {
  font-family:    'Plus Jakarta Sans', sans-serif;
  font-weight:    700;
  font-size:      clamp(22px, 2vw, 26px);
  line-height:    1.3;
  letter-spacing: -0.3px;
  color:          var(--heading);
}

/* Text colour utilities */
.text-heading  { color: var(--heading);   }
.text-heading2 { color: var(--heading-2); }
.text-body     { color: var(--body);      }
.text-light    { color: var(--light);     }


/* ─────────────────────────────────────────
   4. GRADIENT & NOISE UTILITIES
   ───────────────────────────────────────── */

/* Hero key-phrase gradient text */
.grad-text {
  background:              linear-gradient(97deg, #c4b5fd 0%, #8b5cf6 35%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip:         text;
  color:                   transparent;
}

/* Radial gradient noise overlay */
.grid-noise {
  background-image:
    radial-gradient(circle at 15% 10%, rgba(139, 92, 246, 0.16), transparent 40%),
    radial-gradient(circle at 85%  0%, rgba( 34, 211, 238, 0.10), transparent 45%);
}

/* Hairline grid backdrop for hero */
.hero-grid {
  background-image:
    linear-gradient(to right,  rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size:         64px 64px;
  -webkit-mask-image:      radial-gradient(ellipse 70% 60% at 50% 20%, black 40%, transparent 90%);
  mask-image:              radial-gradient(ellipse 70% 60% at 50% 20%, black 40%, transparent 90%);
}


/* ─────────────────────────────────────────
   5. BUTTONS
   ───────────────────────────────────────── */
.btn-primary {
  background:  linear-gradient(97deg, #8b5cf6, #6d5cf6 55%, #22d3ee 130%);
  box-shadow:  0 8px 30px -8px rgba(139, 92, 246, 0.55);
  transition:  filter 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary:hover {
  filter:     brightness(1.08);
  box-shadow: 0 10px 36px -6px rgba(139, 92, 246, 0.7);
}

.btn-outline {
  border:     1px solid var(--hairline);
  color:      var(--heading);
  background: transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.btn-outline:hover {
  border-color: rgba(139, 92, 246, 0.5);
  background:   rgba(139, 92, 246, 0.07);
}


/* ─────────────────────────────────────────
   6. CARD COMPONENT
   ───────────────────────────────────────── */
.card {
  background:  linear-gradient(180deg, #14141b, #101014);
  border:      1px solid rgba(255, 255, 255, 0.07);
  transition:  transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}

.card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  transform:    translateY(-4px);
  box-shadow:   0 20px 50px -20px rgba(139, 92, 246, 0.35);
}


/* ─────────────────────────────────────────
   7. ICON BOX (floating ecosystem icons)
   ───────────────────────────────────────── */
.icon-box {
  position:                absolute;
  border-radius:           1.25rem;
  background:              rgba(20, 20, 26, 0.7);
  border:                  1px solid rgba(255, 255, 255, 0.04);
  display:                 flex;
  align-items:             center;
  justify-content:         center;
  backdrop-filter:         blur(12px);
  -webkit-backdrop-filter: blur(12px);
}


/* ─────────────────────────────────────────
   8. SCROLL-SNAP & NUMBER HELPERS
   ───────────────────────────────────────── */
.snap-row  { scroll-snap-type:  x mandatory; }
.snap-item { scroll-snap-align: start;       }

.num-tick  { font-variant-numeric: tabular-nums; }


/* ─────────────────────────────────────────
   9. REVEAL-ON-SCROLL ANIMATION
   ───────────────────────────────────────── */
.reveal {
  opacity:    0;
  transform:  translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.in {
  opacity:   1;
  transform: translateY(0);
}

/* Stagger delays for grouped reveals */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }


/* ─────────────────────────────────────────
   10. MARQUEE / TICKER ANIMATION
   ───────────────────────────────────────── */
.marquee-track { animation: marquee 28s linear infinite; }

@keyframes marquee {
  from { transform: translateX(0);    }
  to   { transform: translateX(-50%); }
}


/* ─────────────────────────────────────────
   11. FLOATING ICON ANIMATIONS
   ───────────────────────────────────────── */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px)   rotate(0deg);  }
  50%       { transform: translateY(-15px) rotate(3deg);  }
}

@keyframes float-medium {
  0%, 100% { transform: translateY(0px)   rotate(0deg);  }
  50%       { transform: translateY(-25px) rotate(-3deg); }
}

@keyframes float-fast {
  0%, 100% { transform: translateY(0px)   scale(1);    }
  50%       { transform: translateY(-20px) scale(1.05); }
}

@keyframes float-pulse {
  0%, 100% { transform: translateY(0px)   scale(1);    opacity: 0.8; }
  50%       { transform: translateY(-10px) scale(1.08); opacity: 1;   }
}

.float-1 { animation: float-slow   6s ease-in-out infinite; }
.float-2 { animation: float-medium 7s ease-in-out infinite; }
.float-3 { animation: float-fast   5s ease-in-out infinite; }
.float-4 { animation: float-medium 8s ease-in-out infinite alternate-reverse; }
.float-5 { animation: float-pulse  4s ease-in-out infinite; }


/* ─────────────────────────────────────────
   12. FADE & SLIDE-IN ANIMATIONS
   ───────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0);     }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0);    }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1);   }
}

/* Utility classes for one-shot entrance animations */
.anim-fade-up    { animation: fade-up        0.7s ease both; }
.anim-fade-in    { animation: fade-in        0.6s ease both; }
.anim-slide-left { animation: slide-in-left  0.7s ease both; }
.anim-slide-right{ animation: slide-in-right 0.7s ease both; }
.anim-scale-in   { animation: scale-in       0.6s ease both; }

.anim-delay-100 { animation-delay: 0.10s; }
.anim-delay-200 { animation-delay: 0.20s; }
.anim-delay-300 { animation-delay: 0.30s; }
.anim-delay-400 { animation-delay: 0.40s; }
.anim-delay-500 { animation-delay: 0.50s; }
.anim-delay-600 { animation-delay: 0.60s; }
.anim-delay-700 { animation-delay: 0.70s; }
.anim-delay-800 { animation-delay: 0.80s; }


/* ─────────────────────────────────────────
   13. GLOW / PULSE EFFECTS & BORDER SHIMMER
   ───────────────────────────────────────── */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px -4px rgba(139, 92, 246, 0.4); }
  50%       { box-shadow: 0 0 40px -4px rgba(139, 92, 246, 0.8); }
}

@keyframes glow-cyan {
  0%, 100% { box-shadow: 0 0 20px -4px rgba(34, 211, 238, 0.4); }
  50%       { box-shadow: 0 0 40px -4px rgba(34, 211, 238, 0.8); }
}

.glow-accent { animation: glow-pulse 3s ease-in-out infinite; }
.glow-cyan   { animation: glow-cyan  3s ease-in-out infinite; }

@keyframes border-shimmer {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

.border-shimmer {
  position:        relative;
  border:          1px solid transparent;
  background-clip: padding-box;
}

.border-shimmer::before {
  content:         '';
  position:        absolute;
  inset:           -1px;
  border-radius:   inherit;
  background:      linear-gradient(135deg, #8b5cf6, #22d3ee, #8b5cf6);
  background-size: 200% 200%;
  animation:       border-shimmer 4s ease infinite;
  z-index:         -1;
}


/* ─────────────────────────────────────────
   14. SPIN / ROTATE ANIMATIONS
   ───────────────────────────────────────── */
@keyframes spin-slow    { from { transform: rotate(0deg);   } to { transform: rotate(360deg); } }
@keyframes spin-reverse { from { transform: rotate(360deg); } to { transform: rotate(0deg);   } }

.spin-slow    { animation: spin-slow    12s linear infinite; }
.spin-reverse { animation: spin-reverse 10s linear infinite; }


/* ─────────────────────────────────────────
   15. COUNTER / NUMBER TICKER STYLES
   ───────────────────────────────────────── */
.stat-number {
  font-family:          'Plus Jakarta Sans', sans-serif;
  font-weight:          800;
  font-size:            clamp(36px, 4vw, 56px);
  letter-spacing:       -1px;
  font-variant-numeric: tabular-nums;
  color:                var(--heading);
}

.stat-label {
  font-family:    'Inter', sans-serif;
  font-weight:    500;
  font-size:      14px;
  color:          var(--light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}


/* ─────────────────────────────────────────
   16. BADGE / TAG CHIPS
   ───────────────────────────────────────── */
.badge {
  display:        inline-flex;
  align-items:    center;
  gap:            6px;
  padding:        4px 12px;
  border-radius:  100px;
  font-family:    'Inter', sans-serif;
  font-weight:    500;
  font-size:      13px;
  letter-spacing: 0.3px;
}

.badge-accent {
  background: rgba(139, 92, 246, 0.12);
  border:     1px solid rgba(139, 92, 246, 0.30);
  color:      #c4b5fd;
}

.badge-cyan {
  background: rgba(34, 211, 238, 0.10);
  border:     1px solid rgba(34, 211, 238, 0.25);
  color:      #67e8f9;
}

.badge-warm {
  background: rgba(251, 191, 36, 0.10);
  border:     1px solid rgba(251, 191, 36, 0.25);
  color:      #fde68a;
}


/* ─────────────────────────────────────────
   17. SECTION DIVIDERS
   ───────────────────────────────────────── */
.divider-gradient {
  height:     1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.4), transparent);
}

.divider-fade {
  height:     1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
}


/* ─────────────────────────────────────────
   18. GLASSMORPHISM PANEL
   ───────────────────────────────────────── */
.glass {
  background:              rgba(20, 20, 28, 0.6);
  border:                  1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter:         blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass-light {
  background:              rgba(255, 255, 255, 0.04);
  border:                  1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter:         blur(8px);
  -webkit-backdrop-filter: blur(8px);
}


/* ─────────────────────────────────────────
   19. PROGRESS BAR
   ───────────────────────────────────────── */
@keyframes progress-fill {
  from { width: 0%; }
}

.progress-bar {
  height:        6px;
  border-radius: 100px;
  background:    rgba(255, 255, 255, 0.06);
  overflow:      hidden;
}

.progress-bar__fill {
  height:        100%;
  border-radius: 100px;
  background:    linear-gradient(90deg, #8b5cf6, #22d3ee);
  animation:     progress-fill 1.2s ease both;
}


/* ─────────────────────────────────────────
   20. TOOLTIP  (via data-tip attribute)
   ───────────────────────────────────────── */
[data-tip] { position: relative; }

[data-tip]::after {
  content:        attr(data-tip);
  position:       absolute;
  bottom:         calc(100% + 8px);
  left:           50%;
  transform:      translateX(-50%) scale(0.9);
  background:     #1e1e2a;
  border:         1px solid rgba(255, 255, 255, 0.09);
  color:          var(--heading-2);
  font-size:      12px;
  font-family:    'Inter', sans-serif;
  white-space:    nowrap;
  padding:        5px 10px;
  border-radius:  6px;
  pointer-events: none;
  opacity:        0;
  transition:     opacity 0.2s ease, transform 0.2s ease;
}

[data-tip]:hover::after {
  opacity:   1;
  transform: translateX(-50%) scale(1);
}


/* ─────────────────────────────────────────
   21. FOCUS / ACCESSIBILITY
   ───────────────────────────────────────── */
:focus-visible {
  outline:        2px solid var(--accent);
  outline-offset: 3px;
}


/* ─────────────────────────────────────────
   23. ECOSYSTEM / BREADCRUMB FLOATING ICONS
   Used in hero/breadcrumb sections of all
   main pages (about, services, portfolio,
   blog, contact).
   ───────────────────────────────────────── */

/* Wrapper that holds all floating icons (positioned relative to section) */
.icon-ecosystem {
  position: absolute;
  inset:    0;
}

/* Base icon container */
.ecosystem-icon {
  position:                absolute;
  display:                 flex;
  align-items:             center;
  justify-content:         center;
  border-radius:           20px;
  background:              rgba(255, 255, 255, 0.03);
  backdrop-filter:         blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border:                  1px solid rgba(255, 255, 255, 0.05);
  will-change:             transform;
  transition:              all 0.3s ease;
}

.ecosystem-icon:hover {
  transform:        scale(1.1) !important;
  background:       rgba(255, 255, 255, 0.10);
  border-color:     rgba(255, 255, 255, 0.20);
  z-index:          50;
}

/* ── Depth layers ── */
.eco-depth-front {
  z-index: 30;
  filter:  drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

.eco-depth-mid {
  z-index:  20;
  filter:   blur(1px) drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
  opacity:  0.8;
}

.eco-depth-back {
  z-index:   10;
  filter:    blur(3px);
  opacity:   0.5;
  transform: scale(0.8);
}

/* ── Glow variants ── */
.eco-glow-blue {
  box-shadow:
    0 0 20px rgba(56, 189, 248, 0.15),
    inset 0 0 10px rgba(56, 189, 248, 0.10);
}

.eco-glow-purple {
  box-shadow:
    0 0 20px rgba(124, 58, 237, 0.15),
    inset 0 0 10px rgba(124, 58, 237, 0.10);
}

/* ── Keyframe animations ── */
@keyframes ecoFloat1 {
  0%,  100% { transform: translate(0,    0)    rotate(0deg)  scale(1);    }
  25%        { transform: translate(15px, -20px) rotate(5deg)  scale(1.05); }
  50%        { transform: translate(-10px,-30px) rotate(-5deg) scale(0.95); }
  75%        { transform: translate(-20px, 10px) rotate(2deg)  scale(1.02); }
}

@keyframes ecoFloat2 {
  0%,  100% { transform: translate(0,    0)    rotate(0deg)  scale(1);    }
  33%        { transform: translate(-20px, 15px) rotate(-8deg) scale(0.90); }
  66%        { transform: translate(10px,  25px) rotate(6deg)  scale(1.10); }
}

@keyframes ecoFloat3 {
  0%,  100% { transform: translate(0,    0)    rotate(0deg);  }
  50%        { transform: translate(25px, 25px) rotate(10deg); }
}

@keyframes ecoFloat4 {
  0%,  100% { transform: translate(0,    0)    rotate(0deg)  scale(1);    }
  25%        { transform: translate(-15px,-15px) rotate(-5deg) scale(1.05); }
  50%        { transform: translate(10px, -25px) rotate(5deg)  scale(0.95); }
  75%        { transform: translate(20px,  15px) rotate(-2deg) scale(1.02); }
}

@keyframes ecoFloat5 {
  0%,  100% { transform: translate(0,    0)    rotate(0deg)  scale(1);    }
  33%        { transform: translate(20px, -15px) rotate(8deg)  scale(0.90); }
  66%        { transform: translate(-10px,-25px) rotate(-6deg) scale(1.10); }
}

@keyframes ecoFloat6 {
  0%,  100% { transform: translate(0,    0)    rotate(0deg);   }
  50%        { transform: translate(-25px,-25px) rotate(-10deg); }
}

/* ── Float utility classes ── */
.eco-float-1 { animation: ecoFloat1 18s ease-in-out infinite; }
.eco-float-2 { animation: ecoFloat2 22s ease-in-out infinite; }
.eco-float-3 { animation: ecoFloat3 25s ease-in-out infinite; }
.eco-float-4 { animation: ecoFloat4 19s ease-in-out infinite; }
.eco-float-5 { animation: ecoFloat5 23s ease-in-out infinite; }
.eco-float-6 { animation: ecoFloat6 26s ease-in-out infinite; }


/* ─────────────────────────────────────────
   24. FORM INPUTS & SUCCESS MODAL
   ───────────────────────────────────────── */
.input-field {
  width:           100%;
  background:      rgba(255, 255, 255, 0.05) !important;
  border:          1px solid rgba(255, 255, 255, 0.15) !important;
  color:           #ffffff !important;
  border-radius:   0.75rem !important;
  padding:         1rem 1.25rem !important;
  font-size:       1rem !important;
  transition:      all 0.3s ease !important;
}

.input-field:focus {
  outline:      none !important;
  border-color: #8b5cf6 !important;
  background:   rgba(139, 92, 246, 0.08) !important;
  box-shadow:   0 0 0 4px rgba(139, 92, 246, 0.15) !important;
}

.input-field::placeholder {
  color: #9ca3af !important;
}

select.input-field {
  appearance:          none !important;
  background-image:    url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%239ca3af%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E') !important;
  background-repeat:   no-repeat !important;
  background-position: right 1.25rem top 50% !important;
  background-size:     0.65rem auto !important;
}

select.input-field option {
  background: #121218 !important;
  color:      white !important;
}

/* Modal default hidden state & transition */
#successModal {
  opacity:        0;
  pointer-events: none;
  transition:     opacity 0.3s ease;
}

#successModal.show {
  opacity:        1;
  pointer-events: auto;
}

#modalContent {
  transform:  translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#successModal.show #modalContent {
  transform: translateY(0) scale(1);
}


/* ─────────────────────────────────────────
   22. REDUCED MOTION OVERRIDES
   (always last for correct cascade priority)
   ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:        0.01ms !important;
    animation-iteration-count: 1      !important;
    transition-duration:       0.01ms !important;
    scroll-behavior:           auto   !important;
  }

  .reveal {
    opacity:   1    !important;
    transform: none !important;
  }

  .marquee-track {
    animation: none !important;
  }
}
