/* ==========================================================================
   MousePhaser, theme layer on top of Bootstrap 5.
   Same palette and components as /tideline/ and /fineday/ (the house
   look), plus the one thing a desktop app needs that a phone app does
   not: a window frame for its screenshots instead of a phone frame.
   ========================================================================== */

@font-face {
    font-family: 'InterVariable';
    src: url('/assets/fonts/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light dark;
}

/* Dark is the app's native look and stays the default. Light was checked
   against WCAG AA the same way the homepage palette was. */
[data-bs-theme="dark"] {
    --bg: #0d1117;
    --card: rgba(26, 31, 46, 0.9);
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.60);
    --accent: #4a90d9;
    --accent-rgb: 74, 144, 217;
    --accent-hover: #5b9fe4;
    --on-accent: #ffffff;
    --amber: #fca01a;
    --amber-rgb: 252, 160, 26;
    --high: #69d84f;
    --high-rgb: 105, 216, 79;
    --low: #e06c75;
    --low-rgb: 224, 108, 117;
    --row-bg: rgba(26, 31, 46, 0.4);
    --row-border: rgba(255, 255, 255, 0.03);
    --band-bg: rgba(26, 31, 46, 0.35);
    --panel-sunk: rgba(0, 0, 0, 0.25);
    --shadow-window: rgba(0, 0, 0, 0.55);
}

[data-bs-theme="light"] {
    --bg: #f7f9fc;
    --card: #ffffff;
    --border: rgba(13, 17, 23, 0.14);
    --text: #0d1117;
    --muted: #5a6472;
    --accent: #275f9c;
    --accent-rgb: 39, 95, 156;
    --accent-hover: #1d4a76;
    --on-accent: #ffffff;
    --amber: #9a6206;
    --amber-rgb: 154, 98, 6;
    --high: #1e6611;
    --high-rgb: 30, 102, 17;
    --low: #c0392f;
    --low-rgb: 192, 57, 47;
    --row-bg: rgba(13, 17, 23, 0.03);
    --row-border: rgba(13, 17, 23, 0.07);
    --band-bg: rgba(13, 17, 23, 0.028);
    --panel-sunk: rgba(13, 17, 23, 0.04);
    --shadow-window: rgba(13, 17, 23, 0.26);
}

/* Map the palette onto Bootstrap's theme tokens (both themes) */
[data-bs-theme="dark"],
[data-bs-theme="light"] {
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-body-font-family: 'InterVariable', system-ui, sans-serif;
    --bs-emphasis-color: var(--text);
    --bs-secondary-color: var(--muted);
    --bs-tertiary-color: var(--muted);
    --bs-border-color: var(--border);
    --bs-border-color-translucent: var(--border);
    --bs-link-color: var(--accent);
    --bs-link-color-rgb: var(--accent-rgb);
    --bs-link-hover-color: var(--accent-hover);
}

body {
    font-family: 'InterVariable', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.005em;
}

/* Brand wordmark */
.logo {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
    color: var(--text);
}

.logo-accent {
    color: var(--accent);
}

.logo img {
    border-radius: 7px;
}

/* Accent primary button (Bootstrap .btn-primary re-skinned) */
.btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-hover);
    --bs-btn-hover-border-color: var(--accent-hover);
    --bs-btn-active-bg: #3f82c8;
    --bs-btn-active-border-color: #3f82c8;
    --bs-btn-disabled-bg: var(--accent);
    --bs-btn-disabled-border-color: var(--accent);
    --bs-btn-color: #ffffff;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-color: #ffffff;
    --bs-btn-disabled-color: #ffffff;
    font-weight: 600;
    box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.28);
}

.btn-primary:hover {
    box-shadow: 0 12px 30px rgba(var(--accent-rgb), 0.4);
}

/* Outline / ghost button: the "coming soon" store slot until the Store
   listing is live. */
.btn-ghost {
    --bs-btn-color: var(--muted);
    --bs-btn-border-color: var(--border);
    --bs-btn-hover-color: var(--text);
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-disabled-color: var(--muted);
    --bs-btn-disabled-border-color: var(--border);
    font-weight: 500;
    border: 1px solid var(--border);
}

/* Amber pill beside the primary hero badge: the one solid amber focal
   point, the same job the dot on the icon does. */
.badge-amber {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(var(--amber-rgb), 0.14);
    color: var(--amber);
    border: 1px solid rgba(var(--amber-rgb), 0.35);
    font-weight: 600;
}

/* Surfaces */
.surface-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
}

.band-tint {
    background:
        radial-gradient(1200px 400px at 80% -10%, rgba(var(--accent-rgb), 0.14), transparent 60%),
        var(--band-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
}

.section-divider {
    border-top: 1px solid var(--border);
}

.text-muted-2 {
    color: var(--muted) !important;
}

/* --------------------------------------------------------------------------
   The window frame. /assets/carousel.js builds the slides; /assets/carousel.css
   styles them for a phone. This overrides the shape for a desktop window:
   the app's own proportions, a thin border instead of a bezel, and the
   canvas colour behind a dialog that is smaller than the main window.
   The app is a dark-themed Windows program, so like Tideline's phone the
   frame keeps the dark palette in both site themes: a screenshot does not
   change colour with the page around it.
   -------------------------------------------------------------------------- */

.hero-window {
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1075 / 1299;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0d1117;
    box-shadow: 0 30px 60px var(--shadow-window);
    overflow: hidden;
}

.hero-window .carousel-inner,
.hero-window .carousel-item {
    height: 100%;
}

.hero-window .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #0d1117;
}

.hero-window .carousel-control-prev,
.hero-window .carousel-control-next {
    width: 18%;
    opacity: 0.95;
}

.hero-window .carousel-control-prev-icon,
.hero-window .carousel-control-next-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: rgba(13, 17, 23, 0.35);
    background-size: 55% 55%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero-window .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.5 2 4.5 8l6 6'/%3E%3C/svg%3E");
}

.hero-window .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 2l6 6-6 6'/%3E%3C/svg%3E");
}

.hero-window .carousel-indicators {
    margin-bottom: 0.6rem;
}

.hero-window .carousel-indicators button {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
}

/* --------------------------------------------------------------------------
   How it works: three numbered steps
   -------------------------------------------------------------------------- */

.step {
    background: var(--row-bg);
    border: 1px solid var(--row-border);
    border-radius: 18px;
    padding: 22px;
    height: 100%;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 14px;
}

.step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.step p {
    color: var(--muted);
    margin: 0;
}

/* Feature chips row */
.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--row-bg);
    border: 1px solid var(--row-border);
    border-radius: 14px;
    padding: 18px;
    font-size: 15px;
    font-weight: 500;
    height: 100%;
}

.feature i {
    color: var(--accent);
    font-size: 22px;
    flex-shrink: 0;
}

/* "Said plainly" list: the limits, as a list the eye can scan */
.plain-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plain-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--row-border);
    color: var(--muted);
}

.plain-list li:last-child {
    border-bottom: none;
}

.plain-list i {
    color: var(--amber);
    flex-shrink: 0;
    margin-top: 3px;
}

.plain-list strong {
    color: var(--text);
    font-weight: 600;
}

/* FAQ, native <details> so it works without JavaScript */
.faq-list {
    border-top: 1px solid var(--border);
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 34px 18px 0;
    font-weight: 600;
    color: var(--text);
    position: relative;
    transition: color 0.15s ease;
}

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

.faq-item summary::after {
    content: "\eb0b"; /* ti-plus */
    font-family: "tabler-icons";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-item summary:hover {
    color: var(--accent);
}

.faq-item summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.faq-item p {
    color: var(--muted);
    padding: 0 34px 18px 0;
    margin: 0;
    max-width: 680px;
}

/* Pricing */
.price {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1;
}

.price-currency {
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0;
}

.disclaimer {
    color: var(--muted);
    font-size: 12.5px;
    max-width: 720px;
}

/* --------------------------------------------------------------------------
   Theme toggle (same control as the homepage and /tideline/)
   -------------------------------------------------------------------------- */

.theme-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.theme-said {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px 10px;
    box-shadow: 0 6px 18px var(--shadow-window);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 20;
}

.theme-said.is-on {
    opacity: 1;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.theme-toggle i {
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 18px;
    text-align: center;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.1);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}
