:root {
  --bg-cream: #FFF6DC;
  --text-brown: #4E2E14;
  --text-soft: #6D492A;
  --btn-bg: #FFFFFF;
  --btn-shadow: 0 3px 12px rgba(78, 46, 20, 0.08);
  --divider: rgba(78, 46, 20, 0.14);
}

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

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-cream);
  color: var(--text-brown);
  min-height: 100dvh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background-color: var(--bg-cream);
  overflow-x: hidden;
}

.taplink-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  padding: 20px 18px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Full-width Top Wavy Header */
.wave-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 112px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.wave-svg {
  width: 104%;
  height: 100%;
  margin-left: -2%;
  display: block;
  animation: waveSway 7s ease-in-out infinite;
  will-change: transform;
}

/* Brand / Logo */
.brand {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}

.logo-ring {
  width: 116px;
  height: 116px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #FFFFFF;
  padding: 3px;
  box-shadow: 0 6px 18px rgba(78, 46, 20, 0.12);
  animation:
    logoPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
    floatLogo 4.2s ease-in-out 0.55s infinite;
  will-change: transform;
}

.logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.brand-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-brown);
  line-height: 1.15;
  margin-bottom: 8px;
}

.brand-bio {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.55;
}

/* Dividers */
.divider {
  width: 100%;
  max-width: 240px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 8px;
}

.divider-bottom {
  margin: 18px 0 10px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--divider);
}

.divider-icon {
  font-size: 0.9rem;
  line-height: 1;
  display: inline-block;
  animation: iconPulse 3.2s ease-in-out infinite;
  will-change: transform;
}

.order-caption {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-soft);
  text-align: center;
  margin-bottom: 10px;
}

/* White Taplink Buttons */
.btn-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.tap-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 10px 46px 10px 54px;
  background: var(--btn-bg);
  border-radius: 12px;
  box-shadow: var(--btn-shadow);
  text-decoration: none;
  color: var(--text-brown);
  overflow: hidden;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.tap-btn:active {
  transform: scale(0.97);
}

.tap-btn:first-child::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(245, 211, 153, 0.28) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translate3d(-160%, 0, 0) skewX(-18deg);
  animation: sheenGlide 4.8s ease-in-out 1.2s infinite;
  pointer-events: none;
}

@media (hover: hover) {
  .tap-btn:hover {
    transform: translate3d(0, -2px, 0);
  }
  .tap-btn:hover .tap-icon {
    transform: translateY(-50%) scale(1.1) rotate(-5deg);
  }
}

.tap-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-brown);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tap-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
}

.tap-label small {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-soft);
  margin-top: 2px;
}

/* Bottom Note */
.bottom-note {
  width: 100%;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  line-height: 1.6;
}

/* Toast for Otziv placeholder */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate3d(-50%, 16px, 0);
  opacity: 0;
  pointer-events: none;
  background: var(--text-brown);
  color: #FFFDF8;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  z-index: 50;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

/* Lightweight GPU-only animations */
.anim-item {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  animation: fadeUp 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes logoPop {
  0% {
    opacity: 0;
    transform: scale(0.86) translate3d(0, 8px, 0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translate3d(0, 0, 0);
  }
}

@keyframes floatLogo {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -5px, 0);
  }
}

@keyframes waveSway {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(1.2%, 3px, 0);
  }
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.14);
  }
}

@keyframes sheenGlide {
  0%, 65% {
    transform: translate3d(-160%, 0, 0) skewX(-18deg);
  }
  100% {
    transform: translate3d(340%, 0, 0) skewX(-18deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .anim-item {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .logo-ring,
  .wave-svg,
  .divider-icon,
  .tap-btn:first-child::after {
    animation: none;
    will-change: auto;
  }
  .tap-btn,
  .tap-icon,
  .toast {
    transition: none;
  }
}
