:root {
  --brand: #1abc9c;
  --brand-soft: rgba(26, 188, 156, 0.15);
  --brand-border: rgba(26, 188, 156, 0.3);
  --bg: #fafbfc;
  --text: #1a1a1a;
  --muted: #6b7280;
  --card: #ffffff;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* Hero section - full viewport */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
}

.hero-content {
  width: 100%;
  max-width: 720px;
}

.hero .site-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

h1 {
  font-size: clamp(32px, 4.5vw, 44px);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 32px;
  color: var(--text);
  white-space: nowrap;
}

h1 span {
  color: var(--brand);
}

/* Browser mockup */
.browser {
  width: 100%;
  max-width: 720px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
}

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

.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
}

.browser-dots span:nth-child(1) { background: #ff5f57; }
.browser-dots span:nth-child(2) { background: #febc2e; }
.browser-dots span:nth-child(3) { background: #28c840; }

.browser-url {
  flex: 1;
  margin-left: 12px;
  padding: 6px 12px;
  background: white;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
}

.browser-content {
  padding: 32px;
  font-size: 17px;
  line-height: 1.8;
  color: #374151;
}

.browser-content p {
  margin-bottom: 20px;
}

/* Translated word styling */
.translated {
  background: var(--brand-soft);
  color: var(--brand);
  padding: 2px 8px;
  border-radius: 6px;
  border-bottom: 2px solid var(--brand-border);
  position: relative;
  transition: all 0.2s ease;
  font-weight: 500;
}

.translated:hover {
  background: var(--brand);
  color: white;
}

/* Tooltip */
.translated::after {
  content: attr(data-original);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1a1a1a;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.translated:hover::after,
.translated.touched::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.translated.touched {
  background: var(--brand);
  color: white;
}

/* Scroll indicator */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  animation: bounce 2s infinite;
}

.scroll-hint svg {
  width: 20px;
  height: 20px;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* How section */
.how {
  padding: 48px 24px;
  max-width: 800px;
  margin: 0 auto;
}

.how h2 {
  font-size: 24px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 32px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.step-text h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

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

/* FAQ section */
.faq {
  padding: 48px 24px;
  max-width: 640px;
  margin: 0 auto;
}

.faq h2 {
  font-size: 24px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 24px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-list details {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: var(--card);
  overflow: hidden;
}

.faq-list summary {
  padding: 14px 20px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::before {
  content: "+";
  float: right;
  font-weight: 300;
  font-size: 20px;
  color: var(--muted);
  transition: transform 0.2s;
}

details[open] summary::before {
  content: "\2212";
}

.faq-list details p {
  padding: 0 20px 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Signup section */
.signup {
  padding: 48px 24px 200px;
  background: white;
  border-top: 1px solid #e5e7eb;
}

.signup-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.signup h2 {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 16px;
}

/* Email composer */
.email-composer {
  max-width: 480px;
  margin: 0 auto;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-align: left;
}

.email-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 4px 0;
}

.email-row {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  gap: 8px;
  position: relative;
}

.email-row:last-child {
  border-bottom: none;
}

.email-label {
  color: var(--muted);
  width: 56px;
  flex-shrink: 0;
}

.email-value, .email-from {
  color: var(--text);
}

.email-from {
  flex: 1;
  border: none;
  padding: 0 0 0 6px;
  margin: 0 0 0 -6px;
  font-size: 16px;
  font-family: inherit;
  line-height: normal;
  background: transparent;
  outline: none;
  min-width: 0;
}

.email-from::placeholder {
  color: #9ca3af;
}

.email-body-wrapper {
  display: flex;
  align-items: flex-end;
  padding: 16px;
  gap: 12px;
}

.email-body {
  flex: 1;
  min-height: 40px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  outline: none;
}

.email-body:empty:before {
  content: "Write a message (optional)";
  color: #9ca3af;
}

.send-btn {
  padding: 8px 20px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.send-btn:hover {
  opacity: 0.9;
}

.form-face {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.form-face.visible {
  opacity: 1;
}

/* Success screen */
.success-screen {
  display: none;
  align-items: center;
  max-width: 560px;
  margin: 0 auto;
  gap: 12px;
  padding: 60px 0 120px;
}

.success-screen.visible {
  display: flex;
}

.success-face {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.success-screen.visible .success-face .smiley-state {
  animation: successNod 2.5s ease-in-out infinite;
}

@keyframes successNod {
  0%, 20%, 40%, 100% { transform: translateY(0); }
  10%, 30% { transform: translateY(8px); }
}

/* Gmail-style inbox row */
.inbox-row {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  gap: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.inbox-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #ddd;
}

.inbox-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
}

.inbox-sender {
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.inbox-subject {
  color: var(--text);
  flex-shrink: 0;
}

.inbox-preview {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-preview::before {
  content: " - ";
}

/* Footer */
footer {
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid #e5e7eb;
}

@media (max-width: 600px) {
  .hero .site-nav {
    padding-left: 18px;
  }

  h1 {
    white-space: normal;
    margin-top: 60px;
  }

  .browser-content {
    padding: 24px 20px;
    font-size: 15px;
  }

  .step {
    gap: 12px;
  }

  .step-num {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .step-text h3 {
    font-size: 15px;
  }

  .step-text p {
    font-size: 13px;
  }

  .steps {
    gap: 12px;
  }

  .how {
    padding: 32px 24px;
  }

  .how h2 {
    margin-bottom: 20px;
  }

  /* Success screen mobile layout */
  .success-screen {
    flex-direction: column;
    padding: 40px 0 80px;
    gap: 16px;
  }

  .inbox-row {
    width: 100%;
    gap: 10px;
    padding: 10px 12px;
  }

  .inbox-avatar {
    width: 28px;
    height: 28px;
  }

  .inbox-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .inbox-sender {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .inbox-subject {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .inbox-preview {
    display: none;
  }
}
