/* ========================================
   KiWi Recipes — Landing Page Styles
   ======================================== */

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

:root {
  --primary: #6B9B37;
  --primary-dark: #527A28;
  --primary-light: #C8E6A0;
  --primary-lighter: #E8F5D6;
  --accent: #C88F3C;
  --accent-dark: #A87428;
  --soft-green: #F0F7E8;
  --text-primary: #212121;
  --text-secondary: #555;
  --text-muted: #888;
  --white: #fff;
  --bg-light: #FAFCF7;
  --border: #E0E0E0;
  --font: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-phone: 0 20px 60px rgba(0, 0, 0, 0.15);
  --max-width: 1120px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-brand img {
  width: 36px;
  height: 36px;
}

.nav-brand span {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--primary);
  color: var(--white);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition);
}

.nav-cta:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
}

/* --- Nav Right --- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Language Switcher --- */
.lang-switcher {
  position: relative;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text-primary);
  transition: border-color var(--transition), background var(--transition);
}

.lang-toggle:hover {
  border-color: var(--primary-light);
  background: var(--soft-green);
}

.lang-toggle img {
  width: 24px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  display: inline-block;
}

.lang-chevron {
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.lang-switcher.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 150px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  z-index: 200;
}

.lang-switcher.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}

.lang-option:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.lang-option:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}

.lang-option:hover {
  background: var(--soft-green);
  color: var(--text-primary);
}

.lang-option.active {
  background: var(--primary-lighter);
  color: var(--primary-dark);
  font-weight: 600;
}

.lang-option img {
  width: 24px;
  height: 14px;
  border-radius: 2px;
  object-fit: cover;
  display: inline-block;
  flex-shrink: 0;
}

/* --- Hero --- */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(180deg, var(--soft-green) 0%, var(--white) 100%);
  position: relative;
  overflow: hidden;
}

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

.hero-content {
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--white);
  border: 1px solid var(--primary-light);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 24px;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero h1 .highlight {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-phone {
  display: flex;
  justify-content: center;
}

/* --- Phone Mockup --- */
.phone-frame {
  width: 260px;
  height: 520px;
  background: #1a1a1a;
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow-phone);
  position: relative;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: #1a1a1a;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background: var(--soft-green);
  overflow: hidden;
  position: relative;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder when no screenshot exists */
.phone-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--soft-green) 0%, var(--primary-lighter) 100%);
}

.phone-placeholder .placeholder-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.phone-placeholder span {
  font-size: 0.85rem;
  color: var(--primary-dark);
  font-weight: 600;
  text-align: center;
}

/* --- Email Signup Form --- */
.signup-form {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}

.signup-form input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--white);
  transition: border-color var(--transition);
  outline: none;
}

.signup-form input:focus {
  border-color: var(--primary);
}

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

.signup-form button {
  padding: 14px 24px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), transform var(--transition);
}

.signup-form button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.signup-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  font-size: 0.85rem;
  margin-top: 10px;
  text-align: center;
  min-height: 20px;
}

.form-message.success {
  color: var(--primary-dark);
}

.form-message.error {
  color: #D32F2F;
}

.form-privacy {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
}

/* --- Features --- */
.features {
  padding: 80px 0;
}

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

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

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

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--soft-green);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Screenshots --- */
.screenshots {
  padding: 80px 0;
  background: var(--bg-light);
}

.screenshots-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 0 24px 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.screenshots-row::-webkit-scrollbar {
  display: none;
}

.screenshot-item {
  flex-shrink: 0;
  scroll-snap-align: center;
  text-align: center;
}

.screenshot-item .phone-frame {
  width: 220px;
  height: 440px;
  margin-bottom: 12px;
}

.screenshot-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* --- CTA Section --- */
.cta-section {
  padding: 80px 0;
}

.cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 56px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.cta-box::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.cta-box > * {
  position: relative;
  z-index: 1;
}

.cta-box h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.cta-box p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 420px;
  margin: 0 auto 32px;
}

.cta-box .signup-form {
  max-width: 400px;
  margin: 0 auto;
}

.cta-box .signup-form input {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.cta-box .signup-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.cta-box .signup-form input:focus {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.18);
}

.cta-box .signup-form button {
  background: var(--white);
  color: var(--primary-dark);
}

.cta-box .signup-form button:hover {
  background: var(--primary-lighter);
}

.cta-box .form-message.success {
  color: var(--primary-lighter);
}

.cta-box .form-message.error {
  color: #FFCDD2;
}

.cta-box .form-privacy {
  color: rgba(255, 255, 255, 0.5);
}

.cta-box .form-privacy a {
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

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

.footer-brand img {
  width: 28px;
  height: 28px;
}

.footer-brand span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */

@media (max-width: 480px) {
  .nav-cta {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .nav-right {
    gap: 8px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .signup-form {
    flex-direction: column;
  }

  .signup-form button {
    width: 100%;
  }

  .cta-box .signup-form {
    flex-direction: column;
  }

  .cta-box {
    padding: 40px 20px;
  }

  .cta-box h2 {
    font-size: 1.5rem;
  }
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .screenshots-row {
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .hero {
    padding: 140px 0 100px;
  }

  .hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    text-align: left;
  }

  .hero-content {
    text-align: left;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .hero-subtitle {
    margin-left: 0;
  }

  .signup-form {
    margin: 0;
  }

  .form-message,
  .form-privacy {
    text-align: left;
  }

  .hero-phone {
    justify-content: flex-end;
  }

  .phone-frame {
    width: 280px;
    height: 560px;
  }

  .section-header h2 {
    font-size: 2.25rem;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 3.5rem;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .phone-frame {
    width: 300px;
    height: 600px;
  }

  .cta-box {
    padding: 72px 48px;
  }

  .cta-box h2 {
    font-size: 2.5rem;
  }

  .screenshot-item .phone-frame {
    width: 240px;
    height: 480px;
  }
}
