:root {
  --os-sage: #7A9D7A;
  --os-sage-light: #A4C4A4;
  --os-sage-dark: #5A7D5A;
  --os-terracotta: #C97C63;
  --os-teal: #5B9A99;
  --os-teal-light: #7DBDBC;
  --os-warm-gray: #8B8680;
  --os-light-gray: #E8E6E3;
  --os-off-white: #F7F6F4;
  --os-charcoal: #3C3C3C;
  --os-text: #2D2D2D;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f4f3 50%, #f5f7f6 100%);
  color: var(--os-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: white;
  border-bottom: 1px solid var(--os-light-gray);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--os-charcoal);
}

.logo-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--os-sage), var(--os-teal));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 1.125rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header-subtitle {
  font-size: 0.875rem;
  color: var(--os-warm-gray);
  margin-left: auto;
  display: none;
}

@media (min-width: 768px) {
  .header-subtitle {
    display: block;
  }
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
}

.hero-mode {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.hero {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeIn 0.8s ease-out;
}

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

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--os-charcoal);
  margin-bottom: 1.5rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.hero-gradient-text {
  background: linear-gradient(135deg, var(--os-sage), var(--os-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--os-warm-gray);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 400;
}

.chatbot-section {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.chatbot-section--hero {
  animation: scaleIn 0.6s ease-out 0.3s both;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-mode .chatbot-section {
  padding: 0;
}

.conversation-mode {
  padding: 2rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.conversation-mode .chatbot-section {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--os-light-gray);
}

.chat-input-wrapper {
  position: relative;
  width: 100%;
}

.hero-mode .chat-input-wrapper {
  margin-bottom: 2rem;
}

.chat-input-container {
  background: white;
  border: 2px solid var(--os-light-gray);
  border-radius: 24px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
}

.hero-mode .chat-input-container {
  border-radius: 28px;
  box-shadow: 0 8px 32px rgba(122, 157, 122, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chat-input-container:focus-within {
  border-color: var(--os-teal);
  box-shadow: 0 8px 32px rgba(91, 154, 153, 0.18), 0 0 0 4px rgba(91, 154, 153, 0.08);
}

.chat-input {
  width: 100%;
  padding: 1.5rem 1.75rem;
  font-size: 1.0625rem;
  border: none;
  background: transparent;
  color: var(--os-text);
  transition: all 0.2s ease;
  resize: none;
  font-family: inherit;
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
}

.hero-mode .chat-input {
  padding: 2rem 2.25rem;
  font-size: 1.125rem;
  min-height: 120px;
}

.chat-input:focus {
  outline: none;
}

.chat-input::placeholder {
  color: var(--os-warm-gray);
  opacity: 0.8;
}

.chat-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.75rem 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.hero-mode .chat-actions {
  padding: 1rem 2.25rem 1.5rem;
}

.chat-actions-left {
  display: flex;
  gap: 0.5rem;
}

.chat-action-btn {
  background: none;
  border: none;
  color: var(--os-warm-gray);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-action-btn:hover {
  background: var(--os-off-white);
  color: var(--os-sage-dark);
}

.chat-action-btn svg {
  width: 20px;
  height: 20px;
}

.chat-submit {
  background: linear-gradient(135deg, var(--os-sage), var(--os-teal));
  color: white;
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(122, 157, 122, 0.3);
}

.hero-mode .chat-submit {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border-radius: 14px;
}

.chat-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(122, 157, 122, 0.4);
}

.chat-submit:active:not(:disabled) {
  transform: translateY(0);
}

.chat-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-submit svg {
  width: 18px;
  height: 18px;
}

.hero-mode .chatbot-header {
  display: none;
}

.conversation-mode .chatbot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.chatbot-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--os-charcoal);
  letter-spacing: -0.02em;
}

.chatbot-reset {
  border: 1px solid var(--os-teal);
  background: rgba(91, 154, 153, 0.08);
  color: var(--os-teal);
  border-radius: 999px;
  padding: 0.45rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chatbot-reset:hover {
  background: var(--os-teal);
  color: white;
}

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-messages-panel {
  min-height: 220px;
  max-height: 500px;
  overflow-y: auto;
  background: rgba(247, 246, 244, 0.9);
  border-radius: 14px;
  border: 1px solid var(--os-light-gray);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hero-mode .chat-messages-panel {
  display: none;
}

.suggestion-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  width: 100%;
  margin-top: 0.5rem;
}

.hero-mode .suggestion-pills {
  animation: fadeInUp 0.6s ease-out 0.5s both;
}

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

.conversation-mode .suggestion-pills {
  display: none;
}

.suggestion-pill {
  background: white;
  border: 2px solid var(--os-light-gray);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.suggestion-pill:hover {
  border-color: var(--os-sage);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(122, 157, 122, 0.15);
}

.suggestion-pill-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}

.suggestion-pill-text {
  font-size: 0.9375rem;
  color: var(--os-text);
  line-height: 1.5;
  font-weight: 500;
}

.tools-section {
  padding: 3rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--os-charcoal);
  margin-bottom: 1.5rem;
  text-align: center;
}

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

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

@media (min-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tool-card {
  background: white;
  border: 2px solid var(--os-light-gray);
  border-radius: 12px;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--os-sage), var(--os-teal));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tool-card:hover::before {
  transform: scaleX(1);
}

.tool-card.active:hover {
  border-color: var(--os-sage);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(122, 157, 122, 0.15);
}

.tool-card.coming-soon {
  opacity: 0.6;
  cursor: not-allowed;
}

.tool-card.coming-soon:hover {
  transform: none;
  border-color: var(--os-light-gray);
}

.tool-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.75rem;
}

.tool-card.active .tool-icon {
  background: linear-gradient(135deg, var(--os-sage-light), var(--os-teal-light));
}

.tool-card.coming-soon .tool-icon {
  background: var(--os-light-gray);
}

.tool-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--os-charcoal);
  margin-bottom: 0.75rem;
}

.tool-description {
  font-size: 0.9375rem;
  color: var(--os-warm-gray);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  align-self: flex-start;
}

.tool-badge.available {
  background: rgba(122, 157, 122, 0.15);
  color: var(--os-sage-dark);
}

.tool-badge.coming-soon {
  background: var(--os-light-gray);
  color: var(--os-warm-gray);
}

.footer {
  background: white;
  border-top: 1px solid var(--os-light-gray);
  padding: 2rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-text {
  font-size: 0.875rem;
  color: var(--os-warm-gray);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: var(--os-sage-dark);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--os-sage);
}

@media (max-width: 768px) {
  .suggestion-pills {
    grid-template-columns: 1fr;
  }

  .hero-mode {
    min-height: auto;
    padding: 3rem 1.5rem;
  }

  .hero {
    margin-bottom: 2rem;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2rem;
  }

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

  .hero-mode .chat-input {
    min-height: 80px;
    padding: 1.5rem 1.5rem;
    font-size: 1rem;
  }

  .hero-mode .chat-actions {
    padding: 0.75rem 1.5rem 1rem;
  }

  .hero-mode .chat-submit {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }
}

@media (max-width: 480px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .chatbot-section {
    padding: 1.25rem;
  }

  .chat-input-wrapper {
    position: static;
    margin-bottom: 1rem;
  }

  .chat-input {
    padding: 1rem;
    padding-right: 1.25rem;
  }

  .chat-submit {
    position: static;
    width: 100%;
    margin-top: 0.75rem;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(122, 157, 122, 0.3);
  }
}
