/* ── Tokens — Dark Mode (Deep Ocean) ──────────────────────── */
:root {
  /* Color */
  --bg:             #030e1c;
  --text-primary:   #ffffff;
  --text-muted:     #7a9ab8;
  --card-bg:        rgba(255, 255, 255, 0.07);
  --card-border:    rgba(255, 255, 255, 0.12);
  --btn-bg:         rgba(255, 255, 255, 0.07);
  --btn-hover-bg:   rgba(255, 255, 255, 0.14);
  --divider:        rgba(255, 255, 255, 0.10);
  --accent:         #3b9eff;
  --accent-glow:    rgba(59, 158, 255, 0.35);
  --sponsor-accent: #f5a623;
  --sponsor-glow:   rgba(245, 166, 35, 0.35);
  --blob-1:         rgba(0,  80, 200, 0.50);
  --blob-2:         rgba(0, 160, 190, 0.35);
  --blob-3:         rgba(0,  30, 110, 0.65);
  --shadow-depth:   rgba(3, 14, 28, 0.25);

  /* Typography */
  --font-sans:     'Outfit', system-ui, sans-serif;
  --text-xs:       0.75rem;
  --text-sm:       0.875rem;
  --text-base:     1rem;
  --text-xl:       clamp(1.5rem, 4.5vw, 1.875rem);
  --leading-tight: 1.1;
  --leading-ui:    1.2;
  --leading-loose: 1.4;
}

/* ── Tokens — Light Mode (Sunlit Shallows) ────────────────── */
@media (prefers-color-scheme: light) {
  :root {
    --bg:             #e6f1fb;
    --text-primary:   #0a1628;
    --text-muted:     #4a6080;
    --card-bg:        rgba(255, 255, 255, 0.72);
    --card-border:    rgba(15, 40, 80, 0.12);
    --btn-bg:         rgba(15, 40, 80, 0.05);
    --btn-hover-bg:   rgba(15, 40, 80, 0.10);
    --divider:        rgba(15, 40, 80, 0.10);
    --accent:         #1464c8;
    --accent-glow:    rgba(20, 100, 200, 0.20);
    --sponsor-accent: #7d4d00;
    --sponsor-glow:   rgba(125, 77, 0, 0.20);
    --blob-1:         rgba(100, 180, 255, 0.30);
    --blob-2:         rgba(150, 210, 240, 0.25);
    --blob-3:         rgba(180, 225, 255, 0.40);
    --shadow-depth:   rgba(10, 22, 40, 0.15);
  }
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  background: var(--bg);
  position: relative;
}

/* ── Water background ─────────────────────────────────────── */
.water-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  overflow: hidden;
}

/*
  Caustic shapes — irregular, rotating ellipses that simulate
  light refracting through a water surface. Rotation is key:
  water warps light, it doesn't just translate it.
*/
.water-blob {
  position: absolute;
  filter: blur(72px);
  pointer-events: none;
}

.water-blob--1 {
  width: 75vw;
  height: 55vw;
  max-width: 850px;
  max-height: 620px;
  border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
  background: radial-gradient(ellipse, var(--blob-1) 0%, transparent 70%);
  top: -20%;
  left: -20%;
  animation: caustic1 28s ease-in-out infinite;
  will-change: transform;
}

.water-blob--2 {
  width: 60vw;
  height: 75vw;
  max-width: 650px;
  max-height: 800px;
  border-radius: 37% 63% 46% 54% / 48% 55% 45% 52%;
  background: radial-gradient(ellipse, var(--blob-2) 0%, transparent 70%);
  bottom: -30%;
  right: -15%;
  animation: caustic2 22s ease-in-out infinite;
  will-change: transform;
}

.water-blob--3 {
  width: 50vw;
  height: 40vw;
  max-width: 560px;
  max-height: 450px;
  border-radius: 54% 46% 37% 63% / 45% 52% 48% 55%;
  background: radial-gradient(ellipse, var(--blob-3) 0%, transparent 70%);
  top: 30%;
  left: 20%;
  animation: caustic3 18s ease-in-out infinite;
  will-change: transform;
}

@keyframes caustic1 {
  0%, 100% { transform: translate(0, 0)      rotate(0deg)   scale(1);    }
  25%       { transform: translate(8vw, 12vh) rotate(8deg)   scale(1.06); }
  50%       { transform: translate(4vw, 20vh) rotate(-4deg)  scale(0.94); }
  75%       { transform: translate(-6vw, 9vh) rotate(12deg)  scale(1.03); }
}

@keyframes caustic2 {
  0%, 100% { transform: translate(0, 0)        rotate(0deg)    scale(1);    }
  33%       { transform: translate(-14vw, -9vh) rotate(-10deg)  scale(1.10); }
  66%       { transform: translate(-6vw, -18vh) rotate(6deg)    scale(0.90); }
}

@keyframes caustic3 {
  0%, 100% { transform: translate(0, 0)       rotate(0deg)  scale(1);    }
  50%       { transform: translate(-10vw,-6vh) rotate(-8deg) scale(1.15); }
}

/* ── Layout container ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 460px;
  padding: clamp(1rem, 4vw, 1.5rem);
}

/* ── Card ─────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: clamp(16px, 4vw, 20px);
  padding: clamp(1.5rem, 5vw, 2.5rem) clamp(1.25rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: cardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo ─────────────────────────────────────────────────── */
.logo {
  width: clamp(72px, 20vw, 90px);
  height: clamp(72px, 20vw, 90px);
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
  background: var(--btn-bg);
}

/* ── Name — split logotype: Umi (ocean) + VR (technology) ── */
.name {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.name-umi { color: var(--accent); }
.name-vr  { color: var(--text-primary); }

/* ── Links nav ────────────────────────────────────────────── */
.links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  margin-bottom: 0.5rem;
}

/* ── Individual link button ───────────────────────────────── */
.link-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.25rem;  /* 14px × 2 + ~18px line-height = 46px touch target */
  background: var(--btn-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: var(--leading-ui);
  letter-spacing: -0.01em;
  text-decoration: none;
  /* Base: slow-out (returning to rest feels unhurried) */
  transition:
    background 0.25s ease-in,
    transform  0.25s ease-in,
    box-shadow 0.25s ease-in;
  /* Stagger entrance — stays invisible until animation fires */
  opacity: 0;
  animation: fadeSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Staggered delays — card lands at ~0.5s, buttons follow */
.links a:nth-child(1) { animation-delay: 0.10s; }
.links a:nth-child(2) { animation-delay: 0.15s; }
.links a:nth-child(3) { animation-delay: 0.20s; }
.links a:nth-child(4) { animation-delay: 0.25s; }
.links a:nth-child(5) { animation-delay: 0.30s; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.link-icon {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}

/* Hover: fast-in (snappy response) */
.link-btn:hover {
  background: var(--btn-hover-bg);
  transform: translateY(-3px);
  /* Directional glow — light comes from the surface above */
  box-shadow:
    0 -4px 16px var(--accent-glow),
    0  6px 12px var(--shadow-depth);
  transition:
    background 0.15s ease-out,
    transform  0.15s ease-out,
    box-shadow 0.15s ease-out;
}

/* Focus: same lift + explicit ring for keyboard users */
.link-btn:focus-visible {
  background: var(--btn-hover-bg);
  transform: translateY(-3px);
  box-shadow:
    0 -4px 16px var(--accent-glow),
    0  6px 12px var(--shadow-depth);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  transition:
    background 0.15s ease-out,
    transform  0.15s ease-out,
    box-shadow 0.15s ease-out;
}

/* Press: tactile scale-down */
.link-btn:active {
  transform: translateY(-1px) scale(0.97);
  transition: transform 0.08s ease-out;
}

/* ── Contact email ────────────────────────────────────────── */
.contact-email {
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  color: var(--text-muted);
  text-decoration: none;
  margin-top: 0.25rem;
  /* Invisible padding expands tap area to ~44px without affecting visual layout */
  padding: 0.75rem 0.25rem;
  margin-left: -0.25rem;
  margin-right: -0.25rem;
  transition: color 0.2s ease;
}

.contact-email:hover {
  color: var(--accent);
}

.contact-email:focus-visible {
  color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--divider);
  margin: 1rem 0 0.75rem;
}

/* ── Sponsor section ──────────────────────────────────────── */
.sponsor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

/* Understated — lowercase, light weight. Confident brands note affiliations, they don't announce them. */
.sponsor-label {
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--sponsor-accent);
}

.sponsor-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: var(--btn-bg);
  border: 1px solid var(--sponsor-accent);
  border-radius: 12px;
  color: var(--sponsor-accent);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    background 0.25s ease-in,
    transform  0.25s ease-in,
    box-shadow 0.25s ease-in;
}

.sponsor-btn--banner {
  padding: 0;
  overflow: hidden;
  justify-content: stretch;
}

.sponsor-banner {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 11px;
}

.sponsor-btn:hover {
  background: var(--btn-hover-bg);
  transform: translateY(-3px);
  box-shadow:
    0 -4px 16px var(--sponsor-glow),
    0  6px 12px var(--shadow-depth);
  transition:
    background 0.15s ease-out,
    transform  0.15s ease-out,
    box-shadow 0.15s ease-out;
}

.sponsor-btn:focus-visible {
  background: var(--btn-hover-bg);
  transform: translateY(-3px);
  box-shadow:
    0 -4px 16px var(--sponsor-glow),
    0  6px 12px var(--shadow-depth);
  outline: 2px solid var(--sponsor-accent);
  outline-offset: 2px;
  transition:
    background 0.15s ease-out,
    transform  0.15s ease-out,
    box-shadow 0.15s ease-out;
}

.sponsor-btn:active {
  transform: translateY(-1px) scale(0.97);
  transition: transform 0.08s ease-out;
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .water-blob {
    animation: none;
  }

  .card {
    animation: none;
    opacity: 1;
  }

  /* Prevent staggered buttons from staying invisible */
  .link-btn {
    animation: none;
    opacity: 1;
  }

  .link-btn:hover,
  .link-btn:focus-visible,
  .sponsor-btn:hover,
  .sponsor-btn:focus-visible {
    transform: none;
    box-shadow: none;
  }
}
