:root {
  --bg: #f8f5f0;
  --card: #ffffff;
  --ink: #1a1a1a;
  --muted: #6b7280;
  --accent-blue: #5a8cb8;
  --accent-blue-light: #7cb3e3;
  --accent-orange: #e67e50;
  --accent-green: #8bc98f;
  --cream: #f5f0e8;
  --border: #e5e2dd;
  --shadow: 0 8px 30px rgba(90, 140, 184, 0.1);
  --shadow-lg: 0 20px 60px rgba(90, 140, 184, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #f8f5f0 0%, #f0f4f8 100%);
  color: var(--ink);
  min-height: 100vh;
}

.topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.2rem 1rem;
  border-bottom: 2px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  z-index: 20;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.header-logo-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}

.brand-logo {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

.hamburger {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 30;
  width: auto;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--accent-blue);
  border-radius: 2px;
  transition: all 250ms ease;
}

.hamburger:hover span {
  background: var(--accent-blue-light);
}

nav {
  display: none;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
}

nav.nav-open {
  display: flex;
}

nav a {
  padding: 0.65rem 1.2rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0.5rem;
  transition: all 180ms ease;
  background: transparent;
}

nav a:hover {
  background: var(--accent-blue-light);
  color: white;
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  .topbar {
    flex-direction: row;
    justify-content: space-between;
    padding: 1.2rem 2rem;
  }

  .header-logo-wrapper {
    width: auto;
  }

  .brand {
    margin-bottom: 0;
  }

  .brand-logo {
    height: 4.5rem;
    width: auto;
  }

  .hamburger {
    display: none;
  }

  nav {
    display: flex;
    gap: 0.8rem;
    width: auto;
    margin-top: 0;
  }

  nav a {
    font-size: 1rem;
  }
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  animation: rise 300ms ease-out;
}

h1 {
  margin-top: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  margin-top: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--accent-blue);
}

input, button {
  width: 100%;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 2px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
  transition: all 180ms ease;
}

input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(90, 140, 184, 0.1);
}

button, .btn {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
  color: white;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-weight: 600;
  font-size: 1.05rem;
  box-shadow: 0 4px 15px rgba(90, 140, 184, 0.3);
  transition: all 200ms ease;
}

button:hover, .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(90, 140, 184, 0.4);
}

button:active, .btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--accent-orange) 0%, #f09a5f 100%);
  box-shadow: 0 4px 15px rgba(230, 126, 80, 0.3);
}

.btn-secondary:hover {
  box-shadow: 0 8px 25px rgba(230, 126, 80, 0.4);
}

label {
  display: block;
  margin: 1rem 0 0.4rem;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

.hero {
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--cream) 0%, rgba(124, 179, 227, 0.08) 100%);
  border: 2px solid rgba(90, 140, 184, 0.2);
  box-shadow: var(--shadow-lg);
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1.2rem;
}

.hero .muted {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  color: var(--muted);
}

.feature {
  background: linear-gradient(135deg, #ffffff 0%, rgba(139, 201, 143, 0.05) 100%);
  border-left: 4px solid var(--accent-green);
  transition: all 250ms ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-left-color: var(--accent-blue);
}

.qr-preview {
  width: min(256px, 100%);
  height: auto;
  display: block;
  border-radius: 1rem;
  border: 2px solid var(--border);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

code {
  background: var(--cream);
  padding: 0.2rem 0.5rem;
  border-radius: 0.4rem;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 0.9em;
  color: var(--accent-blue);
  border: 1px solid var(--border);
}

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

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.5);
}

.footer-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.footer-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 150ms ease;
}

.footer-link:hover {
  color: var(--accent-blue-light);
}

@media (min-width: 768px) {
  .footer {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }
}

@media (min-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  main {
    padding: 3rem 2rem 4rem;
  }

  .card {
    padding: 2.5rem 2rem;
  }
}
