/* ==========================================================================
   Botona design system
   Warm stone canvas, white content cards, green primary actions. Elevation
   comes from the layered shadow ring; dividers stay real borders.
   ========================================================================== */
:root {
    color-scheme: light;
    --background: #f3f1ec;
    --surface: #ffffff;
    --raised: #ffffff;
    --text: #1c1c1c;
    --muted: #333333;
    --subtle: #2a2a2a;
    --accent: #1c1c1c;
    --accent-hover: #000000;
    --accent-soft: #eceae4;
    --button-primary: #6b9c40;
    --button-primary-hover: #9be15d;
    --button-primary-text: #ffffff;
    --button-primary-hover-text: #1c1c1c;
    --overlay-background: #ffffff;
    --overlay-raised: #f7f6f3;
    --overlay-inset: #f3f1ec;
    --overlay-hover: #eceae4;
    --overlay-border: #e4e1da;
    --line: #e7e4dc;
    --line-strong: #d4d0c6;
    --secondary-background: #ffffff;
    --secondary-hover: #f3f1ec;
    --secondary-hover-border: #d4d0c6;
    --danger: #c0392b;
    --danger-soft: #fdecea;
    --danger-line: #f5c6c0;
    --warning: #8a5a00;
    --warning-soft: #fff6e0;
    --warning-line: #f3d9a4;
    --success: #1fa97a;
    --success-soft: #e5f6ee;
    --brand-face: #9be15d;
    --brand-band: #7b8794;
    --brand-eyes: #ffffff;
    --sky: #efe8dc;
    --lavender: #ebe6df;
    --mint-soft: #e7efe4;
    --peach-soft: #f6ebe3;
    --coral: #ff6b57;
    --mint: #1fa97a;
    --violet: #7c5cf6;
    --badge: #eceae4;
    --shadow-border:
        0px 0px 0px 1px oklch(0 0 0 / 0.06),
        0px 1px 2px -1px oklch(0 0 0 / 0.06),
        0px 2px 4px 0px oklch(0 0 0 / 0.04);
    --shadow-border-hover:
        0px 0px 0px 1px oklch(0 0 0 / 0.08),
        0px 1px 2px -1px oklch(0 0 0 / 0.08),
        0px 2px 4px 0px oklch(0 0 0 / 0.06);
    --shadow-card: var(--shadow-border);
    --shadow-float: var(--shadow-border-hover);
    --shadow-overlay:
        0px 0px 0px 1px oklch(0 0 0 / 0.06),
        0px 24px 70px oklch(0 0 0 / 0.18);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-family: var(--font-family);
    font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }

/* Scrollbars: thin and quiet, no painted track. */
html, body, dialog, select { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background: #c4bfb4; }
::-webkit-scrollbar-button { display: none; }
@supports selector(::-webkit-scrollbar) {
    html, body, dialog, select { scrollbar-width: auto; scrollbar-color: auto; }
}

body { margin: 0; background: var(--background); color: var(--text); font-family: var(--font-family); font-size: 16px; line-height: 1.6; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--text); }
/* Menus and dialogs sit on white; their secondary controls follow. */
:is(dialog, .account-menu-list, .look-menu, .credit-details, .statistics-tooltip, .team-settings-menu) {
    --secondary-background: var(--overlay-background);
    --secondary-hover: var(--overlay-inset);
    --secondary-hover-border: var(--line-strong);
}
a, button, .button { color: inherit; }
button { font: inherit; cursor: pointer; }
button, input, select, a { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
button:active:not(:disabled):not(.tab), .button:active:not(:disabled) { scale: 0.96; }
.marketing-page img:not(.demo-watch-frame),
.hero-platform img,
.platform-grid img,
.team-home-avatar { outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px; }

/* White content panel. Radius 20px wraps a 12px inner control with 8px of inset. */
.surface-card {
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-border);
    padding: 20px;
    transition-property: box-shadow;
    transition-duration: 150ms;
    transition-timing-function: ease-out;
}
.surface-card:hover { box-shadow: var(--shadow-border-hover); }

/* Wordmark and the jelly-face brand mark. */
.wordmark { display: inline-flex; align-items: center; font-size: 24px; line-height: 1; letter-spacing: -.04em; font-weight: 800; white-space: nowrap; text-decoration: none; }
.wordmark-suffix { color: var(--muted); font-weight: 500; }
.brand-mark { position: relative; display: flex; justify-content: center; align-items: center; gap: 5px; flex: 0 0 32px; width: 32px; height: 32px; margin-right: 10px; border-radius: 11px; transform: rotate(-8deg); }
.brand-face { position: absolute; inset: 0; z-index: 1; display: flex; justify-content: center; align-items: center; gap: inherit; padding-left: 4px; background: var(--brand-face); border-radius: inherit; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 16px; height: 9px; left: calc(50% - 8px); background: var(--brand-band); pointer-events: none; }
.brand-mark::before { top: -8px; border-radius: 5px 5px 1px 1px; clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%); transform: rotate(5deg); }
.brand-mark::after { bottom: -8px; border-radius: 1px 1px 5px 5px; clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%); transform: rotate(-5deg); }
.brand-mark i { width: 4px; height: 8px; border-radius: 5px; background: var(--brand-eyes); }

/* Personal / Team switch: a pair of links, because switching navigates to the other site. */
.experience-switch { display: inline-flex; flex-wrap: nowrap; gap: 3px; padding: 4px; border-radius: 999px; background: #e6e2d8; }
.experience-switch a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.experience-switch a:hover { color: var(--text); }
.experience-switch a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(19, 26, 43, .12); }

/* One header for the marketing pages, sign-in and the signed-in portal:
   full-width, sticky, frosted; its content aligns with .page-width. */
header.brand-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; width: auto; max-width: none; min-height: 76px; margin: 0; padding: 12px max(5%, calc((100% - 1200px) / 2)); background: rgba(243, 241, 236, .86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid oklch(0 0 0 / 0.06); }
header.brand-header .wordmark { font-size: 24px; }
header.brand-header .main-nav, .portal-header-actions { margin-left: auto; }
header.brand-header .main-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; color: var(--muted); }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); }
.nav-login { color: var(--text); }
.nav-login span { margin-left: 6px; }
header.brand-header .main-nav > .button { min-height: 42px; padding: 6px 18px; font-size: 14px; box-shadow: none; }
@media (max-width: 900px) {
    header.brand-header .main-nav { gap: 18px; }
    header.brand-header .main-nav > .button { display: none; }
}
@media (max-width: 640px) {
    header.brand-header { position: static; gap: 10px 12px; min-height: 0; padding-block: 12px; }
    header.brand-header > .wordmark { flex: 1 0 100%; }
    header.brand-header .main-nav { gap: 14px; font-size: 14px; }
    .experience-switch a { padding-inline: 12px; font-size: 13px; }
}
@media (max-width: 420px) {
    header.brand-header .wordmark { font-size: 21px; }
    .brand-mark { flex-basis: 28px; width: 28px; height: 28px; margin-right: 8px; border-radius: 9px; }
}

/* Marketing layout and reusable components. */
.page-width { width: min(1200px, 90%); margin-inline: auto; }
:where(.marketing-page) :where(p, h1, h2, h3) { margin: 0; }
.marketing-page a { text-decoration: none; }
.marketing-page h1, .marketing-page h2, .marketing-page h3 { font-weight: 800; letter-spacing: -.025em; line-height: 1.06; }
.marketing-page h1 { font-size: clamp(2.7rem, 5.6vw, 4.8rem); }
.marketing-page h2 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1.12; }
.marketing-page h3 { font-size: 1.3rem; letter-spacing: -.015em; line-height: 1.3; }
.marketing-page h1 span, .marketing-page h2 span, .mark { color: var(--accent); }
.skip-link { position: absolute; z-index: 100; left: 16px; top: 12px; padding: 12px 20px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 700; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.marketing-page .eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.marketing-page .eyebrow::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: currentColor; }
.marketing-page .button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 11px 22px 11px 24px; border-radius: 999px; font-size: 15px; font-weight: 700; border: 0; transition-property: scale, background-color, color, box-shadow; transition-duration: 150ms; transition-timing-function: ease-out; }
.marketing-page .button-primary { background: var(--button-primary); color: var(--button-primary-text); box-shadow: none; }
.marketing-page .button-primary:hover { background: var(--button-primary-hover); color: var(--button-primary-hover-text); }
:is(button, a, .button).button-primary:hover,
button.button-primary:hover,
.pricing-page .plan-button.button-primary:hover,
.places-page button[type=submit]:hover,
.places-page #add-place:hover,
.api-page .api-cta .button:hover,
.auth form button[type=submit]:hover,
.legal-dialog button.legal-done:hover,
.hero-controls .hero-try:hover { color: var(--button-primary-hover-text); }
.marketing-page .button-primary:disabled { opacity: .7; scale: 1; }
.marketing-page .button-secondary { background: var(--surface); color: var(--text); box-shadow: var(--shadow-border); }
.marketing-page .button-secondary:hover { box-shadow: var(--shadow-border-hover); }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-hover); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.text-link:hover { color: var(--text); }

/* Footer. */
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: 34px 0 44px; border-top: 1px solid var(--line); }
.site-footer .wordmark { font-size: 21px; }
.site-footer > p, .site-footer .footer-links { font-size: 15px; color: var(--muted); }
.site-footer > p { flex: 1 1 auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; font-weight: 600; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.site-footer .footer-legal,
.site-footer .footer-disclaimer { flex: 1 1 100%; max-width: 72rem; font-size: 13px; line-height: 1.7; color: var(--subtle); }
.site-footer .footer-legal a { color: inherit; font-weight: 600; text-decoration: none; }
.site-footer .footer-legal a:hover { color: var(--text); }
@media (max-width: 760px) {
    .site-footer { flex-direction: column; align-items: flex-start; gap: 16px; padding-block: 28px 36px; }
}
@media (prefers-reduced-motion: reduce) {
    .marketing-page .button, button, .button { transition: none; }
    button:active, .button:active, .marketing-page .button:active { scale: 1; }
}

/* Legal text is shared by standalone pages and the policy dialog. */
.legal-page-main { max-width: 820px; padding-block: 56px 80px; }
.legal-page h1 { margin-bottom: 8px; font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.legal-content { font-size: 16.5px; line-height: 1.75; color: var(--muted); }
.legal-content p { margin: 12px 0; }
.legal-content .legal-updated { font-size: 14px; margin: 12px 0 24px; color: var(--subtle); }
.legal-content .legal-intro { font-size: 18px; color: var(--text); }
.legal-content section { margin-top: 34px; }
.legal-content h2, .legal-content h3 { font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -.02em; color: var(--text); margin: 0 0 10px; }
.legal-content .legal-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.legal-content a, .legal-dialog-footer a { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
.legal-content a:hover, .legal-dialog-footer a:hover { color: var(--text); }
.legal-is-open { overflow: hidden; }
dialog.legal-dialog { width: min(740px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 20px; background: var(--overlay-background); color: var(--text); box-shadow: var(--shadow-overlay); }
.legal-dialog::backdrop { background: oklch(0 0 0 / 0.45); }
.legal-panel { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.legal-dialog-header { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.legal-dialog-header h2 { font-size: 22px; line-height: 1.2; font-weight: 700; margin: 0; }
.legal-dialog button.legal-close { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 26px; }
.legal-dialog button.legal-close:hover { color: var(--text); background: var(--overlay-hover); }
.legal-dialog-body { padding: 0 24px 24px; overflow-y: auto; overscroll-behavior: contain; }
.legal-dialog-footer { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--line); font-size: 14px; }
.legal-dialog button.legal-done { min-height: 44px; padding: 8px 22px; border: 0; border-radius: 999px; background: var(--button-primary); color: var(--button-primary-text); font-size: 14px; font-weight: 700; }
.legal-dialog button.legal-done:hover { background: var(--button-primary-hover); color: var(--button-primary-hover-text); }
@media (max-width: 600px) {
    .legal-page-main { padding-block: 36px 48px; }
    .legal-dialog-header, .legal-dialog-footer, .legal-dialog-body { padding-inline: 18px; }
    .legal-dialog-header h2 { font-size: 20px; }
}

/* Shared tooltip surface, including the portal credit meter. */
.site-tooltip, .credit-details { padding:8px 10px; background:var(--overlay-raised); color:var(--text); border:1px solid var(--line); border-radius:4px; font-family:var(--font-family); font-size:14px; font-weight:400; line-height:1.45; text-align:left; }
.site-tooltip { position:fixed; z-index:10000; inset:auto; margin:0; width:max-content; max-width:min(320px,calc(100vw - 24px)); max-height:calc(100vh - 24px); overflow:auto; overflow-wrap:anywhere; white-space:normal; box-shadow:var(--shadow-float); }
.site-tooltip::backdrop { background:transparent; pointer-events:none; }
