/* 
   Sovi.AI Brand Styling 
*/

:root {
  --bg-color: #fafafa;
  --card-bg: #ffffff;
  --text-main: #1a1a2e;
  --text-gray: #6b7280;
  --border-color: #e5e7eb;
  --primary-purple: #8b5cf6;
  --primary-purple-hover: #7c3aed;
  --highlight-purple: #f3e8ff;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --container-width: 1100px;
  --transition-speed: 0.3s;
  --border-radius: 16px;

  /* Strict 8pt Spacing Scale */
  --space-xs: 0.5rem;  /* 8px */
  --space-sm: 1rem;    /* 16px - 内部紧凑元素 */
  --space-md: 1.5rem;  /* 24px - 内部普通元素 */
  --space-lg: 3rem;    /* 48px - 大板块内部 padding */
  --space-xl: 6rem;    /* 96px - 板块与板块之间的间距 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-main); color: var(--text-main); background-color: var(--bg-color); line-height: 1.6; -webkit-font-smoothing: antialiased; }

h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; margin-bottom: var(--space-sm); color: var(--text-main); letter-spacing: -0.5px; }
h1 { font-size: 3.5rem; margin-bottom: var(--space-md); }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.3rem; }
p { color: var(--text-gray); margin-bottom: var(--space-sm); font-weight: 500; }
ul { color: var(--text-gray); margin-left: 1.5rem; margin-bottom: var(--space-sm); font-weight: 500; }
li { margin-bottom: var(--space-xs); }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 2rem; }
section { padding: var(--space-lg) 0; scroll-margin-top: 76px; }
.bg-light { background-color: white; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }

.section-header { text-align: center; max-width: 700px; margin: 0 auto var(--space-lg); }

header { padding: 1.25rem 0; position: fixed; top: 0; width: 100%; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); z-index: 1000; border-bottom: 1px solid var(--border-color); }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 700; font-size: 1.5rem; letter-spacing: -0.5px; color: var(--text-main); display: flex; align-items: center; gap: 0.6rem;}
.logo > span { display: inline-flex; align-items: baseline; }
.logo > span > span { font-weight: 800; background: linear-gradient(135deg, var(--primary-purple), #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo-img { height: 32px; width: 32px; object-fit: contain; border-radius: 8px; background-color: #000; padding: 4px; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 2rem; margin: 0; }
.nav-links a { text-decoration: none; color: #374151; font-weight: 600; font-size: 0.95rem; transition: color var(--transition-speed); }
.nav-links a:hover { color: var(--primary-purple); }
.nav-links a.btn-primary { color: white; }
.nav-links a.btn-primary:hover { color: white; }

.btn-primary, .btn-secondary { display: inline-flex; align-items: center; justify-content: center; padding: 0.7rem 2rem; text-decoration: none; border-radius: 9999px; font-weight: 700; transition: all var(--transition-speed) ease; cursor: pointer; border: none; font-family: inherit; font-size: 0.95rem; line-height: 1.6; }
.btn-primary { background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-hover)); color: white; box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3); }
.btn-primary:hover { background: linear-gradient(135deg, #9f75ff, #8b5cf6); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124, 58, 237, 0.45); }
.btn-secondary { background-color: var(--highlight-purple); color: var(--primary-purple-hover); border: none; }
.btn-secondary:hover { background-color: #e9d5ff; transform: translateY(-2px); }
.btn-large { padding: 1rem 2.5rem; font-size: 1.1rem; }
.btn-full { width: 100%; }

.hero-section {
    position: relative;
    width: 100%;
    background-image: url('../assets/images/hero-bg.png');
    background-size: 100% auto; /* Standard proportional fit, preventing any vertical zoom cropping or stretching! */
    background-position: center top; /* Align with the top header bar to eliminate any blank gap! */
    background-repeat: no-repeat;
    background-color: #ffffff; /* Fills extra space with pure white */
    padding-top: 80px; /* Offset fixed header and allow background to flow behind blurred navbar! */
    overflow: hidden;
}
.hero { margin-top: 0; display: flex; align-items: center; gap: 4rem; min-height: 720px; }

#requirements {
    border-top: none !important; /* Removes the grey divider line between the hero background and this section */
}
.hero-content { flex: 1; }
.hero-content p { font-size: 1.25rem; max-width: 500px; }
.hero-cta { display: flex; gap: var(--space-sm); margin-top: var(--space-md); }
.hero-image { flex: 1; }
.image-placeholder { width: 100%; aspect-ratio: 4/5; border-radius: 24px; background: linear-gradient(135deg, var(--highlight-purple), #cfdef3); display: flex; align-items: center; justify-content: center; color: var(--primary-purple-hover); font-weight: 800; font-size: 1.5rem; text-align: center; padding: 2rem; border: 1px solid var(--border-color); box-shadow: 0 20px 40px rgba(0,0,0,0.05);}

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: var(--space-md); }

.card, .step-card { padding: var(--space-lg); border: 1px solid var(--border-color); border-radius: var(--border-radius); background: var(--card-bg); height: 100%; transition: transform var(--transition-speed), box-shadow var(--transition-speed); box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.card:hover, .step-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.card.dark { background: var(--text-main); color: white; border: none; }
.card.dark p, .card.dark ul { color: #9ca3af; }
.card.dark h2, .card.dark h3 { color: white; }

.step-number { font-size: 0.875rem; color: var(--primary-purple); margin-bottom: var(--space-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; background: var(--highlight-purple); display: inline-block; padding: 0.3rem 0.8rem; border-radius: 9999px; }

.submit-container { display: flex; gap: var(--space-lg); align-items: center; }
.submit-content { flex: 1; position: sticky; top: 120px; }
.submit-form-wrapper { flex: 1; background: var(--card-bg); padding: var(--space-lg); border-radius: 24px; border: 1px solid var(--border-color); box-shadow: 0 20px 40px rgba(0,0,0,0.04); }

.form-group { margin-bottom: var(--space-md); }
label { display: block; margin-bottom: var(--space-xs); font-size: 0.875rem; font-weight: 700; color: var(--text-main); }
input, textarea, select { width: 100%; padding: 0.9rem 1rem; border: 1px solid var(--border-color); border-radius: 8px; font-family: inherit; font-size: 1rem; transition: border-color var(--transition-speed), box-shadow var(--transition-speed); background-color: var(--bg-color); color: var(--text-main); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary-purple); background-color: white; box-shadow: 0 0 0 3px var(--highlight-purple); }

.hidden { display: none; }
.message { margin-top: 1.5rem; padding: 1rem; border-radius: 8px; font-size: 0.95rem; text-align: center; font-weight: 600; }
.message.success { background-color: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.message.error { background-color: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

footer { padding: 3rem 0; text-align: center; background: white; border-top: 1px solid var(--border-color); }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.footer-logo { font-weight: 800; display: flex; align-items: center; gap: 0.5rem;}
.footer-logo span { color: var(--primary-purple); }
.copyright { font-size: 0.875rem; margin-bottom: 0; color: var(--text-gray); font-weight: 500;}

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

.badge { display: inline-block; padding: 0.3rem 1rem; background: var(--highlight-purple); color: var(--primary-purple-hover); border: none; border-radius: 9999px; font-size: 0.85rem; font-weight: 700; margin-bottom: 1rem; }

@media (max-width: 900px) {
    :root {
      --space-xs: 0.25rem; /* 4px */
      --space-sm: 0.75rem; /* 12px */
      --space-md: 1.25rem; /* 20px */
      --space-lg: 2rem;    /* 32px */
      --space-xl: 3rem;    /* 48px */
    }
    .hero { flex-direction: column; text-align: center; padding-top: 2rem; min-height: auto; }
    .hero-content p { margin: 0 auto var(--space-lg); }
    .hero-cta { justify-content: center; }
    .hero-image { width: 100%; max-width: 500px; }
    .submit-container { flex-direction: column; }
    .submit-content { position: static; text-align: center; }
    .submit-form-wrapper { width: 100%; padding: var(--space-lg); }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .nav-links { display: none; }
}

/* High Fidelity 3-Column Footer Grid */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* High Fidelity Flexible Sizing for Ready to Apply section with Spacious Sizing */
#submit {
    min-height: auto;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: var(--space-xl) 0; /* Generous vertical padding to guarantee beautiful breathing room on desktop */
    box-sizing: border-box;
    scroll-margin-top: 76px;
}

#submit .submit-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: var(--space-lg); /* Standard comfortable gap matching other sections exactly */
}

#submit .submit-content {
    flex: none;
    text-align: center;
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
    position: static;
}

#submit .submit-content h2 {
    font-size: 2.2rem !important; /* Restored standard large h2 size for perfect consistency */
    margin-bottom: var(--space-sm) !important; /* Set to exactly --space-sm to match other sections perfectly */
    color: var(--text-main);
}

#submit .submit-content p {
    font-size: 1rem !important; /* Restored standard lead p size */
    line-height: 1.5 !important;
    color: var(--text-gray);
    margin: 0 !important;
}

#submit .submit-form-wrapper {
    flex: none;
    width: 100%;
    max-width: 660px; /* Center & constrain width */
    margin: 0 auto;
    padding: var(--space-lg) !important; /* Restored standard comfortable card padding */
    border-radius: 24px; /* Matches other cards */
    box-shadow: 0 15px 35px rgba(0,0,0,0.03);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    height: auto;
    box-sizing: border-box;
}

#submit .form-group {
    margin-bottom: 0.8rem !important; /* Taller, highly optimized margin for single viewport layout! */
}

#submit label {
    margin-bottom: 0.35rem !important;
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.875rem !important; /* Restored standard label size! */
}

#submit input[type="text"],
#submit input[type="number"],
#submit input[type="url"],
#submit select {
    padding: 0.5rem 1.1rem !important; /* Standard luxurious input padding! */
    font-size: 0.95rem !important; /* Standard input font size! */
    border: 1px solid var(--border-color);
    border-radius: 8px !important;
    width: 100%;
    box-sizing: border-box;
    height: 40px !important; /* Premium taller input height for great usability while still fitting above the fold */
    font-family: inherit;
}

/* Big, Spacious Drag & Drop Zone overrides */
#submit #uploadZone {
    padding: 0.75rem 1.5rem !important; /* Taller uploader padding */
    border-radius: 12px !important;
    border: 2px dashed rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.02);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1.25rem !important;
}

#submit #uploadZone div[style*="font-size: 2.5rem"] {
    font-size: 2rem !important; /* Sleek icon */
    margin-bottom: 0 !important;
    display: block !important;
    line-height: 1 !important;
}

#submit #uploadZone p[style*="font-weight: 700"] {
    font-size: 0.9rem !important; /* Clean text size */
    margin-bottom: 0.15rem !important;
    display: block !important;
    color: var(--text-main);
    line-height: 1.2 !important;
}

#submit #uploadZone p[style*="font-size: 0.8rem"] {
    font-size: 0.78rem !important;
    display: block !important;
    color: var(--text-gray);
    margin-bottom: 0 !important;
    line-height: 1.2 !important;
}

/* File List Preview Overrides */
#submit #fileList {
    margin-top: 0.5rem !important;
    gap: 0.4rem !important;
}

#submit #fileList > div {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
}

/* Divider 'or' overrides */
#submit div[style*="margin: 1.25rem 0"] {
    margin: 0.75rem 0 !important; /* Standard sleek divider margin */
}

/* Submit Button Overrides */
#submit button[type="submit"] {
    padding: 0.6rem 2rem !important; /* Standard luxurious button padding! */
    font-size: 0.95rem !important; /* Standard button font! */
    line-height: 1.5 !important;
    margin-top: 0.8rem !important;
    width: 100%;
    box-sizing: border-box;
    height: 42px !important; /* Premium button height */
}

/* Status message overrides */
#submit .message {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.875rem !important;
    margin-top: 0.6rem !important;
    border-radius: 8px !important;
}

/* Responsive handling for mobile/vertical screens */
@media (max-width: 900px) {
    #submit {
        height: auto;
        max-height: none;
        overflow: visible;
        padding: var(--space-xl) 0;
    }
    #submit .submit-container {
        flex-direction: column;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    #submit .submit-form-wrapper {
        width: 100%;
        padding: var(--space-lg) !important;
        height: auto;
        max-height: none;
        overflow: visible;
    }
    #submit .form-group {
        margin-bottom: var(--space-md) !important;
    }
    #submit label {
        margin-bottom: var(--space-xs) !important;
        font-size: 0.875rem !important;
    }
    #submit input[type="text"],
    #submit input[type="number"],
    #submit input[type="url"],
    #submit select {
        padding: 0.7rem 1.2rem !important;
        font-size: 0.95rem !important;
        border-radius: 9999px !important;
    }
    #submit #uploadZone {
        padding: 2rem !important;
        border-radius: 12px !important;
        display: block; /* Restore block layout on mobile */
    }
    #submit #uploadZone div[style*="font-size: 2.5rem"] {
        font-size: 2.5rem !important;
        margin-bottom: 0.5rem !important;
        display: block;
    }
    #submit #uploadZone p[style*="font-weight: 700"] {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
        display: block;
    }
    #submit #uploadZone p[style*="font-size: 0.8rem"] {
        font-size: 0.8rem !important;
    }
    #submit div[style*="margin: 1.25rem 0"] {
        margin: 1.25rem 0 !important;
    }
    #submit button[type="submit"] {
        padding: 0.7rem 2rem !important;
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
}

/* 
   Form Row Layout Styles
*/
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
}

/* 
   Video Carousel Styles
*/
.video-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 325px;
  margin: 0 auto;
}

.video-container-box {
  width: 100%;
  max-width: 325px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.1);
  background: white;
  z-index: 1;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--primary-purple);
  color: var(--primary-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
  padding: 0;
}

.carousel-arrow:hover {
  background: var(--primary-purple);
  color: white;
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
  transform: translateY(-50%) scale(1.08);
}

.carousel-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.prev-arrow {
  left: -60px;
}

.next-arrow {
  right: -60px;
}

.carousel-dots {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  justify-content: center;
  align-items: center;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.carousel-dot:hover {
  background: rgba(139, 92, 246, 0.4);
}

.carousel-dot.active {
  background: var(--primary-purple);
  transform: scale(1.3);
}

/* Responsive adjustments for video carousel */
@media (max-width: 480px) {
  .prev-arrow {
    left: 8px;
    background: rgba(255, 255, 255, 0.9);
  }
  .next-arrow {
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
  }
  .carousel-arrow {
    width: 40px;
    height: 40px;
  }
}

/* 
   Workflow Timeline Styles
*/
.workflow-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 50px;
}

.workflow-timeline::before {
  content: '';
  position: absolute;
  left: 72px; /* 50px padding + 22px (half of 44px badge width) */
  top: 1.5rem;
  bottom: 1.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-purple), var(--highlight-purple));
  z-index: 0;
}

.workflow-step-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.workflow-step-badge {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-purple);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.25);
  margin-top: 0.25rem;
}

.workflow-step-content {
  flex: 1;
  background: var(--card-bg);
  padding: var(--space-lg);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: all var(--transition-speed) ease;
}

.workflow-step-content:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.05);
  border-color: rgba(139, 92, 246, 0.2);
}

.workflow-step-content h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
  color: var(--text-main);
}

.workflow-step-content p {
  font-size: 0.95rem;
  color: var(--text-gray);
  margin-bottom: 0;
  line-height: 1.6;
}

/* Responsive adjustments for workflow timeline */
@media (max-width: 600px) {
  .workflow-timeline {
    padding-left: 40px;
  }
  .workflow-timeline::before {
    left: 58px; /* 40px padding + 18px (half of 36px badge width) */
  }
  .workflow-step-item {
    gap: var(--space-xs);
  }
  .workflow-step-badge {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .workflow-step-content {
    padding: var(--space-md);
  }
}