/* =================================================================
   5) HERO
   ================================================================= */
.hero--suite {
  position: relative;
  isolation: isolate;
  overflow: clip;
  font-family: var(--font-ui);
  text-align: center;
  /* keep neutral; content can choose its own align */
  background: 
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--brand-primary) 4%, transparent) 0%, transparent 75%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  
  /* OPTIMIZED PROFESSIONAL HEIGHT */
  min-height: auto; /* Fit to content height */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Switch to fixed start for precise top margin */
  
  /* FIXED ALIGNMENT: Precise control over where content starts/ends */
  padding-top: clamp(2rem, 10vh, 8rem); /* Tighter mobile start (2rem) */
  padding-bottom: 2rem; /* Reduced bottom cushion significantly */
  
  padding-inline: 0;
  /* container handles horizontal gutters */
}

/* =================================================================
   HERO FLOW ANIMATION (World-Class SaaS Polish)
   ================================================================= */

.hero-flow {
    width: 100%;
    max-width: var(--container-wide);
    margin: 2.5rem auto 1rem; /* Reduced top margin from 3rem */
    padding: 0 var(--gutter);
    position: relative;
    z-index: 2; /* Ensure above decoration */
}

.hero-flow__track {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0; /* Connectors handle spacing */
    position: relative;
}

/* --- STEP CONTAINER --- */
.hero-flow__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: flowStepReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    width: 140px; /* Fixed width for consistency */
    flex-shrink: 0;
}

/* --- ICON WRAPPER (The "Jewel") --- */
.hero-flow__icon-wrapper {
    width: 64px; /* Optimized size */
    height: 64px;
    border-radius: 20px;
    background: white;
    
    /* Subtle gradient border effect via double shadow */
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 10px 15px -3px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 1), /* Inner highlight */
        0 0 0 1px rgba(226, 232, 240, 0.8); /* Outer subtle border */

    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--brand-primary);
    
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy spring */
    position: relative;
    z-index: 2;
}

/* Hover State: Lift & Glow */
.hero-flow__step:hover .hero-flow__icon-wrapper {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 
        0 20px 25px -5px rgba(241, 90, 36, 0.15), /* Accent color glow */
        0 8px 10px -6px rgba(241, 90, 36, 0.1),
        0 0 0 2px var(--brand-accent); /* Active border */
    color: var(--brand-accent);
}

/* --- LABELS --- */
.hero-flow__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.hero-flow__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
    letter-spacing: -0.01em;
    max-width: 130px; /* Prevent wide spilling */
    transition: color 0.3s ease;
}

.hero-flow__step:hover .hero-flow__label {
    color: var(--brand-accent);
}

/* --- CONNECTORS (The "Pipeline") --- */
.hero-flow__connector {
    flex: 1;
    min-width: 40px; /* Minimum space between balls */
    max-width: 120px; /* Keep them together on huge screens */
    height: 3px; /* Slightly thicker for visibility */
    
    /* Perfect Center Alignment:
       Icon Height: 64px / 2 = 32px.
       Connector Height: 3px / 2 = 1.5px.
       Top = 32 - 1.5 = 30.5px */
    margin-top: 30.5px; 
    
    position: relative;
    background: #e2e8f0; /* Slate 200 */
    border-radius: 99px;
    overflow: hidden;
    margin-left: -10px; /* Pull into icon slightly */
    margin-right: -10px;
    z-index: 1; /* Below icons */
}

/* The travelling light/dot */
.connector-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        var(--brand-accent), 
        transparent
    );
    opacity: 0.8;
    transform: translateX(-100%);
    animation: pulseTravel 2.5s ease-in-out infinite;
    filter: blur(2px); /* Glowing effect */
}

/* --- CAPTION --- */
.hero-flow__caption {
    text-align: center;
    margin-top: 1.25rem; /* Reduced from 1.5rem */
    font-size: 1.125rem;
    color: var(--muted);
    font-weight: 500;
    max-width: 900px; /* Kept wide */
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: flowStepReveal 1s ease 1.5s forwards; /* Late reveal */
}

/* --- ANIMATIONS --- */
@keyframes flowStepReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseTravel {
    0% { transform: translateX(-150%); }
    100% { transform: translateX(250%); }
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1024px) {
    .hero-flow__track {
        flex-wrap: wrap;
        gap: 3rem;
    }
    .hero-flow__connector {
        display: none; /* Hide horizontal lines on wrap */
    }
    
    /* Add subtle dashed lines or just nice spacing instead */
    .hero-flow__step::after {
        content: "→";
        position: absolute;
        right: -1.5rem;
        top: 2rem;
        font-size: 1.5rem;
        color: var(--border);
        opacity: 0.5;
    }
    .hero-flow__step:last-child::after,
    .hero-flow__step:nth-child(3)::after { /* Remove on potential wrap points */
        content: none;
    }
}

@media (max-width: 768px) {
    .hero-flow {
        margin-top: 3rem;
    }

    .hero-flow__track {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding-left: 1.5rem; /* Space for timeline line */
        gap: 2rem;
    }

    /* Vertical Timeline Line */
    .hero-flow__track::before {
        content: "";
        position: absolute;
        left: 32px; /* Center of 64px icon roughly (plus padding offset) */
        top: 20px;
        bottom: 20px;
        width: 2px;
        background: var(--border);
        z-index: 0;
    }

    .hero-flow__step {
        width: 100%;
        flex-direction: row;
        gap: 1.5rem;
        text-align: left;
        transform: none !important; /* Reset transform for simple mobile load */
        opacity: 1 !important;
        animation: none; /* Disable complex sequence on mobile for performance */
    }
    
    .hero-flow__step::after { content: none; }

    .hero-flow__icon-wrapper {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
        flex-shrink: 0;
    }

    .hero-flow__label {
        text-align: left;
        max-width: none;
        font-size: 1rem;
    }
    
    .hero-flow__content {
        align-items: flex-start;
    }
}

/* Subtle background blobs (reduced visual noise + motion safe) */
.hero--suite::before,
.hero--suite::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .35;
  z-index: -1;
}

.hero--suite::before {
  width: 520px;
  height: 520px;
  left: -140px;
  top: -120px;
  background: radial-gradient(circle at 40% 40%, var(--mesh-a) 0%, transparent 65%);
}

.hero--suite::after {
  width: 640px;
  height: 640px;
  right: -180px;
  bottom: -160px;
  background: radial-gradient(circle at 60% 60%, var(--mesh-b) 0%, transparent 70%);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: no-preference) {

  .hero--suite::before,
  .hero--suite::after {
    animation: mesh-drift 22s ease-in-out infinite alternate;
  }
}

/* ==============================
   GRID (refined)
   ============================== */
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  /* a touch more room for copy */
  gap: clamp(var(--space-3), 2vw, var(--space-5));
  /* tighter, consistent */
  align-items: center;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Remove heavy decorative overlays on the grid (cleaner, faster) */
.hero__grid::before,
.hero__grid::after {
  content: none;
}

/* Responsive: stack neatly on smaller screens */
@media (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
}

/* Spider Web / Network Decoration */
.hero-web {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%; /* Slightly wider */
    pointer-events: none;
    z-index: 0;
    opacity: 0.5; /* Increased from 0.15 for visibility */
    background-image: radial-gradient(circle at center, #94a3b8 1px, transparent 1px), 
                      linear-gradient(to right, #e2e8f0 1px, transparent 1px), 
                      linear-gradient(to bottom, #e2e8f0 1px, transparent 1px);
    background-size: 32px 32px, 64px 64px, 64px 64px; /* Larger pattern */
    
    /* Cross-browser masking */
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
    
    /* Animation */
    animation: webDrift 10s ease-in-out infinite alternate;
}

.hero-web--left {
    left: 0;
    -webkit-mask-image: linear-gradient(to right, black, transparent);
    mask-image: linear-gradient(to right, black, transparent);
    transform: skewY(-12deg); 
    transform-origin: top left;
}

.hero-web--right {
    right: 0;
    -webkit-mask-image: linear-gradient(to left, black, transparent);
    mask-image: linear-gradient(to left, black, transparent);
    transform: skewY(12deg);
    transform-origin: top right;
}

@keyframes webDrift {
    0% { transform: skewY(-12deg) scale(1); opacity: 0.4; }
    100% { transform: skewY(-10deg) scale(1.05); opacity: 0.6; }
}

/* Specific keyframes for right side to match its skew */
.hero-web--right {
    animation-name: webDriftRight;
}

@keyframes webDriftRight {
    0% { transform: skewY(12deg) scale(1); opacity: 0.4; }
    100% { transform: skewY(10deg) scale(1.05); opacity: 0.6; }
}

/* Hide on Mobile/Tablet */
@media (max-width: 1024px) {
    .hero-web { display: none; }
}

.hero__content {
  order: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* horizontal center */
  justify-content: center;
  /* vertical if you want within its cell */
  text-align: center;
  /* center text */
  margin-inline: auto;
  /* push to center in grid column */
}

/* Professional Pill Badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: .4rem 1rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-accent) 8%, transparent);
  color: var(--brand-accent);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 0.75rem; /* Smaller, sharper */
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-accent) 20%, transparent); /* Refined border */
  margin-bottom: 1.5rem; /* Increased breathing room (was 1rem) */
  transition: all .25s ease;
}

.hero__badge:hover {
  background: color-mix(in srgb, var(--brand-accent) 12%, transparent);
  transform: translateY(-1px);
}

/* =================================================================
   HERO TITLE (VERTICAL SLIDE - BULLETPROOF v3)
   ================================================================= */
.hero__title {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  text-align: center;
  
  margin: 0 0 1.5rem; /* Increased margin (was 1rem) */
  
  font-weight: 900;
  /* Increased min-size to 2.75rem (approx 44px) for purposeful, confident mobile display */
  font-size: clamp(2.75rem, 6vw, 4.5rem); 
  line-height: 1.2; /* Relaxed from 1.1 for legibility */
  letter-spacing: -0.03em;
  color: var(--brand-primary);
}

/* Static "Direct" */
.hero-title__static {
  margin-right: 0.25rem;
  /* Ensure it has height to prop line */
  line-height: inherit;
}

/* Rotator container (The "Window") */
.hero-title__rotator {
  position: relative;
  display: inline-block; /* Revert to inline-block for correct baseline align */
  height: 1.25em;      
  line-height: 1.25em;
  overflow: hidden;        
  vertical-align: -0.2em; /* visual adjustment to align baselines with static text */
  text-align: left;        
  
  width: auto; /* Handled by JS */
  box-sizing: content-box; 
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* The Sliding Wrapper */
.hero-title__slide-wrapper {
  display: block;
  width: 100%;
  will-change: transform;
}

/* Individual Terms */
.hero-title__term {
  height: 1.25em; /* Match container */
  line-height: 1.25em; /* Match container */
  display: block; /* distinct block for each term */
  white-space: nowrap;
  padding-left: 5px; /* slight visual separation */
  
  /* Premium Brand Consistency (Matches Primary CTA) - Reversed (Dark to Light) */
  background: linear-gradient(135deg, var(--btn-primary-grad-end) 0%, var(--btn-primary-grad-start) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@supports not (-webkit-background-clip:text) {
  .hero-title__term {
    color: var(--brand-accent);
    background: none;
  }
}

.hero__title::after {
  content: none; 
}

/* Subtitle Wrapper - structured logic */
.hero__subtitle-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem; /* Increased gap (was 0.75rem) */
  margin: 0 auto 2.5rem; /* Increased bottom margin */
  max-width: 900px;
  width: 100%;
}

.hero__subtitle--primary {
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.5rem); /* Large, readable statement */
  font-weight: 500;
  line-height: 1.4; /* Relaxed from 1.35 */
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance; /* Prevent widows */
}

.hero__subtitle--secondary {
  color: var(--muted);
  font-size: var(--fs-500); /* Fluid resizing */
  font-weight: 400;
  line-height: 1.5;
  margin: 0 auto;
  max-width: 90ch; /* Significantly increased from 65ch to fix user issue */
  background: transparent;
  text-wrap: pretty; /* Better paragraph wrapping */
}



.hero__tagline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem .75rem;
  margin: var(--space-3) 0 var(--space-5); /* Reduced margins */
  padding: 0;
  list-style: none;
  line-height: 1.3;
  text-align: left;
}

.hero__tagline span {
  padding: .4rem 1rem;
  border-radius: 999px;
  background: white;
  color: var(--brand-primary);
  font-weight: 600;
  font-size: var(--fs-300);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.hero__tagline span:hover {
  background: var(--white);
  color: var(--brand-accent);
  border-color: var(--brand-accent);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 15px -3px color-mix(in srgb, var(--brand-accent) 15%, transparent);
}

/* Actions / meta */
.hero__actions {
  display: flex;
  justify-content: center; /* Ensure buttons are centered */
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* =================================================================
   BUTTONS (World-Class System)
   ================================================================= */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem; /* Standard comfortable size */
    font-size: var(--fs-400); /* Fluid resizing */
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 999px; /* Full pill */
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: 1px solid transparent; /* Reserve space for border */
    letter-spacing: -0.01em; /* Modern tightness */
}

/* --- Primary (Action) --- */
.button--primary {
    background: var(--brand-accent);
    color: white;
    /* Soft border for edge definition (10% darker than bg) */
    border-color: color-mix(in srgb, var(--brand-accent) 90%, black); 
    /* Dynamic colored shadow */
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-accent) 25%, transparent);
}

.button--primary:hover {
    /* Slightly darker on hover */
    background: color-mix(in srgb, var(--brand-accent) 90%, black);
    border-color: color-mix(in srgb, var(--brand-accent) 80%, black);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px color-mix(in srgb, var(--brand-accent) 35%, transparent);
}

/* --- Secondary (Alternative) --- */
.button--secondary {
    background: #ffffff;
    color: var(--brand-primary);
    /* Soft Navy Border */
    border-color: color-mix(in srgb, var(--brand-primary) 15%, transparent);
    /* Soft Navy Shadow */
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-primary) 10%, transparent);
}

.button--secondary:hover {
    background: #ffffff;
    color: var(--brand-accent); /* Pop of color on hover */
    border-color: var(--brand-accent);
    transform: translateY(-2px);
    /* Deeper shadow on lift */
    box-shadow: 0 8px 16px color-mix(in srgb, var(--brand-primary) 15%, transparent);
}

/* =================================================================
   SECTION HEADER (Rest of file)
   ================================================================= */
.section-header .badge {
  margin-bottom: 1rem;
}

.section-header {
  position: relative;
  /* Remove top margin to avoid double-gap with section padding */
  margin: 0 auto clamp(var(--space-6), 6vw, var(--space-8));
  text-align: center;
  max-width: 100%; /* User Request: Full Width */
  margin-inline: auto; /* Center cleanly */
  padding: 0 var(--gutter);
}

/* Remove the old card style completely */
.sh-container {
  padding: 0;
}

.section-title {
  margin: 0 0 1rem;
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem); /* Bigger, more confident */
  line-height: 1.1; 
  letter-spacing: -0.02em;
  color: var(--brand-ink);
}

/* Modern Gradient Underline (Subtle & Centered) */
.section-title::after {
  content: "";
  display: block;
  width: 60px; /* Small, focused accent */
  height: 4px;
  margin: 1.5rem auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  opacity: 1;
}

.section-subtitle {
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  color: var(--muted);
  line-height: 1.6;
  max-width: 100%; /* User Request: Full Width */
  margin: 0 auto;
  font-weight: 400;
  text-wrap: balance; /* Prevent widows */
}

/* Dark Background Variant (.band--alt) handling */
.band--alt .section-title {
  color: #ffffff; 
}

.band--alt .section-subtitle {
  color: #cbd5e1; /* Slate 300 for readability on dark */
}

.band--alt .section-title::after {
    /* Make the accent pop more on dark */
    background: linear-gradient(90deg, #fff, var(--brand-accent));
}

.band--alt .badge {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

/* Animations */
.section-header.in-view .section-title {
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

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

@keyframes title-sheen {
  0% { left: -50%; opacity: 0; }
  20% { opacity: 0.5; }
  80% { opacity: 0; }
  100% { left: 150%; opacity: 0; }
}

/* =================================================================
   6) KPIS / RESULTS (Professional Cards)
   ================================================================= */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 2vw, 2rem); /* Tighter gap for cards */
  margin-top: 1rem;
}

.kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
  
  /* Card Styling (Unified Premium) */
  background: var(--surface);
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

/* Optional: Subtle top accent to bring in brand without being loud */
.kpi::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-accent);
  opacity: 0; /* Hidden by default, reveal on hover for delight */
  transition: opacity 0.3s ease;
}

.kpi:hover {
  transform: translateY(-4px);
  /* Deep, expensive shadow matching Solutions */
  box-shadow: 
      0 20px 40px -4px rgba(0,0,0,0.12),
      0 8px 16px -4px rgba(0,0,0,0.08); /* Unified "Professional Lift" shadow */
  /* border-color: color-mix(in srgb, var(--brand-accent) 15%, var(--border)); REMOVED */
}

/* .kpi:hover::before { opacity: 1; } REMOVED */

.kpi strong,
.kpi dt {
  display: block;
  /* Switched to Brand Primary (Navy) - Less Flashy, More Professional */
  color: var(--brand-primary); 
  font-size: clamp(2rem, 2.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: none; /* Removed loud gradient */
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentcolor;
  margin: 0; /* Reset default dt margin */
}

.kpi span,
.kpi dd {
  font-size: var(--fs-400); /* Fluid resizing */
  font-weight: 500;
  color: var(--muted); /* Softer text */
  line-height: 1.4;
  max-width: 20ch; 
  margin: 0; /* Reset default dd margin */
}

@media (max-width: 1024px) {
  .kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .kpis {
    grid-template-columns: 1fr;
  }
}

/* =================================================================
   7) GLOBAL FORMS (World-Class SaaS Inputs)
   ================================================================= */

/* 1. Labels & Base */
label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--ink);
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

/* 2. Text Inputs, Selects, Textareas */
.input,
.select,
.textarea,
input:where([type='text'], [type='email'], [type='password'], [type='number'], [type='tel'], [type='url'], [type='search'], [type='date'], [type='datetime-local']),
select,
textarea {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    font-family: inherit;
    font-size: 0.95rem; /* Slightly smaller for SaaS density */
    font-weight: 400;
    line-height: 1.5;
    color: var(--ink);
    background-color: #ffffff;
    background-clip: padding-box;
    border: 1px solid var(--border);
    border-radius: 6px; /* 6px is tighter/more pro than 8px for inputs */
    box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* Subtle inner depth */
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none; /* Reset native styles */
}

/* Specific height for single-line inputs */
.input,
.select,
input:where([type='text'], [type='email'], [type='password'], [type='number'], [type='tel'], [type='url'], [type='search'], [type='date'], [type='datetime-local']),
select {
    min-height: 40px; /* Standard SaaS height */
}

/* Placeholder Styling */
::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

/* 3. Hover State */
.input:hover,
.select:hover,
.textarea:hover,
input:where([type='text'], [type='email'], [type='password'], [type='number'], [type='tel'], [type='url'], [type='search']):hover,
select:hover,
textarea:hover {
    border-color: #cbd5e1; /* Slightly darker slate */
}

/* 4. Focus State (Refined Glow) */
.input:focus,
.select:focus,
.textarea:focus,
input:where([type='text'], [type='email'], [type='password'], [type='number'], [type='tel'], [type='url'], [type='search']):focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    /* Ultra-minimal focus: Just border + faint 2px glow */
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-primary) 10%, transparent);
}

/* 5. Disabled State */
.input:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    background-color: #f8fafc;
    color: var(--muted);
    cursor: not-allowed;
    opacity: 1; /* iOS fix */
    box-shadow: none;
    border-color: var(--border);
}

/* 6. Textarea Specifics */
textarea {
    resize: vertical; /* Allow vertical resizing only */
    min-height: 100px;
}

/* 7. Select Specifics (Custom Chevron) */
select, .select {
    padding-right: 2.5rem;
    /* Darker, Clearer Chevron */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1em;
}

/* 8. Checkbox & Radio (Accent Color) */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--brand-primary);
    width: 1em;
    height: 1em;
    margin-right: 0.5em;
    vertical-align: text-bottom;
    cursor: pointer;
}

/* 9. Validation States */
/* Only show errors when explicitly marked with .is-invalid class */
.input.is-invalid,
.select.is-invalid {
    border-color: #ef4444;
    color: #ef4444; /* Text color red for error state */
}

.input.is-invalid:focus {
    border-color: #ef4444;
    /* Minimal red glow */
    box-shadow: 0 0 0 2px color-mix(in srgb, #ef4444 10%, transparent);
}
