/*
Theme Name: Ugen i Haven Ona Child
Theme URI: https://ugenihaven.dk
Description: Content-first child theme for Ugen i Haven, built on Ona.
Author: Ugen i Haven
Template: ona
Version: 1.0.0
Text Domain: ugenihaven
*/

:root {
  --uih-green: #3a6b35;
  --uih-accent: #7ab648;
  --uih-bg: #f8f6f1;
  --uih-paper: #fffaf0;
  --uih-text: #2a2a2a;
  --uih-muted: #6f746b;
  --uih-line: #ded8cb;
  --uih-tint: #eef7e9;
  --uih-earth: #9a7b57;
  --uih-heading: "Lora", Georgia, serif;
  --uih-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--uih-bg);
  color: var(--uih-text);
  font-family: var(--uih-body);
  font-size: 18px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(58, 107, 53, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(58, 107, 53, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  opacity: 0.55;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--uih-green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #244a21;
}

.uih-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 246, 241, 0.97);
  border-bottom: 1px solid rgba(58, 107, 53, 0.2);
}

.admin-bar .uih-site-header {
  top: 32px;
}

.uih-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
}

.uih-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--uih-text);
  font-family: var(--uih-body);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.uih-logo-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-top: 1px solid rgba(58, 107, 53, 0.36);
  border-bottom: 1px solid rgba(58, 107, 53, 0.36);
  color: var(--uih-green);
  font-family: var(--uih-heading);
  font-size: 1.1rem;
  letter-spacing: 0;
}

.uih-primary-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
}

.uih-primary-nav li {
  margin: 0;
}

.uih-primary-nav a {
  color: var(--uih-text);
  font-weight: 600;
  text-decoration: none;
}

.uih-primary-nav a:hover {
  color: var(--uih-green);
}

.uih-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(58, 107, 53, 0.22);
  border-radius: 6px;
  background: var(--uih-paper);
  color: var(--uih-green);
  cursor: pointer;
}

.uih-menu-toggle span,
.uih-menu-toggle span::before,
.uih-menu-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  content: "";
}

.uih-menu-toggle span {
  position: relative;
}

.uih-menu-toggle span::before {
  position: absolute;
  top: -7px;
}

.uih-menu-toggle span::after {
  position: absolute;
  top: 7px;
}

.uih-container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.uih-main {
  padding-bottom: 64px;
}

.uih-home-hero {
  padding: 24px 0 18px;
}

.uih-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: center;
  padding: 0;
  background: transparent;
  border-bottom: 1px solid rgba(58, 107, 53, 0.2);
  border-radius: 0;
}

.uih-feature-media {
  display: block;
  min-height: 380px;
  overflow: hidden;
  border-radius: 0;
  background: #e8e1d3;
}

.uih-feature-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

.uih-feature-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 0 30px;
}

.uih-eyebrow,
.uih-card-meta,
.uih-post-meta {
  color: var(--uih-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.uih-feature h1,
.uih-entry-title,
.uih-section-title,
.uih-archive-title {
  margin: 0;
  color: var(--uih-text);
  font-family: var(--uih-heading);
  font-weight: 700;
  line-height: 1.12;
}

.uih-feature h1 {
  margin-top: 10px;
  font-size: clamp(2.25rem, 5vw, 4.35rem);
  letter-spacing: 0;
}

.uih-feature-excerpt {
  margin: 18px 0 22px;
  color: #42463f;
  font-size: 1.08rem;
}

.uih-week-panel {
  width: min(1160px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 24px;
  border: 1px solid rgba(58, 107, 53, 0.2);
  background: #fffdf7;
}

.uih-week-panel__head {
  display: grid;
  gap: 10px;
  max-width: 840px;
}

.uih-week-panel__head h2 {
  margin: 0;
  color: var(--uih-green);
  font-family: var(--uih-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.uih-week-panel__head p {
  margin: 0;
  color: #454d43;
}

.uih-week-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.uih-week-task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.uih-week-task {
  min-height: 100%;
  padding: 16px;
  border-left: 4px solid var(--uih-accent);
  background: var(--uih-tint);
}

.uih-week-task strong {
  display: block;
  color: var(--uih-green);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.uih-week-task p {
  margin: 8px 0 10px;
}

.uih-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.9rem;
}

.uih-mini-links a {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid rgba(58, 107, 53, 0.22);
  background: #fffaf0;
  text-decoration: none;
}

.uih-tool-band {
  padding: 8px 0 24px;
}

.uih-tool-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(58, 107, 53, 0.18);
  background: #fffdf7;
}

.uih-tool-title {
  margin: 0;
  max-width: 720px;
  color: var(--uih-green);
  font-family: var(--uih-heading);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.12;
}

.uih-tool-button .wp-block-button__link {
  border-radius: 0;
  border: 1px solid var(--uih-green);
  background: var(--uih-green);
  color: #fffaf0;
  font-weight: 800;
}

.uih-read-link,
.wp-block-read-more.uih-read-link,
.uih-feature-excerpt .wp-block-post-excerpt__more-link,
.uih-outline-link,
.uih-affiliate-cta,
.entry-content a[target="_blank"][rel*="nofollow"],
.uih-entry-content a[target="_blank"][rel*="nofollow"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(58, 107, 53, 0.36);
  border-radius: 0;
  background: var(--uih-green);
  color: #fffaf0;
  font-weight: 800;
  text-decoration: none;
}

.uih-read-link:hover,
.wp-block-read-more.uih-read-link:hover,
.uih-feature-excerpt .wp-block-post-excerpt__more-link:hover,
.uih-outline-link:hover,
.uih-affiliate-cta:hover,
.entry-content a[target="_blank"][rel*="nofollow"]:hover,
.uih-entry-content a[target="_blank"][rel*="nofollow"]:hover {
  background: var(--uih-green);
  color: #fffaf0;
}

.uih-outline-link {
  background: transparent;
  color: #244a21;
}

.uih-section {
  padding: 30px 0 8px;
}

.uih-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.uih-section-title,
.uih-archive-title {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.uih-section-lede {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--uih-muted);
}

.uih-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 22px;
}

.uih-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid rgba(58, 107, 53, 0.2);
  border-radius: 0;
  background: transparent;
}

.uih-card-image {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e7e0d2;
}

.uih-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 160ms ease;
}

.uih-card:hover .uih-card-image img {
  transform: scale(1.025);
}

.uih-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0 18px;
}

.uih-card-title {
  margin: 0;
  font-family: var(--uih-heading);
  font-size: clamp(1rem, 3.4vw, 1.28rem);
  line-height: 1.24;
}

.uih-card-title a {
  color: var(--uih-text);
  text-decoration: none;
}

.uih-card-title a:hover {
  color: var(--uih-green);
}

.uih-category-pill {
  display: inline-flex;
  width: fit-content;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--uih-green);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.uih-evergreen-band {
  margin-top: 28px;
  padding: 34px 0 38px;
  background: #ecefe2;
  border-top: 1px solid rgba(58, 107, 53, 0.18);
  border-bottom: 1px solid rgba(58, 107, 53, 0.18);
}

.uih-entry-header {
  padding: 28px 0 20px;
}

.uih-entry-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.uih-entry-title {
  max-width: 860px;
  margin-top: 8px;
  font-size: clamp(2.2rem, 7vw, 4.2rem);
}

.uih-entry-excerpt {
  max-width: 680px;
  margin: 16px 0 0;
  color: #4d514a;
  font-size: 1.08rem;
}

.uih-featured-image {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto 28px;
}

.uih-featured-image img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  border-radius: 0;
}

.uih-content-wrap {
  width: min(680px, calc(100% - 32px));
  margin: 0 auto;
}

.uih-toc {
  margin: 0 0 28px;
  border: 1px solid rgba(58, 107, 53, 0.18);
  border-radius: 0;
  background: var(--uih-paper);
}

.uih-toc summary {
  cursor: pointer;
  padding: 13px 16px;
  color: var(--uih-green);
  font-weight: 800;
}

.uih-toc ol {
  margin: 0;
  padding: 0 18px 16px 42px;
  font-size: 0.95rem;
}

.uih-entry-content {
  font-size: 1rem;
  line-height: 1.78;
}

.uih-entry-content > * {
  margin-left: auto;
  margin-right: auto;
}

.uih-entry-content p,
.uih-entry-content li {
  color: var(--uih-text);
}

.uih-entry-content h2 {
  margin: 2.1em 0 0.55em;
  color: var(--uih-green);
  font-family: var(--uih-heading);
  font-size: clamp(1.55rem, 4vw, 2.05rem);
  line-height: 1.18;
}

.uih-entry-content h2::before {
  display: block;
  width: 54px;
  height: 1px;
  margin: 0 0 14px;
  background: var(--uih-accent);
  content: "";
}

.uih-entry-content h3 {
  margin: 1.7em 0 0.45em;
  color: #314d2e;
  font-family: var(--uih-heading);
  font-size: 1.32rem;
}

.uih-entry-content .wp-block-image,
.uih-entry-content figure {
  margin: 28px 0;
}

.uih-entry-content .wp-block-image img,
.uih-entry-content figure img {
  border-radius: 0;
}

.uih-entry-content blockquote {
  margin: 28px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--uih-accent);
  background: var(--uih-tint);
  color: #30402c;
}

.uih-entry-content ul,
.uih-entry-content ol {
  padding-left: 1.35em;
}

.uih-guide-boxes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 28px;
}

.uih-guide-box,
.uih-related-guides {
  padding: 18px;
  border: 1px solid rgba(58, 107, 53, 0.18);
  background: #fffdf7;
}

.uih-guide-box h2,
.uih-related-guides h2 {
  margin: 0 0 10px;
  color: var(--uih-green);
  font-family: var(--uih-heading);
  font-size: 1.35rem;
  line-height: 1.2;
}

.uih-guide-box p {
  margin: 0;
}

.uih-guide-box ul,
.uih-related-guides ul {
  margin: 0;
  padding-left: 1.1em;
}

.uih-related-guides {
  margin: 32px 0 0;
}

.uih-related-guides li + li {
  margin-top: 8px;
}

.uih-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 26px;
}

.uih-hub-card {
  padding: 16px;
  border: 1px solid rgba(58, 107, 53, 0.18);
  background: #fffdf7;
}

.uih-hub-card h3 {
  margin-top: 0;
}

.uih-hub-card p {
  margin-bottom: 0;
}

.uih-related {
  width: min(980px, calc(100% - 32px));
  margin: 54px auto 0;
  padding-top: 28px;
  border-top: 1px solid rgba(58, 107, 53, 0.16);
}

.uih-site-footer {
  padding: 34px 0;
  background: #ece7dc;
  color: #4d514a;
  font-size: 0.92rem;
}

.uih-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.avatar,
.wp-block-avatar,
.author-avatar,
.wp-block-post-author__avatar {
  display: none !important;
}

.uih-block-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(58, 107, 53, 0.08);
  background: rgba(248, 246, 241, 0.94);
  backdrop-filter: blur(10px);
}

.uih-block-header .ona-site-title,
.uih-block-header .wp-block-site-title,
.uih-block-header .wp-block-site-title a {
  color: var(--uih-text);
  font-family: var(--uih-body);
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
  font-weight: 400;
  line-height: 1.1;
  text-decoration: none;
}

.uih-site-tagline {
  max-width: 520px;
  margin: 7px 0 0;
  color: var(--uih-muted);
  font-family: var(--uih-body);
  font-size: clamp(0.78rem, 1.3vw, 0.92rem);
  line-height: 1.35;
}

.uih-top-navigation {
  font-family: var(--uih-body);
  font-size: 1rem;
}

.uih-top-navigation a {
  color: var(--uih-text);
  text-decoration: none;
}

.uih-top-navigation a:hover,
.uih-top-navigation a:focus {
  color: var(--uih-green);
}

.uih-block-footer {
  margin-top: 42px;
  padding: 34px 4%;
  border-top: 1px solid rgba(58, 107, 53, 0.18);
  background: #ece7dc;
  color: #4d514a;
}

.uih-footer-columns {
  gap: 28px;
}

.uih-footer-title,
.uih-footer-title a {
  color: var(--uih-text);
  font-family: var(--uih-body);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
}

.uih-footer-text {
  max-width: 460px;
  color: #4d514a;
  font-size: 0.95rem;
}

.uih-footer-heading {
  margin: 0 0 10px;
  color: var(--uih-green);
  font-family: var(--uih-heading);
  font-size: 1.15rem;
}

.uih-footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.uih-footer-links li {
  margin: 0 0 6px;
}

.uih-footer-links a {
  color: #3d423a;
  text-decoration: none;
}

.uih-footer-links a:hover,
.uih-footer-links a:focus {
  color: var(--uih-green);
  text-decoration: underline;
}

@media (max-width: 820px) {
  body {
    font-size: 18px;
  }

  .admin-bar .uih-site-header {
    top: 46px;
  }

  .uih-menu-toggle {
    display: inline-flex;
  }

  .uih-primary-nav {
    position: absolute;
    inset: 72px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid rgba(58, 107, 53, 0.16);
    border-radius: 8px;
    background: var(--uih-paper);
    box-shadow: 0 18px 40px rgba(42, 42, 42, 0.12);
  }

  .uih-primary-nav.is-open {
    display: flex;
  }

  .uih-primary-nav a {
    display: block;
    padding: 12px;
  }

  .uih-feature {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 0 0 20px;
  }

  .uih-feature-media,
  .uih-feature-media img {
    min-height: 285px;
  }

  .uih-feature-body {
    padding: 0 2px 8px;
  }

  .uih-feature h1 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }

  .uih-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .uih-week-task-grid,
  .uih-guide-boxes,
  .uih-hub-grid {
    grid-template-columns: 1fr;
  }

  .uih-card-body {
    padding: 10px;
  }

  .uih-section-head {
    align-items: start;
    flex-direction: column;
  }

  .uih-footer-inner {
    align-items: start;
    flex-direction: column;
  }

  .uih-block-header {
    position: sticky;
  }

  .uih-block-header .wp-block-columns {
    gap: 12px;
  }

  .uih-block-header .wp-block-column:first-child {
    flex-basis: 76% !important;
  }

  .uih-block-header .wp-block-column:last-child {
    flex-basis: 24% !important;
  }

  .uih-top-navigation .wp-block-navigation__container {
    display: none;
  }

  .uih-top-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    display: flex;
  }

  .uih-top-navigation .wp-block-navigation__responsive-container-open {
    display: flex;
  }

  .uih-top-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) {
    display: none;
  }

  .uih-block-footer {
    padding: 28px 4%;
  }
}

@media (max-width: 380px) {
  .uih-logo {
    font-size: 0.74rem;
    letter-spacing: 0.24em;
  }

  .uih-card-grid {
    gap: 10px;
  }
}
