/* ============================================
   VIBE OTTER QR CODE GENERATOR — STYLES
   Matches vibeotter.com design language
   ============================================ */

:root {
  --bg-body: #FAF6F0;
  --bg-surface: #FFFCF7;
  --bg-secondary: #F5F0E8;
  --bg-tertiary: #EDE6DB;
  --text-primary: #3D3229;
  --text-secondary: #6B5D50;
  --text-tertiary: #9A8B7A;
  --accent: #2D7D7D;
  --accent-light: #4A9B9B;
  --accent-dark: #236060;
  --border: rgba(45, 125, 125, 0.15);
  --shadow-card: 5px 5px 0px #4A9B9B;
  --shadow-btn: 3px 3px 0px #236060;
  --radius-card: 20px;
  --radius-btn: 12px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Gradient background */
.gradient-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.2;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, #A0D4D4 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, #FFC0BD 0%, transparent 40%);
  animation: breathe 30s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.14; }
}

/* ============ NAVBAR ============ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 252, 247, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 0 rgba(45, 125, 125, 0.08), 0 4px 12px rgba(61, 50, 41, 0.04);
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.4) 20%, rgba(45, 125, 125, 0.5) 50%, rgba(212, 165, 116, 0.4) 80%, transparent);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-img {
  height: 2rem;
  width: auto;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.1rem;
  background: linear-gradient(135deg, #2D7D7D 0%, #4A9B9B 100%);
  color: #FFFCF7;
  text-decoration: none;
  border-radius: var(--radius-btn);
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-btn);
  transition: all 0.15s var(--ease);
}

.nav-cta:hover {
  transform: translateY(-1px) translateX(-1px);
  box-shadow: 4px 4px 0px var(--accent-dark);
}

/* ============ MAIN ============ */
.main-wrap {
  position: relative;
  z-index: 2;
  padding-top: 80px;
}

/* ============ HERO ============ */
.hero {
  padding: 5rem 2rem 2rem;
  text-align: center;
}

.hero-inner {
  max-width: 640px;
  margin: 0 auto;
}

.otter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(45, 125, 125, 0.08);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 1rem 0.35rem 0.5rem;
  margin-bottom: 1.5rem;
}

.otter-img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
}

.badge-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #3D3229 0%, #2D7D7D 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ============ TOOL SECTION ============ */
.tool-section {
  padding: 2rem 1.5rem 3rem;
  max-width: 640px;
  margin: 0 auto;
}

/* Tool Card */
.tool-card {
  background: var(--bg-surface);
  border: 2.5px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 2.5rem;
  margin-bottom: 2rem;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Input group */
.input-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}

.url-input {
  flex: 1;
  padding: 0.85rem 1.1rem;
  background: var(--bg-secondary);
  border: 2px solid rgba(45, 125, 125, 0.15);
  border-radius: var(--radius-btn);
  font-size: 1rem;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}

.url-input::placeholder {
  color: var(--text-tertiary);
}

.url-input:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(45, 125, 125, 0.1);
}

.generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  background: linear-gradient(135deg, #2D7D7D 0%, #4A9B9B 100%);
  color: #FFFCF7;
  border: 2px solid var(--accent);
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all 0.15s var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}

.generate-btn:hover {
  transform: translateY(-1px) translateX(-1px);
  box-shadow: 4px 4px 0px var(--accent-dark);
}

.generate-btn:active {
  transform: translateY(2px) translateX(2px);
  box-shadow: 0px 0px 0px transparent;
}

.generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-btn);
}

.btn-arrow {
  transition: transform 0.15s;
}

.generate-btn:hover .btn-arrow {
  transform: translateX(2px);
}

.input-error {
  color: #c0392b;
  font-size: 0.875rem;
  margin-top: 0.4rem;
}

/* ============ LOADING STATE ============ */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--bg-tertiary);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ============ RESULT STATE ============ */
.result-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  animation: fadeUp 0.3s var(--ease);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.qr-frame {
  background: #fff;
  border: 2.5px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 4px 4px 0px rgba(45, 125, 125, 0.15);
  display: inline-block;
}

.qr-img {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
}

.qr-url-label {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  max-width: 300px;
  text-align: center;
  word-break: break-all;
  line-height: 1.4;
}

.result-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  background: linear-gradient(135deg, #2D7D7D 0%, #4A9B9B 100%);
  color: #FFFCF7;
  text-decoration: none;
  border-radius: var(--radius-btn);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-btn);
  transition: all 0.15s var(--ease);
  cursor: pointer;
}

.download-btn:hover {
  transform: translateY(-1px) translateX(-1px);
  box-shadow: 4px 4px 0px var(--accent-dark);
}

.reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.2rem;
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid rgba(45, 125, 125, 0.2);
  border-radius: var(--radius-btn);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 2px 2px 0px rgba(61, 50, 41, 0.08);
  transition: all 0.15s var(--ease);
}

.reset-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============ ERROR STATE ============ */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0;
  animation: fadeUp 0.3s var(--ease);
}

.error-icon {
  color: #c0392b;
  opacity: 0.8;
}

.error-msg {
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
}

/* ============ HOW IT WORKS ============ */
.how-it-works {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-num {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2D7D7D 0%, #4A9B9B 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 2px 2px 0px var(--accent-dark);
}

.step-text {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  max-width: 90px;
  line-height: 1.3;
}

.step-arrow {
  color: var(--accent-light);
  opacity: 0.6;
  margin-bottom: 1.2rem;
}

/* ============ PROMO STRIP ============ */
.promo-strip {
  background: linear-gradient(135deg, #2D7D7D 0%, #3a9090 100%);
  border-top: 2.5px solid var(--accent-dark);
  border-bottom: 2.5px solid var(--accent-dark);
  padding: 2rem 2rem;
}

.promo-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.promo-otter {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.promo-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 220px;
}

.promo-text strong {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.promo-text span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.promo-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.5rem;
  background: #fff;
  color: var(--accent);
  text-decoration: none;
  border-radius: var(--radius-btn);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 3px 3px 0px var(--accent-dark);
  transition: all 0.15s var(--ease);
  flex-shrink: 0;
}

.promo-btn:hover {
  transform: translateY(-1px) translateX(-1px);
  box-shadow: 4px 4px 0px var(--accent-dark);
}

/* ============ FOOTER ============ */
.footer {
  background: rgba(245, 240, 232, 0.6);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(45, 125, 125, 0.12);
  padding: 2rem;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-logo-img {
  height: 1.4rem;
  width: auto;
}

.footer-copy {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.footer-credit {
  color: var(--text-tertiary);
  font-size: 0.8rem;
  font-weight: 300;
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-credit:hover {
  opacity: 0.8;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 600px) {
  .nav-container {
    padding: 0.85rem 1.2rem;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  .nav-cta {
    font-size: 0.8rem;
    padding: 0.45rem 0.85rem;
  }

  .hero {
    padding: 4rem 1.2rem 1.5rem;
  }

  .tool-card {
    padding: 1.75rem 1.25rem;
  }

  .input-row {
    flex-direction: column;
  }

  .generate-btn {
    width: 100%;
    justify-content: center;
  }

  .qr-img {
    width: 180px;
    height: 180px;
  }

  .promo-inner {
    flex-direction: column;
    text-align: center;
  }

  .promo-text {
    align-items: center;
  }

  .step-arrow {
    display: none;
  }

  .how-it-works {
    gap: 1.2rem;
  }
}
