/*
Theme Name: Global AI Monitor
Theme URI: https://globalaimonitor.com/
Author: Global AI Monitor
Author URI: https://globalaimonitor.com/
Description: A premium black-and-white editorial WordPress theme for AI news, tools, reviews, comparisons, and monetised intelligence publishing.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: global-ai-monitor
Tags: blog, news, custom-logo, custom-menu, featured-images, block-styles, wide-blocks, editor-style
*/

:root {
  --gam-bg: #050505;
  --gam-surface: #0f0f0f;
  --gam-surface-soft: #151515;
  --gam-text: #ffffff;
  --gam-muted: #b8b8b8;
  --gam-border: #222222;
  --gam-border-strong: #3a3a3a;
  --gam-max: 1240px;
  --gam-content: 760px;
  --gam-radius: 8px;
  --gam-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gam-serif: Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gam-bg);
  color: var(--gam-text);
  font-family: var(--gam-font);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover,
a:focus {
  color: var(--gam-text);
}

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

button,
input,
textarea,
select {
  font: inherit;
}

.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: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 9999;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  background: var(--gam-text);
  color: var(--gam-bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--gam-border);
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner,
.site-footer .footer-inner,
.container {
  width: min(100% - 32px, var(--gam-max));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.site-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-title a {
  text-decoration: none;
}

.custom-logo {
  max-height: 36px;
  width: auto;
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 18px;
}

.menu,
.footer-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.menu a,
.footer-menu a {
  color: var(--gam-muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.menu a:hover,
.menu a:focus,
.footer-menu a:hover,
.footer-menu a:focus {
  color: var(--gam-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-form {
  display: flex;
  align-items: center;
  min-width: 220px;
  border: 1px solid var(--gam-border);
  background: var(--gam-surface);
}

.search-form input[type="search"] {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 10px 12px;
  background: transparent;
  color: var(--gam-text);
}

.search-form button,
.button,
.wp-block-button__link,
.affiliate-button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--gam-text);
  border-radius: 0;
  padding: 10px 16px;
  background: transparent;
  color: var(--gam-text);
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.search-form button {
  min-height: 40px;
  border-width: 0 0 0 1px;
}

.button:hover,
.button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus,
.affiliate-button:hover,
.affiliate-button:focus,
.search-form button:hover,
.search-form button:focus,
input[type="submit"]:hover,
input[type="submit"]:focus {
  background: var(--gam-text);
  color: var(--gam-bg);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gam-border);
  background: transparent;
  color: var(--gam-text);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.site-main {
  min-height: 60vh;
}

.hero {
  border-bottom: 1px solid var(--gam-border);
  padding: clamp(64px, 10vw, 132px) 0 52px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(28px, 6vw, 72px);
  align-items: end;
}

.eyebrow,
.post-category,
.card-meta,
.entry-meta,
.tool-tax,
.rating,
.section-kicker {
  color: var(--gam-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(3.1rem, 8vw, 7.4rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero p {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--gam-muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.section {
  padding: clamp(42px, 7vw, 80px) 0;
  border-bottom: 1px solid var(--gam-border);
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-title {
  max-width: 820px;
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  line-height: 1;
  letter-spacing: 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.9fr);
  gap: 20px;
}

.story-card,
.tool-card,
.comparison-card,
.newsletter-panel,
.author-box,
.affiliate-disclosure,
.toc,
.ad-slot,
.review-panel,
.comparison-table-wrap {
  border: 1px solid var(--gam-border);
  background: var(--gam-surface);
}

.story-card {
  display: grid;
  min-height: 100%;
}

.story-card a {
  text-decoration: none;
}

.story-card .thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gam-surface-soft);
}

.story-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card-content,
.tool-card,
.comparison-card,
.newsletter-panel,
.author-box,
.affiliate-disclosure,
.toc,
.ad-slot,
.review-panel {
  padding: 20px;
}

.lead-story .story-card-content {
  padding: clamp(22px, 4vw, 34px);
}

.story-card h2,
.story-card h3,
.tool-card h3,
.comparison-card h3 {
  margin: 8px 0 0;
  line-height: 1.08;
  letter-spacing: 0;
}

.lead-story h2,
.lead-story h3 {
  font-size: clamp(2rem, 4vw, 4.3rem);
}

.story-card p,
.tool-card p,
.comparison-card p,
.archive-description,
.entry-summary,
.review-panel p {
  color: var(--gam-muted);
}

.latest-stack {
  display: grid;
  gap: 20px;
}

.latest-stack .story-card {
  grid-template-columns: 150px minmax(0, 1fr);
}

.latest-stack .thumb {
  aspect-ratio: auto;
  height: 100%;
}

.card-grid,
.tool-grid,
.comparison-grid,
.archive-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.tool-card,
.comparison-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 14px;
}

.tool-card .button,
.comparison-card .button {
  width: fit-content;
  margin-top: auto;
}

.tool-meta-list,
.review-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tool-meta-list li,
.review-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--gam-border);
  padding-top: 8px;
  color: var(--gam-muted);
}

.model-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--gam-border);
}

.model-item {
  padding: 22px;
  border-right: 1px solid var(--gam-border);
  border-bottom: 1px solid var(--gam-border);
  background: var(--gam-surface);
}

.model-item:nth-child(4n) {
  border-right: 0;
}

.model-item strong {
  display: block;
  font-size: 1.15rem;
}

.model-item span {
  color: var(--gam-muted);
}

.trending-list {
  display: grid;
  border-top: 1px solid var(--gam-border);
}

.trending-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--gam-border);
  padding: 18px 0;
  text-decoration: none;
}

.trending-rank {
  color: var(--gam-muted);
  font-size: 1.4rem;
  font-weight: 900;
}

.newsletter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 26px;
  align-items: center;
}

.newsletter-panel h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 0.98;
}

.newsletter-form {
  display: flex;
  gap: 10px;
}

.newsletter-form input[type="email"],
.comment-form input,
.comment-form textarea,
.wpcf7 input,
.wpcf7 textarea {
  width: 100%;
  border: 1px solid var(--gam-border);
  padding: 13px 14px;
  background: var(--gam-bg);
  color: var(--gam-text);
}

.site-footer {
  padding: 48px 0;
  background: var(--gam-bg);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
}

.footer-brand {
  max-width: 520px;
}

.footer-brand p,
.site-info {
  color: var(--gam-muted);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.entry-header {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
  padding: clamp(46px, 8vw, 90px) 0 28px;
}

.entry-title {
  margin: 10px 0 16px;
  font-size: clamp(2.4rem, 6vw, 6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.entry-subtitle {
  max-width: 820px;
  color: var(--gam-muted);
  font-size: 1.2rem;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.featured-media {
  width: min(100% - 32px, var(--gam-max));
  margin: 0 auto 36px;
}

.featured-media img {
  width: 100%;
  max-height: 680px;
  object-fit: cover;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--gam-content)) 300px;
  gap: 52px;
  align-items: start;
  width: min(100% - 32px, var(--gam-max));
  margin: 0 auto;
  padding-bottom: 72px;
}

.entry-content {
  color: #eeeeee;
  font-size: 1.075rem;
}

.entry-content > * {
  margin-top: 0;
  margin-bottom: 1.45rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 2rem;
  color: var(--gam-text);
  line-height: 1.12;
}

.entry-content a {
  color: var(--gam-text);
}

.entry-content blockquote {
  border-left: 3px solid var(--gam-text);
  margin-left: 0;
  padding-left: 20px;
  color: var(--gam-muted);
  font-size: 1.2rem;
}

.entry-content table,
.comparison-table {
  width: 100%;
  border-collapse: collapse;
}

.entry-content th,
.entry-content td,
.comparison-table th,
.comparison-table td {
  border: 1px solid var(--gam-border);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.entry-content th,
.comparison-table th {
  background: var(--gam-surface);
}

.sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.toc ul {
  padding-left: 18px;
  margin-bottom: 0;
}

.toc a {
  color: var(--gam-muted);
  text-decoration: none;
}

.toc a:hover,
.toc a:focus {
  color: var(--gam-text);
}

.ad-slot {
  min-height: 250px;
  display: grid;
  place-items: center;
  color: var(--gam-muted);
  text-align: center;
}

.affiliate-disclosure {
  color: var(--gam-muted);
  font-size: 0.95rem;
}

.author-box {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 32px;
}

.author-box img {
  border-radius: 50%;
}

.archive-header {
  width: min(100% - 32px, var(--gam-max));
  margin: 0 auto;
  padding: 56px 0 28px;
}

.archive-title {
  margin: 0 0 10px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.95;
}

.pagination {
  margin: 34px 0 70px;
}

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

.page-numbers {
  border: 1px solid var(--gam-border);
  padding: 8px 12px;
  color: var(--gam-muted);
  text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover,
.page-numbers:focus {
  border-color: var(--gam-text);
  color: var(--gam-text);
}

.review-hero {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.tool-logo {
  width: 130px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--gam-border);
  background: var(--gam-surface);
}

.tool-logo img {
  max-width: 72%;
  max-height: 72%;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.comparison-table-wrap {
  overflow-x: auto;
  margin: 28px 0;
}

.wp-block-image.alignwide,
.alignwide {
  width: min(100vw - 32px, var(--gam-max));
  margin-left: calc((min(100% - 32px, var(--gam-content)) - min(100vw - 32px, var(--gam-max))) / 2);
}

.alignfull {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

@media (max-width: 980px) {
  .menu-toggle {
    display: inline-block;
  }

  .main-navigation {
    position: fixed;
    inset: 72px 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 16px;
    border-bottom: 1px solid var(--gam-border);
    background: var(--gam-bg);
  }

  .main-navigation.is-open {
    display: flex;
  }

  .menu {
    display: grid;
    gap: 0;
  }

  .menu a {
    display: block;
    border-bottom: 1px solid var(--gam-border);
    padding: 14px 0;
    font-size: 1rem;
  }

  .header-actions .search-form {
    display: none;
  }

  .hero-grid,
  .featured-grid,
  .newsletter-panel,
  .content-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .card-grid,
  .tool-grid,
  .comparison-grid,
  .archive-grid,
  .related-grid,
  .model-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .model-item:nth-child(4n) {
    border-right: 1px solid var(--gam-border);
  }

  .model-item:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 680px) {
  .header-inner,
  .container,
  .site-footer .footer-inner,
  .entry-header,
  .featured-media,
  .content-layout,
  .archive-header {
    width: min(100% - 24px, var(--gam-max));
  }

  .hero h1,
  .entry-title,
  .archive-title {
    font-size: clamp(2.7rem, 16vw, 4.4rem);
  }

  .latest-stack .story-card,
  .review-hero,
  .author-box {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .tool-grid,
  .comparison-grid,
  .archive-grid,
  .related-grid,
  .model-strip,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .trending-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .trending-item .card-meta {
    grid-column: 2;
  }
}
