/*
 * ptg-site base stylesheet — PenguinTech standalone product marketing
 * sites. Structure, class names, responsive grid, and nav-toggle pattern
 * adapted from Penguin Technologies's consolidated marketing site
 * (`penguintech/styles.css`, this repo); re-coloured to the standalone
 * product marketing palette captured from the live www.penguintech.io
 * site on 2026-08-21 (dark / cyan), which is deliberately distinct from
 * the navy/gold theme used by the consolidated site and docs.
 */

:root {
    --bg: #0A0C10;
    --surface: #12151C;
    --surface-2: #1A2536;
    --border: #2C313B;
    --text: #FFFFFF;
    --muted: #A0A8B6;
    --accent: #00E0FF;
    --accent-hover: #4CEBFF;
    --accent-text: #0A0C10;

    --font-heading: "Wix Madefor Display", "Manrope", "Inter", system-ui, sans-serif;
    --font-body: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --header-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/*
 * overflow-x lives on html, not body: setting a non-visible overflow-x on
 * body without an explicit overflow-y forces the UA to compute
 * overflow-y: auto for body too (CSS Overflow spec 3-value coupling),
 * which turns body into its own scroll container and detaches every
 * descendant position: sticky element (the header) from the real
 * viewport scrollport — it stops sticking and can render below the fold
 * with an empty band where it used to be. html is already the page's
 * root scroll container, so putting the clip there avoids creating a
 * second, competing one.
 */
body {
    font-family: var(--font-body);
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

img {
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    width: 100%;
}

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: var(--accent-text);
    padding: 0.75rem 1.5rem;
    z-index: 2000;
    font-weight: 700;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    left: 0;
}

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

a:hover,
a:focus-visible {
    color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Header / Nav */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 12, 16, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    min-height: var(--header-height);
    flex-wrap: wrap;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    min-width: 0;
}

.brand-logo {
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-name {
    color: var(--text);
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    margin: 0 auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--accent);
}

.site-nav a.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

.btn-nav {
    padding: 0.5rem 1.1rem !important;
    font-size: 0.9rem !important;
}

.nav-dropdown {
    position: relative;
}

.nav-details summary {
    color: var(--text);
    cursor: pointer;
    list-style: none;
    font-weight: 500;
}

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

.nav-details[open] summary {
    color: var(--accent);
}

/*
 * Dropdown rows: the clickable area is the <a>, not the <li>. An inline
 * anchor sized to its own text leaves a dead zone (the rest of the row's
 * width, and the gap between a wrapped two-line label's lines) that swallows
 * clicks — document.elementFromPoint() at the row's centre resolves to the
 * <li>, not the link. Every row-style padding/min-height lives on the
 * anchor so the visible row and the clickable box are the same rectangle.
 */
.nav-dropdown-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem 0 0.25rem 0.75rem;
}

/* Higher specificity than the mobile .site-nav li rule below (which would
   otherwise reapply row padding to dropdown items at narrow viewports). */
.site-nav .nav-dropdown-menu li {
    padding: 0;
    margin: 0;
    border-bottom: none;
}

.nav-dropdown-menu a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.75rem;
    min-height: 2.5rem;
    line-height: 1.35;
    border-radius: 6px;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
    background: var(--surface-2);
    color: var(--accent);
}

@media (min-width: 861px) {
    .nav-dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 0.5rem;
        min-width: 220px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    }
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: 2px solid;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--accent-text);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--accent);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background: var(--accent);
    color: var(--accent-text);
    transform: translateY(-2px);
}

/* Sections (shared) */
section {
    padding: 4rem 0;
}

.product-section-alt {
    background: var(--surface);
}

.product-cta {
    text-align: center;
}

/* Docs call-to-action appended after the features/solutions index grids
   and each feature detail page's content — a single link, not a banner. */
.docs-cta {
    margin-top: 2.5rem;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--text);
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.prose p {
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* Hero (home page) */
.hero {
    text-align: center;
    background: var(--bg);
    position: relative;
    padding: 4rem 1.25rem 5rem;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 20%, rgba(0, 224, 255, 0.10) 0%, transparent 55%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: clamp(2.25rem, 7vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.25rem;
    color: var(--text);
}

.hero-subtitle {
    font-size: clamp(1.05rem, 3vw, 1.35rem);
    color: var(--muted);
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Page hero (interior pages) */
.page-hero {
    text-align: center;
    background: var(--surface);
    padding: 3.5rem 1.25rem;
}

.page-hero h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: 1rem;
}

.page-hero-subhead {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Feature grid (reused across pages) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

/*
 * Home highlights grid: same card styling as .features-grid, but tracks
 * cap at 300px and center when the row doesn't fill, so 5 highlight cards
 * wrap 3+2 (centered) instead of stretching into an uneven 4+1 on wide
 * screens.
 */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
    justify-content: center;
    gap: 2rem;
}

/*
 * Exactly 4 cards: a pure auto-fit track count is sensitive to the exact
 * container width available at a given viewport (confirmed on a real
 * 4-highlight site at 1374px: it computed 3 tracks, leaving a lone
 * centred 4th card on its own row; the same 3-track boundary reproduced
 * on a 4-screenshot gallery, see .screenshot-gallery[data-count="4"] in
 * site.css). A fixed 2-column grid sidesteps that boundary sensitivity
 * entirely — 4 cards always form a full 2x2, at any width that can hold
 * two 240px+ tracks side by side; below that it collapses to a single
 * column like every other card count already does. .tier-grid shares
 * this treatment since it uses the same minmax(240px, 1fr) track and the
 * same variable, config-driven card count.
 */
.highlights-grid[data-count="4"],
.features-grid[data-count="4"],
.tier-grid[data-count="4"] {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
}

@media (max-width: 640px) {
    .highlights-grid[data-count="4"],
    .features-grid[data-count="4"],
    .tier-grid[data-count="4"] {
        grid-template-columns: 1fr;
    }
}

.feature {
    text-align: left;
    padding: 1.75rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    min-width: 0;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature h3 {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.feature p {
    color: var(--muted);
}

.feature ul, .feature-detail-list {
    list-style: none;
    margin-top: 0.5rem;
}

.feature li, .feature-detail-list li {
    color: var(--muted);
    padding: 0.3rem 0 0.3rem 1.25rem;
    position: relative;
}

.feature li::before, .feature-detail-list li::before {
    content: '\2192';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/*
 * The feature/solution card <h3> is a block element that spans the full
 * card width; a plain inline <a> inside it only hits its own glyph runs,
 * leaving the rest of the heading's row (and the gap between wrapped
 * lines on a long title) unclickable. display: block makes the anchor
 * itself the full-width, full-height hit target for the whole heading.
 */
.card-title-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.card-title-link:hover,
.card-title-link:focus-visible {
    color: var(--accent);
}

/* License tier grid */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.tier-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    min-width: 0;
}

.tier-card h3 {
    color: var(--accent);
}

.tier-blurb {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0.5rem 0 1rem;
}

.tier-card ul {
    list-style: none;
}

.tier-card li {
    color: var(--text);
    padding: 0.4rem 0 0.4rem 1.5rem;
    position: relative;
}

.tier-card li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.tier-note {
    text-align: center;
    color: var(--muted);
    margin-top: 2rem;
}

/* Quickstart */
.quickstart-intro {
    margin-bottom: 2rem;
}

.quickstart-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    max-width: 800px;
    margin: 0 auto;
}

.quickstart-steps h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.quickstart-steps p {
    color: var(--muted);
    margin-bottom: 0.75rem;
}

/* Contact */
.contact-value {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-value a {
    color: var(--accent);
}

/* Footer */
.site-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    min-width: 0;
}

.footer-brand h2 {
    color: var(--text);
    margin-bottom: 0.4rem;
    font-size: 1.15rem;
    text-align: left;
}

.footer-brand p {
    color: var(--muted);
}

.footer-section h3 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1rem;
    text-align: left;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

/* Same fix as .nav-dropdown-menu/.card-title-link: the <li> is a block
   spanning the column width, so the anchor is made block-level too rather
   than leaving an inline hit box narrower than its row. */
.footer-section a {
    display: block;
    color: var(--muted);
    text-decoration: none;
}

.footer-section a:hover,
.footer-section a:focus-visible {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}

/* Responsive: mobile nav */
@media (max-width: 860px) {
    .nav-toggle {
        display: flex;
    }

    .site-nav {
        flex-basis: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
        order: 3;
    }

    .site-nav.nav-open {
        max-height: 640px;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 0 1rem;
    }

    .site-nav li {
        padding: 0.6rem 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-dropdown-menu {
        padding-top: 0.5rem;
    }
}

@media (min-width: 861px) {
    .nav-toggle {
        display: none !important;
    }

    .site-nav {
        max-height: none !important;
    }
}

@media (max-width: 640px) {
    .hero-cta, .btn-primary, .btn-secondary {
        text-align: center;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-brand, .footer-brand h2 {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/*
 * ptg-site page-type styles — additions on top of assets/base.css for page
 * kinds the consolidated marketing site (penguintech/) doesn't have:
 * proof stat tiles, screenshot galleries, code blocks, and solution
 * problem/solution/outcome columns. Same token set as base.css.
 */

/* Proof stats */
.stat-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2rem;
}

.stat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* Screenshot gallery */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

/*
 * Exactly 4 screenshots: same boundary-sensitivity fix as
 * .highlights-grid[data-count="4"] / .features-grid[data-count="4"] in
 * base.css (confirmed on waddlebot: a pure auto-fit track count computed
 * 3 tracks at >=1200px, leaving a lone 4th screenshot on its own row). A
 * fixed 2-column grid always forms a full 2x2 for exactly 4 screenshots.
 */
.screenshot-gallery[data-count="4"] {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
}

@media (max-width: 640px) {
    .screenshot-gallery[data-count="4"] {
        grid-template-columns: 1fr;
    }
}

.screenshot {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.screenshot img {
    display: block;
    width: 100%;
    height: auto;
}

.screenshot figcaption {
    color: var(--muted);
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
}

/* Code blocks (get-started steps) */
.code-block {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.88rem;
    max-width: 100%;
    margin-top: 0.5rem;
}

/* Solution detail: problem / solution / outcomes columns */
.solution-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.solution-column {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.solution-column h2 {
    font-size: 1.15rem;
    text-align: left;
    margin-bottom: 1rem;
    color: var(--accent);
}

.solution-column ul {
    list-style: none;
}

.solution-column li {
    color: var(--muted);
    padding: 0.35rem 0 0.35rem 1.25rem;
    position: relative;
}

.solution-column li::before {
    content: '\2192';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.related-features {
    margin-bottom: 2.5rem;
}

.related-features h2 {
    font-size: 1.15rem;
    text-align: left;
    margin-bottom: 1rem;
}

.related-features ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.related-features li a {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
}

.related-features li a:hover,
.related-features li a:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

