:root {
    --bg: #f4faff;
    --card: #e6f0fa;
    --muted: #4a90e2;
    --accent: #1565d8;
    --accent-2: #5ec6fa;
    --gap: 24px;
    --radius: 12px;
    --container: 1100px;
    --icon-circle: linear-gradient(0deg, #e6f0fa 60%, #f4faff 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

* {
    box-sizing: border-box;
}

html,
html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: #1a2a3a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.45;
    padding-bottom: 64px;
}

/* layout */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 20px;
}

/* header */
.site-header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(12px) saturate(200%);
    -webkit-backdrop-filter: blur(12px) saturate(200%);
    background: linear-gradient(90deg, rgba(86,204,242,0.35) 0%, rgba(21,101,216,0.25) 100%);
    border: 1px solid rgba(255,255,255,0.25);
    border-bottom: 1px solid rgba(255,255,255,0.35);
    box-shadow: 
        0 4px 24px 0 rgba(21,101,216,0.1),
        inset 0 0 0 1px rgba(255,255,255,0.1);
    min-height: 100px; /* Taller minimum height */
    z-index: 1000; /* Ensure header stays on top */
}

.name {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 42px;
    margin-bottom: 5px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    height: 100px; /* Increased header height */
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent);
    font-weight: 800;
    font-size: 26px;
    text-shadow: 
        0 1px 1px rgba(255, 255, 255, 0.5),
        0 2px 8px rgba(21, 101, 216, 0.2);
    letter-spacing: -0.02em;
    min-height: 36px; /* Match logo SVG height */
}

.logo-trigger {
    background: none;
    border: none;
    padding: 8px;
    margin: -8px;
    cursor: pointer;
    color: var(--accent);
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.logo-trigger svg {
    filter: drop-shadow(0 2px 4px rgba(21, 101, 216, 0.2));
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.logo-trigger:hover svg {
    filter: drop-shadow(0 4px 8px rgba(21, 101, 216, 0.3));
    transform: rotate(-8deg);
}

@media (min-size: 900px){

 .nav.show + .logo-trigger svg {
    transform: rotate(90deg);
    filter: drop-shadow(0 4px 12px rgba(21, 101, 216, 0.4));
}
}

@media (max-width: 900px) {
    .header-inner {
        justify-content: center;
    }
    
    .logo {
        position: relative;
        z-index: 2;
        width: 100%;
        justify-content: center;
    }

    .logo-trigger {
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        padding: 8px;
        margin: 0;
    }

    .name {
        margin: 0;
        padding: 0;
        display: block;
        text-align: center;
        width: 100%;
    }
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 900px) {
    .nav {
        display: none;
        position: absolute;
        top: 70px; /* Match new header height */
        left: 0;
        right: 0;
        background: var(--bg);
        padding: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        border-radius: 0 0 var(--radius) var(--radius);
        flex-direction: column;
        align-items: stretch;
        z-index: 1;
    }

    .nav.show {
        display: flex;
    }
}

.nav-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Special styling for the Book a Demo button */
.nav-link.demo-button {
    border: 1px solid var(--accent-2);
}

.nav-link:hover {
    color: #fff;
    background: var(--accent);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(21,101,216,0.15);
    border-color: var(--accent);
}

/* Override nav-link styles for buttons */
.nav .button.button-ghost {
    text-decoration: none;
    padding: 10px 16px;
    font-weight: 700;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent-2);
}

.nav .button.button-ghost:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(21,101,216,0.15);
}

/* Buttons */

.button,
a.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px !important;
    border-radius: 10px;
    font-weight: 700 !important;
    text-decoration: none !important;
    cursor: pointer;
    border: 0;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(21,101,216,0.15);
}

.button:active {
    transform: translateY(0) scale(0.98);
}

.button-ghost,
a.button-ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid transparent;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Special style for the demo button to keep its border */
.nav a#demo-btn {
    border: 1px solid var(--accent-2);
}

.button-ghost:hover,
a.button-ghost:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(21,101,216,0.15);
}

.button-primary {
    background-color: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    box-shadow: 0 0 0 rgba(21,101,216,0);
}

.button-primary:hover, 
.button-primary:focus {
    background-color: #1a75f5;
    border-color: #1a75f5;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(21,101,216,0.2);
}

.button-outline {
    background-color: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    box-shadow: 0 0 0 rgba(21,101,216,0);
}

.button-outline:hover,
.button-outline:focus {
    background-color: rgba(21,101,216,0.1);
    border-color: var(--accent);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(21,101,216,0.15);
}

.button-cta {
    background-color: var(--accent-2);
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    border: 1px solid var(--accent-2);
    box-shadow: 0 0 0 rgba(94,198,250,0);
}

.button-cta:hover,
.button-cta:focus {
    background-color: #72d1ff;
    border-color: #72d1ff;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(94,198,250,0.25);
}

.button-large {
    padding: 14px 20px;
}

/* hero */
.hero {
    padding: 48px 0;
    padding-bottom: 0px;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    align-items: center
}

.hero-copy h1 {
    font-size: clamp(28px, 5vw, 44px);
    margin: 0 0 18px 0;
    letter-spacing: -0.02em;
}

.tagline {
    color: var(--muted);
    font-size: 16px;
    margin-bottom: 20px
}

.cta-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 18px 0
}

.lead-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    max-width: 520px;
    align-items: center;
}

.lead-form input {
    flex: 1;
    min-width: 260px;
    max-width: 360px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--accent-2);
    background: #fff;
    color: #1a2a3a;
    height: 44px;
    display: flex;
    align-items: center;
}

@media (max-width:600px) {
    .lead-form input {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: 44px;
        padding: 14px;
        align-items: center;
    }
}

.small-note {
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px
}

/* hero visual */
.hero-visual {
    display: flex;
    justify-content: center
}

.mock-dashboard {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, #e6f0fa 60%, #f4faff 100%);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--accent-2);
}

.md-header {
    font-weight: 800;
    margin-bottom: 16px
}

.job-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0
}

.job-list li {
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start
}

.job-list li strong {
    font-size: 20px
}

/* features */
.features {
    padding: 24px 0
}

.features h2 {
    margin-top: 0;
    font-size: 20px
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 16px
}

.feature {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--accent-2);
}

.feature h3 {
    margin: 8px 0
}

.icon {
    width: 36px;
    height: 36px;
    fill: var(--accent);
    color: var(--accent);
}

/* how */
.how {
    padding: 24px 0
}

.flow-list {
    background: #e6f0fa;
    padding: 18px;
    border-radius: 12px;
    list-style: decimal;
    margin: 0 0 0 18px
}

/* How it works stepper */
.how-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 32px 0 0 0;
  justify-content: space-between;
}
.how-step {
  background: linear-gradient(180deg, #e6f0fa 60%, #f4faff 100%);
  border: 1px solid var(--accent-2);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(94,198,250,0.07);
  padding: 24px 20px 20px 20px;
  flex: 1 1 220px;
  min-width: 220px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.how-step:hover {
  box-shadow: 0 6px 24px rgba(94,198,250,0.18);
  border-color: var(--accent);
}
.how-step-icon {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--icon-circle);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  box-shadow: 0 2px 8px rgba(59, 125, 158, 0.431);
}
.how-step-icon svg {
  width: 32px;
  height: 32px;
}
.how-step-content h4 {
  font-size: 1.1rem;
  color: var(--accent);
  margin: 0 0 8px 0;
  font-weight: 700;

}
.how-step-content p {
  color: #1a2a3a;
  font-size: 1rem;
  margin: 0;
}

@media (max-width: 900px) {
  .how-steps {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }
  .how-step {
    max-width: 100%;
  }
}

/* stories */
.stories {
    padding: 24px 0
}

.stories details summary {
    cursor: pointer;
    padding: 12px;
    background: #e6f0fa;
    border-radius: 10px
}

.stories-list {
    margin: 12px 0 0 0;
    padding-left: 16px;
    color: var(--accent)
}

/* User stories grid and cards */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.story-card {
    display: flex;
    align-items: flex-start;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(30, 60, 90, 0.07);
    padding: 1.2rem 1.2rem 1.2rem 1rem;
    margin-bottom: 1.2rem;
    border-left: 5px solid #5ec6fa;
    transition: box-shadow 0.2s;
}
.story-card:hover {
    box-shadow: 0 4px 16px rgba(30, 60, 90, 0.12);
}
.story-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    border-radius: 50%;
    background: none;
    flex-shrink: 0;
}
.story-intake svg circle { fill: #e6f0fa; }
.story-intake svg rect { fill: #5ec6fa; }
.story-estimate svg circle { fill: #e6f0fa; }
.story-estimate svg polyline { stroke: #5ec6fa; }
.story-schedule svg circle { fill: #e6f0fa; }
.story-schedule svg rect { fill: #5ec6fa; }
.story-track svg circle { fill: #e6f0fa; }
.story-track svg rect { fill: #5ec6fa; }
.story-invoice svg circle { fill: #e6f0fa; }
.story-invoice svg rect { fill: #5ec6fa; }
.story-comm svg circle { fill: #e6f0fa; }
.story-comm svg rect { fill: #5ec6fa; }
.story-content {
    flex: 1;
    font-size: 1rem;
    color: #2a3a4d;
}

@media (max-width: 900px) {
  .stories-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .story-card {
    flex-direction: row;
    padding: 16px;
  }
}
@media (max-width:600px) {
    .container {
        padding: 0 12px;
        max-width: 100vw;
    }
    .header-inner {
        height: 100px;
        min-height: 100px;
        flex-direction: column;
        align-items: stretch;
        padding: 0 8px;
    }
    .logo {
        height: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    .name {
        font-size: 32px;
        text-align: center;
        width: 100%;
    }
    .logo-trigger svg {
        width: 42px;
        height: 42px;
    }
    .hero {
        padding: 20px 0;
    }
    .hero-inner {
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    .hero-copy h1 {
        font-size: 28px;
    }
    .cta-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .button {
        width: 100%;
        justify-content: center;
    }
    .lead-form {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        width: 100%;
    }
    .lead-form input,
    .lead-form button {
        width: 100%;
        height: 44px;
        padding: 14px;
        margin: 0;
        box-sizing: border-box;
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .feature {
        padding: 16px;
    }
    .job-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .mock-dashboard {
        padding: 16px;
    }
    .how-steps {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    .how-step {
        max-width: 100%;
    }
    .stories-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .story-card {
        flex-direction: row;
        padding: 16px;
    }
}

/* Waitlist modal styles */
.waitlist-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(21,101,216,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.waitlist-modal-content {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(21,101,216,0.18);
  padding: 32px 24px;
  text-align: center;
  min-width: 260px;
}
.waitlist-modal-content h3 {
  margin-top: 0;
  color: var(--accent);
}
.waitlist-modal-content p {
  color: #1a2a3a;
  margin-bottom: 24px;
}
.spinner {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}
.input-error {
  border-color: #e53e3e !important;
  background: #fff0f0 !important;
}
