/* UCB Móvil — landing. Mobile first. Palette taken from the app itself. */

:root {
  --bg: #f2f4f8;
  --surface: #ffffff;
  --border: #e3e7ee;
  --text: #0f1a2e;
  --muted: #5b6578;
  --icon: #173a6b;
  --logo: #173a6b;
  --link: #1d4f96;
  --navy: #173a6b;
  --navy-2: #12305a;
  --halo: rgba(23, 58, 107, .14);
  --glow: rgba(232, 214, 60, .0);
  --shadow: 0 18px 40px -18px rgba(15, 26, 46, .45);
  --focus: #e8c500;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111318;
    --surface: #1b1e25;
    --border: #2a2e37;
    --text: #f2f4f8;
    --muted: #9aa3b2;
    --icon: #8fb3ff;
    --logo: #ffffff;
    --link: #8fb3ff;
    --halo: rgba(45, 100, 190, .45);
    --glow: rgba(232, 214, 60, .10);
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111318;
  --surface: #1b1e25;
  --border: #2a2e37;
  --text: #f2f4f8;
  --muted: #9aa3b2;
  --icon: #8fb3ff;
  --logo: #ffffff;
  --link: #8fb3ff;
  --halo: rgba(45, 100, 190, .45);
  --glow: rgba(232, 214, 60, .10);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0 auto;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}

a { color: var(--link); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 12px; }

/* Header ---------------------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: 4px;
}

.brand { display: inline-flex; padding: 4px 0; }

.brand-logo {
  display: block;
  width: 132px;
  aspect-ratio: 588 / 269;
  background: var(--logo);
  -webkit-mask: url("/assets/logo-ucb.png") center / contain no-repeat;
  mask: url("/assets/logo-ucb.png") center / contain no-repeat;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { background: var(--border); }
.theme-toggle svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }

/* Hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cta-note a { color: #fff; font-weight: 600; }

.stage {
  --w: min(80vw, 340px, 36svh);
  position: relative;
  z-index: 1;
  width: var(--w);
  margin: 0 auto calc(var(--w) * -0.13);
}

.halo {
  position: absolute;
  inset: -12% -22% 8%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(closest-side at 50% 38%, var(--glow), transparent 70%),
    radial-gradient(closest-side, var(--halo), transparent);
  filter: blur(6px);
  animation: breathe 6s ease-in-out infinite;
}

.mascot { animation: arrive .9s cubic-bezier(.2, .9, .25, 1.2) both; }
.mascot img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }

.mascot-head {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .28));
  transform-origin: 50% 90%;
  animation: hover 4.8s ease-in-out infinite;
}

.mascot-body {
  position: relative;
  animation: sway 4.8s ease-in-out infinite;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .22));
}

/* Eyelids drawn over the yellow eye rings, closed for a moment to blink. */
.lid {
  position: absolute;
  width: 18%;
  height: 29%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #222220, #141413 70%);
  transform: scaleY(0);
  transform-origin: 50% 0;
  animation: blink 5.2s infinite;
}
.lid-l { left: 26%; top: 39.4%; }
.lid-r { left: 56.2%; top: 38%; }

.card {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-radius: 28px;
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.card-main { position: relative; padding: clamp(18px, 3.5svh, 30px) 24px clamp(14px, 2.5svh, 22px); }

.hello { margin: 0; font-size: 18px; opacity: .85; }

.card h1 {
  margin: 2px 0 6px;
  font-size: clamp(38px, 11vw, 48px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.02em;
}

.lead { margin: 0; font-size: 17px; opacity: .85; }

.card-band { background: var(--navy-2); padding: clamp(14px, 2.2svh, 18px) 18px clamp(14px, 2.4svh, 20px); }

.cta { display: grid; gap: 10px; }

.store {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 20px;
  border-radius: 16px;
  background: #fff;
  color: #0b1220;
  text-decoration: none;
  text-align: left;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
  transition: transform .15s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.store:hover { box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); }
.store:active { transform: scale(.98); }
.store svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store small { display: block; font-size: 11px; font-weight: 500; opacity: .7; letter-spacing: .02em; }

.cta-note { margin: 12px 0 0; font-size: 13px; opacity: .8; }

/* Footer ---------------------------------------------------------------- */

.foot {
  flex: none;
  padding: 12px 0 max(16px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.foot p { margin: 2px 0; }
.foot a { color: inherit; text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }

/* Larger screens: same column, more air --------------------------------- */

@media (min-width: 420px) {
  :root[data-os="other"] .cta { grid-template-columns: 1fr 1fr; }
  :root[data-os="other"] .store { font-size: 17px; padding: 8px 14px; }
}

@media (min-width: 768px) {
  .stage { --w: min(360px, 36svh); }
  .brand-logo { width: 150px; }
}

/* Motion ---------------------------------------------------------------- */

@keyframes arrive {
  from { opacity: 0; transform: translateY(24px) scale(.92); }
  to { opacity: 1; transform: none; }
}
@keyframes hover {
  0%, 100% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(-7px) rotate(-2deg); }
  70% { transform: translateY(-4px) rotate(1.5deg); }
}
@keyframes sway {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes blink {
  0%, 90%, 100% { transform: scaleY(0); }
  93%, 94% { transform: scaleY(1); }
}
@keyframes breathe {
  0%, 100% { opacity: .85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
