/* =============================================
   VIBE OTTER QR GENERATOR — STYLES
   Brand palette extracted from vibeotter.com
   ============================================= */

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

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

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

.grain {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  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;
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 252, 247, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 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: 900px;
  margin: 0 auto;
  padding: 0.85rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.logo-img {
  height: 32px;
  width: auto;
}
.logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  background: linear-gradient(135deg, #2D7D7D 0%, #4A9B9B 100%);
  color: #FFFCF7;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  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 layout ---- */
main.main-container {
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 8rem 1.5rem 4rem;
  text-align: center;
  width: 100%;
}

/* ---- Badge ---- */
.hero-badge {
  display: inline-block;
  background: rgba(45,125,125,0.1);
  color: var(--accent);
  border: 1.5px solid rgba(45,125,125,0.25);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.1rem;
}

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

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

/* ---- Tool Card ---- */
.tool-card {
  background: rgba(255, 252, 247, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  text-align: left;
  margin-bottom: 2.5rem;
  transition: box-shadow 0.2s var(--ease);
}

/* ---- Input ---- */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.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-md);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.url-input::placeholder {
  color: var(--text-tertiary);
}
.url-input:focus {
  border-color: var(--accent);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(45,125,125,0.1);
}

.generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 1.4rem;
  background: linear-gradient(135deg, #2D7D7D 0%, #4A9B9B 100%);
  color: #FFFCF7;
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  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: none;
}
.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.input-hint {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

/* ---- Loading ---- */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0 0.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(45,125,125,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Error ---- */
.error-state {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  margin-top: 1.25rem;
  background: rgba(239,68,68,0.07);
  border: 1.5px solid rgba(239,68,68,0.25);
  border-radius: var(--radius-md);
  color: #b91c1c;
  font-size: 0.92rem;
}
.error-state svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #ef4444;
}

/* ---- Result ---- */
.result-state {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.qr-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

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

.qr-image {
  display: block;
  width: 220px;
  height: 220px;
  image-rendering: pixelated;
}

.qr-url-preview {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  word-break: break-all;
  text-align: center;
  max-width: 340px;
  padding: 0 0.5rem;
}

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

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #2D7D7D 0%, #4A9B9B 100%);
  color: #FFFCF7;
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  box-shadow: var(--shadow-btn);
  transition: all 0.15s var(--ease);
}
.download-btn svg {
  width: 17px;
  height: 17px;
}
.download-btn:hover {
  transform: translateY(-1px) translateX(-1px);
  box-shadow: 4px 4px 0px var(--accent-dark);
}
.download-btn:active {
  transform: translateY(2px) translateX(2px);
  box-shadow: 0px 0px 0px transparent;
}

.reset-btn {
  padding: 0.8rem 1.25rem;
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid rgba(45,125,125,0.2);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s var(--ease);
  box-shadow: 2px 2px 0px rgba(61,50,41,0.08);
}
.reset-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent);
  color: var(--text-primary);
  box-shadow: 3px 3px 0px rgba(45,125,125,0.15);
}

/* ---- Steps row ---- */
.steps-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

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

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

.step-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  max-width: 80px;
}

.step-arrow {
  color: rgba(45,125,125,0.35);
  margin-bottom: 1.2rem;
}
.step-arrow svg {
  width: 20px;
  height: 20px;
}

/* ---- Footer ---- */
.footer {
  position: relative;
  z-index: 2;
  background: rgba(245, 240, 232, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(45,125,125,0.1);
  padding: 2rem 1.5rem;
  text-align: center;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
}
.footer-logo-img {
  height: 24px;
  width: auto;
}

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

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

/* ---- Enter key animation ---- */
@keyframes qrReveal {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.qr-reveal {
  animation: qrReveal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  main.main-container {
    padding: 7rem 1rem 3rem;
  }
  .tool-card {
    padding: 1.4rem 1.1rem;
  }
  .input-row {
    flex-direction: column;
  }
  .generate-btn {
    width: 100%;
    justify-content: center;
  }
  .qr-image {
    width: 190px;
    height: 190px;
  }
  .nav-container {
    padding: 0.75rem 1rem;
  }
  .logo-text {
    font-size: 1.05rem;
  }
}

@media (max-width: 400px) {
  .steps-row {
    gap: 0.4rem;
  }
  .step-text {
    font-size: 0.75rem;
    max-width: 68px;
  }
  .step-num {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}
