/* ═══════════════════════════════════════════════════════════
   EMMpress Blocks · blocks-frontend.css v1.0
   All blocks use --emm-* CSS variables from the theme.
   Fallbacks included so blocks work even without the theme.
═══════════════════════════════════════════════════════════ */

/* Palette fallbacks (theme overrides these via :root) */
:root {
  --emm-teal:   #4a9a96;
  --emm-red:    #d63b1f;
  --emm-navy:   #1a2535;
  --emm-ochre:  #b8962a;
  --emm-sage:   #5a6b58;
  --emm-paper:  #f5f2ec;
  --emm-sand:   #e8d9a8;
  --emm-warm:   #ece7db;
  --emm-ink:    #1a2535;
  --emm-muted:  #7a7f7e;
  --emm-line:   rgba(26,37,53,.09);
}

/* ── BASE BLOCK RESET ────────────────────────────────────── */
.emm-block {
  padding: 24px;       /* minimum 20px on all sides per spec */
  box-sizing: border-box;
}
/* Remove padding for layout blocks that manage their own spacing */
.emm-hero, .emm-wide-banner { padding: 0; }

/* ══════════════════════════════════════════════════════════
   EMM HERO
══════════════════════════════════════════════════════════ */
.emm-hero {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background-color: var(--emm-navy);
  background-size: cover; background-position: center;
  overflow: hidden;
}
.emm-hero__overlay {
  position: absolute; inset: 0;
  background: var(--emm-navy);
  pointer-events: none;
}
.emm-hero__inner {
  position: relative; z-index: 1;
  text-align: center;
  padding: 48px 32px;
  max-width: 860px; margin-inline: auto;
}
.emm-hero__heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 900; line-height: .95; letter-spacing: -.03em;
  color: #fff; margin: 0 0 1rem;
}
.emm-hero__subtext {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-style: italic; color: rgba(255,255,255,.8);
  max-width: 44ch; margin: 0 auto 2rem;
}
.emm-hero__btn {
  display: inline-flex; align-items: center;
  font-family: 'DM Mono', monospace; font-size: .7rem;
  text-transform: uppercase; letter-spacing: .18em;
  text-decoration: none; color: var(--emm-navy);
  background: var(--emm-sand); border: 1px solid var(--emm-sand);
  padding: .85rem 1.6rem; transition: background .2s, color .2s;
}
.emm-hero__btn:hover { background: var(--emm-teal); color: #fff; border-color: var(--emm-teal); }

/* ══════════════════════════════════════════════════════════
   EMM PULL QUOTE
══════════════════════════════════════════════════════════ */
.emm-pullquote {
  border-top: 1px solid var(--emm-line);
  border-bottom: 1px solid var(--emm-line);
  padding: 32px 28px;
  margin: 0;
}
.emm-pullquote--center { text-align: center; }
.emm-pullquote--right  { text-align: right; }
.emm-pullquote__quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  font-style: italic; font-weight: 400;
  line-height: 1.4; color: var(--emm-navy);
  border-left: 3px solid var(--emm-ochre);
  padding-left: 1.4rem; margin: 0;
}
.emm-pullquote--center .emm-pullquote__quote,
.emm-pullquote--right  .emm-pullquote__quote { border-left: none; padding-left: 0; }
.emm-pullquote--center .emm-pullquote__quote { border-top: 2px solid var(--emm-ochre); padding-top: 1rem; }
.emm-pullquote__cite {
  display: block; margin-top: .9rem;
  font-family: 'DM Mono', monospace; font-size: .62rem;
  text-transform: uppercase; letter-spacing: .18em; color: var(--emm-muted);
}

/* ══════════════════════════════════════════════════════════
   EMM QUOTE BOX
══════════════════════════════════════════════════════════ */
.emm-quote-box {
  background: var(--emm-warm);
  padding: 40px 36px;
  margin: 0; text-align: center;
  position: relative;
}
.emm-quote-box__mark {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 8rem; line-height: .6; font-weight: 900;
  color: var(--emm-teal); opacity: .35; user-select: none;
}
.emm-quote-box__mark--open  { margin-bottom: .5rem; }
.emm-quote-box__mark--close { margin-top: .5rem; }
.emm-quote-box__quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.45rem, 2.6vw, 2.2rem);
  font-style: italic; font-weight: 300;
  line-height: 1.52; color: var(--emm-navy);
  border: none; padding: 0; margin: 0;
  max-width: 36ch; margin-inline: auto;
}
.emm-quote-box__cite {
  display: block; margin-top: 1.2rem;
  font-family: 'DM Mono', monospace; font-size: .62rem;
  text-transform: uppercase; letter-spacing: .18em; color: var(--emm-muted);
}

/* ══════════════════════════════════════════════════════════
   EMM CODE BOX
══════════════════════════════════════════════════════════ */
.emm-code-box {
  background: var(--emm-paper);
  border: 1px solid var(--emm-line);
  border-left: 3px solid var(--emm-teal);
  margin: 0; padding: 0;
  overflow: hidden;
}
.emm-code-box__caption {
  font-family: 'DM Mono', monospace; font-size: .6rem;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--emm-muted); padding: .7rem 1.4rem;
  border-bottom: 1px solid var(--emm-line);
  background: var(--emm-warm);
}
.emm-code-box__pre {
  margin: 0; padding: 24px 28px;
  overflow-x: auto; background: transparent;
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: .88rem; line-height: 1.72;
  color: var(--emm-navy);
  white-space: pre; tab-size: 2;
}
.emm-code-box__pre code { font: inherit; background: none; padding: 0; }

/* ══════════════════════════════════════════════════════════
   EMM MASONRY GALLERY
══════════════════════════════════════════════════════════ */
.emm-masonry-gallery {
  columns: var(--emm-gallery-cols, 3);
  column-gap: 12px;
  padding: 0; /* gallery handles its own spacing */
}
.emm-masonry-gallery--empty { text-align: center; color: var(--emm-muted); font-style: italic; }
.emm-masonry-gallery__item {
  break-inside: avoid;
  margin: 0 0 12px;
  position: relative;
}
.emm-masonry-gallery__link { display: block; }
.emm-masonry-gallery__img {
  width: 100%; height: auto; display: block;
  transition: transform .38s ease;
}
.emm-masonry-gallery__item:hover .emm-masonry-gallery__img { transform: scale(1.02); }
.emm-masonry-gallery__caption {
  font-family: 'DM Mono', monospace; font-size: .56rem;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--emm-muted); padding: .5rem .3rem;
}
@media (max-width: 680px) {
  .emm-masonry-gallery { columns: 2; }
}
@media (max-width: 480px) {
  .emm-masonry-gallery { columns: 1; }
}

/* ══════════════════════════════════════════════════════════
   EMM BEFORE & AFTER
══════════════════════════════════════════════════════════ */
.emm-before-after {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3px; background: var(--emm-line);
  padding: 0;
}
.emm-before-after__panel {
  position: relative; background: var(--emm-warm); overflow: hidden;
}
.emm-before-after__img { width: 100%; height: auto; display: block; }
.emm-before-after__placeholder { aspect-ratio: 4/3; background: var(--emm-warm); }
.emm-before-after__label {
  position: absolute; bottom: 0; left: 0; right: 0;
  font-family: 'DM Mono', monospace; font-size: .58rem;
  text-transform: uppercase; letter-spacing: .16em;
  color: #fff; background: rgba(26,37,53,.65);
  padding: .55rem .8rem; text-align: center;
}
@media (max-width: 640px) {
  .emm-before-after { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   EMM CALLOUT
══════════════════════════════════════════════════════════ */
.emm-callout {
  display: flex; gap: 1.2rem; align-items: flex-start;
  padding: 24px 28px;
  border-left: 3px solid var(--emm-teal);
  background: rgba(74,154,150,.06);
}
.emm-callout--tip     { border-color: var(--emm-teal);  background: rgba(74,154,150,.07); }
.emm-callout--warning { border-color: var(--emm-red);   background: rgba(214,59,31,.06); }
.emm-callout--insight { border-color: var(--emm-ochre); background: rgba(184,150,42,.06); }
.emm-callout--note    { border-color: var(--emm-navy);  background: rgba(26,37,53,.04); }
.emm-callout__icon {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem; line-height: 1; color: var(--emm-teal);
  flex-shrink: 0; margin-top: .1rem;
}
.emm-callout--warning .emm-callout__icon { color: var(--emm-red); }
.emm-callout--insight .emm-callout__icon { color: var(--emm-ochre); }
.emm-callout--note    .emm-callout__icon { color: var(--emm-navy); }
.emm-callout__title {
  font-family: 'DM Mono', monospace; font-size: .64rem;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--emm-navy); margin: 0 0 .4rem;
}
.emm-callout__text { font-size: 1rem; color: var(--emm-ink); }
.emm-callout__text p { margin: 0; }

/* ══════════════════════════════════════════════════════════
   EMM DIVIDER
══════════════════════════════════════════════════════════ */
.emm-divider { padding: 20px 0; display: flex; align-items: center; justify-content: center; }
.emm-divider--rule::before {
  content: ''; display: block; width: 100%; height: 1px; background: var(--emm-line);
}
.emm-divider--dots { gap: 0; }
.emm-divider__dots {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem; letter-spacing: .6em; color: var(--emm-ochre);
}
.emm-divider__symbol {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem; color: var(--emm-teal); opacity: .55;
}
.emm-divider__gradient {
  display: block; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--emm-teal) 0%, var(--emm-ochre) 50%, var(--emm-red) 100%);
}

/* ══════════════════════════════════════════════════════════
   EMM WIDE BANNER
══════════════════════════════════════════════════════════ */
.emm-wide-banner {
  width: 100%;
  position: relative;
}
.emm-wide-banner__inner {
  max-width: 1200px; margin-inline: auto;
  padding: 5rem 2.5rem; text-align: center;
}
.emm-wide-banner__text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-style: italic; line-height: 1.3;
  color: #fff; margin: 0 0 .8rem;
}
.emm-wide-banner__sub {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  color: rgba(255,255,255,.72); margin: 0 0 2rem;
}
.emm-wide-banner__btn {
  display: inline-flex; align-items: center;
  font-family: 'DM Mono', monospace; font-size: .66rem;
  text-transform: uppercase; letter-spacing: .18em;
  text-decoration: none; color: #1a2535;
  background: #e8d9a8; border: 1px solid #e8d9a8;
  padding: .85rem 1.6rem; transition: background .2s, color .2s;
}
.emm-wide-banner__btn:hover { background: #4a9a96; color: #fff; border-color: #4a9a96; }

/* ══════════════════════════════════════════════════════════
   EMM TEXT COLUMNS
══════════════════════════════════════════════════════════ */
.emm-text-columns { padding: 32px 28px; }
.emm-text-columns__label {
  font-family: 'DM Mono', monospace; font-size: .62rem;
  text-transform: uppercase; letter-spacing: .2em; color: var(--emm-teal);
  margin: 0 0 1.4rem;
  display: flex; align-items: center; gap: .7rem;
}
.emm-text-columns__label::before { content: ''; display: block; width: 2rem; height: 1px; background: var(--emm-teal); }
.emm-text-columns__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  border-top: 1px solid var(--emm-line);
  padding-top: 1.5rem;
}
.emm-text-columns__col {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.12rem; line-height: 1.68; color: var(--emm-ink);
}
.emm-text-columns__col p { margin: 0 0 .9rem; }
.emm-text-columns__col p:last-child { margin: 0; }
@media (max-width: 680px) {
  .emm-text-columns__grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
