/**
 * Theme Name:        TMV Editorial
 * Theme URI:         https://themetalvortex.com/
 * Description:       A responsive editorial child block theme for The Metal Vortex.
 * Author:            Arturo Buanzo and Jadzia
 * Template:          twentytwentythree
 * Version:           0.1.4
 * Requires at least: 6.6
 * Tested up to:      7.0
 * Requires PHP:      7.4
 * License:           GPL-2.0-or-later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:       tmv-editorial
 */

:root {
  --tmv-radius-sm: 8px;
  --tmv-radius-md: 16px;
  --tmv-radius-lg: 24px;
  --tmv-shadow-soft: 0 18px 50px rgba(10, 14, 20, 0.1);
  --tmv-shadow-card: 0 8px 28px rgba(10, 14, 20, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.admin-bar .tmv-site-header {
  top: 32px;
}

.tmv-site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid #27313d;
  background:
    linear-gradient(115deg, rgba(49, 215, 207, 0.08), transparent 36%),
    #0a0e14;
  color: #f7f8f5;
}

.tmv-header-inner {
  min-height: 88px;
}

.tmv-brand {
  gap: 0.15rem;
}

.tmv-wordmark {
  margin: 0;
  font-family: var(--wp--preset--font-family--tmv-display);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 850;
  letter-spacing: 0.085em;
  line-height: 1;
}

.tmv-wordmark a,
.tmv-site-footer a {
  color: inherit;
  text-decoration: none;
}

.tmv-brandline {
  margin: 0;
  color: #9eaab7;
  font-family: var(--wp--preset--font-family--tmv-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tmv-site-header .wp-block-navigation {
  color: #f7f8f5;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tmv-site-header .wp-block-navigation a:hover,
.tmv-site-header .wp-block-navigation a:focus-visible {
  color: #31d7cf;
}

.tmv-site-header .wp-block-navigation__responsive-container.is-menu-open {
  background: #0a0e14;
  color: #f7f8f5;
  padding: 2rem;
}

.tmv-home-main,
.tmv-archive-main,
.tmv-page-main,
.tmv-article-main {
  margin-block-start: 0;
}

.tmv-home-intro {
  overflow: hidden;
  border-bottom: 1px solid #27313d;
  background:
    radial-gradient(circle at 82% 24%, rgba(239, 77, 87, 0.2), transparent 28%),
    radial-gradient(circle at 18% 0%, rgba(49, 215, 207, 0.22), transparent 34%),
    #0a0e14;
  color: #f7f8f5;
}

.tmv-eyebrow,
.tmv-card-kicker,
.tmv-article-kicker {
  color: #0b7773;
  font-family: var(--wp--preset--font-family--tmv-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tmv-home-intro .tmv-eyebrow,
.tmv-home-intro a {
  color: #31d7cf;
}

.tmv-home-intro h1 {
  max-width: 15ch;
  margin-top: 0.35rem;
  margin-bottom: 1rem;
  color: #f7f8f5;
  font-size: clamp(2.7rem, 5.4vw, 4.8rem);
}

.tmv-home-deck {
  max-width: 64ch;
  color: #c9d1da;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
}

.tmv-featured-query ul,
.tmv-card-grid ul,
.tmv-archive-grid ul {
  margin: 0;
  padding: 0;
}

.tmv-featured-query,
.tmv-card-grid,
.tmv-archive-grid,
.tmv-section-heading,
.tmv-topic-grid {
  width: min(100%, var(--wp--style--global--wide-size));
  max-width: var(--wp--style--global--wide-size);
  margin-right: auto !important;
  margin-left: auto !important;
}

.tmv-featured-card,
.tmv-card,
.tmv-archive-card {
  overflow: hidden;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--tmv-radius-md);
  background: var(--wp--preset--color--surface);
  box-shadow: var(--tmv-shadow-card);
}

.tmv-featured-card {
  min-height: 430px;
}

.tmv-featured-card .wp-block-post-featured-image,
.tmv-card .wp-block-post-featured-image,
.tmv-archive-card .wp-block-post-featured-image {
  margin: 0;
  overflow: hidden;
  background: #161c24;
}

.tmv-featured-card .wp-block-post-featured-image img,
.tmv-card .wp-block-post-featured-image img,
.tmv-archive-card .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease-out;
}

.tmv-featured-card:hover .wp-block-post-featured-image img,
.tmv-card:hover .wp-block-post-featured-image img,
.tmv-archive-card:hover .wp-block-post-featured-image img {
  transform: scale(1.018);
}

.tmv-featured-copy {
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.tmv-card,
.tmv-archive-card {
  height: 100%;
}

.tmv-card-copy,
.tmv-archive-card-copy {
  padding: 1.25rem 1.35rem 1.45rem;
}

.tmv-card .wp-block-post-title,
.tmv-archive-card .wp-block-post-title {
  margin-top: 0.45rem;
  margin-bottom: 0.7rem;
  font-size: clamp(1.25rem, 1.7vw, 1.6rem);
  line-height: 1.18;
}

.tmv-card .wp-block-post-excerpt,
.tmv-archive-card .wp-block-post-excerpt {
  color: var(--wp--preset--color--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.tmv-card-meta,
.tmv-post-meta {
  color: var(--wp--preset--color--muted);
  font-family: var(--wp--preset--font-family--tmv-mono);
  font-size: 0.74rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.tmv-card-meta .wp-block-post-author,
.tmv-post-meta .wp-block-post-author {
  align-items: center;
}

.tmv-card-meta .wp-block-post-author__content,
.tmv-post-meta .wp-block-post-author__content,
.tmv-card-meta .wp-block-post-author__name,
.tmv-post-meta .wp-block-post-author__name {
  margin: 0;
}

.tmv-section-heading {
  align-items: end;
  border-bottom: 2px solid var(--wp--preset--color--contrast);
  padding-bottom: 0.65rem;
}

.tmv-section-heading h2 {
  margin: 0;
}

.tmv-section-heading p {
  margin: 0;
  color: var(--wp--preset--color--muted);
  font-family: var(--wp--preset--font-family--tmv-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.tmv-topic-grid .wp-block-column {
  border-top: 4px solid var(--wp--preset--color--accent);
  border-radius: 0 0 var(--tmv-radius-sm) var(--tmv-radius-sm);
  background: var(--wp--preset--color--surface);
  padding: 1.35rem;
}

.tmv-topic-grid .wp-block-column:nth-child(2) {
  border-top-color: var(--wp--preset--color--signal);
}

.tmv-topic-grid .wp-block-column:nth-child(3) {
  border-top-color: var(--wp--preset--color--gold);
}

.tmv-topic-links a {
  display: inline-block;
  margin-right: 0.7rem;
  margin-bottom: 0.45rem;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: #fff;
  color: var(--wp--preset--color--contrast);
  font-family: var(--wp--preset--font-family--tmv-mono);
  font-size: 0.72rem;
  font-weight: 750;
  text-decoration: none;
  text-transform: uppercase;
}

.tmv-topic-links a:hover,
.tmv-topic-links a:focus-visible {
  border-color: var(--wp--preset--color--accent);
  background: #e8f8f6;
}

.tmv-article-header {
  padding-top: clamp(3.5rem, 8vw, 7rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

.tmv-article-header h1 {
  max-width: 18ch;
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: clamp(2.35rem, 5.1vw, 3.9rem);
  text-wrap: balance;
}

.tmv-article-deck {
  max-width: 66ch;
  color: var(--wp--preset--color--muted);
  font-size: clamp(1.1rem, 1.7vw, 1.32rem);
  line-height: 1.55;
}

.tmv-hero-image {
  width: min(var(--wp--style--global--wide-size), calc(100vw - 2rem));
  max-width: var(--wp--style--global--wide-size) !important;
  margin-right: auto !important;
  margin-left: auto !important;
  overflow: hidden;
  border-radius: var(--tmv-radius-lg);
  box-shadow: var(--tmv-shadow-soft);
}

.tmv-hero-image img {
  width: 100%;
  height: auto;
}

.tmv-article-content {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(3rem, 6vw, 6rem);
}

.tmv-article-content > p,
.tmv-page-content > p {
  margin-block: 0 1.45em;
}

.tmv-article-content h2 {
  margin-top: 2.1em;
  margin-bottom: 0.72em;
  text-wrap: balance;
}

.tmv-article-content h3 {
  margin-top: 1.8em;
  margin-bottom: 0.65em;
}

.tmv-article-content > figure.wp-block-image,
.tmv-article-content > figure.wp-block-image.alignwide {
  width: min(var(--wp--style--global--wide-size), calc(100vw - 2rem));
  max-width: var(--wp--style--global--wide-size) !important;
  margin-top: clamp(2rem, 5vw, 4rem) !important;
  margin-right: 0 !important;
  margin-bottom: clamp(2rem, 5vw, 4rem) !important;
  margin-left: 50% !important;
  transform: translateX(-50%);
}

.tmv-article-content .wp-block-image img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--tmv-radius-md);
}

.tmv-article-content figcaption {
  margin-top: 0.75rem;
  color: var(--wp--preset--color--muted);
  font-family: var(--wp--preset--font-family--tmv-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: left;
}

.tmv-article-content .wp-block-table,
.tmv-page-content .wp-block-table {
  overflow-x: auto;
  margin-block: 2rem;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--tmv-radius-sm);
  background: var(--wp--preset--color--surface);
  box-shadow: 0 5px 18px rgba(10, 14, 20, 0.045);
}

.tmv-article-content table,
.tmv-page-content table {
  width: 100%;
  min-width: 620px;
  border: 0;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.45;
}

.tmv-article-content th,
.tmv-page-content th {
  border: 0;
  background: #111821;
  color: #f7f8f5;
  font-family: var(--wp--preset--font-family--tmv-mono);
  font-size: 0.72rem;
  letter-spacing: 0.045em;
  text-align: left;
  text-transform: uppercase;
}

.tmv-article-content th,
.tmv-article-content td,
.tmv-page-content th,
.tmv-page-content td {
  border: 0;
  border-bottom: 1px solid var(--wp--preset--color--line);
  padding: 0.85rem 0.95rem;
  vertical-align: top;
}

.tmv-article-content tbody tr:nth-child(even),
.tmv-page-content tbody tr:nth-child(even) {
  background: #f2f5f6;
}

.tmv-article-content tbody tr:last-child td,
.tmv-page-content tbody tr:last-child td {
  border-bottom: 0;
}

.tmv-article-content code,
.tmv-page-content code {
  border: 1px solid #cdd6df;
  border-radius: 4px;
  background: #edf1f4;
  padding: 0.08em 0.32em;
  color: #a52d39;
  font-family: var(--wp--preset--font-family--tmv-mono);
  font-size: 0.9em;
}

.tmv-article-content blockquote {
  margin-inline: 0;
  border-left: 5px solid var(--wp--preset--color--signal);
  padding-left: 1.35rem;
  color: #2c3540;
}

.tmv-article-footer {
  border-top: 1px solid var(--wp--preset--color--line);
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}

.tmv-post-navigation {
  border-top: 1px solid var(--wp--preset--color--line);
  padding-top: 1.5rem;
}

.tmv-archive-header,
.tmv-page-header {
  padding-top: clamp(3rem, 7vw, 6rem);
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.tmv-page-content {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.tmv-page-header h1,
.tmv-archive-header h1 {
  max-width: 20ch;
  font-size: clamp(2.3rem, 5vw, 4rem);
  text-wrap: balance;
}

.tmv-empty-state {
  border: 1px dashed var(--wp--preset--color--line);
  border-radius: var(--tmv-radius-md);
  background: var(--wp--preset--color--surface);
  padding: clamp(1.5rem, 4vw, 3rem);
}

.tmv-pagination {
  border-top: 1px solid var(--wp--preset--color--line);
  padding-top: 1.5rem;
}

.tmv-site-footer {
  margin-block-start: 0;
  border-top: 1px solid #27313d;
  background: #0a0e14;
  color: #d7dee6;
}

.tmv-site-footer .wp-block-navigation {
  color: #d7dee6;
  font-size: 0.84rem;
}

.tmv-footer-note {
  color: #8f9aa7;
  font-family: var(--wp--preset--font-family--tmv-mono);
  font-size: 0.72rem;
}

.tmv-site-footer .wp-block-separator {
  border-color: #27313d;
}

@media (max-width: 900px) {
  .tmv-header-inner {
    min-height: 76px;
  }

  .tmv-featured-card {
    min-height: 0;
  }

  .tmv-featured-card.wp-block-columns {
    gap: 0;
  }

  .tmv-card-grid .wp-block-post-template,
  .tmv-archive-grid .wp-block-post-template {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 782px) {
  body.admin-bar .tmv-site-header {
    top: 46px;
  }

  .tmv-header-inner {
    align-items: center;
  }

  .tmv-site-header .wp-block-navigation__responsive-container-open {
    color: #f7f8f5;
  }

  .tmv-featured-copy {
    padding: 1.5rem;
  }

  .tmv-home-intro h1 {
    font-size: 2.35rem;
  }

  .tmv-article-header .wp-block-post-title {
    font-size: 2.2rem;
  }

  .tmv-card-grid .wp-block-post-template,
  .tmv-archive-grid .wp-block-post-template {
    grid-template-columns: 1fr;
  }

  .tmv-article-header {
    padding-top: 2.8rem;
  }

  .tmv-hero-image {
    border-radius: var(--tmv-radius-sm);
  }

  .tmv-article-content table,
  .tmv-page-content table {
    min-width: 560px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tmv-featured-card .wp-block-post-featured-image img,
  .tmv-card .wp-block-post-featured-image img,
  .tmv-archive-card .wp-block-post-featured-image img {
    transition: none;
  }
}
