/* MNSTR website styles. Colors, sizes and breakpoints follow the Flutter site (lib/theme.dart there). */

@font-face {
  font-family: 'Silkscreen';
  src: url('/fonts/Silkscreen-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Silkscreen';
  src: url('/fonts/Silkscreen-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #00f0ff;
  --primary-light: #80f8ff; /* Color.lerp(primary, white, 0.5) */
  --on-surface: #1d1b20;
  --filled: #00696f; /* Material 3 primary tone from the #00f0ff seed */
  --card: #f0f7f7;
  --error: #f44336; /* Colors.red */
  --success: #4caf50; /* Colors.green */
  --shadow: rgba(254, 247, 255, 0.5); /* theme.canvasColor at 50% alpha */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background-color: var(--primary);
  color: var(--on-surface);
  font-family: 'Silkscreen', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.icon {
  display: block;
  flex: none;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Home banner */

.hero {
  position: relative;
  width: 100%;
  height: 70vh;
  overflow: hidden;
}

.hero picture,
.hero-image {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.store-buttons {
  position: absolute;
  right: 0;
  bottom: 80px;
  left: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 0 16px;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 70px;
  padding: 16px;
  border: 1px solid #fff;
  border-radius: 20px;
  background: linear-gradient(to bottom, var(--primary-light), var(--primary));
  color: var(--on-surface);
  text-decoration: none;
  box-shadow: 0 10px 20px var(--shadow);
  transition: filter 0.15s ease;
}

.store-apple {
  width: 200px;
  box-shadow: 0 10px 10px var(--shadow);
}

.store-button:hover,
.store-button:focus-visible {
  filter: brightness(1.05);
}

.store-button img {
  width: auto;
  height: 38px;
}

.store-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.store-small {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.store-large {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
}

/* Winners */

.winners {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px;
  background: #fff;
}

.winners-title {
  margin: 0;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
}

.winners-hint {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.winners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  justify-content: center;
  gap: 16px;
  width: 100%;
  max-width: 2100px; /* 7 cards of 300px */
}

.winner-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 0.698;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.winner-card:focus-visible {
  outline: 3px solid var(--filled);
  outline-offset: 2px;
}

.winner-card img {
  display: block;
  image-rendering: pixelated;
}

.winner-mnstr {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.winner-qr {
  width: auto;
  max-width: 200px;
  height: auto;
}

/* Inner pages */

.short-header {
  width: 100%;
  padding: 16px;
  background: var(--primary);
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 20px;
  color: #fff;
  text-decoration: none;
}

.home-link:hover,
.home-link:focus-visible {
  background: rgba(255, 255, 255, 0.15);
}

.panel {
  flex: 1;
  width: 100%;
  padding: 16px;
  background: #fff;
}

.prose h1 {
  margin: 0.67em 0 0.5em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #e0e0e0;
  font-size: 32px;
  line-height: 1.3;
}

.prose h2 {
  margin: 1.2em 0 0.5em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #e0e0e0;
  font-size: 24px;
  line-height: 1.3;
}

.prose h2:first-child {
  margin-top: 0.67em;
}

.prose p,
.prose li {
  font-size: 16px;
}

.prose a {
  color: #0969da;
}

/* Unregister */

.unregister {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.unregister > * {
  margin: 0;
}

.unregister-title {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
}

.notice {
  color: var(--error);
  font-size: 14px;
  font-weight: 700;
}

.unregister-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.message {
  margin: 0;
  font-size: 22px;
}

.message.error {
  color: var(--error);
}

.message.success {
  color: var(--success);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  text-align: left;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label {
  color: #49454f;
  font-size: 12px;
}

.field input {
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #79747e;
  background: transparent;
  color: var(--on-surface);
  font: inherit;
  outline: none;
}

.field input:focus {
  border-bottom: 2px solid var(--filled);
}

.field.invalid label,
.field-error {
  color: #b3261e;
}

.field.invalid input {
  border-bottom-color: #b3261e;
}

.field-error {
  font-size: 12px;
}

.password-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-password {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #49454f;
  cursor: pointer;
}

.toggle-password:hover,
.toggle-password:focus-visible {
  background: rgba(0, 0, 0, 0.08);
}

.filled-button {
  align-self: center;
  min-height: 40px;
  padding: 10px 24px;
  border: 0;
  border-radius: 20px;
  background: var(--filled);
  color: #fff;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.filled-button:hover,
.filled-button:focus-visible {
  filter: brightness(1.1);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(0, 105, 111, 0.2);
  border-top-color: var(--filled);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Footer */

.site-footer {
  width: 100%;
  padding: 8px;
  background: var(--primary);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.site-footer a {
  padding: 8px 12px;
  border-radius: 20px;
  color: #000;
  font-size: 16px;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  background: rgba(0, 0, 0, 0.06);
}

/* Desktop: the unregister column is centered with a third of the width on each side (Flutter: > 1280px). */
@media (min-width: 1281px) {
  .unregister {
    padding-right: 33vw;
    padding-left: 33vw;
  }
}

/* Mobile (Flutter: < 768px) */
@media (max-width: 767.98px) {
  .winners-title {
    font-size: 20px;
  }

  .winners-grid {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    flex-direction: column;
    gap: 8px;
  }
}
