/* Microsite themes — shared scaffolding (applies to Atelier / Hearth / Studio).
   Font imports, reset, base variables, shared button & WhatsApp FAB. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=JetBrains+Mono:wght@400;500&family=Caveat:wght@400;500&display=swap');

:root { --wa: #25D366; }

body.ms-body { margin: 0; padding: 0; font-family: 'Inter', system-ui, sans-serif; color: #0e0e0d; -webkit-font-smoothing: antialiased; }

.ms { min-height: 100vh; position: relative; font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bg); }
.ms img, .ms svg, .ms video { max-width: 100%; height: auto; display: block; }
.ms *, .ms *::before, .ms *::after { box-sizing: border-box; }
.ms .offers .card, .ms .social .block, .ms .comm, .ms .faq details { display: block; width: 100%; }
.ms .offers .cover, .ms .hero .portrait, .ms .social .yt { width: 100%; }
.ms a { color: inherit; text-decoration: none; }
.ms .btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 19px; border-radius: 10px; font: 500 15.5px/1 Inter, sans-serif; cursor: pointer; border: 1px solid transparent; }
.ms .btn.primary { background: var(--accent); color: #fff; }
.ms .btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.ms .btn.ink { background: var(--ink); color: var(--bg); }
.ms .btn-sm { padding: 10px 15px; font-size: 14px; border-radius: 8px; }
/* Hero CTA labels stay on one line; the row wraps whole buttons (flex-wrap) instead
   of crushing a label like "Log in with WhatsApp" into stacked, line-height:1 fragments. */
.ms .hero .ctas .btn { white-space: nowrap; }

.wa-fab { position: fixed; bottom: 16px; right: 16px; display: inline-flex; align-items: center; gap: 9px; padding: 11px 15px 11px 13px; background: var(--wa); color: #fff; border-radius: 999px; font: 500 12.5px Inter, sans-serif; box-shadow: 0 12px 26px -10px rgba(37, 211, 102, .5); border: 0; cursor: pointer; z-index: 60; text-decoration: none; }
.wa-fab .ic { width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; }

@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .5 } }

/* Journal strip on microsite home */
.ms .ms-journal {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px; margin: 16px 0 12px;
}
.ms .ms-journal .jcard {
    display: flex; flex-direction: column;
    border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
    background: var(--surface, transparent);
    transition: border-color .15s, transform .15s;
}
.ms .ms-journal .jcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.ms .ms-journal .jcard .cover {
    position: relative; aspect-ratio: 16/9;
    background: var(--surface-2, var(--line-2, rgba(0,0,0,.06)));
}
.ms .ms-journal .jcard .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.ms .ms-journal .jcard .body h3 { font-size: 19px; margin: 0; line-height: 1.3; }
.ms .ms-journal .jcard .body .d {
    color: var(--ink-2); font-size: 16px; margin: 0; line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ms .ms-journal .jcard .specs {
    display: flex; gap: 10px; flex-wrap: wrap;
    color: var(--ink-3); font-size: 11px; font-family: 'JetBrains Mono', monospace; letter-spacing: .04em;
}
.ms .ms-journal-more { margin-top: 8px; }
.ms .ms-journal-more a {
    color: var(--accent); font-size: 13px; font-family: 'JetBrains Mono', monospace; letter-spacing: .04em;
}

/* Floating WhatsApp action button on the storefront — brand green, bottom-right */
.fab-whatsapp {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: calc(20px + env(safe-area-inset-bottom));
    width: 56px; height: 56px; border-radius: 50%;
    background: #25D366; color: #fff;
    display: grid; place-items: center;
    box-shadow: 0 8px 24px rgba(37,211,102,.35), 0 2px 6px rgba(0,0,0,.18);
    z-index: 60;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.fab-whatsapp:hover {
    background: #1ebc59;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37,211,102,.45), 0 4px 10px rgba(0,0,0,.22);
}
.fab-whatsapp:focus-visible {
    outline: 3px solid rgba(37,211,102,.5);
    outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
    .fab-whatsapp { transition: none; }
    .fab-whatsapp:hover { transform: none; }
}

/* Lightbox styles moved inline to Microsite.cshtml layout so they apply to
   portal pages too (microsite-shared.css is microsite-themes only). */

/* ===== WhatsApp login — entry pill (topbar) + hero button (storefront themes) ===== */
.ms .wa-login { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 8px; background: var(--wa); color: #fff; border: 0; border-radius: 999px; font: 600 12px/1 Inter, sans-serif; cursor: pointer; box-shadow: 0 6px 14px -8px rgba(37, 211, 102, .7); white-space: nowrap; }
.ms .wa-login svg { width: 14px; height: 14px; }
.ms .wa-login:hover { filter: brightness(1.04); }
.ms .btn.wa { background: var(--wa); color: #fff; border: 0; box-shadow: 0 10px 22px -12px rgba(37, 211, 102, .8); }
.ms .btn.wa svg { width: 16px; height: 16px; }

/* ===== WhatsApp login — sign-in steps modal (rendered once in the layout, outside .ms) ===== */
.wa-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.wa-modal[hidden] { display: none; }
.wa-modal .wa-scrim { position: absolute; inset: 0; background: rgba(12, 10, 8, .46); backdrop-filter: blur(2px); }
.wa-sheet { position: relative; z-index: 2; box-sizing: border-box; width: 100%; max-width: 430px; background: #fdfcf9; border-radius: 22px 22px 0 0; padding: 22px 20px 20px; box-shadow: 0 -20px 60px -24px rgba(0, 0, 0, .4); animation: waUp .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes waUp { from { transform: translateY(16px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.wa-sheet-grip { width: 36px; height: 4px; border-radius: 99px; background: #d9d4ca; margin: -8px auto 14px; }
.wa-x { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: #efece5; color: #6b6659; font-size: 17px; line-height: 1; cursor: pointer; }
.wa-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.wa-badge { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; background: var(--wa); display: grid; place-items: center; box-shadow: 0 8px 18px -8px rgba(37, 211, 102, .8); }
.wa-badge svg { width: 24px; height: 24px; color: #fff; }
.wa-head h3 { margin: 1px 0 4px; font: 600 17px/1.1 Inter, sans-serif; color: #17130e; letter-spacing: -.01em; }
.wa-head p { margin: 0; font-size: 12.5px; line-height: 1.45; color: #6b6659; }
.wa-steps { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.wa-steps li { display: flex; gap: 11px; align-items: flex-start; }
.wa-steps .n { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: #ecf8ef; color: #0b8a3e; font: 600 11px/22px 'JetBrains Mono', monospace; text-align: center; }
.wa-steps b { display: block; font: 600 13px/1.35 Inter, sans-serif; color: #1f1a14; }
.wa-steps li > div span { display: block; font-size: 11.5px; line-height: 1.4; color: #857d70; margin-top: 1px; }
.wa-steps code { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; background: #ecf8ef; color: #0b8a3e; padding: 1px 6px; border-radius: 5px; }
.wa-num { display: flex; align-items: center; gap: 10px; padding: 11px 13px; background: #f4f1ea; border: 1px solid #e7e2d7; border-radius: 13px; margin-bottom: 14px; }
.wa-num .dot { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: var(--wa); display: grid; place-items: center; color: #fff; }
.wa-num .dot svg { width: 18px; height: 18px; }
.wa-num > div { flex: 1; min-width: 0; }
.wa-num b { display: block; font: 600 12.5px Inter, sans-serif; color: #1f1a14; }
.wa-num > div span { display: block; font: 500 11px 'JetBrains Mono', monospace; color: #857d70; letter-spacing: .02em; margin-top: 1px; }
.wa-num .chk { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; background: #1a8cd8; color: #fff; font-size: 11px; display: grid; place-items: center; }
.wa-cta { box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; max-width: 100%; padding: 14px; background: var(--wa); color: #fff; border: 0; border-radius: 13px; font: 600 14px Inter, sans-serif; cursor: pointer; text-decoration: none; box-shadow: 0 14px 28px -12px rgba(37, 211, 102, .85); }
.wa-cta svg { width: 19px; height: 19px; }
.wa-alt { box-sizing: border-box; display: block; width: 100%; max-width: 100%; margin-top: 10px; background: 0; border: 0; color: #8a8276; font: 500 12px Inter, sans-serif; cursor: pointer; text-align: center; }
.wa-foot { margin: 12px 0 0; text-align: center; font-size: 10.5px; color: #a39b8d; line-height: 1.4; }
/* dark sheet — layout adds .dark when the creator's storefront theme is dark (modal lives outside .ms) */
.wa-modal.dark .wa-sheet { background: #1c1917; box-shadow: 0 -20px 60px -24px rgba(0, 0, 0, .7); }
.wa-modal.dark .wa-head h3 { color: #f1ebde; }
.wa-modal.dark .wa-head p, .wa-modal.dark .wa-steps li > div span, .wa-modal.dark .wa-num > div span { color: #9b9182; }
.wa-modal.dark .wa-steps b, .wa-modal.dark .wa-num b { color: #ece6d9; }
.wa-modal.dark .wa-num { background: #25211c; border-color: #332e26; }
.wa-modal.dark .wa-x { background: #2a261f; color: #b8aea0; }
.wa-modal.dark .wa-sheet-grip { background: #3a352c; }
.wa-modal.dark .wa-steps .n, .wa-modal.dark .wa-steps code { background: rgba(37, 211, 102, .16); color: #5fd98b; }
/* desktop: center the sheet as a card instead of a bottom sheet */
@media (min-width: 700px) {
    .wa-modal { align-items: center; padding: 20px; }
    .wa-sheet { border-radius: 20px; max-width: 400px; }
    .wa-sheet .wa-sheet-grip { display: none; }
}
