/*
 * SceltaLab homepage — Rivista contemporanea.
 * Optional layer: it is loaded only on the front page after explicit opt-in.
 */

@font-face {
  font-family: "SL Newsreader";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
}

body.sl-editorial-home-premium .sceltalab-home {
  --slh-ink: #132d3d;
  --slh-ink-strong: #0f3448;
  --slh-ink-soft: #526772;
  --slh-burgundy: #7d263f;
  --slh-burgundy-deep: #5f1b31;
  --slh-paper: #fffdf9;
  --slh-stone: #f4f0e9;
  --slh-soft: #f7f3ed;
  --slh-line: #dcd4ca;
  --slh-display: "SL Newsreader", Georgia, "Times New Roman", serif;
  --slh-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--slh-ink);
  background: var(--slh-paper);
  font-family: var(--slh-sans);
  -webkit-font-smoothing: antialiased;
}

body.sl-editorial-home-premium .sceltalab-home :where(h1, h2, h3, h4) {
  color: var(--slh-ink-strong);
  font-family: var(--slh-display);
  font-weight: 500;
}

body.sl-editorial-home-premium .sceltalab-home :where(.sceltalab-home__eyebrow, .sceltalab-home__tag) {
  color: var(--slh-burgundy);
  font-family: var(--slh-sans);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .13em;
}

body.sl-editorial-home-premium .sceltalab-home a {
  color: var(--slh-burgundy-deep);
}

/* Hero: same saved H1, copy, search and links; only presentation changes. */
body.sl-editorial-home-premium .sceltalab-home__hero {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 48%) minmax(0, 52%);
  align-items: stretch;
  padding: 0 !important;
  background: var(--slh-paper);
}

body.sl-editorial-home-premium .sceltalab-home__hero .sceltalab-home__wrap {
  position: relative;
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  width: 100% !important;
  max-width: none !important;
  min-height: 610px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 !important;
  padding: 58px clamp(32px, 5.2vw, 70px) 58px max(22px, calc((100vw - 1180px) / 2)) !important;
}

body.sl-editorial-home-premium .sceltalab-home__hero::after {
  position: relative;
  z-index: 0;
  inset: auto;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-height: 610px;
  opacity: 1;
  background: url("../images/hero-appliances.jpg") 51% center / cover no-repeat;
  clip-path: ellipse(84% 76% at 88% 50%);
}

body.sl-editorial-home-premium .sceltalab-home__hero .sceltalab-home__wrap > * {
  width: min(520px, 100%);
  max-width: 520px;
}

body.sl-editorial-home-premium .sceltalab-home__hero h1 {
  margin: 19px 0 0 !important;
  color: var(--slh-ink-strong);
  font: 500 clamp(3.65rem, 5.25vw, 5.35rem)/.92 var(--slh-display) !important;
  letter-spacing: -.055em;
}

body.sl-editorial-home-premium .sceltalab-home__hero h1 br {
  display: none;
}

body.sl-editorial-home-premium .sceltalab-home__hero h1 > span {
  width: min(440px, 100%);
  max-width: 440px !important;
  display: block !important;
  margin: 25px 0 0 !important;
  color: #385663 !important;
  font: 500 clamp(1.65rem, 2.35vw, 2.3rem)/1.06 var(--slh-display) !important;
  letter-spacing: -.035em !important;
}

body.sl-editorial-home-premium .sceltalab-home__hero h1::after {
  width: 44px;
  height: 3px;
  margin-top: 34px;
  background: var(--slh-burgundy);
}

body.sl-editorial-home-premium .sceltalab-home__lead {
  margin: 21px 0 0;
  color: #3e5661;
  font: 450 clamp(1rem, 1.25vw, 1.13rem)/1.62 var(--slh-sans);
}

body.sl-editorial-home-premium .sceltalab-home__search {
  margin-top: 27px;
}

body.sl-editorial-home-premium .sceltalab-home__search-row {
  width: min(470px, 100%);
  height: 54px;
  border-color: #d8d2c9;
}

body.sl-editorial-home-premium .sceltalab-home__search-row input {
  color: var(--slh-ink);
  font-family: var(--slh-sans);
  font-size: .82rem;
}

body.sl-editorial-home-premium .sceltalab-home__search-row button {
  min-width: 108px;
  border: 1px solid var(--slh-burgundy);
  color: #fff;
  background: var(--slh-burgundy);
  font-family: var(--slh-sans);
  font-size: .8rem;
}

body.sl-editorial-home-premium .sceltalab-home__quick-links {
  gap: 22px;
  margin-top: 17px;
}

body.sl-editorial-home-premium .sceltalab-home__quick-links a {
  border-color: rgba(125, 38, 63, .48);
  color: var(--slh-burgundy-deep);
  font-family: var(--slh-sans);
  font-size: .76rem;
  font-weight: 700;
}

/* SceltaBrain keeps the existing illustration and live destination. */
body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] {
  padding: clamp(30px, 4.2vw, 50px) 0;
  background: var(--slh-paper);
}

body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 150px minmax(280px, 1fr) 210px;
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: clamp(26px, 3.5vw, 48px);
  padding: clamp(30px, 3.5vw, 42px) 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--slh-line) !important;
  border-bottom: 1px solid var(--slh-line) !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card::before {
  content: "" !important;
  display: block !important;
  grid-column: 1;
  grid-row: 1 / 4;
  width: 150px;
  height: 112px;
  align-self: center;
  background: url("../images/sceltabrain.jpg") center / cover no-repeat;
}

body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__tag {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
}

body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] h2 {
  grid-column: 2;
  grid-row: 2;
  margin: 5px 0 7px;
  color: var(--slh-ink-strong);
  font: 500 clamp(1.8rem, 2.6vw, 2.35rem)/1.04 var(--slh-display);
  letter-spacing: -.035em;
}

body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card > p:not(:last-child) {
  grid-column: 2;
  grid-row: 3;
  max-width: 590px;
  margin: 0;
  color: #566a74;
  font: 400 .93rem/1.58 var(--slh-sans);
}

body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card > p:last-child {
  grid-column: 3;
  grid-row: 1 / 4;
  justify-self: stretch;
  margin: 0;
}

body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card > p:last-child a {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 17px;
  border: 1px solid var(--slh-burgundy);
  color: #fff;
  background: var(--slh-burgundy);
  font-family: var(--slh-sans);
  font-size: .76rem;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

/* Shared hierarchy for every existing homepage section. */
body.sl-editorial-home-premium .sceltalab-home__section {
  padding-top: clamp(58px, 6.5vw, 84px);
}

body.sl-editorial-home-premium .sceltalab-home__section:last-of-type {
  padding-bottom: clamp(64px, 7.5vw, 92px);
}

body.sl-editorial-home-premium .sceltalab-home__section-head {
  max-width: 780px;
  margin-bottom: 31px;
}

body.sl-editorial-home-premium .sceltalab-home__section-head h2 {
  margin: 9px 0 8px;
  color: var(--slh-ink-strong);
  font: 500 clamp(2.25rem, 3.35vw, 3.15rem)/1 var(--slh-display);
  letter-spacing: -.04em;
}

body.sl-editorial-home-premium .sceltalab-home__section-head h2::after {
  width: 42px;
  height: 2px;
  margin-top: 15px;
  background: var(--slh-burgundy);
}

body.sl-editorial-home-premium .sceltalab-home__section-head > p {
  max-width: 690px;
  margin: 11px auto 0;
  color: #586b74;
  font: 400 .94rem/1.58 var(--slh-sans);
}

/* Flat 12-column grid. PHP supplies balanced spans for every final card count. */
body.sl-editorial-home-premium .sceltalab-home__main-areas {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row;
  align-items: stretch;
  gap: 18px;
}

body.sl-editorial-home-premium .sceltalab-home__main-areas > :where(p:empty, br) {
  display: none !important;
}

body.sl-editorial-home-premium .sceltalab-home__area-card,
body.sl-editorial-home-premium .sceltalab-home__area-card--pillar {
  grid-column: span var(--sl-home-desktop-span, 4);
  min-width: 0;
  min-height: 410px;
  height: 100%;
  padding: 0 22px 22px;
  border: 1px solid #ddd6cc;
  background: #fff;
  box-shadow: 0 12px 30px rgba(19, 45, 61, .055);
}

body.sl-editorial-home-premium .sceltalab-home__area-card--pillar {
  border-top: 3px solid var(--slh-burgundy);
}

body.sl-editorial-home-premium .sceltalab-home__area-strip,
body.sl-editorial-home-premium .sceltalab-home__area-card--pillar .sceltalab-home__area-strip {
  width: auto !important;
  height: 190px;
  flex: 0 0 190px;
  margin: 0 -22px 21px;
  overflow: hidden;
  background-color: #e8e2d9;
  background-position: center;
  background-size: cover;
}

body.sl-editorial-home-premium .sceltalab-home__area-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease;
}

body.sl-editorial-home-premium .sceltalab-home__area-card:hover .sceltalab-home__area-image {
  transform: scale(1.025);
}

body.sl-editorial-home-premium .sceltalab-home__area-card > p {
  margin: 0 0 11px;
  color: #607079;
  font: 400 .88rem/1.52 var(--slh-sans);
}

body.sl-editorial-home-premium .sceltalab-home__area-card > p:first-of-type {
  margin-bottom: 0;
}

body.sl-editorial-home-premium .sceltalab-home__area-card h3 {
  margin: 9px 0 9px;
  color: var(--slh-ink-strong);
  font: 500 clamp(1.38rem, 1.75vw, 1.72rem)/1.08 var(--slh-display);
  letter-spacing: -.025em;
}

body.sl-editorial-home-premium .sceltalab-home__area-card > p:last-child {
  margin-top: auto;
}

body.sl-editorial-home-premium .sceltalab-home__card-link {
  color: var(--slh-burgundy-deep);
  font-family: var(--slh-sans);
  font-size: .72rem;
  font-weight: 750;
}

body.sl-editorial-home-premium .sceltalab-home__card-link--pillar {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 0 !important;
  color: #fff;
  background: var(--slh-burgundy);
}

/* Existing secondary grids keep their content and destinations. */
body.sl-editorial-home-premium :where(.sceltalab-home__coffee-item, .sceltalab-home__guides-grid .sceltalab-home__guide-card) {
  border-color: var(--slh-line);
  box-shadow: 0 10px 26px rgba(19, 45, 61, .045);
}

body.sl-editorial-home-premium .sceltalab-home__coffee-item {
  min-height: 190px;
  padding: 22px;
}

body.sl-editorial-home-premium .sceltalab-home__coffee-item h3,
body.sl-editorial-home-premium :where(.sceltalab-home__guides-grid .sceltalab-home__guide-card, .sceltalab-home__question-card, .sceltalab-home__method-card) h3 {
  color: var(--slh-ink-strong);
  font-family: var(--slh-display);
  font-weight: 500;
}

body.sl-editorial-home-premium .sceltalab-home__question-card,
body.sl-editorial-home-premium .sceltalab-home__method-card {
  border: 0;
  border-top: 2px solid var(--slh-burgundy);
  background: var(--slh-stone);
}

body.sl-editorial-home-premium :where(.sceltalab-home__coffee-item, .sceltalab-home__guide-card, .sceltalab-home__question-card) a {
  color: var(--slh-burgundy-deep);
  font-family: var(--slh-sans);
  font-weight: 750;
}

@media (max-width: 980px) {
  body.sl-editorial-home-premium .sceltalab-home__hero {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  body.sl-editorial-home-premium .sceltalab-home__hero .sceltalab-home__wrap {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    padding: 52px max(28px, calc((100vw - 760px) / 2)) 44px !important;
  }

  body.sl-editorial-home-premium .sceltalab-home__hero::after {
    grid-column: 1;
    grid-row: 2;
    min-height: 360px;
    clip-path: none;
  }

  body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card {
    grid-template-columns: 126px minmax(0, 1fr);
  }

  body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card::before {
    width: 126px;
    height: 95px;
  }

  body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card > p:last-child {
    grid-column: 2;
    grid-row: 4;
    justify-self: start;
    margin-top: 17px;
  }

  body.sl-editorial-home-premium .sceltalab-home__area-card,
  body.sl-editorial-home-premium .sceltalab-home__area-card--pillar {
    grid-column: span var(--sl-home-tablet-span, 6);
  }
}

@media (max-width: 720px) {
  body.sl-editorial-home-premium .sceltalab-home__hero {
    min-height: 0;
    display: grid;
    padding: 0 !important;
  }

  body.sl-editorial-home-premium .sceltalab-home__hero .sceltalab-home__wrap {
    width: 100% !important;
    padding: 40px 22px 34px !important;
  }

  body.sl-editorial-home-premium .sceltalab-home__hero h1 {
    font-size: clamp(3.05rem, 14vw, 3.55rem) !important;
  }

  body.sl-editorial-home-premium .sceltalab-home__hero h1 > span {
    width: auto;
    max-width: none !important;
    margin-top: 18px !important;
    font-size: clamp(1.35rem, 6.1vw, 1.7rem) !important;
    white-space: nowrap;
  }

  body.sl-editorial-home-premium .sceltalab-home__hero h1::after {
    margin-top: 28px;
  }

  body.sl-editorial-home-premium .sceltalab-home__lead {
    margin-top: 17px;
    font-size: 1rem !important;
  }

  body.sl-editorial-home-premium .sceltalab-home__hero::after {
    position: relative;
    inset: auto;
    width: 100%;
    height: 260px;
    min-height: 260px;
  }

  body.sl-editorial-home-premium .sceltalab-home__search-row {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px !important;
    height: auto !important;
  }

  body.sl-editorial-home-premium .sceltalab-home__search-row button {
    min-height: 46px;
  }

  body.sl-editorial-home-premium .sceltalab-home__quick-links {
    flex-flow: row nowrap !important;
    align-items: center;
    gap: 10px;
    padding-bottom: 0;
    background: transparent;
  }

  body.sl-editorial-home-premium .sceltalab-home__quick-links > br {
    display: none !important;
  }

  body.sl-editorial-home-premium .sceltalab-home__quick-links a {
    font-size: clamp(.69rem, 3vw, .76rem);
    white-space: nowrap;
  }

  body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] {
    padding: 28px 0;
  }

  body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 0;
    padding: 27px 0 !important;
    text-align: left !important;
  }

  body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card::before {
    grid-column: 1;
    grid-row: 1;
    width: 132px;
    height: 99px;
    justify-self: center;
    margin-bottom: 19px;
  }

  body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__tag,
  body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] h2,
  body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card > p:not(:last-child),
  body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card > p:last-child {
    grid-column: 1;
    grid-row: auto;
  }

  body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] h2 {
    margin-top: 7px;
    font-size: 1.95rem !important;
  }

  body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card > p:last-child {
    width: 100%;
    margin-top: 18px;
  }

  body.sl-editorial-home-premium .sceltalab-home__section[aria-labelledby="sceltabrain-beta-title"] .sceltalab-home__guide-card > p:last-child a {
    width: 100%;
  }

  body.sl-editorial-home-premium .sceltalab-home__section {
    padding-top: 50px;
  }

  body.sl-editorial-home-premium .sceltalab-home__section-head h2 {
    font-size: clamp(2.05rem, 9.3vw, 2.45rem) !important;
  }

  body.sl-editorial-home-premium .sceltalab-home__main-areas {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  body.sl-editorial-home-premium .sceltalab-home__area-card,
  body.sl-editorial-home-premium .sceltalab-home__area-card--pillar {
    grid-column: 1 / -1;
    min-height: 0;
  }

  body.sl-editorial-home-premium .sceltalab-home__area-strip,
  body.sl-editorial-home-premium .sceltalab-home__area-card--pillar .sceltalab-home__area-strip {
    height: 210px;
    flex-basis: 210px;
  }

  body.sl-editorial-home-premium .sceltalab-home__area-card h3 {
    font-size: 1.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sl-editorial-home-premium .sceltalab-home *,
  body.sl-editorial-home-premium .sceltalab-home *::before,
  body.sl-editorial-home-premium .sceltalab-home *::after {
    transition: none !important;
  }
}
