:root {
  /* Full Evolv28 Brand Palette */
  --midnight: #07343c;
  --pearl: #ecede9;
  --steel-teal: #547d81;
  --mustard: #e79700;
  --coral: #f17961;
  --harmony-green: #78dd81;
  --sky-blue: #6cd9ff;
  --lavender: #daa6ff;

  /* Semantic Mapping for Screenshot Look */
  --bg-main: #fcfcfc; /* Extremely light grey/off-white for background */
  --surface: #ffffff; /* Pure white for cards */
  --text-main: var(--midnight);
  --text-muted: var(--steel-teal);
  --accent-primary: var(--coral);

  --border-light: rgba(7, 52, 60, 0.06);
  --border-medium: rgba(7, 52, 60, 0.12);

  /* Ultra-soft, diffuse shadows matching the screenshot */
  --shadow-sm: 0 4px 12px rgba(7, 52, 60, 0.03);
  --shadow-md: 0 8px 24px rgba(7, 52, 60, 0.04), 0 2px 8px rgba(7, 52, 60, 0.02);
  --shadow-lg: 0 20px 40px rgba(7, 52, 60, 0.06),
    0 1px 3px rgba(7, 52, 60, 0.02);

  /* Typography */
  --font-primary: "Montserrat", sans-serif;
  --font-secondary: "Wondar Quason", "Playfair Display", serif;
}

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

body {
  font-family: var(--font-primary);
  color: var(--text-main);
  background-color: var(--bg-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.brand-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%; /* Fixed horizontal scroll */
  height: 100%;
  z-index: -1;
  background: var(--bg-main);
}

/* --- Premium Navigation --- */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(252, 252, 252, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  font-family: var(--font-secondary);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--midnight);
}

.nav-divider {
  width: 1px;
  height: 24px;
  background: var(--border-medium);
}

.nav-subtitle {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* --- Main Layout --- */
.main-content {
  max-width: 1600px;
  width: 95%;
  margin: 1.5rem auto 4rem auto;
}

.header-titles {
  text-align: center;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge-pill {
  background: rgba(241, 121, 97, 0.1);
  color: var(--accent-primary);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.header-titles h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--midnight);
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.header-titles p {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 400;
  max-width: 600px;
  line-height: 1.6;
}

/* --- Icon Formatting --- */
.icon-container-large {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.icon-container-large svg {
  width: 28px;
  height: 28px;
  color: var(--surface);
  stroke-width: 2.5;
}

/* --- Sidebar Layout --- */
.hub-container {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

.hub-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
}

.sidebar-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: block;
  padding-left: 1rem;
}

.category-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-btn {
  width: 100%;
  text-align: left;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--midnight);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-btn:hover {
  border-color: var(--midnight);
}

.category-btn.active {
  background: var(--midnight);
  color: #fff;
  border-color: var(--midnight);
  box-shadow: var(--shadow-sm);
}

/* --- Right Content Panel --- */
.hub-content {
  flex-grow: 1;
  background: var(--surface);
  border: none;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  min-width: 0;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.category-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--midnight);
  letter-spacing: -0.5px;
}

.category-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* --- ACCORDION FEED LAYOUT --- */
.documents-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem; /* Tighter gap between accordions */
}

/* The Accordion Container */
.accordion-item {
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.accordion-item:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.accordion-item.active-item {
  border-color: var(--accent-primary);
}

/* The Clickable Header Row */
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
}

.accordion-header:hover {
  background: rgba(241, 121, 97, 0.03); /* Subtle coral tint on hover */
}

.accordion-header.active {
  border-bottom: 1px solid var(--border-light);
  background: rgba(241, 121, 97, 0.05); /* slightly stronger tint when open */
}

/* Header Content (Number + Title) */
.doc-title-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.doc-number {
  background: rgba(241, 121, 97, 0.1);
  color: var(--accent-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.accordion-header h3 {
  font-size: 1.25rem;
  color: var(--midnight);
  font-weight: 600;
  transition: color 0.3s ease;
}

.accordion-header.active h3 {
  color: var(--accent-primary);
}

/* Chevron Icon */
.accordion-icon {
  color: var(--text-muted);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

/* Hidden Content Area (CSS Grid Trick for smooth height transitions!) 
  This avoids glitchy javascript height calculations.
*/
.accordion-content {
  display: grid;
  grid-template-rows: 0fr; /* Collapsed */
  transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg-main);
}

.accordion-content.expanded {
  grid-template-rows: 1fr; /* Expanded */
}

.accordion-content-inner {
  overflow: hidden; /* Required for the grid trick to work */
}

/* The actual PDF viewer box inside the accordion */
.doc-iframe-wrapper {
  position: relative;
  margin: 1.5rem; /* Inner padding inside the accordion */
  height: 70vh;
  min-height: 500px;
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.02);
}

.doc-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  border: 1px solid var(--accent-primary);
  box-shadow: 0 4px 12px rgba(241, 121, 97, 0.3);
}
.btn-primary:hover {
  background: #e0654e;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(241, 121, 97, 0.4);
}

/* --- Mobile Dropdown (Hidden on Desktop) --- */
.mobile-dropdown-wrapper {
  display: none;
}

/* --- Ultra-Premium Contact Page / Gate Styles --- */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 180px);
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 32px;
  padding: 4rem;
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.contact-header {
  text-align: center;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-header .icon-container-large,
.success-card .icon-container-large {
  background: rgba(241, 121, 97, 0.1);
  color: var(--accent-primary);
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.contact-header h2,
.success-card h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--midnight);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.contact-header p,
.success-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.premium-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--midnight);
  margin-left: 0.5rem;
}

.input-group input {
  width: 100%;
  padding: 1.2rem 1.5rem;
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  background: var(--bg-main);
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--midnight);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(241, 121, 97, 0.15);
}

.input-group input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.submit-btn {
  margin-top: 1rem;
  width: 100%;
  justify-content: center;
  padding: 1.2rem;
  font-size: 1.05rem;
}

.success-card {
  align-items: center;
  text-align: center;
  opacity: 0;
}

.success-card .icon-container-large {
  background: rgba(120, 221, 129, 0.15);
  color: var(--harmony-green);
}

/* --- Gating Overlay Styles --- */
body.gated-mode {
  overflow: hidden;
}

.gate-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(252, 252, 252, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  overflow-y: auto;
  padding: 1rem;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

.gate-backdrop .contact-card {
  margin: auto;
  box-shadow: 0 40px 80px rgba(7, 52, 60, 0.15);
}

/* --- Form Validation UI --- */
.form-error {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(241, 121, 97, 0.1);
  color: var(--accent-primary);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: -0.5rem;
  animation: fadeIn 0.3s ease;
}

.input-error {
  border-color: var(--accent-primary) !important;
  background: #fffcfc !important;
}

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

/* ========================================= */
/* --- RESPONSIVE MEDIA QUERIES --- */
/* ========================================= */

/* Sidebar Layout adjustments for Tablets & Small Laptops */
@media (max-width: 900px) {
  .hub-container {
    flex-direction: column;
    gap: 2rem;
  }

  .hub-sidebar {
    width: 100%;
    position: relative;
    top: 0;
  }

  .desktop-menu-wrapper {
    display: none;
  }

  .mobile-dropdown-wrapper {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-md);
  }

  .dropdown-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    display: block;
  }

  .select-container {
    position: relative;
  }

  .premium-select {
    width: 100%;
    appearance: none;
    background: transparent;
    border: none;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--midnight);
    cursor: pointer;
    outline: none;
  }

  .dropdown-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--midnight);
    pointer-events: none;
  }
}

/* Ultimate Immersive Mobile View for Phones */
@media (max-width: 820px) {
  .nav-container {
    padding: 0 1.5rem;
  }

  .main-content {
    width: 100%;
    margin-top: 2rem;
  }

  .mobile-dropdown-wrapper {
    margin: 0 1.5rem;
  }

  .hub-content {
    padding: 2rem 1.5rem;
    border-radius: 24px;
    border: 1px solid var(--border-light);
  }

  .category-header {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .accordion-header {
    padding: 1.25rem 1rem;
  }

  .accordion-header h3 {
    font-size: 1.1rem;
  }

  .accordion-content .doc-iframe-wrapper {
    margin: 1rem;
    height: 60vh;
    min-height: 400px;
  }
}

/* Specific Contact Card constraints for ultra-small phones */
@media (max-width: 420px) {
  .contact-card {
    padding: 2.5rem 1.5rem;
    border-radius: 24px;
  }
}

/* --- Home State Styles --- */
.home-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  min-height: 50vh;
  animation: fadeIn 0.5s ease;
}

.home-state-title {
  font-family: var(--font-primary);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--midnight);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  max-width: 800px;
  letter-spacing: -1px;
}

.text-coral {
  color: var(--accent-primary);
}

.home-state-desc {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 750px;
  font-weight: 400;
}

/* Mobile adjustments for the home state */
@media (max-width: 820px) {
  .home-state-title {
    font-size: 2.2rem;
  }
  .home-state-container {
    padding: 2rem 1rem;
  }
}

/* --- Home Hero Image Styles --- */
.home-hero-image {
  max-width: 850px;
  border-radius: 24px;
  overflow: hidden;
  background-color: var(--surface);
  width: 500px;

  /* Slight delay so it fades in just after the text */
  animation: fadeIn 0.8s ease forwards;
  opacity: 0;
}

.home-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 820px) {
  .home-hero-image {
    width: 100%;
    border-radius: 16px;
  }
}

/* --- Special Action Sidebar Buttons --- */

/* App Onboarding Button */
.category-btn.btn-onboarding {
  background: rgba(241, 121, 97, 0.1);
  color: var(--accent-primary);
  border-color: transparent;
}
.category-btn.btn-onboarding:hover {
  border-color: var(--accent-primary);
}

/* Contact Us Button */
.category-btn.btn-contact {
  background: var(--pearl);
  border-color: var(--pearl);
  color: var(--midnight);
  font-weight: 600;
}

/* Contact Us Button - Hover State */
.category-btn.btn-contact:hover {
  background: #e2e4e0;
  border-color: var(--border-medium);
}

/* Contact Us Button - Active State (When Clicked) */
.category-btn.btn-contact.active {
  background: var(--midnight);
  color: #fff;
  border-color: var(--midnight);
}
