/* ============================================================
   INSIGHT ESTATES — GeneratePress child theme
   Design system: Cream Editorial (BRAND_IDENTITY.md §9)

   Structure:
   1.  Design tokens
   2.  Global reset — square corners
   3.  Typography — Inter
   4.  GP body / canvas override
   5.  GP header override
   6.  GP navigation override
   7.  GP content / page override
   8.  GP footer override
   9.  Buttons
   10. Landing page — layout helpers
   11. Landing page — Hero
   12. Landing page — Bomærke section break
   13. Landing page — Three pillars
   14. Landing page — Articles
   15. Editorial components (callout, badge, tag, progress)
   16. WordPress utility overrides
   17. Responsive
   ============================================================ */

/* ---- 1. Design tokens ---------------------------------------- */
:root {
  /* Surfaces */
  --ie-page:           #f4f7e4;
  --ie-surface:        #ffffff;
  --ie-callout:        #fff9ef;

  /* Lines */
  --ie-hairline:       #d8dcc4;
  --ie-callout-border: #f0e2cc;

  /* Ink */
  --ie-ink:            #000000;
  --ie-ink-muted:      #5e6152;

  /* Accent (blue) */
  --ie-accent:         #1a64ae;
  --ie-accent-hover:   #15538f;
  --ie-accent-tint:    #b0d5f2;
  --ie-accent-ink:     #0c3a66;
  --ie-callout-ink:    #8a5a12;

  /* Layout */
  --ie-maxw:   1100px;
  --ie-gutter: 32px;
  --ie-font:   'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---- 2. Global reset — square corners everywhere ------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0 !important; /* Cream Editorial: no rounded corners */
}

/* Override GP's own radius variables */
:root {
  --global-palette-button-radius: 0 !important;
}

/* ---- 3. Typography — Inter ----------------------------------- */
body {
  font-family: var(--ie-font) !important;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ie-font) !important;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* ---- 4. GP body / canvas override ---------------------------- */
body.ie-theme {
  background: var(--ie-page) !important;
  color: var(--ie-ink);
}

a {
  color: var(--ie-accent);
  text-decoration: none;
}
a:hover, a:focus {
  color: var(--ie-accent-hover);
  text-decoration: none;
}

/* ---- 5. GP header override ----------------------------------- */
.site-header {
  background: var(--ie-surface) !important;
  border-bottom: 1px solid var(--ie-hairline) !important;
  box-shadow: none !important;
}

.inside-header {
  max-width: var(--ie-maxw);
  padding: 0 var(--ie-gutter);
}

/* Logo — italic 600, matching the mockup */
.main-title a,
.site-title,
.site-title a {
  font-style: italic !important;
  font-weight: 600 !important;
  font-size: 20px !important;
  letter-spacing: -0.02em !important;
  color: var(--ie-ink) !important;
}
.site-title a:hover {
  color: var(--ie-accent) !important;
  text-decoration: none;
}

.site-description {
  display: none; /* hide GP tagline in header */
}

/* GP "Log ind" header button — add class .ie-header-cta in Menus */
.header-widget a.ie-header-cta,
.nav-primary .menu-item.ie-header-cta > a {
  display: inline-block;
  background: var(--ie-accent) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  padding: 9px 16px !important;
  border: 1px solid var(--ie-accent) !important;
}
.header-widget a.ie-header-cta:hover,
.nav-primary .menu-item.ie-header-cta > a:hover {
  background: var(--ie-accent-hover) !important;
  border-color: var(--ie-accent-hover) !important;
}

/* Log ind button */
#menu-item-29 > a,
.menu-item.ie-header-cta > a {
  display: inline-block !important;
  background: #1a64ae !important;
  color: #fff !important;
  padding: 9px 16px !important;
  border: 1px solid #1a64ae !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  line-height: 1.4 !important;
  margin-left: 4px !important;
}
#menu-item-29 > a:hover,
.menu-item.ie-header-cta > a:hover {
  background: #15538f !important;
  border-color: #15538f !important;
  color: #fff !important;
}

/* ---- 6. GP navigation override ------------------------------ */
#primary-menu .menu-item > a {
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.main-navigation,
.nav-primary {
  background: var(--ie-surface) !important;
}

.main-navigation ul li a,
.nav-primary ul li a {
  font-family: var(--ie-font) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: var(--ie-ink-muted) !important;
  padding: 6px 0 !important;
}

.main-navigation ul li a:hover,
.nav-primary ul li a:hover,
.main-navigation ul li.current-menu-item > a,
.nav-primary ul li.current-menu-item > a,
.main-navigation ul li.current-page-ancestor > a,
.nav-primary ul li.current-page-ancestor > a {
  color: var(--ie-accent) !important;
  text-decoration: none;
}

/* Remove GP nav underline hover effect */
.main-navigation ul li a::after,
.nav-primary ul li a::after {
  display: none !important;
}

/* Sub-menus */
.main-navigation ul ul,
.nav-primary ul ul {
  background: var(--ie-surface) !important;
  border: 1px solid var(--ie-hairline) !important;
  box-shadow: none !important;
}
.main-navigation ul ul li a,
.nav-primary ul ul li a {
  border-bottom: 1px solid var(--ie-hairline) !important;
}

/* ---- 7. GP content / page override -------------------------- */
.site-content {
  background: transparent;
}

.content-area {
  background: transparent;
}

/* Standard page/post content surfaces */
.entry-content,
.page-content {
  color: var(--ie-ink);
}

.entry-header .entry-title {
  font-size: 44px;
  letter-spacing: -0.02em;
}

/* GP widgets */
.widget-area .widget {
  background: var(--ie-surface);
  border: 1px solid var(--ie-hairline);
  padding: 22px;
  margin-bottom: 24px;
}
.widget-area .widget-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ie-ink);
  border-bottom: 1px solid var(--ie-hairline);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

/* ---- 8. GP footer override ---------------------------------- */
.site-footer {
  background: var(--ie-page) !important;
  border-top: 1px solid var(--ie-hairline) !important;
  padding: 0 !important;
}

.inside-footer-widgets {
  max-width: var(--ie-maxw);
}

.site-info {
  max-width: var(--ie-maxw);
  margin: 0 auto;
  padding: 32px var(--ie-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ie-ink-muted);
  letter-spacing: 0.02em;
  background: transparent !important;
  border-top: none !important;
}

.copyright-bar {
  font-size: 12px;
  color: var(--ie-ink-muted);
}

/* Language toggle — rendered by main.js */
.ie-lang-toggle {
  display: inline-flex;
  border: 1px solid var(--ie-hairline);
}
.ie-lang-toggle button {
  font-family: var(--ie-font);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 7px 13px;
  border: 0;
  background: var(--ie-surface);
  color: var(--ie-ink-muted);
  cursor: pointer;
}
.ie-lang-toggle button + button {
  border-left: 1px solid var(--ie-hairline);
}
.ie-lang-toggle button[aria-pressed="true"],
.ie-lang-toggle button.active {
  background: var(--ie-accent);
  color: #fff;
}

/* ---- 9. Buttons --------------------------------------------- */
.ie-btn,
.button,
button.wp-block-button__link,
a.wp-block-button__link,
input[type="submit"] {
  display: inline-block;
  font-family: var(--ie-font) !important;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 13px 24px;
  border: 1px solid var(--ie-hairline);
  background: var(--ie-surface);
  color: var(--ie-ink);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  line-height: 1;
  text-decoration: none;
}

.ie-btn:hover,
.button:hover,
input[type="submit"]:hover {
  background: var(--ie-page);
  color: var(--ie-ink);
  text-decoration: none;
}

.ie-btn--primary,
.wp-block-button.is-style-fill .wp-block-button__link,
input[type="submit"].btn-primary {
  background: var(--ie-accent) !important;
  color: #fff !important;
  border-color: var(--ie-accent) !important;
}

.ie-btn--primary:hover,
.wp-block-button.is-style-fill .wp-block-button__link:hover {
  background: var(--ie-accent-hover) !important;
  border-color: var(--ie-accent-hover) !important;
  color: #fff !important;
}

.ie-btn--sm {
  padding: 9px 16px;
  font-size: 12px;
}

/* Text link with arrow */
.ie-textlink {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ie-accent);
  text-decoration: none;
}
.ie-textlink:hover {
  color: var(--ie-accent-hover);
}
.ie-arr {
  display: inline-block;
  transition: transform 0.12s;
}
.ie-textlink:hover .ie-arr {
  transform: translateX(3px);
}

/* ---- 10. Landing page layout helpers ------------------------ */
.ie-landing {
  /* remove GP default paddings that conflict */
  padding: 0;
}

.ie-wrap {
  max-width: var(--ie-maxw);
  margin: 0 auto;
  padding: 0 var(--ie-gutter);
}

/* Uppercase micro-label */
.ie-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ie-ink-muted);
  margin: 0 0 18px;
}

/* ---- 11. Landing page — Hero -------------------------------- */
.ie-hero {
  padding: 128px 0 120px;
}

.ie-hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 72px;
  align-items: center;
}

.ie-hero h1 {
  font-size: 60px;
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 11ch;
  margin: 0;
}

.ie-lede {
  margin-top: 26px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ie-ink-muted);
  max-width: 42ch;
}

.ie-hero__cta {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

/* Abstract skeleton */
.ie-skeleton {
  background: var(--ie-surface);
  border: 1px solid var(--ie-hairline);
}

.ie-skeleton__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ie-hairline);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ie-ink-muted);
}

.ie-skeleton__dot {
  width: 7px;
  height: 7px;
  background: var(--ie-accent);
  display: inline-block;
}

.ie-skeleton__kpi {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.ie-skeleton__kpi > div {
  padding: 22px 20px;
  border-right: 1px solid var(--ie-hairline);
}

.ie-skeleton__kpi > div:last-child {
  border-right: 0;
}

.ie-skeleton__lab {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ie-ink-muted);
}

.ie-skeleton__num {
  margin-top: 10px;
  height: 22px;
  background: var(--ie-accent-tint);
}

.ie-skeleton__num--accent {
  background: var(--ie-accent);
}

.ie-skeleton__body {
  padding: 22px 20px;
  border-top: 1px solid var(--ie-hairline);
}

.ie-skeleton__row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.ie-skeleton__row:last-child {
  margin-bottom: 0;
}

.ie-skeleton__tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--ie-callout);
  color: var(--ie-callout-ink);
  border: 1px solid var(--ie-callout-border);
  padding: 3px 8px;
  white-space: nowrap;
}

.ie-skel-track {
  flex: 1;
  height: 8px;
  background: var(--ie-page);
  display: block;
}

.ie-skel-fill {
  display: block;
  height: 100%;
  background: var(--ie-accent);
}

/* ---- 12. Landing page — Bomærke section break --------------- */
.ie-break {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ie-break__I,
.ie-break__E {
  font-style: italic;
  font-weight: 600;
  font-size: 28px;
  color: var(--ie-ink);
  line-height: 1;
}

.ie-break__bar {
  flex: 1;
  height: 3px;
  background: var(--ie-ink);
}

/* ---- 13. Landing page — Three pillars ----------------------- */
.ie-section {
  padding: 96px 0;
}

.ie-section__intro {
  max-width: 52ch;
  margin-bottom: 64px;
}

.ie-section__intro h2 {
  font-size: 34px;
  letter-spacing: -0.02em;
  margin: 0;
}

.ie-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.ie-pillar {
  padding: 34px 40px 12px 0;
  border-top: 2px solid var(--ie-ink);
  margin-right: 40px;
}

.ie-pillar:last-child {
  margin-right: 0;
}

.ie-pillar__idx {
  font-style: italic;
  font-weight: 600;
  font-size: 15px;
  color: var(--ie-accent);
  margin-bottom: 18px;
}

.ie-pillar h3 {
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0;
}

.ie-pillar p {
  margin-top: 14px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ie-ink-muted);
}

/* ---- 14. Landing page — Articles ---------------------------- */
.ie-insights {
  background: var(--ie-surface);
  border-top: 1px solid var(--ie-hairline);
  border-bottom: 1px solid var(--ie-hairline);
  padding: 88px 0;
}

.ie-insights .ie-wrap {
  /* override any GP container padding */
}

.ie-insights__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.ie-insights__head h2 {
  font-size: 30px;
  margin: 0;
}

.ie-articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.ie-article {
  padding: 28px 40px 28px 0;
  border-top: 1px solid var(--ie-hairline);
  margin-right: 40px;
}

.ie-article:last-child {
  margin-right: 0;
}

.ie-article__kicker {
  margin-bottom: 14px;
}
.ie-article__kicker a {
  color: var(--ie-ink-muted);
  text-decoration: none;
}

.ie-article h3 {
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}

.ie-article h3 a {
  color: var(--ie-ink);
  text-decoration: none;
}

.ie-article h3 a:hover {
  color: var(--ie-accent);
}

.ie-article p,
.ie-article .entry-summary,
.ie-article .excerpt {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ie-ink-muted);
}

/* Strip WP's default excerpt "..." read-more link */
.ie-article .more-link {
  display: none;
}

/* ---- 15. Editorial components ------------------------------- */

/* Status badge */
.ie-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--ie-callout);
  color: var(--ie-callout-ink);
  border: 1px solid var(--ie-callout-border);
}

/* Tag / chip (e.g. "AI", category) */
.ie-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--ie-accent-tint);
  color: var(--ie-accent-ink);
  padding: 2px 7px;
}

/* Callout / note / quote */
.ie-callout,
blockquote.ie-callout {
  background: var(--ie-callout);
  border-left: 4px solid var(--ie-accent);
  border-right: none;
  border-top: none;
  border-bottom: none;
  padding: 22px;
  font-style: italic;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  color: var(--ie-ink);
}

/* Card / section surface */
.ie-card {
  background: var(--ie-surface);
  border: 1px solid var(--ie-hairline);
  margin-bottom: 26px;
}

.ie-card__head {
  padding: 14px 22px;
  border-bottom: 1px solid var(--ie-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ie-ink);
}

.ie-card__body {
  padding: 22px;
}

/* Progress bar */
.ie-progress-track {
  height: 8px;
  background: var(--ie-page);
}

.ie-progress-fill {
  height: 100%;
  background: var(--ie-accent);
}

/* WP default blockquote */
blockquote {
  border-left: 4px solid var(--ie-accent);
  margin-left: 0;
  padding-left: 22px;
  font-style: italic;
  color: var(--ie-ink-muted);
}

/* ---- 16. WordPress utility overrides ------------------------ */

/* Admin bar — keep it out of the way */
.admin-bar .site-header {
  top: 32px;
}
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

/* WP Image captions */
.wp-caption-text,
figcaption {
  font-size: 13px;
  color: var(--ie-ink-muted);
  text-align: left;
  margin-top: 6px;
}

/* WP search form */
.search-form input[type="search"] {
  border: 1px solid var(--ie-hairline);
  background: var(--ie-surface);
  font-family: var(--ie-font);
  padding: 9px 14px;
}
.search-form input[type="search"]:focus {
  outline: 2px solid var(--ie-accent);
  outline-offset: 0;
}
.search-form input[type="submit"] {
  background: var(--ie-accent);
  color: #fff;
  border-color: var(--ie-accent);
}

/* Focus ring — WCAG compliant */
:focus-visible {
  outline: 2px solid var(--ie-accent);
  outline-offset: 2px;
}

/* GP container override */
.grid-container {
  max-width: var(--ie-maxw);
  padding: 0 var(--ie-gutter);
}

/* ---- 17. Responsive ----------------------------------------- */
@media (max-width: 900px) {
  .ie-hero {
    padding: 80px 0 72px;
  }

  .ie-hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .ie-hero h1 {
    font-size: 44px;
  }

  .ie-pillars,
  .ie-articles {
    grid-template-columns: 1fr;
  }

  .ie-pillar,
  .ie-article {
    margin-right: 0;
  }

  .ie-pillar {
    padding-bottom: 28px;
  }

  .ie-section {
    padding: 64px 0;
  }

  .ie-insights {
    padding: 64px 0;
  }

  .ie-insights__head {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 36px;
  }
}

@media (max-width: 600px) {
  :root {
    --ie-gutter: 20px;
  }

  .ie-hero {
    padding: 60px 0 56px;
  }

  .ie-hero h1 {
    font-size: 36px;
  }

  .ie-lede {
    font-size: 17px;
  }

  .ie-skeleton__kpi {
    grid-template-columns: 1fr;
  }

  .ie-skeleton__kpi > div {
    border-right: 0;
    border-bottom: 1px solid var(--ie-hairline);
  }

  .ie-skeleton__kpi > div:last-child {
    border-bottom: 0;
  }

  .site-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}
