/* ============================================
   EFPIC LINKS — Link Hub Theme
   ============================================ */

:root {
  --color-bg: #0a0a0a;
  --color-bg-card: rgba(26, 26, 26, 0.72);
  --color-bg-card-hover: rgba(34, 34, 34, 0.9);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(196, 112, 90, 0.4);
  --color-text: #f5f0eb;
  --color-text-muted: #9a9590;
  --color-accent: #c4705a;
  --color-accent-light: #d4896f;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --radius: 16px;
  --radius-lg: 24px;
  --max-width: 520px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---- Background effects ---- */
.bg-effects {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-effects__image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.02);
}

.bg-effects__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.75) 55%, rgba(0, 0, 0, 0.9) 100%);
}

body.has-bg-image .bg-effects__gradient {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(196, 112, 90, 0.14), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(196, 112, 90, 0.05), transparent 50%),
    transparent;
}

.bg-effects__gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(196, 112, 90, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(196, 112, 90, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 40% at 0% 80%, rgba(100, 80, 70, 0.08), transparent 50%),
    var(--color-bg);
}

.bg-effects__grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.bg-effects__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 12s ease-in-out infinite;
}

.bg-effects__orb--1 {
  width: 300px;
  height: 300px;
  top: -80px;
  right: -60px;
  background: rgba(196, 112, 90, 0.12);
}

.bg-effects__orb--2 {
  width: 250px;
  height: 250px;
  bottom: 10%;
  left: -80px;
  background: rgba(150, 100, 80, 0.08);
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -15px) scale(1.05); }
}

/* ---- Layout ---- */
.hub {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 20px 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Hero / Profile ---- */
.hub__hero {
  text-align: center;
  margin-bottom: 40px;
}

.hub__avatar {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(196, 112, 90, 0.3);
  box-shadow: 0 8px 40px rgba(196, 112, 90, 0.15);
  animation: avatar-glow 4s ease-in-out infinite;
}

.hub__avatar--circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
}

.hub__avatar--square {
  width: 120px;
  height: 120px;
  border-radius: 18px;
}

.hub__avatar--oval {
  width: 108px;
  height: 140px;
  border-radius: 50%;
}

.hub__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center center;
  will-change: transform;
}

.hub__avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 500;
  color: #fff;
}

@keyframes avatar-glow {
  0%, 100% { box-shadow: 0 8px 40px rgba(196, 112, 90, 0.15); }
  50% { box-shadow: 0 8px 50px rgba(196, 112, 90, 0.3); }
}

.hub__eyebrow {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.hub__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 8px;
}

.hub__tagline {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 360px;
  margin: 0 auto;
}

/* ---- Link cards ---- */
.hub__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(196, 112, 90, 0.08), transparent 60%);
  opacity: 0;
  transition: var(--transition);
}

.link-card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(196, 112, 90, 0.1);
}

.link-card:hover::before {
  opacity: 1;
}

.link-card:hover .link-card__arrow {
  transform: translateX(4px);
  color: var(--color-accent);
}

.link-card--featured {
  padding: 22px 20px;
  border-color: rgba(196, 112, 90, 0.25);
  background: linear-gradient(135deg, rgba(196, 112, 90, 0.12), var(--color-bg-card));
}

.link-card--has-thumb.link-card--featured {
  padding: 16px 20px;
}

.link-card__thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.2);
}

.link-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.link-card--featured .link-card__thumb {
  width: 80px;
  height: 80px;
  border-radius: 16px;
}

.link-card__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(196, 112, 90, 0.12);
  border-radius: 12px;
  color: var(--color-accent);
}

.link-card__icon .icon {
  width: 22px;
  height: 22px;
}

.link-card__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-card__title {
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.link-card__desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card__arrow {
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: var(--transition);
}

.link-card__arrow .icon {
  width: 20px;
  height: 20px;
}

.link-card__badge {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(196, 112, 90, 0.15);
  padding: 3px 8px;
  border-radius: 100px;
}

/* ---- Social buttons ---- */
.hub__socials {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.social-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: var(--transition);
}

.social-btn .icon {
  width: 18px;
  height: 18px;
}

.social-btn:hover {
  color: var(--color-accent);
  border-color: var(--color-border-hover);
  background: rgba(196, 112, 90, 0.1);
  transform: translateY(-2px);
}

/* ---- Footer ---- */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 16px 20px 32px;
}

.site-footer__copy {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.site-footer__copy a {
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.site-footer__copy a:hover {
  color: var(--color-accent);
}

/* ---- QR publiskajā lapā ---- */
.hub__qr {
  margin-top: 32px;
  text-align: center;
}

.hub__qr-label {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.hub__qr-image {
  display: inline-block;
  padding: 12px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* ---- Cookie consent ---- */
.edgars-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  padding: 16px;
}

.edgars-cookie-banner__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px;
  background: rgba(20, 20, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.edgars-cookie-banner__text {
  margin: 0 0 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.edgars-cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edgars-cookie-banner__btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.875rem;
  cursor: pointer;
}

.edgars-cookie-banner__btn--accept {
  background: var(--color-accent);
  color: #fff;
}

.edgars-cookie-banner__btn--decline {
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ---- Reveal animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hub__hero.reveal {
  transition-delay: 0s;
}

/* ---- Responsive ---- */
@media (min-width: 540px) {
  .hub {
    padding-top: 64px;
  }

  .link-card {
    padding: 20px 24px;
  }

  .link-card__title {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
