/* The platform's own landing and sign-up pages. Inter, emerald on slate, mobile first. */

:root {
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --brand: #059669;
    --brand-strong: #047857;
    --brand-soft: #ecfdf5;
    --radius: 16px;
    --shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 8px 24px rgb(15 23 42 / 0.06);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--surface);
}

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--brand-strong); }
img, svg { display: block; max-width: 100%; }

.p-wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.p-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.p-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 2.5rem; padding: 0 1.1rem; border: 1px solid transparent; border-radius: 999px;
    font: inherit; font-size: 0.925rem; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.p-btn:focus-visible, .p-join-form input:focus-visible, .p-field input:focus-visible { outline: 3px solid rgb(5 150 105 / 0.35); outline-offset: 2px; }
.p-btn-primary { background: var(--brand); color: #fff; }
.p-btn-primary:hover { background: var(--brand-strong); }
.p-btn-ghost { color: var(--ink); border-color: var(--line); background: var(--surface); }
.p-btn-ghost:hover { border-color: #cbd5e1; }
.p-btn-light { background: #fff; color: var(--ink); }
.p-btn-light:hover { background: var(--brand-soft); }
.p-btn-lg { min-height: 3rem; padding: 0 1.4rem; font-size: 1rem; }
.p-btn-block { width: 100%; }

/* Header */
.p-header { position: sticky; top: 0; z-index: 10; background: rgb(255 255 255 / 0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.p-header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.p-brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.p-brand-mark { width: 2rem; height: 2rem; border-radius: 9px; }
.p-nav { display: none; gap: 1.5rem; margin-left: 1rem; }
.p-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.925rem; font-weight: 500; }
.p-nav a:hover { color: var(--ink); }
.p-header-actions { display: flex; gap: 0.5rem; margin-left: auto; }
.p-hide-sm { display: none; }

/* Hero */
.p-hero { padding: 3rem 0 3.5rem; background: radial-gradient(60rem 30rem at 85% -10%, rgb(16 185 129 / 0.12), transparent 60%), var(--surface); }
.p-hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.p-eyebrow { display: inline-block; margin-bottom: 1rem; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); font-size: 0.8rem; font-weight: 600; }
.p-hero h1 { font-size: clamp(2.1rem, 6vw, 3.5rem); font-weight: 800; }
.p-lead { margin-top: 1rem; max-width: 36rem; color: var(--ink-2); font-size: 1.075rem; }

.p-join { margin-top: 1.75rem; max-width: 32rem; scroll-margin-top: 6rem; }
.p-join-form { display: flex; flex-direction: column; gap: 0.6rem; }
.p-join-form input {
    min-height: 3rem; width: 100%; padding: 0 1.1rem; border: 1px solid #cbd5e1; border-radius: 999px;
    font: inherit; color: var(--ink); background: #fff;
}
.p-join-form input[aria-invalid="true"] { border-color: #dc2626; }
.p-field-error { margin-top: 0.5rem; color: #b91c1c; font-size: 0.875rem; }
.p-fine { margin-top: 0.75rem; color: var(--muted); font-size: 0.85rem; }

.p-notice { padding: 0.9rem 1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.925rem; color: var(--ink-2); }
.p-notice strong { color: var(--ink); }
.p-notice-success { background: var(--brand-soft); border-color: #a7f3d0; }
.p-notice-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; margin-bottom: 1rem; }

.p-flow-card { max-width: 24rem; margin: 0 auto; padding: 1.5rem; border-radius: var(--radius); background: var(--ink); color: #e2e8f0; box-shadow: 0 24px 48px rgb(15 23 42 / 0.18); }
.p-flow-title { margin-bottom: 1.1rem; color: #94a3b8; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.p-flow { position: relative; display: grid; gap: 1.1rem; margin: 0; padding: 0; list-style: none; }
.p-flow::before { content: ""; position: absolute; left: 0.45rem; top: 0.5rem; bottom: 0.5rem; width: 2px; background: #334155; }
.p-flow li { position: relative; display: flex; gap: 0.9rem; align-items: flex-start; }
.p-flow strong { display: block; color: #fff; font-size: 0.95rem; font-weight: 600; }
.p-flow small { color: #94a3b8; font-size: 0.825rem; }
.p-flow-dot { flex: none; width: 0.95rem; height: 0.95rem; margin-top: 0.25rem; border-radius: 999px; background: #0f172a; border: 2px solid #34d399; }
.p-flow-dot.is-done { background: #34d399; }

/* Sections */
.p-section { padding: 3.5rem 0; scroll-margin-top: 4rem; }
.p-section-alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.p-section-head { max-width: 40rem; margin-bottom: 2rem; }
.p-section-head h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; }
.p-section-head p { margin-top: 0.6rem; color: var(--ink-2); }

.p-product-grid { display: grid; gap: 1rem; }
.p-product { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.p-product-icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-bottom: 1rem; border-radius: 12px; background: var(--brand-soft); color: var(--brand-strong); }
.p-product-icon svg { width: 1.4rem; height: 1.4rem; }
.p-product h3 { font-size: 1.25rem; font-weight: 700; }
.p-product > p { margin-top: 0.35rem; color: var(--ink-2); }
.p-checks { display: grid; gap: 0.55rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.p-checks li { position: relative; padding-left: 1.6rem; font-size: 0.95rem; color: var(--ink-2); }
.p-checks li::before { content: ""; position: absolute; left: 0; top: 0.3rem; width: 1rem; height: 1rem; border-radius: 999px; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23047857'%3E%3Cpath fill-rule='evenodd' d='M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.8 3.8 6.8-6.8a1 1 0 0 1 1.4 0Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / 0.7rem no-repeat; }

.p-feature-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.p-feature { padding: 1.25rem; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.p-feature h3 { font-size: 1rem; font-weight: 700; }
.p-feature p { margin-top: 0.35rem; color: var(--ink-2); font-size: 0.925rem; }

.p-steps { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.p-steps li { padding: 1.25rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.p-step-number { display: grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: 0.8rem; border-radius: 999px; background: var(--ink); color: #34d399; font-weight: 700; font-size: 0.9rem; }
.p-steps h3 { font-size: 1.05rem; font-weight: 700; }
.p-steps p { margin-top: 0.35rem; color: var(--ink-2); font-size: 0.925rem; }

.p-pricing-grid { display: grid; gap: 1rem; }
.p-price-card { padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.p-price-card h3 { font-size: 1.1rem; font-weight: 700; }
.p-price-sub { margin-top: 0.2rem; color: var(--muted); font-size: 0.875rem; }
.p-price-list { display: grid; gap: 0; margin: 1rem 0 0; padding: 0; list-style: none; }
.p-price-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 1rem; padding: 0.75rem 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.p-price-list li span:first-child { font-weight: 600; }
.p-price { font-weight: 700; text-align: right; }
.p-price-list small { grid-column: 2; color: var(--muted); font-size: 0.8rem; text-align: right; }
.p-empty { color: var(--muted); }

.p-cta { padding: 3rem 0; background: var(--ink); color: #fff; }
.p-cta-row { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.p-cta h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; }
.p-cta p { margin-top: 0.4rem; color: #cbd5e1; }

.p-contact-grid { display: grid; gap: 1rem; }
.p-contact { display: grid; gap: 0.15rem; padding: 1.1rem 1.25rem; border-radius: var(--radius); border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--surface); transition: border-color 0.15s; }
.p-contact:hover { border-color: var(--brand); }
.p-contact-label { color: var(--muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.p-contact-value { font-weight: 600; overflow-wrap: anywhere; }

/* Sign-up form page */
.p-signup { padding: 3rem 0 4rem; background: var(--surface-2); min-height: calc(100vh - 8rem); }
.p-signup-wrap { max-width: 30rem; }
.p-card { padding: 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.p-card h1 { font-size: 1.5rem; font-weight: 800; }
.p-card-sub { margin: 0.4rem 0 1.25rem; color: var(--ink-2); font-size: 0.925rem; overflow-wrap: anywhere; }
.p-form { display: grid; gap: 1rem; }
.p-field { display: grid; gap: 0.35rem; }
.p-field label { font-size: 0.875rem; font-weight: 600; }
.p-field input { min-height: 2.75rem; padding: 0 0.9rem; border: 1px solid #cbd5e1; border-radius: 12px; font: inherit; color: var(--ink); background: #fff; }
.p-field small { color: var(--muted); font-size: 0.8rem; }

/* Footer */
.p-footer { padding: 1.5rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.p-footer-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; justify-content: space-between; }
.p-footer-nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.p-footer-nav a { color: var(--muted); text-decoration: none; }
.p-footer-nav a:hover { color: var(--ink); }

@media (min-width: 640px) {
    .p-join-form { flex-direction: row; }
    .p-join-form input { flex: 1; }
    .p-hide-sm { display: inline-flex; }
    .p-feature-grid, .p-steps, .p-contact-grid { grid-template-columns: repeat(2, 1fr); }
    .p-cta-row { flex-direction: row; align-items: center; justify-content: space-between; }
    .p-card { padding: 2rem; }
}

@media (min-width: 960px) {
    .p-wrap { padding: 0 1.5rem; }
    .p-nav { display: flex; }
    .p-hero { padding: 5rem 0 5.5rem; }
    .p-hero-grid { grid-template-columns: 1.25fr 1fr; gap: 3rem; }
    .p-section { padding: 5rem 0; }
    .p-product-grid, .p-pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .p-feature-grid, .p-steps { grid-template-columns: repeat(4, 1fr); }
    .p-contact-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* App download page */
.p-install-steps { display: grid; gap: 0.6rem; margin: 1.25rem 0 0; padding-left: 1.25rem; color: var(--ink-2); font-size: 0.925rem; }
.p-scan { display: none; grid-template-columns: 7.5rem 1fr; gap: 1rem; align-items: center; margin-top: 1.25rem; padding: 1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.p-scan-qr { padding: 0.3rem; border-radius: 10px; background: #fff; }
.p-scan-qr svg { display: block; width: 100%; height: auto; }
.p-scan-title { font-weight: 600; }
/* Only on bigger screens: on a phone you are already on the right device. */
@media (min-width: 640px) and (hover: hover) { .p-scan { display: grid; } }
