/* Design tokens (shared palette with /pingsocials) */
:root {
    --bg-primary: #080c14;
    --bg-secondary: #0f1626;
    --bg-tertiary: #172237;
    --text-primary: #f3f4f6;
    --text-secondary: #a8b0bd;
    --color-brand: #3b82f6;
    --color-focus: #93c5fd;
    --color-whatsapp: #25d366;
    --color-whatsapp-ink: #04240f;
    --color-error: #fca5a5;
    --border: rgba(255, 255, 255, 0.1);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-heading: 'Outfit', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

* {
    margin: 0;
    padding: 0;
}

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

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-focus);
}

:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 3px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.skip-link:focus {
    top: 12px;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

.narrow {
    max-width: 720px;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    line-height: 1.15;
    font-weight: 700;
}

p {
    color: var(--text-secondary);
}

.text-wa {
    color: var(--color-whatsapp);
}

/* Ping brand gradient (matches the logo) */
.text-grad {
    background: linear-gradient(90deg, #22d3ee, #8b5cf6 55%, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.btn:hover {
    filter: brightness(1.08);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--color-whatsapp);
    color: var(--color-whatsapp-ink);
}

.btn-small {
    min-height: 40px;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-large {
    min-height: 56px;
    padding: 14px 28px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

.btn[disabled] {
    opacity: 0.7;
    cursor: wait;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(8, 12, 20, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

/* Matches the main makemylisting.ai header: Outfit bold 24px, white + blue */
.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-link img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1;
    color: #ffffff;
}

.logo-a {
    color: #ffffff;
}

.logo-b {
    color: #3b82f6;
}

/* Hero */
.hero {
    padding: 24px 0 44px;
}

/* Phones: headline, then the phone, then the handle box. Desktop: copy + box left, phone right. */
.hero-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr); /* never wider than the screen */
    grid-template-areas: "copy" "visual" "cta";
}

.hero-copy { grid-area: copy; }
.hero-visual { grid-area: visual; }
/* Above the phone's drop shadow, which would otherwise dim part of the label text. */
.hero-cta { grid-area: cta; scroll-margin-top: 80px; position: relative; z-index: 1; }

.hero h1 {
    font-size: clamp(2.2rem, 10vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-sub {
    margin-top: 14px;
    font-size: 1.1rem;
    max-width: 26em;
}

/* Handle box + button (hero and end of page) */
.cta-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Handle box and button share one pill-shaped bar, on phones too. */
.cta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    background: var(--bg-primary);
    border: 1px solid #3a4558;
    border-radius: 999px;
}

.cta-row:focus-within {
    outline: 3px solid var(--color-focus);
    outline-offset: 1px;
}

.cta-row:has(input[aria-invalid="true"]) {
    border-color: var(--color-error);
}

.cta-row input {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 0 4px 0 14px;
    background: transparent;
    color: var(--text-primary);
    border: 0;
    font-family: var(--font-body);
    font-size: 1rem; /* 16px stops iOS zooming on focus */
}

.cta-row input::placeholder {
    color: #7c8594;
}

.cta-row input:focus {
    outline: none;
}

.cta-row .btn {
    flex: none;
    min-height: 48px;
    padding: 0 18px;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-wa-start {
    gap: 7px;
}

.cta-error {
    margin-top: 8px;
    color: var(--color-error);
    font-size: 0.9rem;
    font-weight: 500;
}

.cta-note {
    margin-top: 10px;
    font-size: 0.85rem;
    text-align: center;
}

/* Hero visual: a phone showing the WhatsApp chat */
.hero-visual {
    width: 100%;
    max-width: 230px;
    margin: 0 auto;
}

.phone {
    position: relative;
    display: flex;
    flex-direction: column;
    aspect-ratio: 9 / 18.5;
    overflow: hidden;
    background: #0b141a;
    border: 9px solid #111318;
    border-radius: 40px;
    outline: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}

.phone-notch {
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 76px;
    height: 20px;
    border-radius: 999px;
    background: #111318;
    z-index: 2;
}

.wa-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 31px 10px 7px;
    background: #202c33;
    color: #e9edef;
}

.wa-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.wa-name {
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.2;
}

.wa-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    padding: 10px 9px 12px;
    overflow: hidden;
}

.msg {
    max-width: 84%;
    padding: 6px 9px 5px;
    border-radius: 9px;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #e9edef;
}

.msg-out {
    align-self: flex-end;
    background: #005c4b;
    border-top-right-radius: 2px;
}

.msg-in {
    align-self: flex-start;
    background: #202c33;
    border-top-left-radius: 2px;
}

/* Image message: the assistant's preview of the site */
.msg-media {
    max-width: 72%;
    padding: 4px 4px 5px;
}

.msg-media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: top;
    border-radius: 6px;
}

.msg-media > span:not(.msg-time) {
    display: block;
    padding: 5px 5px 0;
}

.msg-time {
    display: block;
    text-align: right;
    font-size: 0.62rem;
    color: #aebac1;
    margin-top: 2px;
}

/* Animation: plays once and ends with every message showing.
   Without animation support (or with reduced motion), the final state shows. */
@media (prefers-reduced-motion: no-preference) {
    .m1, .m2, .m3, .m4 {
        animation: msg-in 0.4s ease both;
    }

    .m1 { animation-delay: 0.4s; }
    .m2 { animation-delay: 1.6s; }
    .m3 { animation-delay: 3.0s; }
    .m4 { animation-delay: 3.8s; }

    @keyframes msg-in {
        from { opacity: 0; transform: translateY(8px); }
        to { opacity: 1; transform: none; }
    }
}

/* Sections */
.section {
    padding: 52px 0;
    scroll-margin-top: 72px;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-title {
    font-size: clamp(1.65rem, 6vw, 2.4rem);
    margin-bottom: 12px;
}

.section-sub {
    font-size: 1.05rem;
    margin-bottom: 24px;
}

/* Who does what */
.split {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.split-card {
    border-radius: var(--radius-lg);
    padding: 22px 20px;
}

.split-card h3 {
    font-size: 1.25rem;
    margin-bottom: 14px;
}

.split-us {
    background: var(--bg-primary);
    border: 1px solid var(--border);
}

.split-you {
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.35);
}

.tick-list {
    list-style: none;
    display: grid;
    gap: 10px;
}

.tick-list li {
    position: relative;
    padding-left: 28px;
}

.tick-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-whatsapp);
    font-weight: 700;
}

.chat-list {
    list-style: none;
    display: grid;
    gap: 8px;
}

.chat-list li {
    justify-self: end;
    max-width: 90%;
    padding: 8px 12px;
    background: #005c4b;
    color: #e9edef;
    border-radius: 12px;
    border-top-right-radius: 3px;
    font-size: 0.95rem;
}

.split-note {
    margin-top: 14px;
    font-size: 0.9rem;
}

/* Live example sites */
#examples .section-title {
    text-align: center;
}

.showcase {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 520px;
    margin: 20px auto 0;
}

.showcase li {
    display: grid;
    gap: 10px;
    justify-items: center;
}

.showcase-shot {
    display: block;
    width: 100%;
    border: 5px solid #1f2937;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.showcase-shot img {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    object-position: top;
}

.showcase-link {
    color: var(--color-whatsapp);
    font-weight: 600;
    text-decoration: none;
}

.showcase-note {
    margin-top: 18px;
    font-size: 0.875rem;
    text-align: center;
}

/* Pricing */
.price-card {
    max-width: 440px;
    margin: 0 auto;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 22px 22px;
}

.price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: var(--text-primary);
}

.price-amount {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
}

.price-period {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.price-setup {
    margin-top: 6px;
    color: var(--text-primary);
}

.price-points {
    list-style: none;
    margin: 20px 0 24px;
    display: grid;
    gap: 10px;
}

.price-points li {
    padding-left: 26px;
    position: relative;
}

.price-points li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-whatsapp);
    font-weight: 700;
}

.price-small {
    margin-top: 14px;
    font-size: 0.8rem;
    text-align: center;
}

/* FAQ */
.faq {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.faq details {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 48px 18px 18px;
    font-weight: 600;
    position: relative;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.faq details[open] summary::after {
    content: "−";
}

.faq details p {
    padding: 0 18px 18px;
}

/* Final call to action */
.section-form {
    background: var(--bg-secondary);
}

.privacy-note {
    margin-top: 16px;
    font-size: 0.85rem;
    text-align: center;
}

/* Footer */
.footer {
    padding: 28px 0 36px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.875rem;
}

.footer-inner > p {
    flex: 1 1 320px;
    max-width: 52em;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.link-button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--color-focus);
    text-decoration: underline;
    cursor: pointer;
}

/* Cookie banner (built by tracking.js) */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 16px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-title {
    font-size: 1rem;
    margin-bottom: 4px;
}

.cookie-title:focus {
    outline: none;
}

.cookie-banner p {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.cookie-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

/* Accept and Reject deliberately look the same, so neither is nudged. */
.btn-cookie {
    min-height: 44px;
    background: var(--text-primary);
    color: var(--bg-primary);
}

@media (min-width: 640px) {
    .cookie-banner {
        left: 24px;
        right: auto;
        bottom: 24px;
        max-width: 440px;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
    }
}

/* Thank-you page */
.thanks {
    min-height: calc(100vh - 160px);
    display: grid;
    align-items: center;
    padding: 56px 0;
}

.thanks h1 {
    font-size: clamp(2rem, 7vw, 3rem);
    margin-bottom: 16px;
}

.thanks p + p {
    margin-top: 12px;
}

.thanks .btn {
    margin-top: 28px;
}

/* Larger screens */
@media (min-width: 640px) {
    .container {
        padding: 0 24px;
    }

    .split {
        grid-template-columns: 1fr 1fr;
    }

    .cta-note {
        text-align: left;
    }
}

@media (min-width: 960px) {
    .header-inner {
        height: 80px;
    }

    .hero {
        padding: 64px 0 80px;
    }

    .hero-grid {
        grid-template-columns: 1.15fr 0.85fr;
        grid-template-areas: "copy visual" "cta visual";
        align-items: end;
        column-gap: 48px;
        row-gap: 28px;
    }

    .hero-cta {
        align-self: start;
    }

    .hero-visual {
        max-width: 290px;
    }

    .section {
        padding: 80px 0;
    }
}
