/*
Theme Name:  Edubestari
Theme URI:   https://edubestari.my
Author:      Edubestari Editorial
Author URI:  https://edubestari.my
Description: Ultra-Maximalist Neo-Brutalism theme untuk portal pendidikan dan kerjaya Malaysia. Menggunakan Tailwind CSS CDN, Archivo Black & Space Grotesk.
Version:     1.0.0
Requires at least: 6.0
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: edubestari
Tags:        news, magazine, education, blog, custom-colors, custom-menu, featured-images, brutalist
*/

/* ══════════════════════════════════════════════════
   EDUBESTARI DESIGN SYSTEM
   Semua token, utilities, dan animations.
   Tailwind custom classes ditakrifkan di sini.
══════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────── */
:root {
    --lime:  #ccff00;
    --pink:  #ff007a;
    --blue:  #00f0ff;
    --black: #000000;
    --white: #ffffff;
    --gray:  #f8f8f8;

    --s-brut:      10px 10px 0px 0px #000000;
    --s-brut-sm:    4px  4px 0px 0px #000000;
    --s-brut-lg:   15px 15px 0px 0px #000000;
    --s-brut-pink: 10px 10px 0px 0px #ff007a;
    --s-brut-blue: 10px 10px 0px 0px #00f0ff;
    --s-brut-lime: 10px 10px 0px 0px #ccff00;

    /* Marquee speed — dikawal melalui Customizer */
    --marquee-speed: 50s;
}

/* ── Base Reset ────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--white);
    color: var(--black);
    border: 12px solid var(--black);
    cursor: none;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Grain Texture Overlay ─────────────────────── */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    pointer-events: none;
    z-index: 9000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Typography ────────────────────────────────── */
.font-huge {
    font-family: 'Archivo Black', 'Arial Black', sans-serif;
}

/* ── Custom Cursor ─────────────────────────────── */
#cursor {
    width: 30px;
    height: 30px;
    background: var(--pink);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: transform 0.12s ease, background 0.12s ease;
    will-change: left, top;
}

/* ── Grid Dot Patterns ─────────────────────────── */
.bg-dot-lg {
    background-size: 40px 40px;
    background-image: radial-gradient(circle, #000 1.5px, transparent 1.5px);
}

.bg-dot-sm {
    background-size: 25px 25px;
    background-image: radial-gradient(circle, #000 0.5px, transparent 0.5px);
}

/* ── Brutalist Shadows ─────────────────────────── */
.shadow-brut      { box-shadow: var(--s-brut); }
.shadow-brut-sm   { box-shadow: var(--s-brut-sm); }
.shadow-brut-lg   { box-shadow: var(--s-brut-lg); }
.shadow-brut-pink { box-shadow: var(--s-brut-pink); }
.shadow-brut-blue { box-shadow: var(--s-brut-blue); }
.shadow-brut-lime { box-shadow: var(--s-brut-lime); }

/* ── Marquee ───────────────────────────────────── */
.marquee-inner {
    display: inline-block;
    white-space: nowrap;
    /* Guna CSS variable supaya Customizer boleh override via inline style */
    animation: marquee var(--marquee-speed, 50s) linear infinite;
}

/* Hover pada wrapper → pause animasi supaya teks boleh dibaca */
.marquee-wrapper:hover .marquee-inner,
.marquee-inner:hover {
    animation-play-state: paused;
    cursor: default;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── Floating Sticker ──────────────────────────── */
.float {
    animation: float 3s ease-in-out infinite;
}

.float-delay {
    animation: float 3s ease-in-out 1s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0)     rotate(-3deg); }
    50%       { transform: translateY(-10px) rotate(3deg); }
}

/* ── Glitch (wordmark hover) ───────────────────── */
.glitch:hover {
    animation: glitch 0.3s cubic-bezier(.25,.46,.45,.94) both infinite;
}

@keyframes glitch {
    0%   { transform: translate(0);           text-shadow: -2px 2px var(--blue), 2px -2px var(--pink); }
    25%  { transform: translate(-2px,  2px);  }
    50%  { transform: translate( 2px, -2px);  text-shadow: 2px -2px var(--blue), -2px 2px var(--pink); }
    75%  { transform: translate(-2px, -2px);  }
    100% { transform: translate(0); }
}

/* ── Hover: Lift ───────────────────────────────── */
.lift {
    transition: transform .15s ease, box-shadow .15s ease;
}

.lift:hover {
    transform: translate(-4px, -4px);
    box-shadow: var(--s-brut-lg);
}

.lift:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

/* ── Hover: Press ──────────────────────────────── */
.press {
    transition: transform .15s ease, box-shadow .15s ease;
}

.press:hover  { transform: translate(2px, 2px);  box-shadow: none !important; }
.press:active { transform: translate(4px, 4px); }

/* ── Image Grayscale → Colour ──────────────────── */
.img-gray {
    filter: grayscale(100%);
    transition: filter .6s ease, transform .7s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group:hover .img-gray {
    filter: grayscale(0%);
    transform: scale(1.07);
}

/* ── Bento Cell ────────────────────────────────── */
.bento {
    transition: background-color .2s ease, color .2s ease;
}

/* ── Badge / Sticker ───────────────────────────── */
.badge {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 2px solid #000;
    padding: 0.25em 0.65em;
    line-height: 1.4;
}

/* ── Meta Label ────────────────────────────────── */
.meta {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* ── Vertical Sidebar Label ────────────────────── */
.vert {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    font-family: 'Archivo Black', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.5em;
    text-transform: uppercase;
}

/* ── Most Wanted Number ────────────────────────── */
.wanted-n {
    transition: transform .2s ease;
    display: flex;
}

.wanted-row:hover .wanted-n {
    transform: rotate(12deg);
}

/* ── Outline Text ──────────────────────────────── */
.text-outline {
    -webkit-text-stroke: 3px #000;
    color: transparent;
}

/* ── Scroll Reveal ─────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .55s cubic-bezier(.2,0,0,1),
                transform .55s cubic-bezier(.2,0,0,1);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ══════════════════════════════════════════════════
   SINGLE POST — Article Body Styles
   Digunakan dalam single.php
══════════════════════════════════════════════════ */

.article-container {
    max-width: 68ch;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.125rem;
}

/* Dropcap */
.article-container > p:first-of-type::first-letter {
    font-family: 'Archivo Black', sans-serif;
    font-size: 4.5rem;
    float: left;
    line-height: 0.8;
    margin-right: 0.75rem;
    background: var(--lime);
    padding: 4px;
    border: 2px solid black;
}

/* Headings dalam artikel */
.article-container h2 {
    font-family: 'Archivo Black', sans-serif;
    text-transform: uppercase;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin: 2.5rem 0 1rem;
}

.article-container h3 {
    font-family: 'Archivo Black', sans-serif;
    text-transform: uppercase;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin: 2rem 0 0.75rem;
}

.article-container p {
    margin-bottom: 1.5rem;
}

.article-container a {
    color: var(--black);
    text-decoration: underline;
    text-decoration-color: var(--lime);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    transition: background .15s ease;
}

.article-container a:hover {
    background-color: var(--lime);
}

.article-container blockquote {
    position: relative;
    border: 2px solid var(--black);
    padding: 2.5rem 3rem;
    margin: 2.5rem 0;
    font-weight: 700;
    font-size: 1.1rem;
    font-style: italic;
    transition: box-shadow .2s ease;
}

.article-container blockquote:hover {
    box-shadow: 12px 12px 0px var(--pink);
}

.article-container blockquote::before {
    content: "\201C";
    position: absolute;
    top: -2rem;
    left: -1rem;
    font-family: 'Archivo Black', sans-serif;
    font-size: 10rem;
    color: var(--lime);
    -webkit-text-stroke: 2px black;
    line-height: 1;
    pointer-events: none;
    opacity: 0.4;
}

.article-container ul,
.article-container ol {
    margin: 0 0 1.5rem 1.5rem;
}

.article-container li {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.article-container img {
    max-width: 100%;
    border: 2px solid var(--black);
    box-shadow: var(--s-brut-sm);
}

/* Reading progress bar */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--pink);
    z-index: 10000;
    transition: width .1s linear;
}

/* Command Center (single post) */
.command-center {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════
   WORDPRESS NATIVE OVERRIDES
   Supaya blok Gutenberg tidak clash dengan theme
══════════════════════════════════════════════════ */

.wp-block-image img {
    border: 2px solid var(--black);
    box-shadow: var(--s-brut-sm);
}

.wp-block-quote {
    border-left: none;
    padding: 0;
}

.wp-block-separator {
    border: none;
    border-top: 4px solid var(--black);
    margin: 2.5rem 0;
}

.wp-block-code {
    background: var(--black);
    color: var(--lime);
    border: 2px solid var(--black);
    padding: 1.25rem 1.5rem;
    font-size: 0.875rem;
}

/* Alignment helpers */
.aligncenter { margin-left: auto; margin-right: auto; }
.alignright  { float: right; margin-left: 1.5rem; }
.alignleft   { float: left;  margin-right: 1.5rem; }

/* Pagination */
.nav-links {
    display: flex;
    gap: 0.5rem;
    margin: 3rem 0;
    font-family: 'Archivo Black', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.page-numbers {
    border: 2px solid var(--black);
    padding: 0.5rem 0.75rem;
    color: var(--black);
    text-decoration: none;
    transition: all .15s ease;
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--black);
    color: var(--lime);
}
