/*
Theme Name: Covoada
Theme URI: https://covoada.com
Author: Covoada Technologies Ltd.
Author URI: https://covoada.com
Description: Bespoke neumorphic theme for Covoada Technologies — advisory and consulting.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
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: covoada
*/

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    --bg: #F0F2F5;
    --white: #FFFFFF;
    --shadow-dark: #D1D9E6;
    --text-main: #2D3436;
    --text-muted: #636E72;
    --accent: #2D3436;
    --radius-lg: 40px;
    --radius-sm: 20px;
    --outer-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--white);
    --inner-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--white);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    font-family: 'DM Sans', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ==========================================================================
   Cursor Glow
   ========================================================================== */

#cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

nav.site-nav {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 12px 30px;
    background: var(--bg);
    border-radius: 50px;
    box-shadow: var(--outer-shadow);
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    margin-right: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-dot {
    width: 12px;
    height: 12px;
    background: var(--text-main);
    border-radius: 3px;
    box-shadow: 2px 2px 4px var(--shadow-dark);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links .menu {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links .menu li {
    list-style: none;
}

.nav-link,
.nav-links .menu li a {
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
}

.nav-link:hover,
.nav-link.active,
.nav-links .menu li a:hover,
.nav-links .menu li.current-menu-item a,
.nav-links .menu li.current_page_item a {
    color: var(--text-main);
    box-shadow: var(--inner-shadow);
}

/* Mobile hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10%;
    text-align: center;
}

.hero-content {
    max-width: 900px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--bg);
    box-shadow: var(--outer-shadow);
    border-radius: 50px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-muted);
}

h1 {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 30px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.btn-primary {
    padding: 20px 40px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    box-shadow: var(--outer-shadow);
    border: none;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    box-shadow: var(--inner-shadow);
    transform: scale(0.98);
}

/* ==========================================================================
   Sections
   ========================================================================== */

section {
    padding: 120px 10%;
}

.section-title {
    margin-bottom: 60px;
}

/* ==========================================================================
   Card Grid
   ========================================================================== */

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--outer-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    box-shadow: var(--inner-shadow);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Stats
   ========================================================================== */

.stats-container {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat-card {
    flex: 1;
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--outer-shadow);
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.chart-visual {
    height: 100px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 30px;
    justify-content: center;
}

.bar {
    width: 12px;
    background: var(--bg);
    box-shadow: var(--inner-shadow);
    border-radius: 10px;
    transition: height 1s ease;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer.site-footer {
    padding: 80px 10% 40px;
    text-align: center;
    background: var(--bg);
}

.footer-line {
    height: 2px;
    background: var(--bg);
    box-shadow: var(--inner-shadow);
    margin-bottom: 40px;
    border-radius: 1px;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin: 0 0 20px 0;
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Decorative Background Shapes
   ========================================================================== */

.decoration {
    position: absolute;
    z-index: -1;
    opacity: 0.5;
}

#bg-shape-1 { top: 10%; right: 5%; }
#bg-shape-2 { bottom: 20%; left: 5%; }

/* ==========================================================================
   Blog / Post Styles
   ========================================================================== */

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 10% 80px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
}

.post-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--outer-shadow);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-card-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-body {
    padding: 30px;
}

.post-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 12px;
}

.post-card-body h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1.3;
}

.post-card-body h2 a {
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
}

.post-card-body h2 a:hover {
    color: var(--text-muted);
}

.post-card-body .excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Single Post */
.single-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 140px 5% 80px;
}

.single-post-header {
    margin-bottom: 40px;
}

.single-post-header .badge {
    margin-bottom: 20px;
}

.single-post-header h1 {
    font-size: 3rem;
    letter-spacing: -1.5px;
}

.single-post-header .post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 15px;
}

.single-post-content {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 50px;
    box-shadow: var(--outer-shadow);
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.single-post-content p {
    margin-bottom: 20px;
    color: var(--text-main);
    line-height: 1.8;
}

.single-post-content ul,
.single-post-content ol {
    margin: 0 0 20px 20px;
    color: var(--text-main);
}

.single-post-content blockquote {
    padding: 20px 30px;
    margin: 30px 0;
    border-radius: var(--radius-sm);
    box-shadow: var(--inner-shadow);
    font-style: italic;
    color: var(--text-muted);
}

.single-post-content img {
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

.single-post-content a {
    color: var(--text-main);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    gap: 20px;
}

.post-navigation a {
    padding: 15px 25px;
    border-radius: var(--radius-sm);
    box-shadow: var(--outer-shadow);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.post-navigation a:hover {
    box-shadow: var(--inner-shadow);
}

/* ==========================================================================
   Page Styles
   ========================================================================== */

.page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 140px 5% 80px;
}

.page-container h1 {
    margin-bottom: 40px;
}

.page-content {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 50px;
    box-shadow: var(--outer-shadow);
}

.page-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-404 {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 10%;
}

.error-404 h1 {
    font-size: 8rem;
    letter-spacing: -4px;
}

.error-404 p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* ==========================================================================
   Search
   ========================================================================== */

.search-form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto 40px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 15px 25px;
    border-radius: var(--radius-sm);
    box-shadow: var(--inner-shadow);
    border: none;
    background: var(--bg);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
}

.search-form button {
    padding: 15px 25px;
    border-radius: var(--radius-sm);
    box-shadow: var(--outer-shadow);
    border: none;
    background: var(--bg);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    box-shadow: var(--inner-shadow);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 60px;
}

.pagination a,
.pagination span {
    padding: 12px 18px;
    border-radius: 15px;
    box-shadow: var(--outer-shadow);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.pagination a:hover,
.pagination .current {
    box-shadow: var(--inner-shadow);
}

/* ==========================================================================
   Gutenberg / Block Editor Alignment
   ========================================================================== */

.wp-block-group.is-style-neumorphic {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--outer-shadow);
}

.wp-block-group.is-style-neumorphic-inset {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--inner-shadow);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .grid { grid-template-columns: 1fr 1fr; }
    h1 { font-size: 3rem; }
    .stats-container { flex-wrap: wrap; }
    .stat-card { min-width: calc(50% - 20px); }
}

@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; }
    nav.site-nav { width: 90%; padding: 12px 20px; flex-wrap: wrap; }

    .menu-toggle { display: flex; }

    .nav-links {
        display: none;
        width: 100%;
        padding-top: 15px;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links .menu {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .stats-container { flex-direction: column; }
    .stat-card { min-width: 100%; }

    h1 { font-size: 2.5rem; }

    .single-post-content { padding: 30px; }
    .page-content { padding: 30px; }

    .post-navigation { flex-direction: column; }
}
