/*
Theme Name: Earthbound
Theme URI: https://earthbound.com
Author: Adam Silverstein
Author URI: https://earthbound.com
Description: A retro 70s-inspired personal portfolio theme with modern WordPress APIs. Features warm earth tones, fluid typography, and full site editing support.
Version: 1.0.0
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: earthbound
Tags: block-patterns, block-styles, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, one-column, portfolio, template-editing, translation-ready, wide-blocks

Earthbound WordPress Theme, (C) 2024
Earthbound is distributed under the terms of the GNU GPL.
*/

/* Visible focus indicators - never remove, only enhance */
:focus-visible {
    outline: 3px solid var(--wp--preset--color--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Skip link styles */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 999999;
    padding: 0.75rem 1.5rem;
    background: var(--wp--preset--color--foreground);
    color: var(--wp--preset--color--background);
    font-family: var(--wp--preset--font-family--heading);
    text-decoration: none;
    border-radius: var(--wp--custom--border-radius--medium);
}

.skip-link:focus {
    top: 0.5rem;
    left: 0.5rem;
}

/* Screen reader text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--wp--preset--color--background);
    clip: auto !important;
    clip-path: none;
    color: var(--wp--preset--color--foreground);
    display: block;
    font-size: 1rem;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

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

/* Amber cyberpunk accent system */

/* Amber headline glow on hover */
h1 a:hover,
h2 a:hover,
h3 a:hover,
.wp-block-post-title a:hover {
    text-shadow: 0 0 20px rgba(147, 111, 38, 0.35),
                 0 0 40px rgba(147, 111, 38, 0.15);
}

/* Amber underline accent on links */
.wp-block-post-content a:not(.wp-block-button__link) {
    text-decoration: underline;
    text-decoration-color: var(--wp--preset--color--primary);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    transition: text-decoration-color var(--wp--custom--transition--fast);
}

.wp-block-post-content a:not(.wp-block-button__link):hover {
    text-decoration-color: var(--wp--preset--color--secondary);
}

/* Terminal badge — amber on dark for labels and metadata */
.terminal-badge,
.feed-item__label {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: var(--wp--preset--color--foreground);
    color: var(--wp--preset--color--primary);
    font-family: var(--wp--preset--font-family--mono, monospace);
    font-size: var(--wp--preset--font-size--small);
    letter-spacing: 0.05em;
    border-radius: 2px;
}

/* Amber glow shadow for cards */
.has-amber-glow {
    box-shadow: 0 0 15px rgba(147, 111, 38, 0.15),
                0 0 30px rgba(147, 111, 38, 0.08);
}

/* Amber glow button variant */
.wp-block-button.is-style-chunky .wp-block-button__link:hover {
    box-shadow: 6px 6px 0 var(--wp--preset--color--secondary),
                0 0 20px rgba(147, 111, 38, 0.25);
}

/* Dark panel sections — cyberpunk amber on dark */
.has-dark-background-color {
    color: var(--wp--preset--color--background);
}

.has-dark-background-color h1,
.has-dark-background-color h2,
.has-dark-background-color h3,
.has-dark-background-color h4 {
    color: var(--wp--preset--color--primary);
}

.has-dark-background-color a {
    color: var(--wp--preset--color--primary);
}

.has-dark-background-color a:hover {
    text-shadow: 0 0 15px rgba(147, 111, 38, 0.5);
}

/* Reduced motion — disable glow animations */
@media (prefers-reduced-motion: reduce) {
    h1 a:hover,
    h2 a:hover,
    h3 a:hover,
    .wp-block-post-title a:hover,
    .has-dark-background-color a:hover {
        text-shadow: none;
    }
}

/* Newspaper column layout */
.newspaper-columns {
    border-top: 3px solid var(--wp--preset--color--foreground);
    padding-top: 1.5rem;
}

/* Column rule — vertical divider between columns */
.newspaper-columns > .wp-block-column + .wp-block-column {
    border-left: 1px solid var(--wp--preset--color--foreground-muted);
    padding-left: 2rem;
}

/* On mobile, switch to top border instead */
@media (max-width: 781px) {
    .newspaper-columns > .wp-block-column + .wp-block-column {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--wp--preset--color--foreground-muted);
        padding-top: 1.5rem;
        margin-top: 1.5rem;
    }
}

/* Lead column — big headline energy */
.lead-column .wp-block-post-title {
    line-height: 1.05;
    margin-bottom: 0.5rem;
}

/* Sidebar column — tighter stacking */
.sidebar-column .wp-block-post-title {
    line-height: 1.2;
}

/* Masthead / nameplate styles */
.masthead {
    text-align: center;
}

.masthead .wp-block-site-title {
    font-family: var(--wp--preset--font-family--heading);
    line-height: 1;
}

.masthead .wp-block-site-title a {
    text-decoration: none;
    color: var(--wp--preset--color--foreground);
}

.masthead .wp-block-site-title a:hover {
    color: var(--wp--preset--color--primary);
}

.masthead-dateline {
    font-family: var(--wp--preset--font-family--mono, monospace);
}

/* Newspaper navigation — dot separators between top-level items.
   The container <ul> sits several levels below the <nav> inside the
   responsive overlay markup, so this cannot be a direct-child selector. */
.newspaper-nav .wp-block-navigation__container > .wp-block-navigation-item:not(:last-child)::after {
    content: "\00b7";
    /* Empty alt text keeps the decorative dot out of the accessibility tree. */
    content: "\00b7" / "";
    margin-inline-start: 0.75rem;
    color: var(--wp--preset--color--foreground-muted);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
    pointer-events: none;
}

/* The mobile overlay stacks items vertically, where trailing dots read as noise. */
.newspaper-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item::after {
    content: none;
}

.newspaper-nav .wp-block-navigation-item__content {
    text-decoration: none;
}

.newspaper-nav .wp-block-navigation-item__content:hover {
    color: var(--wp--preset--color--primary);
}

.masthead-rule-top,
.masthead-rule-bottom {
    margin: 0;
    opacity: 1;
}

/* Editorial design elements */

/* Sharp edges — newspapers don't have rounded corners */
.wp-block-group,
.wp-block-cover,
.wp-block-image img,
.wp-block-post-featured-image img {
    border-radius: 0;
}

/* Warm shadows */
.has-shadow {
    box-shadow: var(--wp--preset--shadow--warm);
}

/* Chunky button style — keep border-radius on buttons only */
.wp-block-button.is-style-chunky .wp-block-button__link {
    box-shadow: 4px 4px 0 var(--wp--preset--color--secondary);
    transition: transform var(--wp--custom--transition--fast),
                box-shadow var(--wp--custom--transition--fast);
}

.wp-block-button.is-style-chunky .wp-block-button__link:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--wp--preset--color--secondary);
}

.wp-block-button.is-style-chunky .wp-block-button__link:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--wp--preset--color--secondary);
}

/* Thin-thick-thin newspaper rule divider */
.section-divider,
.wp-block-separator.is-style-newspaper-rule {
    width: 100%;
    height: auto;
    background: none;
    border: none;
    border-top: 1px solid var(--wp--preset--color--foreground);
    border-bottom: 1px solid var(--wp--preset--color--foreground);
    padding: 2px 0;
    position: relative;
}

.section-divider::after,
.wp-block-separator.is-style-newspaper-rule::after {
    content: "";
    display: block;
    border-top: 3px solid var(--wp--preset--color--foreground);
}

/* Section labels — small-caps monospace above sections */
.section-label {
    font-family: var(--wp--preset--font-family--mono, monospace);
    font-size: var(--wp--preset--font-size--small);
    font-variant: small-caps;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--wp--preset--color--foreground-muted);
    margin-bottom: 0.5rem;
    display: block;
}

/* Byline / dateline styling */
.byline,
.dateline,
.wp-block-post-date,
.wp-block-post-author-name {
    font-variant: small-caps;
    letter-spacing: 0.08em;
    font-size: var(--wp--preset--font-size--small);
}

/* Editorial card styles — replaces groovy-card */
.groovy-card {
    background: var(--wp--preset--color--background);
    border-top: 3px solid var(--wp--preset--color--secondary);
    border-bottom: 1px solid var(--wp--preset--color--secondary);
    border-left: none;
    border-right: none;
    border-radius: 0;
    padding: 1.5rem 0;
    transition: border-color var(--wp--custom--transition--normal);
}

.groovy-card:hover {
    border-top-color: var(--wp--preset--color--primary);
}

/* Loading state styles */
.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Feed item styles */
.feed-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--wp--preset--color--background-alt);
}

.feed-item:last-child {
    border-bottom: none;
}

.feed-item__title {
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--large);
    margin-bottom: 0.5rem;
}

.feed-item__meta {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--foreground-muted);
}

.feed-item__label {
    margin-right: 0.25rem;
}

/* Load more button */
.load-more-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--background);
    border: none;
    border-radius: var(--wp--custom--border-radius--pill);
    font-family: var(--wp--preset--font-family--heading);
    font-size: var(--wp--preset--font-size--medium);
    cursor: pointer;
    transition: background var(--wp--custom--transition--fast);
}

.load-more-button:hover {
    background: var(--wp--preset--color--secondary);
}

.load-more-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Work section styles */
.work-section {
    margin-bottom: 4rem;
}

.work-section h2 {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--wp--preset--color--primary);
}
