/* Variables */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --text-primary: #f5f5f7;
  --text-secondary: #a0a0a8;
  --text-muted: #6b6b73;
  --accent: #ff6b35;
  --accent-secondary: #f7c548;
  --accent-tertiary: #4ecdc4;
  --success: #10b981;
  --border: #2a2a36;
  --font-display: 'Instrument Serif', serif;
  --font-body: 'Satoshi', -apple-system, sans-serif;
}

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

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Noise overlay */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-primary);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(78, 205, 196, 0.06) 0%, transparent 50%);
  z-index: -1;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1.1;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 50%, var(--accent-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #e85a2c 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

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

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--text-secondary);
}

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

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

/* Floating cards animation */
.hero-visual {
  position: relative;
  height: 400px;
}

.floating-cards {
  position: relative;
  width: 100%;
  height: 100%;
}

.floating-card {
  position: absolute;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.floating-card .card-icon {
  font-size: 32px;
}

.floating-card .card-text {
  font-weight: 600;
  font-size: 18px;
}

.card-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.card-2 {
  top: 45%;
  right: 5%;
  animation-delay: -2s;
}

.card-3 {
  bottom: 15%;
  left: 25%;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(2deg);
  }
}

/* Generator Section */
.generator-section {
  padding: 100px 0;
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 42px;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 18px;
}

/* Form */
.brand-form {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group select {
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-generate {
  width: 100%;
  justify-content: center;
  padding: 18px;
  font-size: 16px;
}

.btn-generate .btn-loading {
  display: none;
}

.btn-generate.loading .btn-text {
  display: none;
}

.btn-generate.loading .btn-loading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Result Card */
.result-card {
  max-width: 900px;
  margin: 60px auto 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
}

.result-header {
  padding: 48px;
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(78, 205, 196, 0.05) 100%);
  border-bottom: 1px solid var(--border);
}

.result-name {
  font-family: var(--font-display);
  font-size: 48px;
  margin-bottom: 12px;
}

.result-tagline {
  font-size: 20px;
  color: var(--text-secondary);
  font-style: italic;
}

.result-body {
  padding: 48px;
}

.result-section {
  margin-bottom: 40px;
}

.result-section:last-child {
  margin-bottom: 0;
}

.result-section h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
}

.result-section p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Color Palette */
.color-palette {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.color-box {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.color-hex {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
}

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.menu-item {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.menu-item-name {
  font-weight: 600;
  margin-bottom: 8px;
}

.menu-item-description {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.menu-item-price {
  font-weight: 700;
  color: var(--accent);
}

/* Result Actions */
.result-actions {
  display: flex;
  gap: 16px;
  padding: 32px 48px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

/* Brands Section */
.brands-section {
  padding: 100px 0;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.brand-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  border-color: var(--accent);
}

.brand-card-name {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 8px;
}

.brand-card-tagline {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.brand-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-card-cuisine {
  background: var(--bg-secondary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}

.brand-card-colors {
  display: flex;
  gap: 4px;
}

.brand-card-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 24px;
  opacity: 0.5;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.empty-state p {
  color: var(--text-muted);
}

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-visual {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .brand-form {
    padding: 32px;
  }

  .result-actions {
    flex-direction: column;
  }
}