/*
Theme Name: Evil Speculator Redesign
Description: Editorial Market Mayhem child theme prototype for Blocksy.
Author: Evil Speculator
Template: blocksy
Version: 1.0.2
Text Domain: evil-speculator-redesign
*/

@font-face {
  font-family: "Anton";
  src: url("assets/fonts/Anton-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/IBMPlexSans-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --es-paper: #e8e5dc;
  --es-paper-light: #f2f0e9;
  --es-ink: #171817;
  --es-muted: #635b4f;
  --es-orange: #e8461e;
  --es-red: #bd2e19;
  --es-green: #00b86b;
  --es-rule: rgba(23, 24, 23, 0.42);
  --es-shell: min(1440px, calc(100% - 48px));
  --es-shadow: 0 6px 18px rgba(30, 20, 12, 0.12);
}

* { box-sizing: border-box; }

html { background: #151616; }

body {
  margin: 0;
  color: var(--es-ink);
  background: var(--es-paper);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

body.es-redesign-theme .ct-header,
body.es-redesign-theme .ct-footer {
  display: none !important;
}

body.es-redesign-theme {
  background-color: var(--es-paper);
  background-image: linear-gradient(rgba(255, 255, 255, .3), rgba(255, 255, 255, .3)), url("assets/images/paper-texture.webp");
  background-position: center top, center top;
  background-size: auto, 900px auto;
  background-repeat: no-repeat, repeat;
  color: var(--es-ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif !important;
}

body.es-redesign-theme:not(.es-redesign-page) {
  background-color: var(--es-paper);
  background-image: linear-gradient(rgba(255, 255, 255, .3), rgba(255, 255, 255, .3)), url("assets/images/paper-texture.webp");
  background-position: center top, center top;
  background-size: auto, 1350px auto;
  background-repeat: no-repeat, repeat;
}

.es-global-shell { width: var(--es-shell); margin: 0 auto; }
body.es-redesign-theme .site-main { background: transparent; }
body.es-redesign-theme .entry-header :where(h1, h2, h3, p, a, li, span),
body.es-redesign-theme .entry-content :where(h1, h2, h3, h4, h5, h6, p, a, li, blockquote, figcaption, span) {
  color: var(--es-ink) !important;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}
body.es-redesign-theme .entry-header h1,
body.es-redesign-theme .entry-content :where(h1, h2, h3, h4, h5, h6) {
  font-family: "Anton", Impact, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
}
body.es-redesign-theme .entry-header h1 {
  font-size: clamp(3.5rem, 4vw, 4.5rem) !important;
  line-height: .95;
}
body.es-redesign-theme .entry-content {
  font-size: 1.4375rem;
  line-height: 1.75;
}
body.es-redesign-theme .entry-content :where(p, li, blockquote, figcaption) {
  font-size: 1em !important;
}
body.es-redesign-theme .entry-content a { color: var(--es-orange) !important; }
body.es-redesign-theme .entry-content img { max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

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

.es-site {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background-color: var(--es-paper);
  background-image: linear-gradient(rgba(255, 255, 255, .3), rgba(255, 255, 255, .3)), url("assets/images/paper-texture.webp");
  background-position: center top, center top;
  background-size: auto, 900px auto;
  background-repeat: no-repeat, repeat;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}

.es-site::before {
  position: fixed;
  z-index: 10;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.07;
  background: url("assets/images/grunge-overlay.png") center / cover repeat;
  mix-blend-mode: multiply;
}

.es-shell { width: var(--es-shell); margin: 0 auto; }

.es-masthead {
  display: block;
  padding: 0 0 7px;
  border-bottom: 2px solid var(--es-ink);
}

.es-masthead-row { display: grid; grid-template-columns: minmax(420px, 43%) minmax(0, 1fr); align-items: start; }
.es-masthead-logo { position: relative; z-index: 3; display: block; margin: 14px -80px 0 0; }
.es-lockup { width: min(620px, calc(100% + 80px)); height: auto; }
.es-masthead-right { min-width: 0; }

.es-hero h2,
.es-card h3,
.es-dungeon h2,
.es-rpq h2 {
  margin: 0;
  font-family: "Anton", Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.es-nav { display: flex; align-items: center; justify-content: flex-end; gap: 26px; font-weight: 700; font-size: 1.1rem; text-transform: uppercase; }
.es-nav a:hover { color: var(--es-orange); }
.es-nav-search { font-size: 1.3rem; line-height: 1; }
.es-cta, .es-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: var(--es-orange); color: #fff; cursor: pointer; font: 700 0.82rem "Inter", sans-serif; letter-spacing: 0.05em; text-transform: uppercase; }
.es-cta { padding: 11px 16px; }
.es-nav .es-cta { font-size: 1.35rem; }
.es-cta:hover, .es-button:hover { background: var(--es-red); }

.es-street-banner { position: relative; height: 245px; overflow: hidden; }
.es-street-banner-image { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.es-street-quote { position: absolute; right: 18px; top: 22px; width: min(230px, 30%); margin: 0; padding: 8px 10px; background: rgba(242, 240, 233, .86); color: var(--es-ink); font: 1.1rem/1.3 Georgia, serif; }
.es-quote-attribution { display: inline-block; margin-top: 5px; font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.es-sidebar-quote { margin: 0; font-family: Georgia, serif; font-size: 1.1rem; line-height: 1.35; }
.es-sidebar-box .es-quote-attribution { margin-top: 14px; }

.es-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(0, 1.07fr);
  gap: 22px;
  align-items: stretch;
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--es-rule);
}

.es-kicker { display: inline-block; padding: 4px 10px; background: var(--es-orange); color: #fff !important; font: 700 1rem "Inter", sans-serif; letter-spacing: 0.08em; text-transform: uppercase; }
.es-hero h2 { margin-top: 10px; font-size: clamp(2.6rem, 5.8vw, 6.7rem); line-height: 0.91; }
.es-hero-title-line { display: block; }
.es-hero-title-line:first-child { font-size: clamp(3rem, 7vw, 7.9rem); }
.es-hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 0 0 10px 0; }
.es-dek { max-width: 650px; margin: 18px 0 20px; font-family: Georgia, serif; font-size: clamp(1.12rem, 1.65vw, 1.5rem); line-height: 1.28; }
.es-hero-info { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.es-hero-info .es-meta, .es-hero-info > p:last-child { margin: 0; }
.es-meta { color: var(--es-muted); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.es-meta strong { color: var(--es-ink); }
.es-hero-image { min-height: 420px; border: 2px solid var(--es-ink); box-shadow: var(--es-shadow); overflow: hidden; }
.es-hero-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.es-hero-image { clip-path: none; -webkit-mask-image: url("assets/images/featured-image-mask.webp"); mask-image: url("assets/images/featured-image-mask.webp"); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }

.es-site :where(.es-masthead, .es-hero, .es-main-grid, .es-category-row, .es-footer) :where(h1, h2, h3, p, a, span, strong, small) { color: var(--es-ink); }
.es-site .es-masthead,
.es-site .es-hero,
.es-site .es-main-grid,
.es-site .es-category-row,
.es-site .es-footer { color: var(--es-ink) !important; }
.es-site .es-hero h2,
.es-site .es-hero p,
.es-site .es-card h3,
.es-site .es-card p,
.es-site .es-category h3,
.es-site .es-category p,
.es-site .es-footer a { color: var(--es-ink) !important; }
.es-site .es-rpq,
.es-site .es-rpq h2,
.es-site .es-rpq p { color: var(--es-ink) !important; }
.es-site .es-rpq .es-button { color: #fff; }
.es-site .es-hero h2 a { color: inherit !important; }
.es-site .es-button,
.es-site .es-button:hover,
.es-site .es-cta,
.es-site .es-cta:hover { color: #fff !important; }
.es-site .es-button span,
.es-site .es-cta span { color: #fff !important; }
.es-site .es-ticker :where(span, strong),
.es-site .es-profit :where(h3, span, strong),
.es-site .es-dungeon :where(h2, h3, p, span, strong) { color: inherit; }

.es-ticker { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0 0 22px; background: var(--es-ink); color: #fff; }
.es-ticker-item { min-width: 0; padding: 12px 14px; border-right: 1px solid rgba(255,255,255,.28); }
.es-ticker-item:last-child { border-right: 0; }
.es-ticker-label { display: block; font-family: "Anton", Impact, sans-serif; font-size: 1.1rem; letter-spacing: .03em; }
.es-ticker-value { display: flex; gap: 8px; align-items: baseline; font-size: .88rem; font-weight: 600; }
.es-up { color: var(--es-green); }
.es-down { color: #ff4b2a; }
.es-spark { width: 74px; height: 24px; margin-left: auto; opacity: .95; }

.es-main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.es-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.es-card { border-top: 2px solid var(--es-ink); padding-top: 10px; }
.es-card-image { display: block; aspect-ratio: 1.33; border: 1px solid var(--es-ink); overflow: hidden; background: #252526; }
.es-card-image img { width: 100%; height: 100%; object-fit: cover; }
.es-card h3 { margin-top: 8px; font-size: clamp(1.45rem, 2.6vw, 2.2rem); line-height: .98; }
.es-card p { margin: 8px 0 14px; font-size: 1.2rem; line-height: 1.35; }
.es-card .es-meta { font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: .78rem; line-height: 1.25; letter-spacing: .06em; }
.es-more { display: flex; justify-content: center; margin: 24px 0 8px; }
.es-button { padding: 12px 22px; }
.es-hero .es-button { font-size: 1rem; }
.es-button[disabled] { opacity: .45; cursor: default; }

.es-entry-featured { margin: 0 0 2.5rem; border: 1px solid var(--es-ink); box-shadow: var(--es-shadow); }
.es-entry-featured-image { display: block; width: 100%; height: auto; }
.ct-author-name .ct-media-container-static, .ct-author-name .ct-media-container-static img { border-radius: 50%; overflow: hidden; }

.es-sidebar { display: grid; gap: 18px; }
.es-sidebar-box { border: 1px solid var(--es-ink); padding: 18px; background: rgba(255, 255, 255, .34); }
.es-rpq { background: #f0d399; box-shadow: var(--es-shadow); }
.es-rpq h2 { font-size: 3.2rem; line-height: 1; }
.es-rpq p { margin: 12px 0 18px; }
.es-profit { background: var(--es-ink); color: #fff; }
.es-profit h3 { margin: 0; font-family: "Anton", Impact, sans-serif; font-size: 1.7rem; font-weight: 400; text-transform: uppercase; }
.es-profit-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: #e9dbc0; font-size: .78rem; }
.es-profit svg { width: 100%; height: 86px; margin: 14px 0 4px; }
.es-graph-link { display: block; margin: 14px 0 4px; cursor: zoom-in; }
.es-graph-link img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: #000; }
.es-lightbox { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; padding: 5vw; background: rgba(8, 8, 8, .88); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; }
.es-lightbox.is-open { opacity: 1; visibility: visible; }
.es-lightbox-dialog { position: relative; display: grid; place-items: center; max-width: min(1200px, 96vw); max-height: 92vh; }
.es-lightbox-image { display: block; max-width: 100%; max-height: 84vh; width: auto; height: auto; object-fit: contain; box-shadow: 0 18px 70px rgba(0,0,0,.5); }
.es-lightbox-caption { margin-top: 12px; color: #fff; font: 600 .95rem/1.3 "Inter", sans-serif; text-align: center; }
.es-lightbox-close { position: absolute; top: -42px; right: -4px; border: 0; background: transparent; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
body.es-lightbox-open { overflow: hidden; }
.es-status { color: var(--es-green); font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.es-category-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 28px 324px 30px 0; }
.es-category { display: grid; grid-template-columns: minmax(0, 1fr) 42%; gap: 12px; align-items: center; border-top: 1px solid var(--es-rule); padding-top: 12px; }
.es-category h3 { margin: 5px 0 0; font: 400 1.65rem/1 "Anton", Impact, sans-serif; text-transform: uppercase; }
.es-category p { margin: 8px 0 0; font-size: .78rem; }
.es-category-image { aspect-ratio: .9; overflow: hidden; border: 1px solid var(--es-ink); }
.es-category-image img { width: 100%; height: 100%; object-fit: cover; object-position: 60% center; }

.es-dungeon { margin: 0 calc((100vw - 100%) / -2); padding: 26px max(24px, calc((100vw - var(--es-shell)) / 2)); background: var(--es-ink); color: #fff; }
.es-dungeon-inner { display: grid; grid-template-columns: 1.15fr repeat(3, 1fr); gap: 22px; }
.es-dungeon h2 { color: #fff; font-size: 2.3rem; line-height: .95; }
.es-dungeon-card { border-left: 1px solid rgba(255,255,255,.45); padding-left: 18px; }
.es-dungeon-card h3 { margin: 0 0 8px; font-size: 1rem; }
.es-dungeon-card p { margin: 0; color: #ddd1ba; font-size: .82rem; }
.es-dungeon-card .es-meta { display: block; margin-top: 16px; color: var(--es-orange); }

.es-footer { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; padding: 24px 0 28px; }
.es-footer-brand { display: block; }
.es-footer-lockup { width: min(390px, 100%); height: auto; }
.es-footer-nav { display: flex; justify-content: center; gap: 18px; font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.es-footer-legal { font-size: .7rem; text-align: right; }

@media (max-width: 1080px) {
  :root { --es-shell: min(100% - 32px, 920px); }
  .es-masthead-row { grid-template-columns: minmax(300px, 38%) minmax(0, 1fr); }
  .es-masthead-logo { margin-right: -50px; }
  .es-main-grid { grid-template-columns: 1fr; }
  .es-category-row { margin-right: 0; }
  .es-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .es-dungeon-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  :root { --es-shell: calc(100% - 24px); }
  .es-masthead-row { display: block; }
  .es-masthead-logo { margin: 10px 0 0; }
  .es-lockup { width: min(480px, 100%); }
  .es-nav { flex-wrap: wrap; justify-content: flex-start; gap: 10px 14px; font-size: .85rem; }
  .es-nav .es-cta { font-size: 1.1rem; }
  .es-nav a:nth-child(n+4) { display: none; }
  .es-street-banner { height: 170px; }
  .es-street-quote { right: 8px; top: 10px; width: 42%; padding: 5px 7px; font-size: .82rem; }
  .es-hero { grid-template-columns: 1fr; }
  .es-hero-copy { padding-left: 0; }
  .es-hero h2 { font-size: clamp(3.1rem, 14vw, 6rem); }
  .es-hero-title-line:first-child { font-size: clamp(3.5rem, 17vw, 6.8rem); }
  .es-hero-info { align-items: flex-start; flex-wrap: wrap; }
  body.es-redesign-theme .entry-header h1 { font-size: clamp(3rem, 12vw, 4.2rem) !important; }
  body.es-redesign-theme .entry-content { font-size: 1.25rem; }
  .es-hero-image { min-height: 250px; }
  .es-ticker { grid-template-columns: repeat(3, 1fr); }
  .es-ticker-item { padding: 9px 10px; }
  .es-spark { display: none; }
  .es-post-grid, .es-category-row, .es-sidebar { grid-template-columns: 1fr; }
  .es-category { grid-template-columns: 1fr 35%; }
  .es-dungeon-inner { grid-template-columns: 1fr; }
  .es-dungeon-card { border-left: 0; border-top: 1px solid rgba(255,255,255,.45); padding: 16px 0 0; }
  .es-footer { grid-template-columns: 1fr; }
  .es-footer-nav { justify-content: flex-start; flex-wrap: wrap; }
  .es-footer-legal { text-align: left; }
}
