/*
Theme Name: Copyright.sh
Theme URI: https://copyright.sh
Author: Copyright.sh
Author URI: https://copyright.sh
Description: Custom WordPress theme for Copyright.sh blog - AI content licensing platform
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: copyrightsh
*/

/* ============================================
   CSS CUSTOM PROPERTIES - BRAND SYSTEM
   ============================================ */
:root {
  /* Brand Colors */
  --color-primary: #1a1f36;          /* Deep Ink Blue */
  --color-primary-rgb: 26, 31, 54;
  --color-primary-dark: #0d1117;
  --color-primary-light: #2d3561;
  --color-secondary: #c9f31d;        /* Electric Lime */
  --color-secondary-dark: #a8d117;
  --color-accent: #ff3864;            /* Coral Red */
  --color-success: #00c896;           /* Mint Green */
  --color-warning: #ffb41f;           /* Golden Yellow */
  --color-error: #ff3864;

  /* Text Colors */
  --color-text-primary: #0a0e1a;
  --color-text-secondary: #4a5568;
  --color-text-muted: #718096;
  --color-text-inverse: #fafbfc;

  /* Background Colors */
  --color-bg-primary: #fafbfc;
  --color-bg-secondary: #f5f7fa;
  --color-bg-muted: #eef1f5;
  --color-bg-dark: #1a1f36;
  --color-surface: #ffffff;

  /* Border Colors */
  --color-border-light: #e5e7eb;
  --color-border-medium: #d1d5db;
  --color-border-dark: #9ca3af;

  /* Typography */
  --font-family-sans: 'Neue Haas Grotesk Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-family-display: 'Neue Haas Grotesk Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

  /* Font Sizes */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */

  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Spacing */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px */

  /* Border Radius */
  --radius-sm: 0.25rem;  /* 4px */
  --radius-md: 0.5rem;   /* 8px */
  --radius-lg: 0.75rem;  /* 12px */
  --radius-xl: 1rem;     /* 16px */
  --radius-2xl: 1.5rem;  /* 24px */
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #1a1f36 0%, #2d3561 50%, #0d1117 100%);
  --gradient-hero: linear-gradient(135deg, #1a1f36 0%, #0d1117 70%, #c9f31d 100%);
  --gradient-lime: linear-gradient(135deg, #c9f31d 0%, #a8d117 100%);
}

/* ============================================
   FONT FACE DECLARATIONS
   ============================================ */
@font-face {
  font-family: 'Neue Haas Grotesk Text';
  src: url('assets/fonts/neuehaasgrottext-55roman-trial.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Haas Grotesk Text';
  src: url('assets/fonts/neuehaasgrottext-65medium-trial.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Haas Grotesk Text';
  src: url('assets/fonts/neuehaasgrottext-75bold-trial.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Haas Grotesk Display';
  src: url('assets/fonts/neuehaasgrotdisp-55roman-trial.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Haas Grotesk Display';
  src: url('assets/fonts/neuehaasgrotdisp-65medium-trial.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Haas Grotesk Display';
  src: url('assets/fonts/neuehaasgrotdisp-75bold-trial.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Haas Grotesk Display';
  src: url('assets/fonts/neuehaasgrotdisp-95black-trial.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-display);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: var(--font-size-5xl);
  font-weight: var(--font-weight-extrabold);
}

h2 {
  font-size: var(--font-size-4xl);
}

h3 {
  font-size: var(--font-size-3xl);
}

h4 {
  font-size: var(--font-size-2xl);
}

h5 {
  font-size: var(--font-size-xl);
}

h6 {
  font-size: var(--font-size-lg);
}

p {
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

strong {
  font-weight: var(--font-weight-bold);
}

em {
  font-style: italic;
}

code {
  font-family: var(--font-family-mono);
  font-size: 0.9em;
  background: var(--color-bg-secondary);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
}

pre {
  font-family: var(--font-family-mono);
  background: var(--color-bg-dark);
  color: var(--color-success);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: var(--space-lg);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

blockquote {
  border-left: 4px solid var(--color-secondary);
  padding-left: var(--space-lg);
  margin: var(--space-lg) 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  padding: var(--space-lg) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.95);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-family-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  color: var(--color-text-primary);
  text-decoration: none;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.site-navigation ul {
  list-style: none;
  display: flex;
  gap: var(--space-xl);
  margin: 0;
  padding: 0;
}

.site-navigation a {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-fast);
}

.site-navigation a:hover {
  color: var(--color-primary-dark);
}

.site-main {
  padding: var(--space-3xl) 0;
}

.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding: var(--space-2xl) 0 var(--space-md);
  margin-top: var(--space-4xl);
}

.site-footer a {
  color: var(--color-text-inverse);
  opacity: 0.8;
}

.site-footer a:hover {
  opacity: 1;
}

/* ============================================
   BLOG POST STYLES
   ============================================ */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

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

.post-content {
  padding: var(--space-lg);
}

.post-title {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-sm);
}

.post-meta {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-md);
}

.post-excerpt {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.read-more {
  display: inline-block;
  margin-top: var(--space-md);
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
  transition: color var(--transition-fast);
}

.read-more:hover {
  color: var(--color-secondary);
}

/* Single Post */
.single-post {
  max-width: 800px;
  margin: 0 auto;
}

.post-header {
  margin-bottom: var(--space-2xl);
  text-align: center;
}

.post-header .post-title {
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-md);
}

.post-header .post-meta {
  font-size: var(--font-size-base);
}

.post-body {
  font-size: var(--font-size-lg);
  line-height: 1.8;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: var(--space-xl) 0;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-primary {
  background: var(--color-secondary);
  color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(201, 243, 29, 0.3);
}

.btn-primary:hover {
  background: var(--color-secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 243, 29, 0.4);
}

.btn-secondary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-secondary:hover {
  background: var(--color-primary-dark);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .site-header .container {
    flex-direction: column;
    gap: var(--space-md);
  }

  .site-navigation ul {
    gap: var(--space-md);
  }

  .post-list {
    grid-template-columns: 1fr;
  }

  .post-header .post-title {
    font-size: var(--font-size-3xl);
  }
}

/* ============================================
   WORDPRESS SPECIFIC
   ============================================ */
.alignleft {
  float: left;
  margin: 0 var(--space-lg) var(--space-md) 0;
}

.alignright {
  float: right;
  margin: 0 0 var(--space-md) var(--space-lg);
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-align: center;
  padding: var(--space-sm);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================
   FIRECRAWL-INSPIRED DESIGN
   ============================================ */

/* Announcement Banner */
.announcement-banner {
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border-light);
  padding: var(--space-sm) 0;
  text-align: center;
}

.announcement-banner p {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.announcement-banner a {
  color: var(--color-secondary);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.announcement-banner a:hover {
  text-decoration: underline;
}

/* Tight Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
}

.site-header .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.site-header .site-branding img {
  height: 32px;
  width: auto;
}

.site-header .site-navigation {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.site-header .site-navigation a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  transition: color var(--transition-fast);
}

.site-header .site-navigation a:hover,
.site-header .site-navigation a.active {
  color: var(--color-text-primary);
}

.site-header .btn-signup {
  background: var(--color-secondary);
  color: var(--color-primary);
  padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-semibold);
}

.site-header .btn-signup:hover {
  background: var(--color-secondary-dark);
  color: var(--color-primary) !important;
}

/* Category Navigation Pills */
.category-nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  padding: var(--space-lg) 0;
}

.category-pills {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  display: inline-block;
  padding: var(--space-xs) var(--space-lg);
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.category-pill:hover {
  background: var(--color-bg-muted);
  color: var(--color-text-primary);
}

.category-pill.active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}

/* Hero Post Section */
.hero-post {
  background: var(--color-surface);
  padding: var(--space-3xl) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.hero-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #1a1f36 0%, #2d3561 100%);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.hero-title {
  font-family: var(--font-family-display);
  font-size: 3.5rem;
  font-weight: var(--font-weight-black);
  line-height: 1.1;
  color: var(--color-text-primary);
  margin: 0;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-excerpt {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-light);
}

.author-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
}

.author-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.author-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.post-date {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.btn-read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-xl);
  background: var(--color-secondary);
  color: var(--color-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-read-more:hover {
  background: var(--color-secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 243, 29, 0.3);
}

/* Post Grid Section */
.post-grid-section {
  background: var(--color-bg-primary);
  padding: var(--space-3xl) 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.grid-post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-normal);
}

.grid-post-card:hover {
  border-color: var(--color-border-medium);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-4px);
}

.grid-post-title {
  font-family: var(--font-family-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  margin: 0 0 var(--space-md) 0;
}

.grid-post-title a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.grid-post-title a:hover {
  color: var(--color-secondary);
}

.grid-post-excerpt {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0 0 var(--space-lg) 0;
}

.grid-post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-light);
}

.grid-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
}

.grid-author-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.grid-post-date {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-left: auto;
}

/* Responsive Design for Hero and Grid */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero-post {
    padding: var(--space-xl) 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .site-header .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header .site-navigation {
    width: 100%;
    justify-content: space-between;
  }
}

/* ============================================
   POST CONTENT: Lists and Spacing
   ============================================ */
.post-content ul,
.post-content ol {
  margin: var(--space-lg) 0 var(--space-lg) var(--space-xl);
  padding-left: var(--space-md);
}

.post-content ul {
  list-style-type: disc;
}

.post-content ol {
  list-style-type: decimal;
}

.post-content li {
  margin-bottom: var(--space-sm);
  line-height: 1.8;
}

.post-content h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-lg);
}

.post-content h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.post-content h4,
.post-content h5,
.post-content h6 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

/* Reduce top margin for headings immediately after lists */
.post-content ul + h2,
.post-content ol + h2,
.post-content ul + h3,
.post-content ol + h3 {
  margin-top: var(--space-xl);
}

/* ============================================
   TEMPORARY: Hide search bar
   ============================================ */
.search-form {
  display: none;
}
