/**
 * MIURA design system — Inter + Playfair Display · metallic gold · moving reflections
 *
 * POLICY (Brian 2026-09-09): NON-NEGOTIABLE — keep reflection animations and metallic
 * gradients on all UI surfaces. See OWNER INBOX/MIURA_Metallic_UI_Policy_2026-09-09.md
 * Tokens: data/miura_design_tokens.json · Flutter: mobile/lib/theme/miura_metallic.dart
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,600;1,500&display=swap');

:root {
  /* Product UI (flagship black) */
  --bg: #050505;
  --card: #0C0C0E;
  --card2: #141416;
  /* Deck Slide 51 navy — marketing / optional admin theme */
  --bg-deck: #0A0E1A;
  --card-deck: #12182B;
  --card2-deck: #1E2640;
  /* Metallic gold stack (deck anchor #D4AF37 ≈ mid stop) */
  --gold-deck: #D4AF37;
  --gold: #C5A059;
  --gold-bright: #E8C872;
  --gold-dark: #9A7B3A;
  --gold-highlight: #FFF8E7;
  --text: #F5F5F5;
  --text-secondary: #A0A8C0;
  --muted: #6B7280;
  --muted2: #4B5563;
  /* Slide 51 status colors */
  --success: #22C55E;
  --warn: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;
  --radius: 8px;
  --phone-w: 390px;
  --phone-h: 844px;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  /* Metallic animation timings — do not remove */
  --reflect-duration: 4.5s;
  --reflect-hero-duration: 5.2s;
  --btn-sweep-duration: 3.8s;
  --icon-glint-duration: 4.8s;
  --module-tile-shimmer-duration: 4.8s;
  --module-tile-float-duration: 6.2s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: linear-gradient(145deg, #050810 0%, #1a1f35 100%);
  min-height: 100vh;
}

.display, h1.display, .hero h2.display {
  font-family: var(--font-display);
  font-weight: 600;
}

.gold-metallic,
.gold-num,
.tab.active .label,
.nav-item.active,
.sidebar .brand span.name,
.header h1,
.chip-cap,
.badge-sdk span,
.profile-card.selected .check {
  background: linear-gradient(
    110deg,
    #8B6914 0%, #C5A059 16%, #9A7B3A 30%, #FFF8E7 44%,
    #E8C872 50%, #FFF8E7 56%, #C5A059 70%, #F0D78C 84%, #8B6914 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gold-reflect var(--reflect-duration) ease-in-out infinite;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}

.gold-metallic-hero {
  background: linear-gradient(
    180deg,
    #8B6914 0%, #C5A059 18%, #E8C872 34%, #FFF1C1 46%,
    #FFFFFF 50%, #FFF1C1 54%, #E8C872 66%, #C5A059 82%, #8B6914 100%
  );
  background-size: 100% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gold-reflect-v var(--reflect-hero-duration) ease-in-out infinite;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.4));
}

@keyframes gold-reflect {
  0%, 100% { background-position: 100% 50%; }
  50% { background-position: 0% 50%; }
}
@keyframes gold-reflect-v {
  0%, 100% { background-position: 50% 100%; }
  50% { background-position: 50% 0%; }
}
@keyframes gold-btn-sweep {
  0%, 18% { transform: translateX(-130%); }
  52% { transform: translateX(130%); }
  100% { transform: translateX(130%); }
}
@keyframes gold-icon-glint {
  0%, 100% {
    filter: brightness(1.12) sepia(0.35) saturate(1.85) hue-rotate(8deg)
      drop-shadow(0 1px 2px rgba(232,200,114,.2));
  }
  50% {
    filter: brightness(1.38) sepia(0.45) saturate(2.2) hue-rotate(6deg)
      drop-shadow(0 1px 4px rgba(255,241,193,.45));
  }
}
@keyframes module-tile-shimmer {
  0%, 100% { transform: translateX(-130%) skewX(-12deg); opacity: 0; }
  12% { opacity: 1; }
  48% { transform: translateX(130%) skewX(-12deg); opacity: 1; }
  60%, 100% { opacity: 0; }
}
@keyframes module-tile-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@keyframes module-tile-glow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .gold-metallic, .gold-metallic-hero, .gold-num, .btn-gold::after,
  .module-icon-cell img, .miura-module-tile, .miura-module-tile::before,
  .miura-module-tile::after, .miura-module-tile__icon, .tab.active .icon img {
    animation: none !important;
  }
}

.btn-gold {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #FFF1C1 0%, #E8C872 28%, #C5A059 55%, #9A7B3A 80%, #E8C872 100%);
  color: #1a1408;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
}
.btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.45) 50%, transparent 60%);
  animation: gold-btn-sweep var(--btn-sweep-duration) ease-in-out infinite;
  pointer-events: none;
}

.module-icon-grid,
.miura-module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

/* Premium 3D gold squircle module tile — code-first shimmer (Yuki 2026-09-12) */
.miura-module-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 24%;
  padding: 2px;
  cursor: pointer;
  background: linear-gradient(145deg, #FFF1C1 0%, #E8C872 22%, #C5A059 50%, #9A7B3A 78%, #E8C872 100%);
  box-shadow: 0 6px 18px rgba(0,0,0,.45), 0 0 14px rgba(197,160,89,.12);
  overflow: hidden;
  animation: module-tile-float var(--module-tile-float-duration) ease-in-out infinite;
  transition: box-shadow .25s, transform .2s;
}
.miura-module-tile:hover {
  box-shadow: 0 8px 22px rgba(0,0,0,.5), 0 0 20px rgba(232,200,114,.22);
  transform: translateY(-1px);
}
.miura-module-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.42) 50%, transparent 62%);
  animation: module-tile-shimmer var(--module-tile-shimmer-duration) ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
}
.miura-module-tile__inner {
  position: relative;
  height: 100%;
  border-radius: 22%;
  background: linear-gradient(155deg, #0A0E1A 0%, #060810 45%, #12182B 100%);
  border: 1px solid rgba(232,200,114,.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 6px 8px;
  overflow: hidden;
}
.miura-module-tile__nebula {
  position: absolute;
  inset: 8% 12% 28%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(59,130,246,.38) 0%, rgba(30,58,138,.12) 42%, transparent 72%);
  animation: module-tile-glow calc(var(--module-tile-float-duration) * 1.1) ease-in-out infinite;
  pointer-events: none;
}
.miura-module-tile__icon {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.55)) drop-shadow(-1px -1px 2px rgba(255,241,193,.25));
  animation: gold-icon-glint var(--icon-glint-duration) ease-in-out infinite;
}
.miura-module-tile__label {
  position: relative;
  z-index: 1;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.15;
  text-transform: uppercase;
  text-align: center;
  background: linear-gradient(
    110deg,
    #8B6914 0%, #C5A059 16%, #9A7B3A 30%, #FFF8E7 44%,
    #E8C872 50%, #FFF8E7 56%, #C5A059 70%, #F0D78C 84%, #8B6914 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gold-reflect var(--reflect-duration) ease-in-out infinite;
}

/* Legacy flat cells — still used in compact admin toggles */
.module-icon-cell {
  background: var(--card);
  border: 1px solid rgba(197,160,89,.12);
  border-radius: 10px;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
}
.module-icon-cell:hover {
  border-color: rgba(197,160,89,.45);
  transform: translateY(-1px);
}
.module-icon-cell img {
  width: 28px;
  height: 28px;
  display: block;
  margin: 0 auto 6px;
  animation: gold-icon-glint var(--icon-glint-duration) ease-in-out infinite;
}
.module-icon-cell span {
  font-size: 0.58rem;
  color: var(--muted);
  line-height: 1.2;
  display: block;
}

.module-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .2s;
}
.module-list-row:hover { border-color: rgba(197,160,89,.35); }
.module-list-row img { width: 32px; height: 32px; flex-shrink: 0; }
.module-list-row .info { flex: 1; min-width: 0; }
.module-list-row strong { display: block; font-size: 0.9rem; }
.module-list-row small { color: var(--muted); font-size: 0.75rem; }

.section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 16px 0 10px;
}

.top-link-bar {
  text-align: center;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid rgba(197,160,89,.12);
  font-size: 0.85rem;
  color: var(--muted);
}
.top-link-bar a {
  color: var(--gold-bright);
  font-weight: 600;
  text-decoration: none;
}
