/* ── Brand fonts ── */
@font-face {
  font-family: 'Sana Sans Alt';
  src: url('../assets/fonts/SanaSansAlt-Book.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sana Sans Alt';
  src: url('../assets/fonts/SanaSansAlt-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sana Sans Alt';
  src: url('../assets/fonts/SanaSansAlt-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Eufoniem';
  src: url('../assets/fonts/Eufoniem-One.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;700&display=swap');

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

html, body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: 'Sana Sans Alt', 'Nunito Sans', Arial, sans-serif;
  background: linear-gradient(to bottom, #FFF0F0, #FFE4E4);
  color: #1A1A1A;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Skip link ── */
.skip-link {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #E0001A;
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  z-index: 200;
  font-size: 14px;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* ── Game container ── */
#game-container {
  position: relative;
  max-width: 500px;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background: linear-gradient(to bottom, #FFF0F0, #FFE4E4);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Desktop: add subtle shadow to game container */
@media (min-width: 520px) {
  #game-container {
    max-height: 100vh;
    border-radius: 0;
    box-shadow: 0 0 60px rgba(0,0,0,0.4);
  }
}

#game-canvas {
  display: block;
  margin: 0 auto;
  touch-action: manipulation;
  image-rendering: auto;
}

/* ── Greeting overlay ── */
#greeting-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #fff;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#greeting-overlay[hidden] {
  display: none;
}

.greeting-form {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0;
}

.greeting-form h2 {
  font-family: 'Eufoniem', 'Dancing Script', cursive;
  font-size: 28px;
  color: #E0001A;
  text-align: center;
  margin: 0 0 8px;
}

/* ── Form inputs ── */
.greeting-form input,
.greeting-form textarea {
  border: 2px solid #ddd;
  border-radius: 12px;
  padding: 12px;
  width: 100%;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.greeting-form input:focus,
.greeting-form textarea:focus {
  border-color: #E0001A;
}

.greeting-form textarea {
  resize: vertical;
  min-height: 80px;
}

/* ── Buttons ── */
.btn {
  background: #E0001A;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 12px 32px;
  font-size: 18px;
  min-height: 44px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  transition: opacity 0.2s;
  text-align: center;
}

.btn:hover {
  opacity: 0.9;
}

.btn:active {
  opacity: 0.8;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--secondary {
  background: transparent;
  color: #E0001A;
  border: 2px solid #E0001A;
}

/* ── Screen reader only ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Card preview (heart shape) ── */
#card-preview {
  margin: 8px 0;
}

.heart-preview {
  width: 260px;
  margin: 0 auto;
  padding-bottom: 234px; /* ~90% of width for heart proportions */
  position: relative;
  background: #fff;
  clip-path: url(#heart-clip);
  box-shadow: 0 4px 20px rgba(224,0,26,0.12);
}

.heart-preview-inner {
  position: absolute;
  inset: 18% 14% 28%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* ── Promo banner ── */
.promo-oysters {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #FFF8F0, #FFF0E8);
  border: 1px solid #F0DDD0;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 12px 0 0;
}

.promo-oysters-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.promo-oysters-text {
  font-size: 13px;
  color: #555;
  line-height: 1.45;
  margin: 0;
}

.promo-oysters-text strong {
  color: #333;
  font-size: 14px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
