/*
Theme Name:  SHADI
Theme URI:   https://shadi.pl
Author:      Shadi Hamama
Author URI:  https://shadi.pl
Description: SHADI
Version:     1.1.0
Requires at least: 6.2
Tested up to: 6.5
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: SHADI
*/

/* ============================================================
   TOKENS & RESET
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --black: #0d0d0d;
    --white: #ffffff;
    --off-white: #f5f4f1;
    --gray:  #999;
    --light: #e8e6e2;
}

/* ============================================================
   HOME — 3D SPHERE PAGE
   ============================================================ */
body.home,
body.blog {
    width: 100%;
    height: 100%;
    background: var(--off-white);
    color: var(--black);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    user-select: none;
}

#shadi-logo {
    position: fixed;
    top: 24px;
    left: 26px;
    z-index: 400;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--black);
    text-decoration: none;
    transition: opacity 0.3s;
}
#shadi-logo:hover { opacity: 0.6; }

#shadi-count {
    position: fixed;
    top: 26px;
    right: 26px;
    font-size: 9px;
    letter-spacing: 0.1em;
    color: var(--gray);
    z-index: 400;
    font-family: 'Inter', sans-serif;
}


#shadi-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    transition: opacity 0.55s ease;
    display: block;
}
#shadi-canvas.grabbing { cursor: grabbing; }
#shadi-canvas.pointer  { cursor: pointer; }

/* Social icons */
#shadi-social {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 400;
    display: flex;
    gap: 14px;
    align-items: center;
}
#shadi-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--black);
    border-radius: 50%;
    color: var(--black);
    text-decoration: none;
    transition: background 0.18s, color 0.18s;
    flex-shrink: 0;
}
#shadi-social a:hover { background: var(--black); color: var(--white); }
#shadi-social a svg { width: 14px; height: 14px; fill: currentColor; display: block; }

/* ============================================================
   SINGLE POST — EDITORIAL LAYOUT
   Full-width image on top, constrained column below
   ============================================================ */
body.single-post {
    background: var(--white);
    color: var(--black);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Floating top bar — no background, no border, just links ── */
.shadi-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 500;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 32px;
    pointer-events: none; /* let clicks pass through the empty space */
}
.shadi-topbar a {
    pointer-events: auto;
}
.shadi-topbar-logo {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: opacity 0.2s;
}
.shadi-topbar-logo:hover { opacity: 0.45; }
.shadi-back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--black);
    text-decoration: none;
    transition: opacity 0.2s;
}
.shadi-back-link:hover { opacity: 0.45; }
.shadi-back-link svg {
    width: 13px; height: 13px;
    fill: none; stroke: currentColor; stroke-width: 1.5;
    flex-shrink: 0;
}

/* ── Page wrapper ── */
.shadi-single-page {
    padding-top: 0;
}

/* ── Full-width hero image ── */
.shadi-single-hero {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    /* Generous padding so image never touches the browser edge on wide screens */
    padding: clamp(24px, 3vw, 48px) clamp(24px, 3vw, 48px) 0;
}
.shadi-single-hero img {
    width: 100%;
    height: auto;
    display: block;
    /* Let the image breathe — no forced crop */
}

/* ── Constrained text column ── */
.shadi-single-body {
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(36px, 5vw, 64px) clamp(24px, 3vw, 48px) clamp(48px, 6vw, 80px);
}

/* Title */
.shadi-single-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(32px, 5vw, 58px);
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -0.02em;
    color: var(--black);
    margin-bottom: clamp(24px, 3vw, 40px);
}

/* Post content */
.shadi-single-content {
    font-size: 14px;
    line-height: 1.95;
    color: #333;
    letter-spacing: 0.02em;
}
.shadi-single-content > * + * { margin-top: 1.6em; }

.shadi-single-content p { margin: 0; }

.shadi-single-content h2 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(20px, 2.8vw, 26px);
    font-weight: 400;
    font-style: italic;
    line-height: 1.2;
    color: var(--black);
    margin-top: 2.4em;
}
.shadi-single-content h3 {
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--black);
    margin-top: 2em;
}
.shadi-single-content blockquote {
    border-left: 1px solid var(--black);
    padding-left: 20px;
    font-family: 'Inter', sans-serif;
    font-size: clamp(16px, 2vw, 20px);
    font-style: italic;
    color: #555;
    line-height: 1.55;
}
.shadi-single-content a {
    color: var(--black);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #ccc;
    transition: text-decoration-color 0.2s;
}
.shadi-single-content a:hover { text-decoration-color: var(--black); }

/* Images inside content — same constrained max-width, centred */
.shadi-single-content img,
.shadi-single-content figure {
    width: 100%;
    max-width: 720px;
    height: auto;
    display: block;
    margin: 0;
}
.shadi-single-content figcaption {
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray);
    margin-top: 6px;
    text-align: center;
}
.shadi-single-content ul,
.shadi-single-content ol { padding-left: 1.3em; }
.shadi-single-content li + li { margin-top: 0.35em; }

/* ── Post navigation ── */
.shadi-post-footer {
    border-top: 1px solid var(--light);
    padding: 28px clamp(24px, 3vw, 48px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
}
.shadi-nav-prev,
.shadi-nav-next {
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: color 0.2s;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.shadi-nav-prev:hover,
.shadi-nav-next:hover { color: var(--black); }
.shadi-nav-prev svg,
.shadi-nav-next svg {
    width: 13px; height: 13px;
    fill: none; stroke: currentColor; stroke-width: 1.5;
    flex-shrink: 0;
}
.shadi-back-home {
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--black);
    text-decoration: none;
    border: 1px solid var(--black);
    padding: 8px 20px;
    white-space: nowrap;
    transition: background 0.18s, color 0.18s;
}
.shadi-back-home:hover { background: var(--black); color: var(--white); }

/* Site footer */
.shadi-site-footer {
    text-align: center;
    padding: 22px 24px;
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray);
    border-top: 1px solid var(--light);
    font-family: 'Inter', sans-serif;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    #shadi-social { gap: 18px; bottom: 24px; }
    #shadi-social a { width: 48px; height: 48px; }
    #shadi-social a svg { width: 20px; height: 20px; }
    .shadi-topbar { padding: 15px 20px; }

    /* Mobile: image goes truly full-bleed, no padding */
    .shadi-single-hero {
        padding: 0;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .shadi-post-footer { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   GUTENBERG BLOCK RESET
   ============================================================ */
.entry-content .wp-block-image { margin: 0; }
.entry-content .wp-block-quote { margin: 0; }
.entry-content p:empty { display: none; }
