/* Cloudey Brand Colors */
:root {
  --cyan-primary: #06B6D4;
  --cyan-hover: #0891B2;
  --cyan-dark: #0E7490;
  --cyan-light: #ECFEFF;
  --blue: #3B82F6;
  --yellow: #FACC15;
  --green: #10B981;
  --red: #EF4444;
  --text-primary: #171717;
  --text-body: #404040;
  --text-muted: #737373;
  --bg-white: #FDFDFD;
  --bg-off: #FAFAFA;
  --bg-dark: #0F172A;
  --hero-gradient: linear-gradient(135deg, #06B6D4 0%, #3B82F6 100%);
  --btn-gradient: linear-gradient(to right, #06B6D4, #0891B2);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-white);
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 {
  font-family: "Syne", sans-serif;
  color: var(--text-primary);
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.75rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 640px) {
  .nav {
    padding: 0.5rem 1rem;
    padding-top: max(0.5rem, env(safe-area-inset-top));
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .btn-nav {
    display: none;
  }
}

.nav-spacer {
  width: 0;
}

.nav-logo {
  justify-self: center;
}

.btn-nav {
  justify-self: end;
}

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

.logo-img {
  height: 100px;
  width: auto;
  display: block;
}

@media (max-width: 640px) {
  .logo-img {
    height: 72px;
  }
  .logo-footer .logo-img-footer {
    height: 56px;
  }
}

.logo-footer .logo-img-footer {
  height: 96px;
}

.btn-nav {
  padding: 0.5rem 1.25rem;
  background: var(--btn-gradient);
  color: white !important;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-nav:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .btn-nav {
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg-white);
  color: var(--text-body);
  padding: 6rem 2rem 4rem;
  overflow: hidden;
}

@media (max-width: 640px) {
  .hero {
    padding: 5rem 1rem 3rem;
    min-height: auto;
  }
}

.hero-dots {
  display: none; /* Solid white hero — no dot overlay */
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .hero-image {
    order: -1;
  }
}

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

@media (max-width: 768px) {
  .hero-content {
    text-align: center;
  }
}

.hero-headline {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--text-primary);
}

.hero-subheadline {
  font-size: clamp(1.125rem, 2.5vw, 1.35rem);
  margin: 0 0 1rem;
  color: var(--text-body);
}


.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  width: 100%;
  max-width: 800px;
  height: auto;
}

@media (max-width: 768px) {
  .hero-image img {
    max-width: 360px;
  }
}

@media (max-width: 480px) {
  .hero-image img {
    max-width: 280px;
  }
  .hero-headline {
    font-size: 1.75rem;
  }
  .hero-subheadline {
    font-size: 1rem;
  }
}

.btn-hero {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: var(--btn-gradient);
  color: white !important;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
}

/* Sections */
.section {
  padding: 4rem 2rem;
}

@media (max-width: 640px) {
  .section {
    padding: 2.5rem 1rem;
  }
}

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

/* Intro */
.section-intro {
  background: var(--bg-white);
}

.intro-body {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-body);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 640px) {
  .intro-body {
    font-size: 1rem;
  }
}

/* Problem Cards */
.section-problem {
  background: var(--bg-off);
}

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

@media (max-width: 640px) {
  .cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .card {
    padding: 1.25rem;
  }
}

.card {
  background: var(--bg-white);
  padding: 1.75rem;
  border-radius: 12px;
  border-left: 4px solid var(--cyan-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.card-icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

.card-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-body);
}

.card-text em {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* How It Works */
.section-how {
  background: var(--bg-white);
}

.container-how {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.container-how .chat-snippet {
  order: -1;
}

.container-how .steps {
  order: 1;
}

@media (max-width: 900px) {
  .container-how {
    grid-template-columns: 1fr;
  }
  .container-how .chat-snippet {
    order: -1;
    margin: 0 auto;
  }
  .container-how .steps {
    order: 2;
  }
}

.steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.step {
  text-align: center;
  max-width: 400px;
}

.step-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
}

.step-title {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.step-text {
  margin: 0;
  color: var(--text-body);
}

/* Chat Snippet */
.chat-snippet {
  max-width: 560px;
  margin: 0;
  background: var(--bg-dark);
  border-radius: 12px;
  padding: 1.5rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3);
}

@media (max-width: 640px) {
  .chat-snippet {
    padding: 1rem;
    font-size: 0.8rem;
  }
  .step-title {
    font-size: 1.1rem;
  }
  .step-text {
    font-size: 0.9rem;
  }
}

.section-how .chat-line {
  min-height: 1.5em;
}

.chat-cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.chat-line {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-line:last-child {
  border-bottom: none;
}

.chat-user {
  color: var(--text-muted);
}

.chat-user.chat-user--asking::before {
  content: "You: ";
  color: var(--cyan-light);
}

.chat-bot {
  color: var(--cyan-primary);
}

.chat-bot.chat-bot--responding::before {
  content: "Cloudey: ";
  color: var(--cyan-light);
  font-weight: 600;
}

/* Stats Bar */
.stats-bar {
  background: var(--hero-gradient);
  padding: 2.5rem 2rem;
}

.stats-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2rem;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
}

.stat-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
}

.stat-divider {
  width: 1px;
  height: 2rem;
  background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 640px) {
  .stats-bar {
    padding: 2rem 1rem;
  }
  .stats-inner {
    flex-direction: column;
    gap: 1rem;
  }
  .stat-divider {
    width: 60%;
    height: 1px;
    max-width: 120px;
  }
  .stat-value {
    font-size: 1.25rem;
  }
  .stats-inner .stat:last-child .stat-value {
    font-size: 0.95rem;
    word-break: break-word;
  }
  .stat-label {
    font-size: 0.8rem;
  }
}

/* Signup Form */
.section-signup {
  background: #FFFFFF;
  position: relative;
  overflow: hidden;
}

.container-signup {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 520px;
}

.signup-content {
  position: relative;
  z-index: 2;
  max-width: 480px;
  padding-right: 2rem;
}

.signup-title {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

@media (max-width: 640px) {
  .signup-title {
    font-size: 1.5rem;
  }
  .signup-subtitle {
    font-size: 0.95rem;
  }
}

.signup-subtitle {
  color: var(--text-muted);
  margin: 0 0 2rem;
}

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

.signup-image {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 65%;
  max-width: 720px;
  height: 100%;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.signup-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right center;
}

@media (max-width: 900px) {
  .container-signup {
    flex-direction: column;
    min-height: auto;
  }
  .signup-content {
    padding-right: 0;
    margin-top: 2rem;
    order: 2;
  }
  .signup-image {
    position: relative;
    width: 100%;
    max-width: 420px;
    min-height: 320px;
    transform: none;
    margin: 0 auto;
    order: -1;
  }
  .signup-image img {
    object-position: center;
  }
}

@media (max-width: 640px) {
  .container-signup {
    gap: 1rem;
  }
  .signup-content {
    margin-top: 1rem;
  }
  .signup-image {
    max-width: 280px;
    min-height: 220px;
  }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.required {
  color: var(--red);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.875rem;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--cyan-primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-message {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  display: none;
}

.form-message.visible {
  display: block;
}

.form-message.success {
  background: #DCFCE7;
  color: #166534;
}

.form-message.error {
  background: #FEE2E2;
  color: #991B1B;
}

.btn-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--btn-gradient);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-submit:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Footer */
.footer {
  background: var(--cyan-light);
  color: var(--text-primary);
  padding: 4rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(6, 182, 212, 0.2);
}

@media (max-width: 640px) {
  .footer {
    padding: 2.5rem 1rem;
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  }
  .footer-tagline {
    font-size: 1rem;
  }
  .footer-message {
    font-size: 0.9rem;
  }
}

.footer-inner {
  max-width: 560px;
  margin: 0 auto;
}

.footer .logo {
  display: inline-flex;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-family: "Syne", sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  margin: 0 0 1rem;
  color: var(--text-primary);
}

.footer-message {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-body);
  margin: 0 0 1.5rem;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--cyan-primary);
  color: white;
  transition: transform 0.2s, background 0.2s;
}

.footer-social:hover {
  background: var(--cyan-hover);
  transform: translateY(-2px);
}

.footer-social svg {
  width: 22px;
  height: 22px;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

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

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