@import url("/design-tokens.css");
@import url("/page-types/editorial.css");

.page-type-insights { background: var(--nemely-surface-page); }
.ih-page, .ih-page * { box-sizing: border-box; }
.ih-page { width: 100%; overflow: hidden; color: var(--nemely-color-editorial-ink); background: var(--nemely-color-ivory); font-family: var(--nemely-font-editorial); }
.ih-page :where(h1, h2, h3, p, figure) { margin: 0; }
.ih-page a { color: inherit; text-decoration: none; }
.ih-page button, .ih-page input { font: inherit; }

.ih-hero { padding: 92px 0 var(--nemely-section-space); background: var(--nemely-color-ivory); }
.ih-hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .62fr); gap: 84px; align-items: end; }
.ih-hero h1 { max-width: 940px; margin-top: 30px; color: var(--nemely-color-editorial-navy); font: 600 clamp(4.4rem, 7.4vw, 7.7rem)/.88 var(--nemely-font-editorial); letter-spacing: -.075em; text-wrap: balance; }
.ih-hero h1 span { color: var(--nemely-color-orange-heading); }
.ih-hero-intro { padding-bottom: 4px; }
.ih-hero-intro > p { max-width: 590px; color: var(--nemely-color-muted-ink); font-size: clamp(1.08rem, 1.6vw, 1.28rem); line-height: 1.75; }
.ih-hero-intro > a { display: inline-flex; align-items: center; gap: 14px; margin-top: 34px; color: var(--nemely-color-editorial-navy); font-size: 14px; font-weight: 700; }
.ih-hero-intro .editorial-arrow { transform: rotate(-90deg); color: var(--nemely-color-navy-dark); }
.ih-feature { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); min-height: 610px; margin-top: 64px; overflow: hidden; border-radius: var(--nemely-radius-editorial); background: var(--nemely-color-editorial-navy); color: var(--nemely-color-white); box-shadow: var(--nemely-shadow-photo); transition: transform .22s cubic-bezier(.22, 1, .36, 1); }
.ih-feature-copy { position: relative; z-index: 1; display: flex; min-width: 0; flex-direction: column; justify-content: space-between; padding: 54px; overflow: hidden; container-type: inline-size; }
.ih-feature-copy::after { content: ''; position: absolute; left: -110px; bottom: -150px; width: 350px; height: 350px; border: 68px solid var(--nemely-color-navy-line); border-radius: 50%; pointer-events: none; }
.ih-feature-copy > * { position: relative; z-index: 1; }
.ih-feature-category { margin-top: 54px !important; color: var(--nemely-color-on-dark-accent); font-size: 10px; line-height: 1.5; font-weight: 700; letter-spacing: .19em; text-transform: uppercase; }
.ih-feature h2 { max-width: 720px; margin-top: 18px; color: var(--nemely-color-white); font: var(--nemely-heading-weight) var(--nemely-insight-feature-title-size)/var(--nemely-editorial-title-leading) var(--nemely-font-editorial); letter-spacing: var(--nemely-editorial-title-tracking); text-wrap: balance; overflow-wrap: normal; word-break: normal; hyphens: none; }
.ih-feature h2[data-title-scale="compact"] { font-size: var(--nemely-insight-feature-title-compact-size); }
.ih-feature-copy > div > p:last-child { max-width: 620px; margin-top: 26px; color: var(--nemely-color-on-dark-muted); font-size: 17px; line-height: 1.75; }
.ih-feature-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--nemely-color-white-line); }
.ih-feature-meta > span:first-child { display: flex; flex-wrap: wrap; gap: 9px; color: var(--nemely-color-on-dark-muted); font-size: 12px; font-weight: 600; }
.ih-feature figure { position: relative; min-height: 450px; overflow: hidden; background: var(--nemely-color-navy-panel); }
.ih-feature figure::after { content: ''; position: absolute; inset: 0; background: var(--nemely-gradient-photo); pointer-events: none; }
.ih-feature img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .38s cubic-bezier(.22, 1, .36, 1); }

.ih-library { padding: var(--nemely-section-space) 0 clamp(48px, 6vw, 76px); background: var(--nemely-color-warm-paper); scroll-margin-top: var(--nemely-sticky-header-offset); }
.ih-library-heading { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .55fr); gap: 64px; align-items: end; }
.ih-library-heading h2 { max-width: 850px; margin-top: 26px; color: var(--nemely-color-editorial-navy); font: 600 clamp(3.4rem, 5.6vw, 5.9rem)/.94 var(--nemely-font-editorial); letter-spacing: -.065em; text-wrap: balance; }
.ih-library-heading > p { color: var(--nemely-color-muted-ink); font-size: 16px; line-height: 1.75; }
.ih-tools { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 52px; padding-block: 18px; border-block: 1px solid var(--nemely-color-stone); }
.ih-topics { display: flex; flex-wrap: wrap; gap: 9px; }
.ih-topics button, .ih-empty button { min-height: 39px; padding: 0 17px; border: 1px solid var(--nemely-color-stone); border-radius: 999px; background: transparent; color: var(--nemely-color-editorial-navy); font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .2s ease, background-color .2s ease, color .2s ease; }
.ih-topics button.is-active, .ih-topics button:hover, .ih-topics button:focus-visible { border-color: var(--nemely-color-editorial-navy); background: var(--nemely-color-editorial-navy); color: var(--nemely-color-white); }
.ih-search { display: flex; width: min(100%, 330px); min-height: 48px; flex: 0 0 auto; align-items: center; gap: 11px; padding: 0 16px; border: 1px solid var(--nemely-color-stone); border-radius: 999px; background: var(--nemely-color-white); }
.ih-search svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--nemely-color-orange-ink); stroke-width: 2; }
.ih-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--nemely-color-editorial-ink); font-size: 13px; }
.ih-search:focus-within { border-color: var(--nemely-color-orange-ink); outline: 2px solid var(--nemely-color-orange-soft); outline-offset: 2px; }
.ih-result-count { margin-top: 24px !important; color: var(--nemely-color-muted-ink); font-size: 12px; font-weight: 700; }
.ih-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; margin-top: 22px; }
.ih-card { min-width: 0; overflow: hidden; border: 1px solid var(--nemely-color-stone); border-radius: var(--nemely-radius-editorial); background: var(--nemely-color-ivory); transition: transform .18s cubic-bezier(.22, 1, .36, 1), border-color .18s ease, box-shadow .18s ease; }
.ih-card[hidden] { display: none; }
.ih-card > a { display: flex; height: 100%; flex-direction: column; }
.ih-card-media { position: relative; height: 245px; overflow: hidden; background: var(--nemely-color-control-soft); }
.ih-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .32s cubic-bezier(.22, 1, .36, 1); }
.ih-card-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; padding: 28px; }
.ih-card-category { color: var(--nemely-color-orange-ink); font-size: 10px; line-height: 1.4; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.ih-card h3 { margin-top: 14px; color: var(--nemely-color-editorial-navy); font: var(--nemely-heading-weight) var(--nemely-insight-card-title-size)/var(--nemely-insight-card-title-leading) var(--nemely-font-editorial); letter-spacing: -.035em; text-wrap: balance; overflow-wrap: normal; word-break: normal; hyphens: none; }
.ih-card h3[data-title-scale="compact"] { font-size: var(--nemely-insight-card-title-compact-size); }
.ih-card-copy > p:nth-of-type(2) { margin-top: 18px; color: var(--nemely-color-muted-ink); font-size: 14px; line-height: 1.7; }
.ih-card-meta { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: auto; padding-top: 30px; color: var(--nemely-color-muted-ink); font-size: 11px; font-weight: 600; }
.ih-card-meta > span:first-child { display: flex; flex-wrap: wrap; gap: 7px; }
.ih-author { flex-basis: 100%; min-width: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.ih-card .editorial-arrow { width: 38px; height: 38px; color: var(--nemely-color-orange-ink); }
.ih-empty { margin-top: 40px; padding: 52px; border: 1px dashed var(--nemely-color-stone); border-radius: var(--nemely-radius-editorial); text-align: center; }
.ih-empty h3 { color: var(--nemely-color-editorial-navy); font-size: 30px; }
.ih-empty p { margin-top: 10px; color: var(--nemely-color-muted-ink); }
.ih-empty button { margin-top: 22px; background: var(--nemely-color-editorial-navy); color: var(--nemely-color-white); }
.ih-load-more { display: flex; justify-content: center; margin-top: 42px; }
.ih-load-more > button { display: inline-flex; align-items: center; gap: 14px; padding: 0; border: 0; background: transparent; color: var(--nemely-color-editorial-navy); font-size: 13px; font-weight: 700; cursor: pointer; }
.ih-load-more > button:is(:hover, :focus, :active) { background: transparent; color: var(--nemely-color-editorial-navy); }
.ih-load-more > button[hidden] { display: none; }
.ih-load-more .editorial-arrow { transform: rotate(90deg); }

.ih-newsletter { padding: 0 0 var(--nemely-section-space); background: var(--nemely-color-warm-paper); }
.ih-newsletter-card { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .72fr); overflow: hidden; border: 1px solid var(--nemely-color-stone); border-radius: var(--nemely-radius-editorial); background: var(--nemely-color-warm-paper); box-shadow: var(--nemely-shadow-photo); }
.ih-newsletter-copy { padding: 54px; }
.ih-newsletter h2 { max-width: 760px; margin-top: 24px; color: var(--nemely-color-editorial-navy); font: 600 clamp(3rem, 4.8vw, 5.1rem)/.94 var(--nemely-font-editorial); letter-spacing: -.06em; text-wrap: balance; }
.ih-newsletter-copy > p:last-child { max-width: 620px; margin-top: 25px; color: var(--nemely-color-muted-ink); font-size: 16px; line-height: 1.75; }
.ih-newsletter form { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 54px; background: var(--nemely-color-editorial-navy); color: var(--nemely-color-white); }
.ih-newsletter form > label { color: var(--nemely-color-on-dark-muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ih-newsletter form > div { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 14px; }
.ih-newsletter input { min-width: 0; height: 54px; padding: 0 17px; border: 1px solid var(--nemely-color-white-line); border-radius: var(--nemely-radius-control); background: transparent; color: var(--nemely-color-white); outline: 0; }
.ih-newsletter input::placeholder { color: var(--nemely-color-on-dark-muted); }
.ih-newsletter input:focus { border-color: var(--nemely-color-orange); outline: 2px solid var(--nemely-color-orange); outline-offset: 2px; }
.ih-newsletter button { display: inline-flex; height: 54px; align-items: center; gap: 12px; padding: 0 20px; border: 0; border-radius: var(--nemely-radius-control); background: var(--nemely-color-orange); color: var(--nemely-color-navy-dark); font-weight: 700; cursor: pointer; }
.ih-newsletter button svg { width: 17px; height: 17px; }
.ih-newsletter form > p { margin-top: 14px; color: var(--nemely-color-on-dark-muted); font-size: 11px; line-height: 1.55; }
.ih-newsletter output { min-height: 22px; margin-top: 8px; color: var(--nemely-color-white); font-size: 12px; }

.ih-page :where(a, button, input):focus-visible { outline: 3px solid var(--nemely-color-orange-ink); outline-offset: 4px; }

@media (hover: hover) {
  .ih-feature:hover { transform: translateY(-4px); }
  .ih-card:hover { transform: translateY(-6px); border-color: var(--nemely-color-orange); box-shadow: var(--nemely-shadow-soft); }
  .ih-feature:hover img, .ih-card:hover img { transform: scale(1.045); }
}

.ih-card:focus-within { border-color: var(--nemely-color-orange); box-shadow: var(--nemely-shadow-soft); }
.ih-card:active { transform: translateY(-2px); }

@media (max-width: 1080px) {
  .ih-hero-grid, .ih-library-heading { grid-template-columns: 1fr; gap: 34px; }
  .ih-feature { grid-template-columns: 1fr; }
  .ih-feature figure { order: -1; height: 460px; }
  .ih-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ih-newsletter-card { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .ih-hero { padding: var(--nemely-section-space-mobile) 0; }
  .ih-hero h1 { font-size: clamp(3.5rem, 15vw, 5.4rem); }
  .ih-feature { min-height: 0; margin-top: 46px; }
  .ih-feature figure { height: 360px; min-height: 0; }
  .ih-feature-copy, .ih-newsletter-copy, .ih-newsletter form { padding: 34px; }
  .ih-library { padding: var(--nemely-section-space-mobile) 0 36px; }
  .ih-library-heading h2 { font-size: clamp(3rem, 12vw, 4.5rem); }
  .ih-tools { align-items: stretch; flex-direction: column; }
  .ih-topics { flex-wrap: nowrap; margin-inline: calc(var(--nemely-page-gutter-mobile) * -1); padding-inline: var(--nemely-page-gutter-mobile); overflow-x: auto; scrollbar-width: thin; }
  .ih-topics button { flex: 0 0 auto; }
  .ih-search { width: 100%; }
  .ih-grid { grid-template-columns: 1fr; }
  .ih-card-media { height: 260px; }
  .ih-newsletter { padding: 0 0 var(--nemely-section-space-mobile); }
  .ih-newsletter h2 { font-size: clamp(2.7rem, 12vw, 4rem); }
  .ih-newsletter form > div { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ih-feature, .ih-card, .ih-feature img, .ih-card-media img, .ih-topics button { transition: none; }
  .ih-feature:hover, .ih-card:hover, .ih-card:active, .ih-feature:hover img, .ih-card:hover img { transform: none; }
}

.ih-newsletter form > p a { text-decoration: underline; text-underline-offset: .2em; }
.ih-newsletter form > p a:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
