
/* =========================================
   STYLEWISE — GLOBAL HOMEPAGE LAYOUT
   ========================================= */

/* Consistent box sizing */
.home .entry-content *,
.home .wp-block-post-content * {
  box-sizing: border-box;
}

/* CENTRED CONTENT WIDTH
   Applies to Gutenberg blocks and plugin blocks */
body.home .entry-content > *,
body.home .wp-block-post-content > * {
  width: calc(100% - clamp(44px, 8vw, 130px));
  max-width: 1500px;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Preserve intentional full-width blocks */
body.home .entry-content > .alignfull,
body.home .wp-block-post-content > .alignfull {
  width: 100%;
  max-width: none;
}

/* Prevent horizontal overflow */
body.home {
  overflow-x: clip;
}

/* =========================================
   STYLEWISE — HERO
   ========================================= */

.sw-home {
  --sw-lime: #76ad3a;
  --sw-green: #52ac75;
  --sw-forest: #2e6b57;
  --sw-teal: #265c6b;
  --sw-ink: #26332e;
  --sw-paper: #fffefa;
  --sw-soft: #f2f7f1;
  --sw-line: #dce6dc;
  --sw-serif: Georgia, "Times New Roman", serif;

  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0;
  color: var(--sw-ink);
  font-family: inherit;
  line-height: 1.65;
}

.sw-home * {
  box-sizing: border-box;
}

.sw-home a {
  color: inherit;
}

.sw-home .sw-eyebrow {
  color: var(--sw-forest);
  font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.sw-home .sw-squiggle {
  display: block;
  width: 94px;
  height: 25px;
  margin: 0 0 15px;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 32'%3E%3Cpath d='M2 18 C14 -1 25 34 39 16 S62 1 70 17 S94 33 118 8' fill='none' stroke='%2376ad3a' stroke-width='2.3' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Hero grid */
.sw-home .sw-hero {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 28px;
  margin: 28px 0 46px;
  align-items: stretch;
}

.sw-home .sw-hero-copy {
  background: var(--sw-soft);
  padding: clamp(28px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sw-home h1 {
  color: var(--sw-teal);
  font: 500 clamp(43px, 6vw, 76px)/.94 var(--sw-serif);
  letter-spacing: -.045em;
  margin: 4px 0 18px;
}

.sw-home h1 em {
  color: var(--sw-green);
  font-weight: 400;
}

.sw-home .sw-hero-copy > p {
  font-size: 16px;
  max-width: 440px;
  margin: 0 0 25px;
}

.sw-home .sw-button {
  display: inline-block;
  align-self: flex-start;
  background: var(--sw-teal);
  color: white !important;
  padding: 12px 17px;
  text-decoration: none;
  font: 600 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
  transition: background .2s;
}

.sw-home .sw-button:hover {
  background: var(--sw-forest);
}

.sw-home .sw-hero-image {
  min-height: 390px;
  position: relative;
  background: #dfe9df;
  overflow: hidden;
}

.sw-home .sw-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
}

.sw-home .sw-sticker {
  position: absolute;
  right: 17px;
  top: 17px;
  width: 106px;
  height: 106px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 13px;
  background: var(--sw-lime);
  color: #173d35;
  font: 600 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  transform: rotate(8deg);
}

.sw-home .sw-image-caption {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: rgba(255,254,250,.9);
  padding: 7px 12px;
  font: 11px ui-monospace, monospace;
  color: var(--sw-ink);
}

/* Announcement ticker */
.sw-home .sw-ticker {
  background: var(--sw-forest);
  color: #fff;
  padding: 10px 15px;
  text-align: center;
  font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* =========================================
   STYLEWISE — INTRO SECTIONS
   ========================================= */

/* First introduction */
.sw-home .sw-intro {
  max-width: 760px;
  text-align: center;
  margin: 58px auto 54px;
  padding: 0 18px;
}

.sw-home .sw-intro .sw-squiggle {
  margin: 0 auto 12px;
}

.sw-home .sw-intro h2 {
  color: var(--sw-teal);
  font: 500 clamp(31px, 4vw, 45px)/1.06 var(--sw-serif);
  letter-spacing: -.02em;
  margin: 0;
}

.sw-home .sw-intro p {
  max-width: 620px;
  margin: 16px auto 0;
  font-size: 14px;
}

/* Second introduction */
.sw-topic-intro {
  background: #fffefa;
  padding: 75px 24px 80px;
  text-align: center;
  width: 100%;
}

.sw-topic-intro-inner {
  max-width: 850px;
  margin: 0 auto;
}

.sw-topic-intro .sw-eyebrow {
  font-family: Arial, sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #76ad3a;
  margin-bottom: 20px;
}

.sw-topic-intro h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.2;
  color: #265c6b;
  margin: 0 auto 22px;
}

.sw-topic-intro h2 em {
  color: #52ac75;
  font-weight: 400;
  font-style: italic;
}

.sw-topic-intro-accent {
  width: 48px;
  height: 3px;
  background: #76ad3a;
  margin: 0 auto 24px;
}

.sw-topic-intro p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.8;
  color: #26332e;
  max-width: 680px;
  margin: 0 auto;
}

/* =========================================
   FLEX POSTS PLUGIN
   ========================================= */

/* Keep plugin content within page margins */
body.home .wp-block-flex-posts-list {
  width: calc(100% - clamp(44px, 8vw, 130px));
  max-width: 1500px;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Images should not exceed their cards */
body.home .wp-block-flex-posts-list img {
  max-width: 100%;
  height: auto;
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */

@media (max-width: 760px) {
  .sw-home .sw-hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .sw-home .sw-hero-image,
  .sw-home .sw-hero-image img {
    min-height: 300px;
  }
}

@media (max-width: 600px) {
  .sw-home .sw-hero-copy {
    padding: 28px 23px;
  }

  .sw-home .sw-intro {
    padding: 0 10px;
  }

  .sw-topic-intro {
    padding: 55px 22px 60px;
  }

  .sw-topic-intro h2 {
    font-size: clamp(30px, 8vw, 38px);
  }

  .sw-topic-intro p {
    font-size: 16px;
    line-height: 1.7;
  }
}
