/* ==========================================================================
   site.css — NEW styles only.
   style.css is an unmodified copy of the live production stylesheet
   (/static/css/style.1603d026ad15.css). Everything below is additive, so devs
   can append this file to style.css (or keep it as a second <link>) without
   touching a single existing rule.
   ========================================================================== */

/* --- Docs: marks a figure slot awaiting a screenshot ----------------------- */
.docs-figure-pending {
    margin: 18px 0;
    padding: 10px 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    color: #94a3b8;
    font-style: italic;
    font-size: 0.92rem;
}

/* --- Primary app navigation: a single "Our Apps" dropdown ------------------
   Replaces the old About/Services/Solutions... menu. One trigger; the three
   app pages live inside the panel. Behaviour is in site.js.
   -------------------------------------------------------------------------- */
.brand-bar { position: relative; }

.app-menu { position: relative; margin-left: auto; }

.app-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-slate);
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 9px 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.app-menu-trigger:hover { color: var(--accent-blue); background-color: #eff6ff; }
.app-menu-trigger:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}
/* Open, or sitting on one of the app pages. */
.app-menu-trigger[aria-expanded="true"],
.app-menu-trigger.is-current {
    color: var(--accent-blue);
    background-color: #eff6ff;
    border-color: #bfdbfe;
}

.app-menu-caret {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    transition: transform 0.2s ease;
}
.app-menu-trigger[aria-expanded="true"] .app-menu-caret { transform: rotate(180deg); }

/* --- Dropdown panel -------------------------------------------------------- */
.app-menu-list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 200;
    min-width: 220px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
}
.app-menu-list[hidden] { display: none; }

.app-menu-list li { margin: 0; }

/* Name over caption, stacked. */
.app-menu-list a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 5px;
    text-decoration: none;
    color: var(--dark-slate);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.app-menu-list a:hover,
.app-menu-list a:focus-visible {
    color: var(--accent-blue);
    background-color: #eff6ff;
    outline: none;
}

/* Small caption under each app name, e.g. "Field History Tracking". */
.app-menu-item-label { display: block; }
.app-menu-item-note {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    color: #64748b;
}

/* The trigger already names the current app, so it is never listed in the
   panel — there is no "current item" state to style here. */

/* The header's right-hand action sits after the nav. */
.brand-bar .btn-back { margin-left: 16px; }

/* Solid CTA used in the home header. */
.btn-header {
    display: inline-block;
    background-color: var(--accent-blue);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 22px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    margin-left: 16px;
}
.btn-header:hover { background-color: #2563eb; }

/* No hamburger: the nav is a single trigger, so it fits at every width. */

/* --- Home hero (left-aligned variant of .hero) ---------------------------- */
.hero-home {
    text-align: left;
    padding: 76px 8% 84px;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-slate));
}
/* Headline scales with the viewport so it stays on one line across desktop
   widths — this is what keeps the hero short enough that the app cards below
   are visible without scrolling. Do NOT add a max-width here. */
.hero-home h1 {
    /* 3.35vw is the largest size that keeps the headline on ONE line given the
       8% side padding (measured: the string needs 3.43vw at most). The 3.7rem
       cap only engages above ~1767px, where there is spare width anyway. */
    font-size: clamp(2rem, 3.35vw, 3.7rem);
    line-height: 1.12;
    text-transform: none;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    max-width: none;
}
.hero-home p {
    margin: 0 0 32px;
    max-width: 80ch;
    font-size: 1.15rem;
    opacity: 0.92;
}
.hero-home .btn { padding: 14px 34px; font-size: 1.05rem; }

/* Short hero for utility pages (contact) — no product tagline to carry, so it
   stays out of the way of the form below it. */
.hero-compact { padding: 56px 20px 60px; }
.hero-compact h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); text-transform: none; letter-spacing: -0.01em; }
.hero-compact p { margin-bottom: 0; font-size: 1.08rem; }

/* --- Section scaffolding -------------------------------------------------- */
.section { padding: 72px 20px; }
.section-white { background-color: #ffffff; border-top: 1px solid var(--border-color); }
.section-light { background-color: var(--light-bg); }
.section-inner { max-width: 1200px; margin: 0 auto; }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.section-head h2 { color: var(--primary-blue); font-size: 2rem; margin-bottom: 14px; }
.section-head p { color: #64748b; font-size: 1.05rem; }

/* --- Three-column app cards (home page) ----------------------------------- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: stretch;
}

.app-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 34px 30px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    border-top: 4px solid var(--accent-blue);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    border-color: var(--accent-blue);
}

.app-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background-color: #eff6ff;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    flex: 0 0 auto;
}
.app-card-icon svg { width: 26px; height: 26px; }

.app-card h3 { color: var(--primary-blue); font-size: 1.4rem; margin-bottom: 4px; }

/* Distribution model, e.g. "(AgentExchange)" / "(Managed Package)". Sits inline
   after the app name but drops to body weight/size so it reads as a qualifier
   rather than part of the product name. */
.app-card-dist {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    letter-spacing: 0;
}
.app-card .app-card-tag {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 14px;
}
.app-card > p { font-size: 0.98rem; margin-bottom: 18px; }

.app-card ul { list-style: none; margin: 0 0 26px; padding: 0; }
.app-card ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 9px;
    font-size: 0.93rem;
    color: var(--text-color);
}
.app-card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-blue);
    font-weight: 700;
}

/* Pins the link to the bottom so all three cards align regardless of copy length. */
.app-card-link {
    margin-top: auto;
    font-weight: 700;
    color: var(--accent-blue);
    font-size: 0.95rem;
}
.app-card:hover .app-card-link { text-decoration: underline; }

/* --- Product-page hero actions -------------------------------------------- */
.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 4px;
}
/* Outlined companion to .btn, for use on the dark hero. Also used on <button>
   (the "Get It Now" coming-soon trigger), hence the appearance reset. */
.btn-ghost {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1rem;
    font-family: inherit;
    text-decoration: none;
    color: #fff;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.45);
    appearance: none;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: #fff;
}

/* --- "Coming Soon" modal ---------------------------------------------------- */
.modal {
    /* The global `* { margin: 0 }` reset clobbers <dialog>'s UA-default
       `margin: auto`, which is what centers it — restore it explicitly. */
    margin: auto;
    border: none;
    border-radius: 12px;
    padding: 0;
    max-width: 420px;
    width: calc(100% - 40px);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
}
.modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
}
.modal-card {
    position: relative;
    padding: 40px 32px 32px;
    text-align: center;
}
.modal-card h3 {
    font-size: 1.4rem;
    color: var(--primary-blue);
    margin-bottom: 12px;
}
.modal-card p {
    color: var(--text-color);
    margin-bottom: 24px;
    line-height: 1.6;
    overflow-wrap: break-word;
}
.modal-card p a {
    color: var(--accent-blue);
    word-break: break-all;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--text-color);
    cursor: pointer;
    padding: 4px;
}
.modal-close:hover {
    color: var(--primary-blue);
}

/* Small uppercase label above a section title. */
.eyebrow {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 10px;
}

/* --- Demo videos ----------------------------------------------------------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    align-items: start;
}

.video-card {
    margin: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.13);
}

/* Fixed 16:9 box so both cards line up regardless of the source file's size. */
.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--dark-slate);
    display: block;
}
.video-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: var(--dark-slate);
}

.video-meta { padding: 22px 26px 26px; }
.video-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--accent-blue);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.video-meta h3 { color: var(--primary-blue); font-size: 1.25rem; margin-bottom: 8px; }
/* Reserves 2 lines regardless of actual length, so the Setup/Functional cards
   line up evenly even when one caption is noticeably shorter than the other. */
.video-meta p { margin: 0; font-size: 0.96rem; min-height: 3.2em; }

/* --- Feature list (Rollup+ / MailFlow product pages) ---------------------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 26px 28px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.feature-check {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--accent-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 2px;
}
.feature-card h3 { color: var(--primary-blue); font-size: 1.08rem; margin-bottom: 6px; }
.feature-card p { font-size: 0.95rem; margin: 0; }

/* --- Support callout band ------------------------------------------------- */
.support-band {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}
.support-band h3 { color: var(--primary-blue); font-size: 1.2rem; margin-bottom: 4px; }
.support-band p { margin: 0; font-size: 0.95rem; color: #64748b; }

/* --- Service selector: round radio-style controls, multi-select ------------
   IMPORTANT: these are <input type="checkbox"> on purpose — the requirement is
   that MORE THAN ONE service can be chosen. Only the appearance is radio-like
   (round). Do not switch these to <input type="radio">: that would silently
   limit users to a single selection.
   Same specificity as the base rule in style.css, but site.css loads after,
   so these win.
   -------------------------------------------------------------------------- */
.service-checkboxes input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background-color: #fff;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.service-checkboxes input[type="checkbox"]::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #fff;
    transform: scale(0);
    transition: transform 0.15s ease;
}
.service-checkboxes input[type="checkbox"]:checked {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}
.service-checkboxes input[type="checkbox"]:checked::before { transform: scale(1); }
.service-checkboxes input[type="checkbox"]:hover { border-color: var(--accent-blue); }
.service-checkboxes input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Rows are plain control + label — no card, border or fill. style.css boxes
   each option; that reads as six stacked cards and eats vertical space, so it
   is unwound here. */
.service-checkboxes > div { gap: 4px; }
.service-checkboxes label {
    padding: 7px 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    gap: 12px;
}
.service-checkboxes label:hover {
    border: 0;
    background-color: transparent;
    color: var(--accent-blue);
}

/* Selected rows are marked by the filled control plus a weight shift — there is
   no longer a surface to tint. Class is toggled by site.js. */
.service-checkboxes label.selected {
    border: 0;
    background-color: transparent;
    font-weight: 600;
    color: var(--dark-slate);
}

/* Brief pulse on the option pre-selected by a ?app= deep link. Applied to the
   control itself, not the row — with the box gone, a ring around the whole row
   would float untethered to anything. */
@keyframes service-flash {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
    35%      { box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.30); }
}
.service-checkboxes label.prefilled input[type="checkbox"] {
    animation: service-flash 1.1s ease-out 2;
}

/* --- Text fields: underline, not boxed ------------------------------------
   Single-line inputs render as a rule beneath the text. The comment textarea
   deliberately KEEPS its box — it is a multi-line region and needs a visible
   area to signal that.
   -------------------------------------------------------------------------- */
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group select {
    border: 0;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    background-color: transparent;
    padding: 10px 2px;
    transition: border-color 0.2s ease;
}
.form-group input[type="text"]:hover,
.form-group input[type="tel"]:hover,
.form-group input[type="email"]:hover { border-bottom-color: #94a3b8; }

/* Focus is a 2px accent underline. The padding drops by 1px so the field does
   not shift when the border thickens. */
.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus {
    outline: none;
    border-bottom: 2px solid var(--accent-blue);
    padding-bottom: 9px;
    background-color: transparent;
}

/* Textarea keeps the box. */
.form-group textarea {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: #fff;
    padding: 12px;
}

/* --- Footer additions ----------------------------------------------------- */
.footer-links { margin-bottom: 10px; display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: #cbd5e1; text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1024px) {
    .app-grid { grid-template-columns: 1fr; max-width: 620px; margin: 0 auto; }
    .video-grid { grid-template-columns: 1fr; max-width: 720px; margin: 0 auto; gap: 26px; }
}

@media (max-width: 900px) {
    .brand-bar .btn-back,
    .btn-header { margin-left: 0; }
}

@media (max-width: 640px) {
    .hero-home { padding: 56px 20px 60px; }
    .hero-home p { font-size: 1rem; }
    .section { padding: 48px 18px; }
    .section-head h2 { font-size: 1.55rem; }
    .support-band { padding: 22px; }
    .brand-bar .btn-back, .btn-header { font-size: 0.85rem; padding: 8px 14px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn, .hero-actions .btn-ghost { text-align: center; }
    .video-meta { padding: 18px 20px 22px; }

    /* Panel spans the header instead of hanging off the trigger, so it cannot
       run past the right edge on a narrow screen. */
    .app-menu { position: static; }
    .app-menu-list { left: 5%; right: 5%; min-width: 0; }
    .app-menu-trigger { padding: 8px 12px; font-size: 0.9rem; }
}
