/* Ravintolab — Homepage Stylesheet */
/* No external CDN dependencies — self-contained */

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

:root {
  --color-bg: #0f1117;
  --color-bg-card: #1a1d27;
  --color-bg-subtle: #141720;
  --color-accent: #4f7fff;
  --color-accent-soft: rgba(79, 127, 255, 0.12);
  --color-accent-hover: #6b95ff;
  --color-text-primary: #f0f2f8;
  --color-text-secondary: #8b92aa;
  --color-text-muted: #555b70;
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-subtle: rgba(255, 255, 255, 0.03);
  --color-success: #3ecf8e;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 60px rgba(79, 127, 255, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== BACKGROUND DECORATION ===== */
.bg-decoration {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-decoration::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(79, 127, 255, 0.08) 0%, transparent 70%);
}

.bg-decoration::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(62, 207, 142, 0.05) 0%, transparent 70%);
}

/* ===== LAYOUT ===== */
.page-wrapper {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER / NAV ===== */
.site-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.85);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.nav-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.3px;
}

.nav-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

/* ===== HERO SECTION ===== */
.hero {
  padding: 100px 0 80px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border: 1px solid rgba(79, 127, 255, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 20px;
  color: var(--color-text-primary);
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--color-accent) 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto 44px;
  line-height: 1.6;
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(79, 127, 255, 0.35);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(79, 127, 255, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.btn-icon {
  font-size: 18px;
  line-height: 1;
}

/* ===== WAITLIST FORM ===== */
.waitlist-form {
  max-width: 520px;
  margin: 0 auto 20px;
}

.waitlist-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.2px;
}

.field-input {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--color-text-primary);
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

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

.field-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(79, 127, 255, 0.15);
}

.field-input:invalid:not(:placeholder-shown) {
  border-color: #ff5050;
}

.waitlist-submit {
  width: 100%;
  justify-content: center;
  padding: 14px 24px;
  font-size: 16px;
}

.waitlist-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* Form feedback panels */
.form-feedback {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  background: rgba(62, 207, 142, 0.08);
  border: 1px solid rgba(62, 207, 142, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: left;
}

/* Ensure the HTML `hidden` attribute wins over display:flex (#335) */
.form-feedback[hidden] { display: none !important; }

.form-feedback--error {
  background: rgba(255, 80, 80, 0.08);
  border-color: rgba(255, 80, 80, 0.2);
}

.feedback-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.form-feedback div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.form-feedback strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.form-feedback span {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.form-feedback a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 540px) {
  .waitlist-fields {
    grid-template-columns: 1fr;
  }
}

/* ===== HERO VISUAL / MOCKUP ===== */
.hero-visual {
  margin-top: 72px;
  display: flex;
  justify-content: center;
}

.app-mockup {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 720px;
  width: 100%;
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.mockup-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.mockup-dots {
  display: flex;
  gap: 6px;
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mockup-dot:nth-child(1) { background: #ff5f57; }
.mockup-dot:nth-child(2) { background: #ffbd2e; }
.mockup-dot:nth-child(3) { background: #28ca41; }

.mockup-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.mockup-spacer { width: 54px; }

/* Mockup content — inventory table */
.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mockup-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.mockup-badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border: 1px solid rgba(79, 127, 255, 0.2);
  padding: 3px 9px;
  border-radius: 20px;
}

.mockup-table {
  width: 100%;
  border-collapse: collapse;
}

.mockup-table thead th {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.mockup-table tbody tr {
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background var(--transition);
}

.mockup-table tbody tr:last-child {
  border-bottom: none;
}

.mockup-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.mockup-table tbody td {
  font-size: 13px;
  padding: 11px 12px;
  color: var(--color-text-secondary);
}

.mockup-table tbody td:first-child {
  color: var(--color-text-primary);
  font-weight: 500;
}

.stock-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
}

.stock-ok { background: rgba(62, 207, 142, 0.12); color: var(--color-success); }
.stock-low { background: rgba(255, 165, 0, 0.12); color: #ff9d00; }
.stock-critical { background: rgba(255, 80, 80, 0.12); color: #ff5050; }

/* ===== FEATURES SECTION ===== */
.features {
  padding: 80px 0;
}

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

.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--color-accent);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--color-text-primary);
  line-height: 1.15;
}

.section-subtitle {
  margin-top: 14px;
  font-size: 17px;
  color: var(--color-text-secondary);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  border-color: rgba(79, 127, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 16px;
  display: block;
}

.feature-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.feature-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ===== STATS SECTION ===== */
.stats {
  padding: 60px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 40px;
  text-align: center;
}

.stat-value {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--color-text-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-value span {
  color: var(--color-accent);
}

.stat-label {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 80px 0 100px;
  text-align: center;
}

.cta-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 64px 48px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 127, 255, 0.4), transparent);
}

.cta-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 14px;
  color: var(--color-text-primary);
}

.cta-subtitle {
  font-size: 17px;
  color: var(--color-text-secondary);
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.cta-note {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

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

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-text-secondary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero {
    padding: 64px 0 48px;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    max-width: 280px;
    margin: 0 auto;
  }

  .btn {
    justify-content: center;
  }

  .hero-visual {
    margin-top: 48px;
  }

  .app-mockup {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
  }

  .cta-card {
    padding: 40px 24px;
  }

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

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

  .footer-links {
    justify-content: center;
  }

  .mockup-table thead th:nth-child(3),
  .mockup-table tbody td:nth-child(3) {
    display: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .nav-badge {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}
