/* Lederhosen Stylesheet — Whiteboard */

:root {
    --bg: #141414;
    --text: rgba(255, 255, 255, 0.85);
    --title: rgba(255, 255, 255, 0.85);
    --tagline: rgba(255, 255, 255, 0.65);
    --footer-text: rgba(255, 255, 255, 0.4);
    --nav-link: rgba(255, 255, 255, 0.4);
    --nav-link-hover: rgba(255, 255, 255, 0.8);
    --contact-bg: rgba(255, 255, 255, 0.1);
    --contact-text: #ffffff;
    --contact-border: rgba(255, 255, 255, 0.2);
    --contact-hover-bg: rgba(255, 255, 255, 0.18);
    --contact-hover-border: rgba(255, 255, 255, 0.35);
    --cta-bg: #ffffff;
    --cta-text: #000000;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #fafafa;
        --text: rgba(30, 40, 60, 0.85);
        --title: rgba(30, 40, 60, 0.85);
        --tagline: rgba(30, 40, 60, 0.85);
        --footer-text: rgba(30, 40, 60, 0.4);
        --nav-link: rgba(30, 40, 60, 0.4);
        --nav-link-hover: rgba(30, 40, 60, 0.8);
        --contact-bg: rgba(0, 0, 0, 0.06);
        --contact-text: #1a1a2e;
        --contact-border: rgba(0, 0, 0, 0.12);
        --contact-hover-bg: rgba(0, 0, 0, 0.10);
        --contact-hover-border: rgba(0, 0, 0, 0.20);
        --cta-bg: #000000;
        --cta-text: #ffffff;
    }
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
header { display: none; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    color-scheme: light dark;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================
   HERO — homepage only (main whose first child is p > img)
   HTML: <main> <p><img></p> <h1></h1> <p>tagline</p> <p><a><a></p> </main>
   ========================================================== */

.hero-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hero centering only when homepage (main has img) */
.hero-wrapper:has(main > p:first-child img) {
    justify-content: center;
    padding: 40px;
    text-align: center;
    gap: 14px;
}

main {
    width: 100%;
}

main:has(> p:first-child img) {
    display: grid;
    grid-template-columns: auto auto;
    align-content: center;
    justify-content: center;
    align-items: center;
    column-gap: 24px;
    row-gap: 14px;
    text-align: center;
}

/* Row 1, col 1: icon */
main:has(> p:first-child img) > p:first-child {
    grid-row: 1; grid-column: 1;
    line-height: 0;
    margin: 0;
    animation: fadeUp 0.8s ease-out both;
}

main:has(> p:first-child img) > p:first-child img {
    width: 96px;
    height: 96px;
    border-radius: 22.5%;
    object-fit: cover;
}

/* Row 1, col 2: title */
main:has(> p:first-child img) > h1 {
    grid-row: 1; grid-column: 2;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 76px;
    font-weight: 600;
    color: var(--title);
    letter-spacing: -2.5px;
    line-height: 1.05;
    animation: fadeUp 0.8s ease-out both;
}

/* Row 2, span both cols: tagline */
main:has(> p:first-child img) > h1 + p {
    grid-row: 2; grid-column: 1 / -1;
    font-size: 19px;
    font-weight: 300;
    color: var(--tagline);
    line-height: 1.55;
    margin: 0;
    animation: fadeUp 0.8s ease-out 0.3s both;
}

/* ==========================================================
   CTA BUTTONS — nav[aria-label="ctas"]
   ========================================================== */

nav[aria-label="ctas"] {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    animation: fadeUp 0.8s ease-out 0.5s both;
}

/* On content pages: left-aligned, hugs content */
.hero-wrapper:not(:has(main > p:first-child img)) nav[aria-label="ctas"] {
    justify-content: flex-start;
    max-width: calc(680px + 80px);
    width: 100%;
    padding: 0 40px;
    margin-top: 0;
}

nav[aria-label="ctas"] ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    list-style: none;
}

/* Primary CTA */
nav[aria-label="ctas"] li:first-child a {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    background-color: var(--cta-bg);
    color: var(--cta-text);
    text-decoration: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.1px;
    transition: opacity 0.2s ease, transform 0.15s ease;
}
nav[aria-label="ctas"] li:first-child a:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* Secondary CTA */
nav[aria-label="ctas"] li:last-child a {
    display: inline-flex;
    align-items: center;
    padding: 12px 22px;
    background-color: var(--contact-bg);
    color: var(--contact-text);
    text-decoration: none;
    border: 1px solid var(--contact-border);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.1px;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
nav[aria-label="ctas"] li:last-child a:hover {
    background-color: var(--contact-hover-bg);
    border-color: var(--contact-hover-border);
    transform: translateY(-1px);
}

/* ==========================================================
   BACK LINK — "← Home" at top of content pages
   ========================================================== */

main:not(:has(> p:first-child img)) > p:first-child a[href="/"] {
    color: var(--nav-link);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease;
}

main:not(:has(> p:first-child img)) > p:first-child a[href="/"]:hover {
    color: var(--nav-link-hover);
}

main:not(:has(> p:first-child img)) > p:first-child:has(a[href="/"]) {
    margin-bottom: 16px;
}

/* ==========================================================
   BREADCRUMB — "← Parent" on child pages
   ========================================================== */

nav[aria-label="Breadcrumb"] {
    max-width: calc(680px + 80px);
    width: 100%;
    padding: 40px 40px 0;
}

nav[aria-label="Breadcrumb"]:not(:has(a)) {
    display: none;
}

nav[aria-label="Breadcrumb"] ol {
    list-style: none;
}

nav[aria-label="Breadcrumb"] li:not(:first-child) {
    display: none;
}

nav[aria-label="Breadcrumb"] a {
    color: var(--nav-link);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease;
}

nav[aria-label="Breadcrumb"] a::before {
    content: "← ";
}

nav[aria-label="Breadcrumb"] a:hover {
    color: var(--nav-link-hover);
}

/* ==========================================================
   CONTENT PAGES — support, privacy, etc.
   ========================================================== */

main:not(:has(> p:first-child img)) {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
}

nav[aria-label="Breadcrumb"] + main:not(:has(> p:first-child img)) {
    padding-top: 16px;
}

main:not(:has(> p:first-child img)) > * {
    max-width: 680px;
    width: 100%;
    color: var(--text);
    font-size: 17px;
    line-height: 1.7;
}

main:not(:has(> p:first-child img)) h1 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 40px;
    font-weight: 600;
    color: var(--title);
    letter-spacing: -1px;
    margin-bottom: 24px;
}

main:not(:has(> p:first-child img)) h2 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--title);
    letter-spacing: -0.5px;
    margin-top: 36px;
    margin-bottom: 16px;
}

main:not(:has(> p:first-child img)) h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--title);
    margin-top: 28px;
    margin-bottom: 12px;
}

main:not(:has(> p:first-child img)) p {
    margin-bottom: 16px;
}

main:not(:has(> p:first-child img)) a {
    color: var(--nav-link-hover);
    text-decoration: underline;
}

main:not(:has(> p:first-child img)) ul,
main:not(:has(> p:first-child img)) ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

main:not(:has(> p:first-child img)) li {
    margin-bottom: 8px;
}

main:not(:has(> p:first-child img)) code {
    font-size: 15px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--contact-bg);
}

main:not(:has(> p:first-child img)) pre {
    padding: 16px;
    border-radius: 8px;
    background: var(--contact-bg);
    overflow-x: auto;
    margin-bottom: 16px;
}

main:not(:has(> p:first-child img)) pre code {
    padding: 0;
    background: transparent;
}

main:not(:has(> p:first-child img)) blockquote {
    border-left: 3px solid var(--nav-link);
    padding-left: 16px;
    margin-bottom: 16px;
    color: var(--tagline);
}

main:not(:has(> p:first-child img)) hr {
    border: none;
    border-top: 1px solid var(--contact-border);
    margin: 32px 0;
}

/* FAQ accordion */
main details {
    border: 1px solid var(--contact-border);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

main details summary {
    padding: 16px 20px;
    background: var(--contact-bg);
    font-size: 18px;
    font-weight: 600;
    color: var(--title);
    cursor: pointer;
    list-style: none;
}

main details summary::-webkit-details-marker {
    display: none;
}

main details summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 10px;
    transition: transform 0.2s ease;
}

main details[open] summary::before {
    transform: rotate(90deg);
}

main details[open] summary {
    border-bottom: 1px solid var(--contact-border);
}

main details > p,
main details > ul,
main details > ol {
    padding: 16px 20px 0;
}

main details > p:last-child,
main details > ul:last-child,
main details > ol:last-child {
    padding-bottom: 16px;
}

/* ==========================================================
   FOOTER
   ========================================================== */

footer {
    padding: 28px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    animation: fadeUp 0.6s ease-out 0.5s both;
}

.footer-copyright {
    color: var(--footer-text);
    font-size: 14px;
    flex: 1;
}

.footer-attribution {
    color: var(--footer-text);
    font-size: 14px;
    flex: 1;
    text-align: right;
}

.footer-attribution a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-attribution a:hover { color: var(--nav-link-hover); }

footer nav ul {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
}

footer nav a {
    color: var(--nav-link);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}
footer nav a:hover { color: var(--nav-link-hover); }

/* ==========================================================
   ANIMATIONS
   ========================================================== */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 768px) {
    main:has(> p:first-child img) { padding: 40px 24px; }
    main:has(> p:first-child img) > h1 { font-size: 52px; }
    main:has(> p:first-child img) > p:first-child img { width: 72px; height: 72px; }
    main:not(:has(> p:first-child img)) { padding: 32px 24px; }
    main:not(:has(> p:first-child img)) h1 { font-size: 32px; }
    footer { flex-direction: column; text-align: center; padding: 24px; }
    .footer-copyright, .footer-attribution { text-align: center; }
}

@media (max-width: 480px) {
    main:has(> p:first-child img) { grid-template-columns: 1fr; }
    main:has(> p:first-child img) > h1 { font-size: 40px; grid-column: 1; }
    main:has(> p:first-child img) > p:first-child { grid-column: 1; }
    main:has(> p:first-child img) > p:first-child img { width: 64px; height: 64px; }
    main:has(> p:first-child img) > h1 + p { grid-column: 1; }
    nav[aria-label="ctas"] ul { flex-direction: column; }
    main:not(:has(> p:first-child img)) h1 { font-size: 28px; }
    main h2 { font-size: 24px; }
}
