/* Styles for the Bearnoby Tools page. Builds on static/css/style.css (tokens, .card, .btn, .badge). */

body {
    justify-content: flex-start;
    align-items: center;
    padding: 1rem 1.5rem;
}

.page {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

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

/* ── Card colours ── */
.card.white { background: white; }
.card.red { background: var(--accent); }
.card.lav { background: var(--lavender); }
.card:hover { transform: none; box-shadow: 0 8px 0 var(--dark-brown); }

/* ── Titles ── */
.outline-title {
    font-weight: 800;
    color: var(--text-white);
    line-height: 1;
    text-shadow:
        -3px -3px 0 var(--deep-brown),
         3px -3px 0 var(--deep-brown),
        -3px  3px 0 var(--deep-brown),
         3px  3px 0 var(--deep-brown),
         0px  6px 0 rgba(0,0,0,0.1);
}

.h-page { font-size: clamp(2.2rem, 6vw, 3.2rem); }

.h-section {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1.25rem;
    text-shadow:
        -3px -3px 0 var(--deep-brown),
         3px -3px 0 var(--deep-brown),
        -3px  3px 0 var(--deep-brown),
         3px  3px 0 var(--deep-brown);
}

.back-link {
    display: inline-block;
    text-decoration: none;
    color: var(--dark-brown);
    font-weight: 800;
    font-size: 0.8rem;
    opacity: 0.4;
    transition: opacity 0.2s;
    margin-bottom: 0.3rem;
}

.back-link:hover { opacity: 1; }

.title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.title-row .badge { margin-top: 0; }
.badge.free { background: var(--primary); color: var(--dark-brown); }
.badge.now { background: var(--accent); margin-top: 0; }

/* ── Announcement pill ── */
.newpill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    background: var(--lavender);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    border: 3px solid var(--dark-brown);
    border-radius: 999px;
    padding: 0.3rem 0.5rem 0.3rem 0.9rem;
    box-shadow: 0 4px 0 var(--dark-brown);
    transition: transform 0.15s;
}

.newpill:hover { transform: translateY(-2px); }

.newpill b {
    font-weight: 800;
    background: var(--accent);
    border-radius: 8px;
    padding: 0 0.4rem;
    margin-right: 0.3rem;
}

.newpill .go {
    background: white;
    color: var(--deep-brown);
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: grid;
    place-items: center;
    font-weight: 800;
}

/* ── Layout: sidebar + main ── */
.layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 2rem;
    align-items: start;
}

.main {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    min-width: 0;
}

.main > section { scroll-margin-top: 1.5rem; }
html { scroll-behavior: smooth; }

.side-nav {
    position: sticky;
    top: 1.25rem;
    background: var(--deep-brown);
    border: 5px solid var(--dark-brown);
    border-radius: 22px;
    box-shadow: 0 8px 0 var(--dark-brown);
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
}

.side-nav .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 800;
    padding: 0.2rem 0.5rem 0.8rem;
}

.side-nav .logo img { width: 30px; border-radius: 8px; }

.side-nav h4 {
    color: var(--lavender);
    font-size: 0.65rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 0.7rem 0.6rem 0.25rem;
}

.side-nav a {
    color: #f0e2c0;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.4rem 0.7rem;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
}

.side-nav a:hover { background: rgba(255,255,255,0.08); }
.side-nav a.on { background: var(--lavender); color: white; }

.side-nav .new {
    font-size: 0.6rem;
    background: var(--accent);
    color: white;
    border-radius: 8px;
    padding: 1px 7px;
}

/* ── Screenshots ── */
.shot {
    background: var(--deep-brown);
    border: 5px solid var(--dark-brown);
    border-radius: 18px;
    box-shadow: 0 7px 0 var(--dark-brown);
    overflow: hidden;
    line-height: 0;
    display: block;
    padding: 0;
    width: 100%;
    font-family: inherit;
}

.shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
}

button.shot { cursor: zoom-in; }
button.shot:hover { border-color: var(--lavender); }

.shot.soon {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    background: repeating-linear-gradient(135deg, var(--deep-brown) 0 14px, #3b2204 14px 28px);
    color: var(--primary);
    font-weight: 800;
    text-align: center;
    line-height: 1.3;
    padding: 1rem;
    font-size: 0.9rem;
}

/* ── Overview ── */
.overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.overview {
    grid-template-columns: 1.3fr 1fr;
    grid-template-rows: auto 1fr;
}

.overview .hero-shot {
    grid-row: 1 / span 2;
}

.overview .hero-shot img {
    object-fit: contain;
    object-position: center;
}

.overview .card p {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--dark-brown);
}

.overview .download {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    justify-content: center;
}

.download h3 {
    font-size: 1.3rem;
    color: white;
    text-shadow: -2px 2px 0 rgba(0,0,0,0.25);
}

.download p { color: white !important; }
.download .btn.big {
    display: block;
    font-size: 1.05rem;
    padding-inline: 0.75rem;
    white-space: nowrap;
}

.btn.big { font-size: 1.25rem; padding: 0.85rem 1.5rem; }
.btn.sm { font-size: 0.75rem; padding: 0.35rem 0.85rem; border-width: 3px; box-shadow: 0 4px 0 var(--dark-brown); }
.btn.yellow { background: var(--primary); }
.btn.disabled { opacity: 0.6; cursor: default; box-shadow: none; pointer-events: none; }

.btn-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.download .btn-row { justify-content: center; }

/* ── Feature tiles ── */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.75rem 1.5rem;
}

.tile {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 0;
}

.tile .shot { aspect-ratio: 16 / 10; }
.tile h3 { font-size: 1.1rem; font-weight: 800; color: var(--deep-brown); margin-bottom: 0.2rem; }
.tile p { font-weight: 600; font-size: 0.92rem; line-height: 1.55; color: var(--dark-brown); }

.feature-more { text-align: center; }
.feature-more p { font-size: 1.6rem; font-weight: 800; }

/* ── Premium ── */
.premium {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.addon-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scroll-margin-top: 1.5rem;
}

.addon {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.75rem;
    align-items: center;
    padding: 1.5rem;
}

.pet-art {
    background: white;
    border: 4px solid var(--dark-brown);
    border-radius: 20px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.pet-art img { width: 100%; max-width: 200px; }

.addon-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    min-width: 0;
}

.addon-head {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
}

.price { font-weight: 800; font-size: 1.1rem; color: white; }

.addon-body h3 {
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    line-height: 1.05;
    color: var(--deep-brown);
    margin: 0;
}

.addon .pitch { color: white; font-size: 1.02rem; font-weight: 600; line-height: 1.6; }

.addon-list {
    list-style: none;
    display: grid;
    gap: 0.35rem;
    font-weight: 700;
    color: white;
    font-size: 0.95rem;
}

.addon-list li::before {
    content: '\2713';
    display: inline-grid;
    place-items: center;
    width: 1.3rem;
    height: 1.3rem;
    margin-right: 0.55rem;
    border-radius: 50%;
    background: var(--primary);
    border: 2.5px solid var(--dark-brown);
    color: var(--dark-brown);
    font-size: 0.7rem;
    font-weight: 800;
}

.addon-shots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.addon-shots .shot { aspect-ratio: 16 / 10; }

.coming-soon {
    border: 4px dashed var(--dark-brown);
    border-radius: 20px;
    padding: 0.9rem 1.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark-brown);
}

/* ── About / FAQ ── */
.philosophy h3 { font-size: 1.05rem; font-weight: 800; color: var(--deep-brown); margin-bottom: 0.75rem; }
.philosophy p { font-size: 0.95rem; font-weight: 600; line-height: 1.6; color: var(--dark-brown); }

.philosophy ol {
    list-style: none;
    counter-reset: steps;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.philosophy li {
    counter-increment: steps;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--dark-brown);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.5;
}

.philosophy li::before {
    content: counter(steps);
    flex-shrink: 0;
    width: 1.55rem;
    height: 1.55rem;
    background: var(--primary);
    border: 2.5px solid var(--dark-brown);
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.55rem;
    text-align: center;
}

.faq-list { display: flex; flex-direction: column; gap: 1rem; }

details.faq-item {
    border: 5px solid var(--dark-brown);
    border-radius: 20px;
    box-shadow: 0 7px 0 var(--dark-brown);
    overflow: hidden;
}

details.faq-item summary {
    background: var(--primary);
    padding: 1rem 1.5rem;
    font-weight: 800;
    font-size: 1rem;
    color: var(--deep-brown);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    user-select: none;
}

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

details.faq-item summary::after {
    content: '\25BE';
    font-size: 1.1rem;
    transition: transform 0.2s;
    opacity: 0.6;
}

details.faq-item[open] summary::after { transform: rotate(180deg); }
details.faq-item summary:hover { background: #f5c84a; }

.faq-body {
    background: white;
    padding: 1.1rem 1.5rem;
    border-top: 4px solid var(--dark-brown);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.faq-body p { color: var(--dark-brown); font-size: 0.95rem; font-weight: 600; line-height: 1.65; }
.faq-body a { color: var(--accent); font-weight: 800; text-decoration: none; }
.faq-body a:hover { text-decoration: underline; }

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(47, 26, 2, 0.88);
    display: grid;
    place-items: center;
    padding: 1rem;
}

.lightbox[hidden] { display: none; }

.lightbox-card {
    width: max-content;
    max-width: min(1100px, 100%);
    max-height: 100%;
    overflow: auto;
    background: var(--primary);
    border: 5px solid var(--dark-brown);
    border-radius: 22px;
    box-shadow: 0 8px 0 var(--dark-brown);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

/* width:0 + min-width:100% keeps the text from widening the card past the image */
.lightbox-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    width: 0;
    min-width: 100%;
}

.lightbox-top h3 { font-size: 1.2rem; color: var(--deep-brown); }
.lightbox-top p { font-weight: 600; color: var(--dark-brown); }
.lightbox-top p:empty { display: none; }

.lightbox-card img {
    display: block;
    max-width: 100%;
    max-height: 72vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }

    .side-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.3rem;
        max-height: none;
    }

    .side-nav .logo,
    .side-nav h4 { display: none; }
    .side-nav a { background: rgba(255,255,255,0.08); }

    .overview,
    .addon { grid-template-columns: 1fr; }
    .overview { grid-template-rows: none; }
    .overview .hero-shot { grid-row: auto; }

    .addon .pet-art { max-width: 200px; }
}

@media (max-width: 600px) {
    body { padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
