/* Marketing-page styling for the Hermes SEG rebuild.
 * Loaded site-wide by hermes-licensing.php. Scoped to .hermes-* classes so it
 * never collides with Blocksy/WooCommerce styles. */

:root {
    /* Brand orange matches the logo mark (#f0a000 sampled from the PNG).
     * Kept in sync with hermes-blocksy-child/style.css.  */
    --hermes-accent: #f0a000;
    --hermes-accent-dark: #c08000;
    --hermes-ink: #1d1f21;
    --hermes-muted: #586069;
    --hermes-line: #e1e4e8;
    --hermes-bg-soft: #f6f8fa;
    --hermes-bg-callout: #fff4ec;
}

.hermes-hero {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 1px solid var(--hermes-line);
    margin-bottom: 2rem;
}
.hermes-hero h1 {
    margin: 0 0 0.5em;
    line-height: 1.15;
}
.hermes-lead {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--hermes-muted);
    max-width: 720px;
}

/* --- Pricing grid ---------------------------------------------------------- */
.hermes-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0 3rem;
}

.hermes-pricing-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--hermes-line);
    border-radius: 8px;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
}
.hermes-pricing-card h2 {
    margin: 0 0 0.25rem;
    font-size: 1.4rem;
}
.hermes-pricing-card-recommended {
    border-color: var(--hermes-accent);
    box-shadow: 0 0 0 3px rgba(238, 108, 43, 0.12);
}
.hermes-pricing-badge {
    position: absolute;
    top: -0.75rem;
    right: 1rem;
    background: var(--hermes-accent);
    color: #fff;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
}
.hermes-pricing-tagline {
    color: var(--hermes-muted);
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
    min-height: 2.5em;
}
.hermes-pricing-price {
    font-size: 1.05rem;
    color: var(--hermes-muted);
    margin: 0.5rem 0 1rem;
    line-height: 1.4;
}
.hermes-pricing-price strong {
    color: var(--hermes-ink);
    font-size: 2rem;
    line-height: 1;
}
.hermes-pricing-period {
    font-size: 0.85rem;
    color: var(--hermes-muted);
}
.hermes-pricing-alt {
    font-size: 0.85rem;
    color: var(--hermes-muted);
}
.hermes-pricing-features {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1;
}
.hermes-pricing-features li {
    padding: 0.25rem 0 0.25rem 1.25rem;
    border-bottom: 1px dotted var(--hermes-line);
    position: relative;
}
.hermes-pricing-features li:last-child { border-bottom: none; }
.hermes-pricing-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--hermes-accent);
    font-weight: 700;
}
.hermes-pricing-cta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
}

/* --- CTA buttons ----------------------------------------------------------- */
.hermes-cta-button {
    display: inline-block;
    padding: 0.65rem 1.1rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
    line-height: 1.2;
}
.hermes-cta-primary {
    background: var(--hermes-accent);
    color: #fff;
    border: 1px solid var(--hermes-accent);
}
.hermes-cta-primary:hover,
.hermes-cta-primary:focus {
    background: var(--hermes-accent-dark);
    border-color: var(--hermes-accent-dark);
    color: #fff;
}
.hermes-cta-secondary {
    background: #fff;
    color: var(--hermes-accent);
    border: 1px solid var(--hermes-accent);
}
.hermes-cta-secondary:hover,
.hermes-cta-secondary:focus {
    background: var(--hermes-bg-callout);
    color: var(--hermes-accent-dark);
}
.hermes-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 2rem;
}

/* --- Releases list (rendered by [hermes_github_releases] shortcode) ------- */
/* margin-inline 0 + width 100% forces a left-anchored block — WP's
 * is-layout-constrained wrapper otherwise auto-centers narrower children. */
.hermes-releases {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 1.5rem 0 1rem !important;
    margin-inline: 0 !important;
    max-width: 900px;
    width: 100%;
    text-align: left;
}
.hermes-release {
    background: #fff;
    border: 1px solid var(--hermes-line);
    border-left: 3px solid var(--hermes-accent);
    border-radius: 6px;
    padding: 1.1rem 1.25rem;
    text-align: left;
}
.hermes-release-header { margin-bottom: 0.5rem; text-align: left; }
.hermes-release-title { margin: 0 0 0.25rem; font-size: 1.1rem; text-align: left; }
.hermes-release-title a { color: var(--hermes-ink); text-decoration: none; }
.hermes-release-title a:hover { color: var(--hermes-accent); }
.hermes-release-meta { margin: 0; font-size: 0.85rem; color: var(--hermes-muted); display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; text-align: left; }
.hermes-release-tag {
    font-family: Menlo, Monaco, Consolas, monospace;
    background: var(--hermes-bg-soft);
    padding: 1px 6px;
    border-radius: 3px;
    color: var(--hermes-ink);
    font-size: 0.8rem;
}
.hermes-release-prerelease {
    background: var(--hermes-bg-callout);
    color: var(--hermes-accent-dark);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.hermes-release-date {
    color: var(--hermes-muted);
    font-weight: 500;
}

/* Collapsible body — clamped to a preview height by default; "Read more"
 * removes the clamp and the fade-out gradient. Toggle managed by JS via
 * [data-expanded] / [aria-expanded] on the wrapper + button. */
.hermes-release-body-wrap { position: relative; text-align: left; }
.hermes-release-body { font-size: 0.93rem; line-height: 1.6; text-align: left; }
.hermes-release-body * { text-align: left; }
.hermes-release-body-wrap[data-expanded="false"] .hermes-release-body {
    max-height: 11rem;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}
.hermes-release-body h3,
.hermes-release-body h4,
.hermes-release-body h5 { font-size: 1rem; margin-top: 1.25rem; margin-bottom: 0.4rem; }
.hermes-release-body code { background: var(--hermes-bg-soft); padding: 1px 5px; border-radius: 3px; font-size: 0.88em; }
.hermes-release-body pre {
    background: #1d1f21;
    color: #d1d5da;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.85em;
}
.hermes-release-body pre code { background: transparent; padding: 0; color: inherit; }

.hermes-release-toggle {
    margin-top: 0.6rem;
    background: transparent;
    border: 1px solid var(--hermes-line);
    color: var(--hermes-accent-dark);
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.hermes-release-toggle:hover { background: var(--hermes-bg-soft); }
.hermes-release-body-wrap[data-expanded="false"] .hermes-release-toggle-less { display: none; }
.hermes-release-body-wrap[data-expanded="true"]  .hermes-release-toggle-more { display: none; }

.hermes-releases-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.5rem 0 !important;
    margin-inline: 0 !important;
    max-width: 900px;
    width: 100%;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--hermes-line);
    border-bottom: 1px solid var(--hermes-line);
    font-size: 0.9rem;
}
.hermes-pag-link {
    color: var(--hermes-accent-dark);
    text-decoration: none;
    font-weight: 600;
}
.hermes-pag-link:hover { text-decoration: underline; }
.hermes-pag-link.is-disabled { color: var(--hermes-muted); pointer-events: none; opacity: 0.5; }
.hermes-pag-position { color: var(--hermes-muted); }

.hermes-releases-footer { margin-top: 1.5rem; }
.hermes-releases-empty { margin: 1.5rem 0; }

/* --- Support page sections ------------------------------------------------ */
.hermes-support-section {
    border-top: 1px solid var(--hermes-line);
    padding-top: 1.5rem;
    margin-top: 2rem;
}
.hermes-support-section:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 1rem;
}
.hermes-support-section h2 {
    margin-bottom: 0.5rem;
}
.hermes-support-section p {
    max-width: 760px;
    line-height: 1.65;
}

/* --- Feature groups (features page) --------------------------------------- */
.hermes-feature-group,
.hermes-feature-detail {
    border-top: 1px solid var(--hermes-line);
    padding-top: 1.5rem;
    margin-top: 2rem;
}
.hermes-feature-group:first-of-type,
.hermes-feature-detail:first-of-type {
    border-top: none;
    padding-top: 0;
}
.hermes-feature-group h2,
.hermes-feature-detail h2 {
    color: var(--hermes-ink);
    margin-bottom: 0.5rem;
}
.hermes-feature-group p,
.hermes-feature-detail p {
    max-width: 720px;
    line-height: 1.65;
}

/* --- Deployment topology grid (download page) ----------------------------- */
.hermes-topology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0 2rem;
}
.hermes-topology-card {
    background: var(--hermes-bg-soft);
    border: 1px solid var(--hermes-line);
    border-radius: 8px;
    padding: 1.25rem;
}
.hermes-topology-card h3 {
    margin: 0 0 0.5rem;
    color: var(--hermes-accent);
}
.hermes-topology-card p {
    margin: 0;
    line-height: 1.55;
}

/* --- Spec table (download page) ------------------------------------------- */
.hermes-spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.95rem;
}
.hermes-spec-table th,
.hermes-spec-table td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--hermes-line);
    vertical-align: top;
}
.hermes-spec-table thead th {
    background: var(--hermes-bg-soft);
    font-weight: 600;
}
.hermes-spec-table tbody td:first-child {
    white-space: nowrap;
    font-weight: 500;
}
.hermes-spec-footnote {
    font-size: 0.9rem;
    color: var(--hermes-muted);
    margin: -0.5rem 0 1.5rem;
}

/* --- Diagram figures (topologies / pipeline / architecture SVGs) ---------- */
.hermes-diagram {
    margin: 2rem auto;
    max-width: 1080px;
    text-align: center;
}
.hermes-diagram img {
    width: 100%;
    height: auto;
    max-width: 1080px;
    border: 1px solid var(--hermes-line);
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.hermes-diagram figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--hermes-muted);
    font-style: italic;
}
@media (max-width: 720px) {
    .hermes-diagram img { padding: 0.5rem; }
}

/* --- Screenshot figures (product UI captures) ----------------------------- */
.hermes-screenshot {
    margin: 1.75rem auto 2.5rem;
    max-width: 1080px;
    text-align: center;
}
.hermes-screenshot img {
    width: 100%;
    height: auto;
    max-width: 1080px;
    border: 1px solid var(--hermes-line);
    border-radius: 8px;
    background: #fff;
    /* slightly stronger shadow than diagrams -- suggests "real UI" */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08),
                0 1px 3px  rgba(0, 0, 0, 0.04);
    display: block;
}
.hermes-screenshot figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--hermes-muted);
    font-style: italic;
    text-align: center;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Homepage hero screenshot: pulled up under the hero, bigger shadow */
.hermes-screenshot-hero {
    margin-top: -1rem;
    margin-bottom: 3rem;
}
.hermes-screenshot-hero img {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10),
                0 2px 6px  rgba(0, 0, 0, 0.05);
}

/* Side-by-side pair (used for small screenshots like the MFA TOTP/Push pair).
 * Force a uniform aspect ratio so the two cards render identically regardless
 * of source-image dimensions; whitespace inside any non-matching image is
 * filled with the white background so it still looks intentional. */
.hermes-screenshot-pair {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.75rem auto 2.5rem;
    max-width: 1080px;
    align-items: stretch;
}
.hermes-screenshot-pair .hermes-screenshot {
    margin: 0;
    display: flex;
    flex-direction: column;
}
.hermes-screenshot-pair .hermes-screenshot img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: contain;
    background: #fff;
}

/* --- Callout box (pricing page bottom) ------------------------------------ */
.hermes-callout {
    background: var(--hermes-bg-callout);
    border: 1px solid var(--hermes-accent);
    border-radius: 8px;
    padding: 1.5rem 1.5rem 1rem;
    margin: 2rem 0;
}
.hermes-callout h2 {
    margin-top: 0;
    color: var(--hermes-accent-dark);
}

/* --- Homepage hero -------------------------------------------------------- */
.hermes-home-hero {
    background: linear-gradient(135deg, #fff4ec 0%, #ffe4d2 100%);
    padding: 4rem 1.5rem;
    margin: 0 0 2rem;
    border-radius: 12px;
}
.hermes-home-hero-inner {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}
.hermes-home-hero h1 {
    font-size: clamp(1.75rem, 3.4vw, 2.6rem);
    line-height: 1.2;
    margin: 0 0 1rem;
    color: var(--hermes-ink);
}
.hermes-home-hero-lead {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--hermes-muted);
    margin: 0 0 1.5rem;
}
.hermes-home-hero-cta {
    justify-content: center;
    margin: 0;
}

/* --- Homepage sections ---------------------------------------------------- */
.hermes-home-section {
    padding: 2.5rem 0;
}
.hermes-home-section + .hermes-home-section { border-top: 1px solid var(--hermes-line); }
.hermes-home-section-tinted {
    background: var(--hermes-bg-soft);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    margin: 1rem 0;
    border-top: none !important;
}
.hermes-home-section h2 {
    margin-top: 0;
}

/* --- Pro grid (homepage) -------------------------------------------------- */
.hermes-pro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.hermes-pro-card {
    background: #fff;
    border: 1px solid var(--hermes-line);
    border-left: 3px solid var(--hermes-accent);
    border-radius: 6px;
    padding: 1rem 1.1rem;
}
.hermes-pro-card h3 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
    color: var(--hermes-accent);
}
.hermes-pro-card p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--hermes-muted);
}

/* --- Newsletter signup ---------------------------------------------------- */
.hermes-home-newsletter {
    background: var(--hermes-bg-callout);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-top: none !important;
}
.hermes-newsletter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    max-width: 480px;
    margin: 1.25rem auto 0.5rem;
}
.hermes-newsletter-form input[type="email"] {
    flex: 1 1 240px;
    min-width: 0;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--hermes-line);
    border-radius: 6px;
    font-size: 1rem;
}
.hermes-newsletter-form button {
    cursor: pointer;
    border: 1px solid var(--hermes-accent);
    font-size: 1rem;
}
.hermes-newsletter-fineprint {
    font-size: 0.85rem;
    color: var(--hermes-muted);
    margin: 0.75rem 0 0;
}

/* --- Feature matrix (pricing page) --------------------------------------- */
.hermes-matrix-wrap {
    overflow-x: auto;
    margin: 1.5rem 0 0.5rem;
}
.hermes-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 560px;
}
.hermes-matrix th,
.hermes-matrix td {
    text-align: left;
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid var(--hermes-line);
}
.hermes-matrix thead th {
    background: var(--hermes-bg-soft);
    font-weight: 600;
    border-bottom: 2px solid var(--hermes-line);
}
.hermes-matrix thead th:not(:first-child) { text-align: center; width: 16%; }
.hermes-matrix tbody td:not(:first-child)  { text-align: center; }
.hermes-matrix .hermes-matrix-group th {
    background: var(--hermes-bg-callout);
    color: var(--hermes-accent-dark);
    font-weight: 600;
    border-bottom: 1px solid var(--hermes-line);
    padding-top: 0.7rem;
    padding-bottom: 0.4rem;
}
.hermes-matrix-note {
    font-size: 0.9rem;
    color: var(--hermes-muted);
    margin: 0.5rem 0 1.5rem;
}
