/* ==========================================================================
   KALINJATHIL LINKS - Redesigned 100vh Luxury Link Hub
   Refined, Architectural, Ultra-Clean Mobile & Desktop Experience
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  /* Colors */
  --bg-dark: #060911;
  --bg-card: rgba(14, 20, 32, 0.65);
  --bg-card-hover: rgba(20, 29, 48, 0.88);
  --border-line: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(212, 175, 55, 0.45);

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Gold & Accent Tones */
  --gold: #d4af37;
  --gold-light: #f5e7b8;
  --gold-glow: rgba(212, 175, 55, 0.25);

  /* Social Icons */
  --color-insta: #e1306c;
  --color-whatsapp: #25d366;
  --color-website: #3b82f6;
  --color-location: #ef4444;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Strict Viewport Lock */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Ambient Lighting & Background Mesh
   ========================================================================== */
.ambient-mesh {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.light-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform, opacity;
  animation: breathe 10s infinite alternate ease-in-out;
}

.glow-gold {
  width: 360px;
  height: 360px;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.22) 0%, rgba(180, 130, 20, 0.03) 70%, transparent 100%);
}

.glow-navy {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(14, 27, 48, 0.6) 0%, rgba(6, 10, 18, 0.05) 70%, transparent 100%);
  animation-duration: 14s;
}

.subtle-grid {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.04) 1px, transparent 0);
  background-size: 28px 28px;
  opacity: 0.7;
}

@keyframes breathe {
  0% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  100% { transform: translateX(-50%) scale(1.12); opacity: 1; }
}

/* ==========================================================================
   Page Wrapper: 100vh Layout Container
   ========================================================================== */
.page-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
}

.card-wrapper {
  width: 100%;
  max-width: 440px;
  height: 100%;
  max-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

/* Fallback for ultra-compact or landscape devices */
@media (max-height: 620px) {
  html, body {
    overflow-y: auto !important;
  }
  .page-wrapper {
    height: auto !important;
    min-height: 100vh;
    padding: 24px 16px;
    align-items: flex-start;
  }
  .card-wrapper {
    height: auto !important;
    max-height: none;
    gap: 20px;
  }
}

/* ==========================================================================
   Brand Header
   ========================================================================== */
.brand-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex-shrink: 0;
  padding-top: 4px;
}

.logo-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.brand-logo {
  max-width: 200px;
  max-height: 52px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s ease;
}

.brand-logo:hover {
  transform: scale(1.03);
}

.tagline {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold-light);
  opacity: 0.9;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulseDot 2.2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

/* ==========================================================================
   Links Stack (4 Redirection Cards)
   ========================================================================== */
.links-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
  justify-content: center;
  padding: 8px 0;
}

.link-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border-line);
  border-radius: 16px;
  padding: 13px 18px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  overflow: hidden;
  transition: transform 0.22s var(--ease-spring), 
              background 0.22s var(--ease-spring), 
              border-color 0.22s var(--ease-spring), 
              box-shadow 0.22s var(--ease-spring);
  cursor: pointer;
}

/* Shimmer Light Reflection on Hover */
.link-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent, 
    rgba(255, 255, 255, 0.08), 
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.link-item:hover::before {
  left: 140%;
}

.link-item:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.5), 0 0 16px var(--gold-glow);
}

.link-item:active {
  transform: scale(0.985);
}

/* Left Group: Icon + Details */
.item-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.item-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: transform 0.22s var(--ease-spring), background 0.22s ease;
}

.link-item:hover .item-icon-box {
  transform: scale(1.08);
}

/* Distinct Brand Icon Accents */
.item-insta .item-icon-box {
  background: linear-gradient(135deg, rgba(225, 48, 108, 0.18), rgba(245, 96, 64, 0.18));
  color: #fd5949;
  border-color: rgba(225, 48, 108, 0.35);
}
.item-insta:hover .item-icon-box {
  background: linear-gradient(135deg, #e1306c, #f56040);
  color: #fff;
  box-shadow: 0 6px 16px rgba(225, 48, 108, 0.4);
}

.item-whatsapp .item-icon-box {
  background: rgba(37, 211, 102, 0.14);
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.35);
}
.item-whatsapp:hover .item-icon-box {
  background: #25d366;
  color: #0b1a30;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.item-website .item-icon-box {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}
.item-website:hover .item-icon-box {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #fff;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.item-location .item-icon-box {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}
.item-location:hover .item-icon-box {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Item Details */
.item-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.item-index {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.item-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.item-meta {
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* Item Arrow */
.item-arrow {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform 0.22s var(--ease-spring), color 0.22s ease;
}

.link-item:hover .item-arrow {
  color: var(--gold);
  transform: translateX(4px);
}

/* ==========================================================================
   Brand Footer
   ========================================================================== */
.brand-footer {
  width: 100%;
  text-align: center;
  flex-shrink: 0;
  padding-bottom: 4px;
}

.brand-footer p {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  opacity: 0.8;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 380px) {
  .page-wrapper {
    padding: 12px 14px;
  }
  .brand-logo {
    max-width: 170px;
  }
  .tagline {
    font-size: 0.65rem;
    letter-spacing: 0.16em;
  }
  .item-icon-box {
    width: 38px;
    height: 38px;
  }
  .link-item {
    padding: 10px 14px;
    border-radius: 14px;
  }
  .item-title {
    font-size: 0.92rem;
  }
  .item-meta {
    font-size: 0.68rem;
  }
}
