/* ==========================================================================
   Public pages — shared design layer
   Matches the index.php language: tight header rhythm, card surfaces, consistent
   section spacing, readable measure. Loaded after style.css, scoped to
   body.page-public so the dashboard and auth screens are untouched.
   ========================================================================== */

body.page-public {
    --pp-bg: #f6f8f7;
    --pp-surface: #ffffff;
    --pp-line: #dfe6e3;
    --pp-ink: #0d2b28;
    --pp-muted: #5c6f6b;
    --pp-brand: #095650;
    --pp-brand-soft: #0f766e;
    background: var(--pp-bg);
}

/* ---------- page header ---------- */
body.page-public .page-header {
    position: relative;
    padding: 116px 0 54px;
    background:
        radial-gradient(900px 420px at 12% -20%, rgba(20, 184, 166, .14), transparent 62%),
        radial-gradient(700px 380px at 92% 0%, rgba(9, 86, 80, .10), transparent 60%),
        #ffffff;
    border-bottom: 1px solid var(--pp-line);
    overflow: hidden;
}

body.page-public .page-header::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(9, 86, 80, .045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(9, 86, 80, .045) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 74%);
    mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 74%);
}

body.page-public .page-header .container {
    position: relative;
    z-index: 1;
}

body.page-public .page-header h1 {
    max-width: 21ch;
    margin: 0 auto 14px;
    font-size: clamp(30px, 4.1vw, 46px);
    line-height: 1.14;
    letter-spacing: -.025em;
    font-weight: 800;
    color: var(--pp-ink);
}

body.page-public .page-header p {
    max-width: 62ch;
    margin: 0 auto;
    font-size: 16.5px;
    line-height: 1.62;
    color: var(--pp-muted);
}

/* ---------- page body rhythm ---------- */
body.page-public .page-content {
    padding: 44px 0 76px;
}

body.page-public .content-section {
    margin-bottom: 22px;
    padding: 26px 30px;
    border-radius: 18px;
    border: 1px solid var(--pp-line);
    background: var(--pp-surface);
    box-shadow: 0 1px 2px rgba(13, 43, 40, .04);
    transition: border-color .2s ease, box-shadow .2s ease;
}

body.page-public .content-section:hover {
    border-color: #b9d3cd;
    box-shadow: 0 10px 28px rgba(13, 43, 40, .07);
    transform: none;
}

body.page-public .content-section h2 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--pp-line);
    font-size: 21px;
    line-height: 1.3;
    letter-spacing: -.01em;
    color: var(--pp-ink);
}

body.page-public .content-section h3 {
    margin: 22px 0 8px;
    font-size: 16.5px;
    line-height: 1.35;
    color: var(--pp-ink);
}

body.page-public .content-section p,
body.page-public .content-section li {
    font-size: 15px;
    line-height: 1.68;
    color: var(--pp-muted);
    margin-bottom: 9px;
}

body.page-public .content-section ul,
body.page-public .content-section ol {
    margin: 0 0 14px 20px;
}

body.page-public .content-section li::marker {
    color: var(--pp-brand-soft);
}

body.page-public .content-section strong {
    color: var(--pp-ink);
}

body.page-public .content-section a {
    color: var(--pp-brand-soft);
    text-underline-offset: 2px;
}

body.page-public .content-section a:hover {
    color: #0b5f58;
}

body.page-public .content-section code,
body.page-public .content-section pre {
    overflow-wrap: anywhere;
}

/* ---------- feature cards ---------- */
body.page-public .features-grid,
body.page-public .blog-grid {
    gap: 18px;
    margin-top: 6px;
}

body.page-public .feature-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--pp-line);
    background: var(--pp-surface);
    box-shadow: 0 1px 2px rgba(13, 43, 40, .04);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

body.page-public .feature-card:hover {
    transform: translateY(-3px);
    border-color: #b9d3cd;
    box-shadow: 0 14px 32px rgba(13, 43, 40, .09);
}

body.page-public .feature-card .feature-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
}

body.page-public .feature-card.is-centered {
    align-items: center;
    text-align: center;
}

body.page-public .feature-card.is-centered a {
    align-self: center;
}

body.page-public .feature-card h3 {
    margin: 16px 18px 6px;
    font-size: 16.5px;
    line-height: 1.32;
    color: var(--pp-ink);
}

body.page-public .feature-card p {
    margin: 0 18px 18px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--pp-muted);
}

/* the "Learn more" links carry inline styles in the markup; pin them to the card
   bottom and align them with the body text instead of letting them hug the edge */
body.page-public .feature-card > a:not(.btn) {
    display: inline-flex !important;
    align-items: center;
    align-self: flex-start;
    margin: auto 18px 18px !important;
    padding-top: 10px;
    font-size: 13.5px !important;
    font-weight: 650 !important;
    line-height: 1.4;
    color: var(--pp-brand-soft) !important;
    text-decoration: none !important;
    letter-spacing: .01em;
}

body.page-public .feature-card > a:not(.btn):hover {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* ---------- pricing ---------- */
body.page-public .pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
    gap: 18px;
    align-items: stretch;
}

body.page-public .pricing-card {
    display: flex;
    flex-direction: column;
    padding: 26px 22px;
    border-radius: 18px;
    border: 1px solid var(--pp-line);
    background: var(--pp-surface);
    box-shadow: 0 1px 2px rgba(13, 43, 40, .04);
}

body.page-public .pricing-card .price {
    margin: 10px 0 14px;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--pp-ink);
}

body.page-public .pricing-card .btn {
    margin-top: auto;
}

/* the featured card used to be scaled 1.05, which made the row uneven and pushed
   the CTA out of line with its neighbours */
body.page-public .pricing-card.featured,
body.page-public .pricing-card.popular {
    transform: none !important;
    border-color: var(--pp-brand-soft);
    box-shadow: 0 12px 30px rgba(15, 118, 110, .14);
}

body.page-public .pricing-card:hover {
    transform: translateY(-2px);
}

body.page-public .pricing-card h3 {
    margin: 0 0 4px;
    font-size: 17px;
    line-height: 1.3;
}

body.page-public .pricing-card ul {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

body.page-public .pricing-card li {
    padding: 8px 0;
    border-bottom: 1px solid var(--pp-line);
    font-size: 14px;
    color: var(--pp-muted);
}

body.page-public .pricing-card li:last-child {
    border-bottom: 0;
}

/* ---------- blog ---------- */
body.page-public .blog-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid var(--pp-line);
    background: var(--pp-surface);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

body.page-public .blog-card:hover {
    transform: translateY(-3px);
    border-color: #b9d3cd;
    box-shadow: 0 14px 32px rgba(13, 43, 40, .09);
}

body.page-public .blog-card .date {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--pp-muted);
}

body.page-public .blog-card-content h3 {
    margin: 8px 0 8px;
    font-size: 17px;
    line-height: 1.35;
    color: var(--pp-ink);
}

/* ---------- buttons inside public pages ---------- */
body.page-public .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: transform .16s ease, filter .16s ease, border-color .16s ease;
}

body.page-public .btn:hover { transform: translateY(-1px); }

/* primary buttons were inheriting the brand link colour, which painted teal text on
   the teal fill — unreadable. */
body.page-public .btn,
body.page-public a.btn,
body.page-public button.btn {
    background: var(--pp-brand);
    color: #ffffff !important;
}

body.page-public .btn i { color: inherit; }

/* icon tile used where the pages had emoji glyphs */
body.page-public .pp-icon-tile {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 16px;
    font-size: 24px;
    color: #0f766e;
    background: linear-gradient(180deg, rgba(20, 184, 166, .16), rgba(20, 184, 166, .06));
    border: 1px solid rgba(15, 118, 110, .18);
}

html[data-theme="dark"] body.page-public .pp-icon-tile {
    color: #5eead4;
    background: rgba(20, 184, 166, .1);
    border-color: rgba(94, 234, 212, .22);
}

body.page-public .btn-secondary,
body.page-public .btn-outline {
    background: var(--pp-surface) !important;
    border: 1px solid var(--pp-line);
    color: var(--pp-ink) !important;
}

body.page-public .btn-secondary:hover {
    border-color: var(--pp-brand-soft);
    color: var(--pp-brand-soft);
}



/* ---------- blog / guides index ---------- */
body.page-public .blog-group { padding: 0 0 8px; }
body.page-public .blog-group > h2 { margin-bottom: 18px; }
body.page-public .blog-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body.page-public .blog-card:hover {
    transform: translateY(-2px);
    border-color: rgba(13, 148, 136, .55);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}
body.page-public .blog-chip {
    display: inline-block;
    margin-bottom: 9px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #0d9488;
    background: rgba(13, 148, 136, .12);
}
body.page-public .blog-card h3 { font-size: 16.5px; line-height: 1.35; margin: 0 0 8px; }
body.page-public .blog-card p { font-size: 13.5px; line-height: 1.55; margin: 0 0 10px; }
body.page-public .blog-card .date { font-size: 11.5px; opacity: .65; }
body.page-public .pp-inline-link { margin-top: 14px; }

/* ---------- comparison tables inside guide pages ---------- */
body.page-public .content-section table {
    width: 100%;
    margin: 16px 0 18px;
    border-collapse: collapse;
    border: 1px solid var(--pp-line);
    border-radius: 12px;
    font-size: 14px;
}

body.page-public .content-section thead th {
    padding: 11px 14px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--pp-muted);
    background: rgba(9, 86, 80, .06);
    border-bottom: 1px solid var(--pp-line);
    white-space: nowrap;
}

body.page-public .content-section tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--pp-line);
    color: var(--pp-muted);
    vertical-align: top;
    line-height: 1.55;
}

body.page-public .content-section tbody td:first-child {
    color: var(--pp-ink);
    font-weight: 600;
}

body.page-public .content-section tbody tr:last-child td {
    border-bottom: 0;
}

html[data-theme="dark"] body.page-public .content-section thead th {
    background: rgba(45, 212, 191, .08);
}

@media (max-width: 720px) {
    body.page-public .content-section table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ---------- legal / long-form readability ---------- */
body.page-public .content-section p,
body.page-public .content-section li {
    max-width: 74ch;
}

/* ---------- dark theme ---------- */
html[data-theme="dark"] body.page-public {
    --pp-bg: #08090a;
    --pp-surface: #121416;
    --pp-line: #23272c;
    --pp-ink: #edf3f1;
    --pp-muted: #9aa8a4;
    --pp-brand: #5eead4;
    --pp-brand-soft: #5eead4;
}

html[data-theme="dark"] body.page-public .page-header {
    background:
        radial-gradient(900px 420px at 12% -20%, rgba(45, 212, 191, .12), transparent 62%),
        radial-gradient(700px 380px at 92% 0%, rgba(15, 118, 110, .14), transparent 60%),
        #0b0d0e;
}

html[data-theme="dark"] body.page-public .page-header::after {
    background-image:
        linear-gradient(to right, rgba(45, 212, 191, .06) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(45, 212, 191, .06) 1px, transparent 1px);
}

html[data-theme="dark"] body.page-public .content-section h2 {
    border-bottom-color: #262b30;
}

html[data-theme="dark"] body.page-public .content-section a:hover { color: #7ff0e2; }

/* theme.css pins white ink on dark .btn; a deep teal fill keeps that text readable */
html[data-theme="dark"] body.page-public .btn,
html[data-theme="dark"] body.page-public a.btn,
html[data-theme="dark"] body.page-public button.btn {
    background: #0f766e !important;
}

html[data-theme="dark"] body.page-public .btn-secondary,
html[data-theme="dark"] body.page-public .btn-outline {
    background: #171a1d !important;
}


/* ---------- responsive ---------- */
@media (max-width: 900px) {
    body.page-public .page-header {
        padding: 96px 0 40px;
    }

    body.page-public .page-header h1 {
        max-width: none;
        font-size: clamp(26px, 6.4vw, 34px);
    }

    body.page-public .page-content {
        padding: 32px 0 56px;
    }

    body.page-public .content-section {
        padding: 20px 18px;
        border-radius: 14px;
    }
}
