/*
Theme Name: Essentialsify Labs
Theme URI: https://essentialsify.com/
Author: Essentialsify
Description: Elementor-ready ruby black theme for Essentialsify Labs and AI cosmetic formula tools.
Version: 2.0.0
Text Domain: essentialsify-labs
*/

:root {
  --ruby: #ff0808;
  --ruby-deep: #9b0000;
  --wine: #3b0000;
  --jet: #020303;
  --charcoal: #090b0d;
  --smoke: #141414;
  --text: #f4f0f0;
  --muted: #b8a8a8;
  --line: rgba(255, 8, 8, .28);
  --panel: rgba(9, 11, 13, .92);
  --shadow: 0 34px 90px rgba(0, 0, 0, .62);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--jet);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 4%, rgba(255, 8, 8, .24), transparent 30rem),
    radial-gradient(circle at 92% 18%, rgba(155, 0, 0, .18), transparent 28rem),
    linear-gradient(115deg, var(--jet), var(--charcoal) 48%, var(--jet));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    linear-gradient(rgba(255, 8, 8, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 8, 8, .035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 78%);
}

a {
  color: inherit;
}

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

.ess-site {
  min-height: 100vh;
}

.ess-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.ess-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 3, 3, .9);
  backdrop-filter: blur(18px);
}

.admin-bar .ess-header {
  top: 32px;
}

.ess-nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ess-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ess-mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--ruby);
  border-radius: 13px;
  background:
    radial-gradient(circle at 32% 18%, var(--ruby), var(--ruby-deep) 36%, var(--wine) 56%, var(--jet) 74%);
  box-shadow: 0 0 38px rgba(255, 8, 8, .42);
  transform: rotate(-12deg);
}

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

.ess-menu a {
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
}

.ess-menu a:hover {
  color: var(--text);
}

.ess-button,
.ess-menu .ess-cta a,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 13px 20px;
  border: 1px solid var(--ruby);
  border-radius: 8px;
  color: var(--text);
  background: linear-gradient(135deg, var(--ruby), var(--ruby-deep) 58%, var(--wine));
  box-shadow: 0 18px 46px rgba(255, 8, 8, .28);
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.ess-button.ghost {
  background: rgba(20, 20, 20, .72);
  box-shadow: none;
}

.ess-hero {
  min-height: calc(100vh - 82px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr);
  align-items: center;
  gap: 58px;
  padding: 72px 0 42px;
}

.ess-kicker {
  display: block;
  color: var(--ruby);
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .32em;
  text-transform: uppercase;
}

.ess-hero h1,
.ess-page-hero h1 {
  margin: 18px 0 22px;
  font-size: clamp(3.2rem, 8vw, 7.6rem);
  line-height: .88;
  letter-spacing: 0;
}

.ess-red {
  color: var(--ruby);
  text-shadow: 0 0 38px rgba(255, 8, 8, .4);
}

.ess-lead {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
}

.ess-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.ess-hero-panel {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 8, 8, .3), transparent 25%),
    linear-gradient(145deg, rgba(20,20,20,.96), rgba(2,3,3,.98));
  box-shadow: var(--shadow);
}

.ess-motion-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ess-lab-card {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ess-lab-card span {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2,3,3,.72);
  color: var(--muted);
  font-weight: 850;
}

.ess-section {
  padding: 86px 0;
}

.ess-section-header {
  max-width: 760px;
  margin-bottom: 30px;
}

.ess-section-header h2,
.ess-page-hero h1,
.ess-tool-panel h2 {
  margin: 12px 0;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: .98;
}

.ess-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ess-card,
.ess-post,
.ess-tool-panel,
.ess-article,
.ess-page-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(20,20,20,.94), rgba(2,3,3,.96)),
    radial-gradient(circle at 0 0, rgba(255,8,8,.12), transparent 30%);
  box-shadow: var(--shadow);
}

.ess-card,
.ess-post {
  padding: 26px;
}

.ess-card h3,
.ess-post h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.ess-card p,
.ess-post p,
.ess-page-card p,
.ess-tool-panel p {
  color: var(--muted);
}

.ess-steps {
  counter-reset: steps;
}

.ess-step {
  position: relative;
  padding-top: 64px;
}

.ess-step::before {
  counter-increment: steps;
  content: "0" counter(steps);
  position: absolute;
  top: 24px;
  left: 24px;
  color: var(--ruby);
  font-weight: 950;
  letter-spacing: .18em;
}

.ess-founder {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 24px;
  align-items: stretch;
}

.ess-founder-portrait {
  min-height: 330px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 36% 24%, rgba(255,8,8,.6), transparent 18%),
    radial-gradient(circle at 58% 54%, rgba(155,0,0,.42), transparent 28%),
    linear-gradient(135deg, var(--smoke), var(--jet));
  box-shadow: var(--shadow);
}

.ess-founder-copy {
  padding: 34px;
}

.ess-blog-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ess-post a {
  text-decoration: none;
}

.ess-post time,
.ess-post span {
  color: var(--ruby);
  font-size: .8rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ess-tool-band {
  padding: 90px 0 110px;
}

.ess-tool-panel {
  padding: clamp(18px, 4vw, 42px);
  overflow: hidden;
}

.ess-tool-panel .essentialsify-product-lab-live,
.ess-tool-panel .esspl-product-lab {
  margin-top: 26px;
}

.ess-page {
  min-height: 72vh;
  padding: 80px 0;
}

.ess-page-hero {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto 36px;
}

.ess-page-card,
.ess-article {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(22px, 5vw, 48px);
}

.ess-article h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: .98;
}

.ess-article :where(p, li) {
  color: var(--muted);
}

.ess-archive-grid {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ess-footer {
  border-top: 1px solid var(--line);
  background: var(--jet);
}

.ess-footer-inner {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

.elementor,
.elementor-page {
  background: transparent;
}

.elementor-section,
.elementor-container,
.entry-content {
  color: var(--text);
}

@media (max-width: 980px) {
  .admin-bar .ess-header {
    top: 46px;
  }

  .ess-nav {
    min-height: auto;
    padding: 18px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .ess-menu {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .ess-hero,
  .ess-founder {
    grid-template-columns: 1fr;
  }

  .ess-hero {
    padding-top: 44px;
  }

  .ess-hero-panel {
    min-height: 420px;
  }

  .ess-grid,
  .ess-blog-row,
  .ess-archive-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ess-wrap {
    width: min(100% - 28px, 1180px);
  }

  .ess-menu {
    gap: 14px;
  }

  .ess-hero h1,
  .ess-page-hero h1 {
    font-size: clamp(2.8rem, 15vw, 4.4rem);
  }

  .ess-hero-panel {
    min-height: 360px;
    border-radius: 18px;
  }

  .ess-lab-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
    grid-template-columns: 1fr;
  }

  .ess-lab-card span {
    min-height: auto;
  }

  .ess-section {
    padding: 58px 0;
  }
}
