/*
Theme Name: GeneratePress Child
Theme URI: https://generatepress.com
Description: Custom child theme for GeneratePress with the Vercel Design System.
Author: OpenCode
Template: generatepress
Version: 1.1.0
*/

/* ==========================================================================
   1. LOCAL FONTS (Geist)
   ========================================================================== */
@font-face {
    font-family: 'Geist Sans';
    src: url('./fonts/geist-sans/Geist-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('./fonts/geist-mono/GeistMono-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   2. CSS VARIABLES (Vercel Design System)
   ========================================================================== */
:root {
    /* Colors */
    --vercel-black: #171717;
    --vercel-white: #ffffff;
    --vercel-gray-900: #171717;
    --vercel-gray-600: #4d4d4d;
    --vercel-gray-500: #666666;
    --vercel-gray-400: #808080;
    --vercel-gray-100: #ebebeb;
    --vercel-gray-50: #fafafa;

    /* Workflow Accents */
    --ship-red: #ff5b4f;
    --preview-pink: #de1d8d;
    --develop-blue: #0a72ef;

    /* Interactive */
    --link-blue: #0072f5;
    --focus-blue: hsla(212, 100%, 48%, 1);
    --badge-blue-bg: #ebf5ff;
    --badge-blue-text: #0068d6;

    /* Typography */
    --font-sans: "Geist Sans", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --font-mono: "Geist Mono", "ui-monospace", SFMono-Regular, Roboto Mono, Menlo, Monaco, Liberation Mono, DejaVu Sans Mono, Courier New, monospace;

    /* Shadows & Borders */
    --border-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    --ring-border: 0 0 0 1px rgb(235, 235, 235);
    --shadow-subtle: 0 2px 2px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 2px rgba(0, 0, 0, 0.04), 0 8px 8px -8px rgba(0, 0, 0, 0.04), inset 0 0 0 1px #fafafa;

    /* Layout */
    --container-width: 1200px;
    --border-radius-s: 6px;
    --border-radius-m: 8px;
    --border-radius-l: 12px;
    --border-radius-pill: 9999px;
    --section-spacing: 80px;
}

/* ==========================================================================
   2. BASE STYLES
   ========================================================================== */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--vercel-white);
    color: var(--vercel-gray-600);
    font-family: var(--font-sans);
    font-size: 1.125rem; /* 18px */
    line-height: 1.56;
    font-feature-settings: "liga" 1;
    margin: 0;
}

/* Global Ligatures */
* {
    font-variant-ligatures: common-ligatures;
    box-sizing: border-box;
}

/* Selection */
::selection {
    background-color: hsla(0, 0%, 95%, 1);
    color: var(--vercel-black);
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--vercel-black);
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem; /* 48px */
    line-height: 1.1;
    letter-spacing: -0.05em; /* Approximately -2.4px at 48px */
}

h2 {
    font-size: 2.5rem; /* 40px */
    line-height: 1.2;
    letter-spacing: -0.06em; /* -2.4px */
}

h3 {
    font-size: 2rem; /* 32px */
    line-height: 1.25;
    letter-spacing: -0.04em; /* -1.28px */
}

h4 {
    font-size: 1.5rem; /* 24px */
    line-height: 1.33;
    letter-spacing: -0.04em; /* -0.96px */
}

.body-large {
    font-size: 1.25rem; /* 20px */
    line-height: 1.8;
}

.body-small, .wp-block-latest-posts__post-excerpt {
    font-size: 1rem; /* 16px */
    line-height: 1.5;
}

.semibold-label {
    font-weight: 600;
    letter-spacing: -0.02em; /* -0.32px */
}

code, pre, .mono-text {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-feature-settings: "liga" 1, "tnum" 1;
}

/* Links */
a {
    color: var(--link-blue);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   4. LAYOUT & SPACING
   ========================================================================== */
.grid-container {
    max-width: var(--container-width);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.site-content {
    padding: var(--section-spacing) 0;
}

/* Section Rhythm */
section, .wp-block-group {
    padding: var(--section-spacing) 0;
}

/* ==========================================================================
   5. COMPONENTS
   ========================================================================== */

/* Buttons */
.button, 
.wp-block-button__link,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--border-radius-s);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

/* Primary CTA (Dark) */
.button.primary,
.wp-block-button__link:not(.is-style-outline) {
    background-color: var(--vercel-black);
    color: var(--vercel-white);
}

.button.primary:hover,
.wp-block-button__link:not(.is-style-outline):hover {
    background-color: #000;
    text-decoration: none;
}

/* Ghost Button (White Shadow-bordered) */
.button.ghost,
.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: var(--vercel-white);
    color: var(--vercel-black);
    box-shadow: var(--ring-border);
}

.button.ghost:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--vercel-gray-50);
    box-shadow: var(--border-shadow);
    text-decoration: none;
}

/* Focus Ring */
button:focus,
.button:focus,
.wp-block-button__link:focus,
input:focus {
    outline: 2px solid var(--focus-blue);
    outline-offset: 2px;
}

/* Cards (Shadow-as-border) */
.type-post,
.card,
.wp-block-group.is-style-card {
    background-color: var(--vercel-white);
    border-radius: var(--border-radius-m);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: none;
    overflow: hidden;
    padding: 32px;
}

.type-post:hover,
.card:hover {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 4px 4px rgba(0, 0, 0, 0.04), 0 12px 12px -8px rgba(0, 0, 0, 0.08), inset 0 0 0 1px #fafafa;
}

/* Pill Badges */
.badge,
.pill {
    display: inline-flex;
    align-items: center;
    background-color: var(--badge-blue-bg);
    color: var(--badge-blue-text);
    font-size: 0.75rem; /* 12px */
    font-weight: 500;
    padding: 0 10px;
    height: 24px;
    border-radius: var(--border-radius-pill);
    text-transform: none;
}

/* Workflow Steps */
.step-develop { color: var(--develop-blue); }
.step-preview { color: var(--preview-pink); }
.step-ship { color: var(--ship-red); }

/* ==========================================================================
   6. SITE HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    background-color: var(--vercel-white);
    box-shadow: var(--border-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-navigation .main-nav ul li a {
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
    color: var(--vercel-black);
    padding: 0 12px;
}

.main-navigation .main-nav ul li[class*="current-menu-"] > a {
    font-weight: 600;
}

/* ==========================================================================
   7. BLOG & ARCHIVES
   ========================================================================== */
.generate-columns-container .type-post {
    margin-bottom: 32px;
}

.entry-title {
    font-size: 1.5rem;
    letter-spacing: -0.96px;
    font-weight: 600;
}

.read-more {
    font-size: 0.875rem;
    font-weight: 500;
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.site-info {
    background-color: var(--vercel-white);
    color: var(--vercel-gray-500);
    padding: 40px 0;
    border-top: 1px solid var(--vercel-gray-100);
}

.site-info a {
    color: var(--vercel-gray-900);
}

/* ==========================================================================
   9. RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --section-spacing: 48px;
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 2rem;
    }
}
