/*
Theme Name: DS Blocks Theme
Theme URI: https://digitalspotlight.com
Author: Digital Spotlight
Author URI: https://digitalspotlight.com
Description: A minimal starter theme designed specifically for the DS Block Library. Clean, greyscale design that puts the focus on block content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ds-blocks-theme
*/

/* ================================================
   RESET & BASE
   ================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--ds-font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: var(--ds-text-base, 1rem);
    line-height: var(--ds-leading-normal, 1.5);
    color: var(--ds-text-primary, #262626);
    background-color: var(--ds-background-light, #ffffff);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================================
   TYPOGRAPHY
   ================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--ds-font-heading, 'Playfair Display', Georgia, serif);
    font-weight: var(--ds-weight-normal, 400);
    line-height: var(--ds-leading-tight, 1.2);
    margin-top: 0;
    margin-bottom: 0.5em;
    color: var(--ds-grey-800, #171717);
}

h1 {
    font-size: var(--ds-text-5xl, 3rem);
}

h2 {
    font-size: var(--ds-text-4xl, 2.25rem);
}

h3 {
    font-size: var(--ds-text-3xl, 1.875rem);
}

h4 {
    font-size: var(--ds-text-2xl, 1.5rem);
}

h5 {
    font-size: var(--ds-text-xl, 1.25rem);
}

h6 {
    font-size: var(--ds-text-lg, 1.125rem);
}

p {
    margin-top: 0;
    margin-bottom: 1em;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--ds-grey-800, #171717);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:hover {
    text-decoration: none;
}

/* ================================================
   IMAGES
   ================================================ */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ================================================
   LAYOUT
   ================================================ */

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
}

.site-header,
.site-footer {
    flex-shrink: 0;
}

/* Container */
.container {
    max-width: var(--ds-container-xl, 1280px);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--ds-space-6, 1.5rem);
    padding-right: var(--ds-space-6, 1.5rem);
}

/* ================================================
   HEADER
   ================================================ */

.site-header {
    background: var(--ds-white, #ffffff);
    border-bottom: 1px solid var(--ds-grey-200, #d4d4d4);
    padding: var(--ds-space-4, 1rem) 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo a {
    font-family: var(--ds-font-heading);
    font-size: var(--ds-text-xl, 1.25rem);
    font-weight: var(--ds-weight-semibold, 600);
    color: var(--ds-grey-800, #171717);
    text-decoration: none;
}

.site-logo a:hover {
    color: var(--ds-grey-600, #404040);
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--ds-space-6, 1.5rem);
}

.main-navigation a {
    font-size: var(--ds-text-sm, 0.875rem);
    font-weight: var(--ds-weight-medium, 500);
    color: var(--ds-grey-600, #404040);
    text-decoration: none;
    padding: var(--ds-space-2, 0.5rem) 0;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--ds-grey-800, #171717);
}

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

.site-footer {
    background: var(--ds-grey-800, #171717);
    color: var(--ds-grey-300, #a3a3a3);
    padding: var(--ds-space-12, 3rem) 0;
}

.site-footer a {
    color: var(--ds-white, #ffffff);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    font-size: var(--ds-text-sm, 0.875rem);
}

/* ================================================
   FULL WIDTH BLOCKS
   ================================================ */

.entry-content > .alignfull {
    max-width: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.entry-content > .alignwide {
    max-width: var(--ds-container-xl, 1280px);
    margin-left: auto;
    margin-right: auto;
}

/* ================================================
   MINIMAL HEADER (for mockup pages)
   ================================================ */

.site-header--minimal {
    padding: var(--ds-space-2, 0.5rem) 0;
    background: var(--ds-grey-100, #e5e5e5);
}

.site-header--minimal .site-logo a {
    font-size: var(--ds-text-sm, 0.875rem);
}

/* ================================================
   PAGE TEMPLATES
   ================================================ */

/* Full width template */
.page-template-template-full-width .site-content {
    padding: 0;
}

.page-template-template-full-width .entry-content {
    max-width: none;
}

/* Mockup template */
.page-template-template-mockup .site-header,
.page-template-template-mockup .site-footer {
    display: none;
}

/* ================================================
   WORDPRESS DEFAULTS
   ================================================ */

.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: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

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

@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: var(--ds-space-4);
    }

    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--ds-space-4);
    }

    .footer-content {
        flex-direction: column;
        gap: var(--ds-space-4);
        text-align: center;
    }
}
