/*
Theme Name: Machines Mindset V1.5 Simple Gutenberg
Theme URI: https://machinesmindset.com/
Description: Lightweight GeneratePress child theme with a pre-built, fully editable Gutenberg homepage. Designed around one simple blog hub: V1 hero, search, automatic featured/latest posts, about, and CTA.
Author: Machines Mindset
Template: generatepress
Version: 1.5.0
Text Domain: machines-mindset
Requires at least: 6.6
Requires PHP: 7.4
*/

:root {
  --mm-orange: #e97827;
  --mm-orange-bright: #f97316;
  --mm-orange-dark: #b94b19;
  --mm-ink: #11182e;
  --mm-charcoal: #20283b;
  --mm-slate: #66758f;
  --mm-line: #e7ebf1;
  --mm-soft: #fff7ef;
  --mm-panel: #f7f9fc;
  --mm-white: #ffffff;
  --mm-wide: 1360px;
  --mm-reading: 780px;
  --mm-radius-lg: 28px;
  --mm-radius: 20px;
  --mm-shadow-sm: 0 10px 30px rgba(15, 23, 42, .055);
  --mm-shadow: 0 24px 64px rgba(15, 23, 42, .09);
  --mm-gutter: clamp(18px, 3vw, 40px);
  --mm-section-space: clamp(4.75rem, 7vw, 7rem);
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  color: var(--mm-ink);
  background: var(--mm-white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

/* =========================================================
   GeneratePress + front-page canvas
   ========================================================= */
body.home.page .entry-header {
  display: none;
}

body.home.page .site-content,
body.home.page .content-area,
body.home.page .site-main,
body.home.page .inside-article,
body.home.page .entry-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.home.page .widget-area {
  display: none;
}

body.home.page .site.grid-container,
body.home.page .site-content.grid-container {
  max-width: none;
}

body.home.page .site-main,
body.home.page .entry-content {
  overflow: visible;
}

body.home.page .entry-content > .alignfull {
  width: 100%;
  max-width: none;
  margin: 0;
}

.entry-content > .alignwide {
  width: min(100%, var(--mm-wide));
  margin-inline: auto;
}

.mm-shell {
  width: 100%;
  max-width: var(--mm-wide);
  margin-inline: auto;
  padding-inline: var(--mm-gutter);
  box-sizing: border-box;
}

#article-search,
#latest-articles,
#about {
  scroll-margin-top: 96px;
}

/* =========================================================
   GeneratePress header/nav: clean spacing + dropdown layering
   ========================================================= */
.site-header,
.main-navigation,
.inside-navigation,
.main-navigation .main-nav,
.main-navigation .main-nav > ul {
  position: relative;
  z-index: 99990;
  overflow: visible !important;
}

.main-navigation .main-nav ul li {
  position: relative;
}

.main-navigation .main-nav ul ul,
.main-navigation .sub-menu {
  z-index: 99999 !important;
  overflow: visible !important;
}

body.home .site-content,
body.home .site-main,
body.home .entry-content {
  position: relative;
  z-index: 1;
}

@media (min-width: 1025px) {
  .site-header .inside-header,
  .main-navigation .inside-navigation {
    max-width: var(--mm-wide);
    margin-inline: auto;
    padding-left: var(--mm-gutter);
    padding-right: var(--mm-gutter);
    box-sizing: border-box;
  }

  .main-navigation .main-nav > ul {
    flex-wrap: nowrap;
  }

  .main-navigation .main-nav > ul > li > a {
    white-space: nowrap;
    padding-left: clamp(10px, 1.1vw, 17px);
    padding-right: clamp(10px, 1.1vw, 17px);
  }
}

/* =========================================================
   Gutenberg typography/buttons
   ========================================================= */
.wp-block-heading.is-style-mm-eyebrow,
.mm-eyebrow {
  margin: 0 0 1rem;
  color: var(--mm-orange-dark);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.wp-block-heading {
  text-wrap: balance;
}

.wp-block-button .wp-block-button__link,
.wp-element-button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 750;
  line-height: 1.1;
  padding: .85rem 1.55rem;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}

.wp-block-button .wp-block-button__link:hover,
.wp-element-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, .08);
}

.wp-block-button.is-style-mm-outline .wp-block-button__link {
  color: var(--mm-ink);
  background: rgba(255, 255, 255, .78);
  border-color: #d8dee8;
}

.wp-block-button.is-style-mm-outline .wp-block-button__link:hover {
  color: var(--mm-orange-dark);
  border-color: rgba(233, 120, 39, .65);
  background: #fff;
}

/* =========================================================
   V1 hero
   ========================================================= */
.mm-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 690px;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(255, 247, 239, .92) 0%, rgba(255, 255, 255, .98) 48%, rgba(248, 250, 252, .98) 100%);
}

.mm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .55;
  background-image:
    linear-gradient(rgba(25, 36, 58, .052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 36, 58, .052) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .68) 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .68) 72%, transparent 100%);
}

.mm-hero::after {
  content: "";
  position: absolute;
  right: -12rem;
  top: 2rem;
  width: 42rem;
  height: 42rem;
  z-index: -1;
  border-radius: 50%;
  background: rgba(100, 116, 139, .055);
}

.mm-hero > .mm-shell {
  padding-top: clamp(4.3rem, 7vw, 6.8rem);
  padding-bottom: clamp(4.3rem, 7vw, 6.8rem);
}

.mm-hero-columns {
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5.5rem);
  margin-bottom: 0;
}

.mm-hero-title {
  max-width: 720px;
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--mm-ink);
  font-size: clamp(3.55rem, 5.35vw, 5.75rem) !important;
  font-weight: 820;
  letter-spacing: -.052em;
  line-height: .98;
}

.mm-hero-copy {
  max-width: 670px;
  margin-bottom: 2rem;
  color: var(--mm-slate);
  font-size: clamp(1.08rem, 1.25vw, 1.3rem) !important;
  line-height: 1.68;
}

.mm-hero-actions {
  gap: .8rem;
}

.mm-hero-visual {
  margin: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.mm-hero-visual img {
  width: min(100%, 690px);
  height: auto;
  display: block;
  margin-inline: auto;
  filter: drop-shadow(0 30px 52px rgba(15, 23, 42, .09));
}

/* =========================================================
   Search strip
   ========================================================= */
.mm-search-strip {
  position: relative;
  z-index: 3;
  background: #fff;
  border-top: 1px solid rgba(231, 235, 241, .7);
  border-bottom: 1px solid var(--mm-line);
}

.mm-search-inner {
  padding-top: 1.55rem;
  padding-bottom: 1.55rem;
}

.mm-search-columns {
  gap: clamp(1rem, 3vw, 3rem);
  margin-bottom: 0;
}

.mm-search-title {
  margin: 0;
  font-size: clamp(1.2rem, 1.7vw, 1.55rem);
  letter-spacing: -.02em;
}

.mm-search .wp-block-search__inside-wrapper {
  min-height: 54px;
  overflow: hidden;
  border: 1px solid #dfe5ed;
  border-radius: 999px;
  background: #f9fbfd;
  padding: 4px 4px 4px 18px;
}

.mm-search .wp-block-search__input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  padding: .6rem .4rem;
  font-size: 1rem;
}

.mm-search .wp-block-search__button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--mm-orange);
}

.mm-search .wp-block-search__button:hover {
  background: var(--mm-orange-dark);
}

/* =========================================================
   Shared sections
   ========================================================= */
.mm-section {
  padding-top: var(--mm-section-space);
  padding-bottom: var(--mm-section-space);
}

.mm-section-tight {
  padding-top: clamp(3.5rem, 5.5vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 5.5vw, 5.5rem);
}

.mm-section-heading {
  max-width: 830px;
  margin: 0 0 clamp(2rem, 4vw, 3.2rem);
}

.mm-section-heading > :last-child {
  margin-bottom: 0;
}

.mm-section-heading .has-x-large-font-size,
.mm-about-panel .has-x-large-font-size,
.mm-cta-panel .has-x-large-font-size {
  margin-top: 0;
  margin-bottom: 1rem;
  letter-spacing: -.035em;
}

.mm-section-heading p,
.mm-about-panel p {
  line-height: 1.7;
}

/* =========================================================
   Featured article
   ========================================================= */
.mm-feature-query .wp-block-post-template,
.mm-feature-query .wp-block-post-template > li,
.mm-latest-query .wp-block-post-template {
  margin: 0;
  padding: 0;
}

.mm-feature-query .wp-block-post-template > li,
.mm-latest-query .wp-block-post-template > li {
  list-style: none;
}

.mm-feature-card {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, .82fr);
  gap: 0;
  overflow: hidden;
  min-height: 410px;
  border: 1px solid var(--mm-line);
  border-radius: var(--mm-radius-lg);
  background: #fff;
  box-shadow: var(--mm-shadow-sm);
}

.mm-feature-image {
  height: 100%;
  min-height: 410px;
  margin: 0;
  background: #eef2f7;
}

.mm-feature-image a,
.mm-feature-image img {
  width: 100%;
  height: 100%;
  display: block;
}

.mm-feature-image img {
  object-fit: cover;
}

/* Graceful artwork placeholder when a post has no featured image yet. */
.mm-feature-card:not(:has(.mm-feature-image img))::before {
  content: "";
  min-height: 410px;
  background:
    radial-gradient(circle at 68% 42%, rgba(233, 120, 39, .26) 0 12%, transparent 13%),
    linear-gradient(rgba(17, 24, 46, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 46, .055) 1px, transparent 1px),
    linear-gradient(135deg, #fff7ef, #f2f6fa);
  background-size: auto, 36px 36px, 36px 36px, auto;
}

.mm-feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 4vw, 3.6rem);
}

.mm-feature-copy .wp-block-post-date,
.mm-post-card .wp-block-post-date {
  margin-bottom: .85rem;
  color: var(--mm-slate);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mm-feature-copy .wp-block-post-title {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 3vw, 2.8rem) !important;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.mm-feature-copy .wp-block-post-title,
.mm-post-card .wp-block-post-title {
  color: var(--mm-ink);
}

/* Let Gutenberg's Text/Link color controls work. The block owns the color;
   the title link inherits it instead of the theme forcing a fixed value. */
.mm-feature-copy .wp-block-post-title a,
.mm-post-card .wp-block-post-title a {
  color: inherit;
  text-decoration: none;
}

.mm-feature-copy .wp-block-post-title a:hover,
.mm-post-card .wp-block-post-title a:hover {
  color: var(--mm-orange-dark);
}

.mm-feature-copy .wp-block-post-excerpt {
  color: var(--mm-slate);
  font-size: 1.03rem;
  line-height: 1.7;
}

.mm-feature-copy .wp-block-post-excerpt__more-link,
.mm-post-card .wp-block-post-excerpt__more-link {
  display: inline-block;
  margin-top: .7rem;
  color: var(--mm-orange-dark);
  font-weight: 800;
  text-decoration: none;
}

.mm-empty-state {
  padding: 2.2rem;
  border: 1px dashed #cbd5e1;
  border-radius: var(--mm-radius);
  background: #f8fafc;
}

/* =========================================================
   Latest article grid
   ========================================================= */
.mm-post-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(1rem, 2vw, 1.5rem) !important;
}

.mm-post-card {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--mm-line);
  border-radius: var(--mm-radius);
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .045);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.mm-post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(233, 120, 39, .28);
  box-shadow: var(--mm-shadow-sm);
}

.mm-post-card-image {
  margin: 0;
  background: #eef2f7;
}

.mm-post-card-image a,
.mm-post-card-image img {
  width: 100%;
  display: block;
}

.mm-post-card-image img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.mm-post-card:not(:has(.mm-post-card-image img))::before {
  content: "";
  display: block;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 72% 36%, rgba(233, 120, 39, .24) 0 10%, transparent 11%),
    linear-gradient(rgba(17, 24, 46, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 46, .05) 1px, transparent 1px),
    linear-gradient(135deg, #fff7ef, #eef3f8);
  background-size: auto, 30px 30px, 30px 30px, auto;
}

.mm-post-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 2.1vw, 1.7rem);
}

.mm-post-card .wp-block-post-title {
  margin: 0 0 .7rem;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.mm-post-card .wp-block-post-excerpt {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--mm-slate);
  line-height: 1.65;
}

.mm-pagination {
  gap: .45rem;
  margin-top: clamp(2.4rem, 4vw, 3.5rem);
}

.mm-pagination a,
.mm-pagination .page-numbers {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dfe5ed;
  border-radius: 999px;
  color: var(--mm-ink);
  background: #fff;
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}

.mm-pagination .current,
.mm-pagination a:hover {
  color: #fff;
  border-color: var(--mm-orange);
  background: var(--mm-orange);
}

/* =========================================================
   About
   ========================================================= */
.mm-about-panel {
  padding-top: clamp(2.2rem, 4.5vw, 4rem);
  padding-bottom: clamp(2.2rem, 4.5vw, 4rem);
  border: 1px solid #f1d7c4;
  border-radius: var(--mm-radius-lg);
  background: linear-gradient(135deg, #fff7ef 0%, #fff 56%, #f8fafc 100%);
}

.mm-about-columns {
  gap: clamp(2rem, 5vw, 5rem);
  margin-bottom: 0;
}

.mm-topic-cloud {
  gap: .65rem;
  padding: clamp(1rem, 2vw, 1.4rem);
}

.mm-topic-cloud > p {
  margin: 0;
}

.mm-tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid #e0e6ee;
  border-radius: 999px;
  padding: .55rem .85rem;
  color: #46546b;
  background: rgba(255, 255, 255, .9);
  font-size: .86rem;
  font-weight: 750;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .035);
}

/* =========================================================
   CTA
   ========================================================= */
.mm-cta-panel {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding-top: clamp(2.2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2.2rem, 4vw, 3.5rem);
  border-radius: var(--mm-radius-lg);
  background: linear-gradient(135deg, #11182e 0%, #20283b 70%, #2d384f 100%);
}

.mm-cta-panel::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -90px;
  top: -100px;
  border-radius: 50%;
  background: rgba(249, 115, 22, .16);
}

.mm-cta-panel :where(h2, p) {
  color: inherit;
}

.mm-eyebrow-light {
  color: #fdba74;
}

.mm-cta-columns {
  position: relative;
  z-index: 1;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-bottom: 0;
}

.mm-cta-panel p {
  margin-bottom: 0;
  color: #cbd5e1;
}

.mm-cta-panel .wp-block-button__link {
  color: #fff;
  background: var(--mm-orange);
}

/* =========================================================
   Single-post reading experience
   ========================================================= */
.single-post .entry-content {
  font-size: 1.075rem;
  line-height: 1.82;
}

.single-post .entry-content > * {
  max-width: var(--mm-reading);
  margin-left: auto;
  margin-right: auto;
}

.single-post .entry-content > .alignwide {
  max-width: 1160px;
}

.single-post .entry-content > .alignfull {
  max-width: none;
}

.single-post .entry-content h2 {
  margin-top: 2.4em;
  letter-spacing: -.025em;
}

.single-post .entry-content h3 {
  margin-top: 1.9em;
  letter-spacing: -.02em;
}

.single-post .entry-content blockquote {
  border-left: 4px solid var(--mm-orange-bright);
  padding-left: 1.2rem;
  color: #475569;
}

.single-post .entry-content pre {
  overflow-x: auto;
  border-radius: 14px;
}

/* =========================================================
   Responsive — tested around common desktop/tablet/mobile widths
   ========================================================= */
@media (max-width: 1100px) {
  .mm-hero-title {
    font-size: clamp(3.25rem, 6.5vw, 5rem) !important;
  }

  .mm-feature-card {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  }
}

@media (max-width: 900px) {
  :root {
    --mm-section-space: clamp(4rem, 8vw, 5.5rem);
  }

  .mm-hero {
    min-height: auto;
  }

  .mm-hero-columns,
  .mm-search-columns,
  .mm-about-columns,
  .mm-cta-columns {
    flex-wrap: wrap !important;
  }

  .mm-hero-columns > .wp-block-column,
  .mm-search-columns > .wp-block-column,
  .mm-about-columns > .wp-block-column,
  .mm-cta-columns > .wp-block-column {
    flex-basis: 100% !important;
  }

  .mm-hero-columns {
    gap: 2.1rem;
  }

  .mm-hero-title {
    max-width: 760px;
    font-size: clamp(3.4rem, 9vw, 5.2rem) !important;
  }

  .mm-hero-copy {
    max-width: 720px;
  }

  .mm-hero-visual img {
    width: min(82%, 610px);
  }

  .mm-search-columns {
    gap: 1rem;
  }

  .mm-feature-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .mm-feature-image {
    min-height: 0;
    aspect-ratio: 16 / 8.5;
  }

  .mm-feature-copy {
    padding: clamp(1.8rem, 5vw, 3rem);
  }

  .mm-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .mm-topic-cloud {
    justify-content: flex-start !important;
    padding: 0;
  }

  .mm-cta-panel .wp-block-buttons {
    justify-content: flex-start !important;
  }
}

@media (max-width: 781px) {
  .mm-hero > .mm-shell {
    padding-top: 3.8rem;
    padding-bottom: 3.8rem;
  }

  .mm-section-heading {
    margin-bottom: 2.25rem;
  }

  .mm-about-panel,
  .mm-cta-panel {
    border-radius: 24px;
  }
}

@media (max-width: 600px) {
  :root {
    --mm-gutter: 18px;
    --mm-section-space: 3.9rem;
  }

  .mm-hero::before {
    background-size: 42px 42px;
  }

  .mm-hero::after {
    right: -18rem;
    width: 36rem;
    height: 36rem;
  }

  .mm-hero > .mm-shell {
    padding-top: 3.2rem;
    padding-bottom: 3.3rem;
  }

  .mm-hero-title {
    margin-bottom: 1.25rem;
    font-size: clamp(2.7rem, 13vw, 3.8rem) !important;
    line-height: 1;
  }

  .mm-hero-copy {
    margin-bottom: 1.6rem;
    font-size: 1.05rem !important;
    line-height: 1.62;
  }

  .mm-hero-actions {
    width: 100%;
  }

  .mm-hero-actions .wp-block-button {
    flex: 1 1 100%;
    width: 100%;
  }

  .mm-hero-actions .wp-block-button__link {
    width: 100%;
  }

  .mm-hero-visual img {
    width: min(100%, 520px);
  }

  .mm-search-inner {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .mm-search-title {
    font-size: 1.15rem;
  }

  .mm-search .wp-block-search__inside-wrapper {
    padding-left: 14px;
  }

  .mm-feature-card,
  .mm-post-card {
    border-radius: 18px;
  }

  .mm-feature-image {
    aspect-ratio: 16 / 10;
  }

  .mm-feature-copy {
    padding: 1.45rem;
  }

  .mm-feature-copy .wp-block-post-title {
    font-size: clamp(1.7rem, 8vw, 2.2rem) !important;
  }

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

  .mm-post-card-body {
    padding: 1.25rem;
  }

  .mm-about-panel,
  .mm-cta-panel {
    padding-top: 1.8rem;
    padding-bottom: 1.8rem;
    border-radius: 20px;
  }

  .mm-cta-panel .wp-block-button,
  .mm-cta-panel .wp-block-button__link {
    width: 100%;
  }
}

@media (max-width: 430px) {
  :root {
    --mm-gutter: 15px;
  }

  .mm-hero-title {
    font-size: clamp(2.45rem, 12.5vw, 3.2rem) !important;
    letter-spacing: -.045em;
  }

  .mm-eyebrow {
    font-size: .76rem;
    letter-spacing: .13em;
  }

  .mm-pagination {
    gap: .3rem;
  }

  .mm-pagination a,
  .mm-pagination .page-numbers {
    min-width: 38px;
    min-height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
