/*
Theme Name: HouseplantLab
Theme URI: https://github.com/rjb2803/houseplantlab
Author: HouseplantLab
Description: A calm, editorial block theme for practical UK houseplant guidance.
Version: 0.4.4
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: houseplantlab
*/

:root {
  color-scheme: light;
  --hpl-shadow: 0 12px 36px rgb(18 49 37 / 10%);
  --hpl-border: #d9ded3;
}

html { scroll-behavior: smooth; }

body {
  background: #e6eadf;
  text-wrap: pretty;
}

a { text-underline-offset: 0.18em; }

.wp-site-blocks {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wp-site-blocks > footer { margin-block-start: auto; }

.hpl-card {
  background: var(--wp--preset--color--paper);
  border: 1px solid var(--hpl-border);
  border-radius: 0.55rem;
  box-shadow: 0 4px 14px rgb(19 55 42 / 7%);
  overflow: hidden;
}

.hpl-card .wp-block-post-featured-image { margin: 0; }

.hpl-card__body { padding: 0.8rem 0.85rem 0.9rem; }
.hpl-card__body > * { margin-block-start: 0; }

.hpl-card__body .wp-block-post-title {
  font-family: var(--wp--preset--font-family--interface);
  font-weight: 750;
  line-height: 1.25;
}

.hpl-card__body a {
  color: var(--wp--preset--color--forest);
  text-decoration: none;
}

.hpl-card__link {
  color: var(--wp--preset--color--leaf);
  font-size: 0.72rem;
  font-weight: 700;
}

.hpl-eyebrow {
  color: inherit;
  font-size: var(--wp--preset--font-size--small);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hpl-header {
  background: var(--wp--preset--color--paper);
  border-bottom: 1px solid rgb(20 55 42 / 12%);
  box-shadow: 0 2px 18px rgb(20 55 42 / 6%);
  position: sticky;
  top: 0;
  z-index: 50;
}

.hpl-header__inner {
  max-width: 90rem !important;
  min-height: clamp(4.75rem, 4rem + 1.2vw, 5.5rem);
  width: calc(100% - clamp(2rem, 8vw, 9rem));
}

.hpl-brand { gap: clamp(0.65rem, 0.4rem + 0.3vw, 0.85rem); }

.hpl-brand__mark {
  align-items: center;
  background: var(--wp--preset--color--forest);
  border-radius: 0.55rem 0.55rem 0.55rem 0.15rem;
  box-shadow: 0 5px 12px rgb(19 65 47 / 16%);
  color: var(--wp--preset--color--paper);
  display: inline-flex;
  height: clamp(2.35rem, 1.9rem + 0.55vw, 2.85rem);
  justify-content: center;
  transform: rotate(-8deg);
  width: clamp(2.35rem, 1.9rem + 0.55vw, 2.85rem);
}

.hpl-brand__mark svg {
  fill: none;
  height: clamp(1.35rem, 1.05rem + 0.35vw, 1.65rem);
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: clamp(1.35rem, 1.05rem + 0.35vw, 1.65rem);
}

.hpl-brand__copy { gap: 0 !important; }

.hpl-brand__title {
  font-family: var(--wp--preset--font-family--interface);
  font-size: clamp(1.1rem, 0.7rem + 0.5vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
}

.hpl-brand__tagline {
  color: var(--wp--preset--color--leaf);
  font-size: clamp(0.52rem, 0.35rem + 0.2vw, 0.62rem);
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 0.32rem 0 0;
  text-transform: uppercase;
}

.hpl-brand__title a,
.hpl-primary-nav a {
  color: var(--wp--preset--color--forest);
  text-decoration: none;
}

.hpl-header__navigation { gap: clamp(0.75rem, 0.4rem + 0.8vw, 1.5rem); }
.hpl-primary-nav { font-size: clamp(0.9rem, 0.4rem + 0.5vw, 1rem); }
.hpl-primary-nav .wp-block-navigation__container { gap: clamp(0.15rem, 0.05rem + 0.35vw, 0.55rem); }

.hpl-primary-nav .wp-block-navigation-item__content {
  border-radius: 999px;
  padding: clamp(0.58rem, 0.4rem + 0.25vw, 0.72rem) clamp(0.62rem, 0.35rem + 0.4vw, 0.88rem);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.hpl-primary-nav .wp-block-navigation-item__content:hover,
.hpl-primary-nav .current-menu-item > .wp-block-navigation-item__content {
  background: #e8f0e7;
  color: var(--wp--preset--color--leaf);
  transform: translateY(-1px);
}

.hpl-header__actions {
  align-items: center;
  display: flex;
  gap: 0.55rem;
}

.hpl-header__search {
  align-items: center;
  border: 1px solid var(--hpl-border);
  border-radius: 50%;
  color: var(--wp--preset--color--forest);
  display: inline-flex;
  height: clamp(2.35rem, 2rem + 0.4vw, 2.7rem);
  justify-content: center;
  transition: background-color 160ms ease, border-color 160ms ease;
  width: clamp(2.35rem, 2rem + 0.4vw, 2.7rem);
}

.hpl-header__search:hover {
  background: #e8f0e7;
  border-color: #bdcbbb;
}

.hpl-header__search svg {
  fill: none;
  height: clamp(1rem, 0.8rem + 0.25vw, 1.2rem);
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
  width: clamp(1rem, 0.8rem + 0.25vw, 1.2rem);
}

.hpl-header__cta {
  background: var(--wp--preset--color--forest);
  border-radius: 999px;
  color: var(--wp--preset--color--paper);
  font-size: clamp(0.82rem, 0.45rem + 0.35vw, 0.92rem);
  font-weight: 750;
  padding: clamp(0.68rem, 0.5rem + 0.25vw, 0.82rem) clamp(0.95rem, 0.65rem + 0.45vw, 1.25rem);
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.hpl-header__cta:hover {
  background: var(--wp--preset--color--leaf);
  transform: translateY(-1px);
}

.hpl-home { background: var(--wp--preset--color--cream); }

.hpl-hero {
  background-color: var(--wp--preset--color--forest);
  background-image: url("assets/images/hero-monstera-mock-v1.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--wp--preset--color--paper);
  overflow: hidden;
  position: relative;
}

.hpl-hero::before {
  background: linear-gradient(90deg, rgb(8 28 20 / 92%) 0%, rgb(8 28 20 / 72%) 38%, rgb(8 28 20 / 18%) 68%, rgb(8 28 20 / 4%) 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.hpl-hero__columns {
  gap: 0;
  margin-bottom: 0;
  min-height: 34rem;
  position: relative;
  z-index: 1;
}

.hpl-hero__copy {
  padding: clamp(3rem, 7vw, 6rem) clamp(2rem, 5vw, 5rem) 3rem 0;
}

.hpl-hero__copy h1 {
  color: var(--wp--preset--color--paper);
  letter-spacing: -0.035em;
  margin-block: 0.65rem 1.15rem;
  max-width: 10ch;
}

.hpl-hero__copy > p:not(.hpl-eyebrow) { max-width: 34rem; }

.hpl-hero__search {
  margin-top: 1.8rem;
  max-width: 36rem;
}

.hpl-hero__search .wp-block-search__inside-wrapper {
  background: var(--wp--preset--color--paper);
  border: 0;
  border-radius: 0.45rem;
  box-shadow: var(--hpl-shadow);
  padding: 0.32rem;
}

.hpl-hero__search input { border: 0; }

.hpl-hero__search button {
  background: var(--wp--preset--color--leaf);
  border-radius: 0.35rem;
}

.hpl-hero__image {
  min-height: 34rem;
  position: relative;
}

.hpl-hero__image .wp-block-post-featured-image,
.hpl-hero__image .wp-block-post-featured-image img {
  display: none;
}

.hpl-hero__image:has(.wp-block-post-featured-image img) .hpl-photo-placeholder { display: none; }

.hpl-trust-row {
  border-top: 1px solid rgb(255 255 255 / 20%);
  gap: 0;
  padding-block: 1.1rem;
  position: relative;
  z-index: 1;
}

.hpl-trust-row p {
  border-right: 1px solid rgb(255 255 255 / 18%);
  font-size: 0.79rem;
  line-height: 1.25;
  margin: 0;
  padding-inline: 1.2rem;
}

.hpl-trust-row p:first-child { padding-left: 0; }
.hpl-trust-row p:last-child { border-right: 0; }
.hpl-trust-row small { opacity: 0.72; }

.hpl-section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.hpl-section--paper { background: var(--wp--preset--color--paper); }
.hpl-section__heading { margin-bottom: 1.35rem; }

.hpl-section__heading h2,
.hpl-section__heading p { margin: 0; }

.hpl-section__heading a {
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.hpl-plant-query .wp-block-post-template,
.hpl-article-query .wp-block-post-template { gap: 0.85rem; }

.hpl-plant-card,
.hpl-article-card { height: 100%; }

.hpl-plant-card .wp-block-post-title { margin-bottom: 0.35rem; }

.hpl-mock-grid {
  display: grid;
  gap: 0.85rem;
}

.hpl-mock-grid--plants { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.hpl-mock-grid--articles { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.hpl-mock-card {
  color: var(--wp--preset--color--forest);
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.hpl-mock-image {
  background-repeat: no-repeat;
  display: block;
  width: 100%;
}

.hpl-mock-grid--plants .hpl-mock-image {
  aspect-ratio: 1;
  background-image: url("assets/images/popular-plants-mock-v1.png");
  background-size: 300% 200%;
}

.hpl-plant-image--1 { background-position: 0 0; }
.hpl-plant-image--2 { background-position: 50% 0; }
.hpl-plant-image--3 { background-position: 100% 0; }
.hpl-plant-image--4 { background-position: 0 100%; }
.hpl-plant-image--5 { background-position: 50% 100%; }
.hpl-plant-image--6 { background-position: 100% 100%; }

.hpl-mock-grid--articles .hpl-mock-image {
  aspect-ratio: 4 / 3;
  background-image: url("assets/images/article-thumbnails-mock-v1.png");
  background-size: 400% auto;
}

.hpl-article-image--1 { background-position: 0 center; }
.hpl-article-image--2 { background-position: 33.333% center; }
.hpl-article-image--3 { background-position: 66.667% center; }
.hpl-article-image--4 { background-position: 100% center; }

.hpl-mock-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.75rem 0.8rem 0.9rem;
}

.hpl-mock-card__body strong {
  font-size: 0.79rem;
  line-height: 1.25;
}

.hpl-mock-card__body small {
  color: #697269;
  font-size: 0.64rem;
  margin-top: auto;
}

.hpl-mock-grid--plants .hpl-mock-card__body small {
  color: var(--wp--preset--color--leaf);
  font-weight: 750;
}

.hpl-mock-card__body b {
  background: #e7efe5;
  border-radius: 999px;
  color: var(--wp--preset--color--leaf);
  font-weight: 700;
  padding: 0.15rem 0.38rem;
}

.hpl-diagnosis { background: #e9ede2; }
.hpl-diagnosis .wp-block-columns { gap: clamp(2rem, 7vw, 7rem); }
.hpl-diagnosis h2 { margin-block: 0.5rem 0.75rem; }

.hpl-diagnosis__visual {
  min-height: 17rem;
  position: relative;
}

.hpl-symptom-card {
  align-items: flex-end;
  background-image: url("assets/images/plant-symptoms-mock-v1.png");
  background-repeat: no-repeat;
  background-size: 300% auto;
  border: 0.45rem solid var(--wp--preset--color--paper);
  border-radius: 0.35rem;
  box-shadow: var(--hpl-shadow);
  display: flex;
  height: 13rem;
  justify-content: center;
  padding: 0;
  position: absolute;
  top: 1.5rem;
  width: 10rem;
}

.hpl-symptom-card p {
  background: rgb(20 55 42 / 88%);
  color: white;
  font-size: 0.7rem;
  margin: 0;
  padding: 0.35rem 0.55rem;
  text-align: center;
  width: 100%;
}

.hpl-symptom-card--one { background-position: 0 center; left: 6%; transform: rotate(-7deg); }
.hpl-symptom-card--two { background-position: 50% center; left: 35%; transform: rotate(2deg); z-index: 2; }
.hpl-symptom-card--three { background-position: 100% center; left: 64%; transform: rotate(7deg); }

.hpl-card__meta {
  color: #647067;
  font-size: 0.65rem;
  gap: 0.55rem;
  margin-top: 0.7rem;
}

.hpl-card__meta a {
  background: #e7efe5;
  border-radius: 999px;
  color: var(--wp--preset--color--leaf);
  padding: 0.2rem 0.45rem;
}

@media (max-width: 1100px) {
  .hpl-header__inner { width: calc(100% - 3rem); }
  .hpl-header__cta { display: none; }
  .hpl-header__navigation { gap: 0.65rem; }
}

@media (max-width: 960px) {
  .hpl-brand__tagline { display: none; }
  .hpl-primary-nav { font-size: 0.86rem; }
  .hpl-primary-nav .wp-block-navigation__container { gap: 0.05rem; }
  .hpl-primary-nav .wp-block-navigation-item__content { padding-inline: 0.58rem; }
}

@media (max-width: 860px) {
  .hpl-header__inner {
    min-height: 4.4rem;
    width: calc(100% - 2rem);
  }

  .hpl-header__actions { display: none; }
  .hpl-primary-nav .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }

  .hpl-primary-nav .wp-block-navigation__responsive-container-open {
    align-items: center;
    border: 1px solid var(--hpl-border);
    border-radius: 50%;
    display: flex !important;
    height: 2.55rem;
    justify-content: center;
    width: 2.55rem;
  }

  .hpl-primary-nav .wp-block-navigation__responsive-container.is-menu-open {
    background: var(--wp--preset--color--paper);
    color: var(--wp--preset--color--forest);
    padding: clamp(1.5rem, 5vw, 3rem);
  }

  .hpl-primary-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    padding-top: 4rem;
  }

  .hpl-primary-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
  }

  .hpl-primary-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    border-bottom: 1px solid var(--hpl-border);
    border-radius: 0;
    display: block;
    font-family: var(--wp--preset--font-family--editorial);
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    padding: 1rem 0;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .hpl-plant-query .wp-block-post-template { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hpl-article-query .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hpl-hero__copy { padding-left: 1.25rem; }
  .hpl-mock-grid--plants { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hpl-mock-grid--articles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hpl-header__cta { display: none; }
}

@media (max-width: 781px) {
  .hpl-header__inner { min-height: 4.25rem; }
  .hpl-primary-nav { font-size: 1rem; }
  .hpl-brand__mark { height: 2rem; width: 2rem; }
  .hpl-brand__tagline { display: none; }
  .hpl-header__actions { display: none; }
  .hpl-primary-nav .wp-block-navigation__responsive-container-open {
    align-items: center;
    border: 1px solid var(--hpl-border);
    border-radius: 50%;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
  }
  .hpl-primary-nav .wp-block-navigation__responsive-container.is-menu-open {
    background: var(--wp--preset--color--paper);
    color: var(--wp--preset--color--forest);
    padding: 1.5rem;
  }
  .hpl-primary-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    padding-top: 4rem;
  }
  .hpl-primary-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
  }
  .hpl-primary-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    border-bottom: 1px solid var(--hpl-border);
    border-radius: 0;
    display: block;
    font-family: var(--wp--preset--font-family--editorial);
    font-size: 1.65rem;
    padding: 1rem 0;
    width: 100%;
  }

  .hpl-hero__columns {
    min-height: 0;
    position: relative;
  }

  .hpl-hero__copy {
    min-height: 30rem;
    padding: 4rem 1.25rem 2.5rem;
    position: relative;
    z-index: 2;
  }

  .hpl-hero {
    background-position: 58% center;
  }

  .hpl-hero::before {
    background: linear-gradient(90deg, rgb(12 38 27 / 88%), rgb(12 38 27 / 42%));
  }

  .hpl-hero__copy h1 { font-size: clamp(2.55rem, 12vw, 4rem) !important; }

  .hpl-hero__image {
    inset: 0;
    min-height: 30rem;
    position: absolute;
    width: 100%;
  }

  .hpl-hero__image .wp-block-post-featured-image,
  .hpl-hero__image .wp-block-post-featured-image img { min-height: 30rem; }

  .hpl-photo-placeholder { display: none; }

  .hpl-trust-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
  }

  .hpl-trust-row p:nth-child(4) { display: none; }

  .hpl-trust-row p {
    padding-inline: 0.55rem;
    text-align: center;
  }

  .hpl-trust-row p:first-child { padding-left: 0.55rem; }
  .hpl-section { padding-block: 2.25rem; }

  .hpl-plant-query {
    overflow-x: auto;
    padding-bottom: 0.8rem;
  }

  .hpl-plant-query .wp-block-post-template {
    display: flex;
    width: max-content;
  }

  .hpl-plant-card { width: 9.5rem; }

  .hpl-mock-grid--plants {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.8rem;
  }

  .hpl-mock-grid--plants .hpl-mock-card { flex: 0 0 9.5rem; }
  .hpl-diagnosis__visual { min-height: 14rem; }

  .hpl-symptom-card {
    height: 11rem;
    width: 7.7rem;
  }

  .hpl-symptom-card--one { left: 2%; }
  .hpl-symptom-card--two { left: calc(50% - 3.85rem); }
  .hpl-symptom-card--three { left: auto; right: 2%; }
}

@media (max-width: 520px) {
  .hpl-brand__title { font-size: 1rem; }
  .hpl-article-query .wp-block-post-template { grid-template-columns: 1fr 1fr; }
  .hpl-section__heading { align-items: baseline; }
  .hpl-mock-grid--articles { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

