:root {
  --bg: #050816;
  --bg-soft: #090d20;
  --text: #f7f8ff;
  --muted: #8d96b7;
  --purple: 141, 93, 246;
  --blue: 56, 189, 248;
  --green: 52, 211, 153;
  --orange: 249, 151, 62;
  --status: 132, 92, 246;
  --share: 45, 212, 191;
  --vault: 168, 85, 247;
  --notify: 250, 204, 21;
  --birds: 96, 165, 250;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% -12%, rgba(93, 74, 255, .13), transparent 35%),
    radial-gradient(circle at 82% 32%, rgba(0, 172, 255, .06), transparent 30%),
    linear-gradient(180deg, #030613 0%, #060a19 48%, #070a18 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, #000 15%, transparent 80%);
}

.ambient {
  position: fixed;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .055;
  pointer-events: none;
  animation: ambientMove 14s ease-in-out infinite alternate;
}

.ambient-one { left: -16rem; top: 20%; background: #6947ff; }
.ambient-two { right: -18rem; top: 42%; background: #08b8ff; animation-delay: -6s; }

.cursor-glow {
  position: fixed;
  z-index: 0;
  left: 0;
  top: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(102, 87, 255, .09), transparent 65%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .25s ease;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 28px;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.logo-stage {
  position: relative;
  width: min(430px, 80vw);
  margin: 0 auto;
}

.logo-halo {
  position: absolute;
  inset: 19% 12% 20%;
  background: radial-gradient(circle, rgba(99, 92, 255, .18), rgba(0, 172, 255, .06) 42%, transparent 72%);
  filter: blur(26px);
  animation: haloPulse 4s ease-in-out infinite;
}

.hero-logo {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(88, 100, 255, .18));
  animation: logoFloat 6s ease-in-out infinite;
  user-select: none;
  -webkit-user-drag: none;
}

.tagline {
  margin: 8px 0 0;
  position: relative;
  z-index: 2;
  color: var(--muted);
  font-size: clamp(.98rem, 2vw, 1.18rem);
  letter-spacing: .01em;
}

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  width: min(900px, 100%);
  margin: 42px auto 0;
}

.service-card {
  --accent: var(--purple);
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 164px;
  padding: 24px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(var(--accent), .36);
  color: inherit;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(var(--accent), .07), transparent 50%),
    linear-gradient(180deg, rgba(15, 20, 48, .90), rgba(8, 12, 31, .92));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.035),
    0 20px 45px rgba(0,0,0,.25),
    0 0 0 1px rgba(255,255,255,.015);
  backdrop-filter: blur(12px);
  transform-style: preserve-3d;
  transition:
    transform .28s cubic-bezier(.2,.8,.2,1),
    border-color .28s ease,
    box-shadow .28s ease,
    background .28s ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent), .16), transparent 62%);
  transition: opacity .25s ease;
}

.service-card::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -72px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(var(--accent), .09);
  filter: blur(42px);
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-7px) scale(1.012);
  border-color: rgba(var(--accent), .78);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 26px 55px rgba(0,0,0,.35),
    0 0 28px rgba(var(--accent), .12);
}

.service-card:hover::before { opacity: 1; }
.service-card:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 5px; }

.tone-purple { --accent: var(--purple); }
.tone-blue { --accent: var(--blue); }
.tone-green { --accent: var(--green); }
.tone-orange { --accent: var(--orange); }
.tone-status { --accent: var(--status); }
.tone-share { --accent: var(--share); }
.tone-vault { --accent: var(--vault); }
.tone-notify { --accent: var(--notify); }
.tone-birds { --accent: var(--birds); }

.card-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.card-shine::after {
  content: "";
  position: absolute;
  top: -90%;
  left: -65%;
  width: 40%;
  height: 260%;
  transform: rotate(20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  transition: left .65s cubic-bezier(.2,.8,.2,1);
}

.service-card:hover .card-shine::after { left: 135%; }

.service-icon {
  position: relative;
  display: grid;
  flex: 0 0 82px;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 1px solid rgba(var(--accent), .25);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(var(--accent), .10), rgba(255,255,255,.015) 58%),
    rgba(3, 7, 20, .42);
  box-shadow: inset 0 0 24px rgba(var(--accent), .03);
  transition: transform .28s ease, box-shadow .28s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.05) rotate(-2deg);
  box-shadow: inset 0 0 24px rgba(var(--accent), .07), 0 0 24px rgba(var(--accent), .10);
}

.line-icon svg {
  width: 46px;
  height: 46px;
  fill: none;
  stroke: rgb(var(--accent));
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px rgba(var(--accent), .28));
}


.birdnet-icon {
  overflow: hidden;
  padding: 0;
  background: transparent;
  border-color: rgba(var(--accent), .25);
}

.birdnet-icon img {
  display: block;
  width: 76%;
  height: 76%;
  object-fit: contain;
  transform: none;
  filter: drop-shadow(0 0 10px rgba(var(--accent), .18));
}

.service-card:hover .birdnet-icon img {
  transform: scale(1.04);
  transition: transform .28s ease;
}

.immich-icon {
  transform: rotate(-8deg);
}

.immich-icon span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 29px;
  border-radius: 999px 999px 60% 60%;
  transform-origin: 50% 87%;
  background: hsl(calc(var(--i) * 58deg), 78%, 65%);
}
.immich-icon span:nth-child(1) { --i: 0; transform: translate(-50%,-88%) rotate(0deg); }
.immich-icon span:nth-child(2) { --i: 1; transform: translate(-50%,-88%) rotate(60deg); }
.immich-icon span:nth-child(3) { --i: 2; transform: translate(-50%,-88%) rotate(120deg); }
.immich-icon span:nth-child(4) { --i: 3; transform: translate(-50%,-88%) rotate(180deg); }
.immich-icon span:nth-child(5) { --i: 4; transform: translate(-50%,-88%) rotate(240deg); }
.immich-icon span:nth-child(6) { --i: 5; transform: translate(-50%,-88%) rotate(300deg); }

.service-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.service-copy strong {
  font-size: clamp(1.3rem, 2vw, 1.68rem);
  font-weight: 690;
  letter-spacing: -.025em;
}

.service-copy small {
  color: var(--muted);
  font-size: 1rem;
}

.arrow {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid rgba(var(--accent), .26);
  border-radius: 50%;
  color: rgb(var(--accent));
  background: rgba(var(--accent), .11);
  font-size: 1.65rem;
  line-height: 1;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.service-card:hover .arrow {
  transform: translateX(4px);
  background: rgba(var(--accent), .18);
  box-shadow: 0 0 20px rgba(var(--accent), .14);
}

.status-icon::before,
.status-icon::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.status-icon::before { width: 44px; height: 44px; background: rgba(255,255,255,.12); box-shadow: inset 0 0 14px rgba(255,255,255,.06); }
.status-icon::after { width: 34px; height: 34px; background: rgba(52, 211, 153, .16); }
.status-dot {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #62e5aa;
  box-shadow: 0 0 0 7px rgba(98,229,170,.14), 0 0 20px rgba(98,229,170,.46);
  animation: statusPulse 2.2s ease-out infinite;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 42px;
  color: #7f88a7;
  font-size: .98rem;
}

.paw { color: #9170ff; filter: saturate(1.2); }
.separator { width: 1px; height: 22px; background: rgba(255,255,255,.14); }
.shield { width: 21px; height: 21px; fill: none; stroke: #69738f; stroke-width: 1.8; }

.reveal {
  opacity: 0;
  transform: translateY(18px) scale(.985);
  transition: opacity .72s ease, transform .72s cubic-bezier(.2,.75,.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0) scale(1); }

@keyframes logoFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@keyframes haloPulse {
  0%,100% { opacity: .68; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(98,229,170,.33), 0 0 20px rgba(98,229,170,.4); }
  70% { box-shadow: 0 0 0 13px rgba(98,229,170,0), 0 0 20px rgba(98,229,170,.4); }
  100% { box-shadow: 0 0 0 0 rgba(98,229,170,0), 0 0 20px rgba(98,229,170,.4); }
}

@keyframes ambientMove {
  from { transform: translate3d(0, -20px, 0) scale(.95); }
  to { transform: translate3d(60px, 30px, 0) scale(1.08); }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 20px, 1160px); padding-top: 22px; }
  .logo-stage { width: min(360px, 94vw); }
  .tagline { margin-top: 10px; }
  .services { grid-template-columns: 1fr; gap: 14px; margin-top: 34px; }
  .service-card { width: 100%; min-height: 126px; padding: 18px; border-radius: 20px; }
  .service-icon { width: 66px; height: 66px; flex-basis: 66px; }
  .line-icon svg { width: 38px; height: 38px; }
  .arrow { width: 40px; height: 40px; flex-basis: 40px; }
  .footer { margin-top: 30px; flex-wrap: wrap; gap: 10px; }
  .cursor-glow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}


/* Footer navigation / admin page */
.footer-link {
  color: #8d96b7;
  text-decoration: none;
  transition: color .22s ease, text-shadow .22s ease;
}
.footer-link:hover,
.footer-link:focus-visible {
  color: #c8cfff;
  text-shadow: 0 0 14px rgba(141, 93, 246, .35);
}
.footer-link:focus-visible {
  outline: 2px solid rgba(141, 93, 246, .8);
  outline-offset: 4px;
  border-radius: 4px;
}

.footer-link--icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.admin-hero { margin-bottom: 10px; }
.admin-logo-link { display: inline-block; color: inherit; text-decoration: none; }
.admin-logo-stage { width: min(330px, 72vw); }
.admin-tagline { margin-top: 4px; font-size: 1.1rem; }
.admin-services { margin-top: 30px; }
