/*
Theme Name: heyNorah Demo
Theme URI: https://heynorah.ai
Author: heyNorah
Author URI: https://heynorah.ai
Description: A lightweight WordPress 7 demo theme for showing the heyNorah plugin surfaces.
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: heynorah-demo
Tags: custom-logo, custom-menu, editor-style
*/

:root {
  --hn-bg: #f2eee8;
  --hn-surface: #fffdfa;
  --hn-surface-2: #f7f2ec;
  --hn-line: #dfd6ca;
  --hn-line-strong: #cfc3b5;
  --hn-ink: #28231e;
  --hn-muted: #62594f;
  --hn-faint: #91877a;
  --hn-accent: #267b80;
  --hn-accent-soft: #e8f6f4;
  --hn-logo: #6366f1;
  --hn-critical: #b44737;
  --hn-good: #267b58;
  --hn-max: 1180px;
  --hn-radius: 8px;
  --hn-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--hn-bg);
  color: var(--hn-ink);
  font-family: var(--hn-font);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--hn-bg);
  color: var(--hn-ink);
  font-family: var(--hn-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.admin-bar .hn-demo-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .hn-demo-header {
    top: 46px;
  }
}

a {
  color: var(--hn-accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--hn-ink);
}

img,
svg,
video {
  display: block;
  height: auto;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

::selection {
  background: var(--hn-logo);
  color: #ffffff;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  clip: auto;
  border: 1px solid var(--hn-line-strong);
  border-radius: var(--hn-radius);
  background: var(--hn-surface);
  color: var(--hn-ink);
}

.hn-demo-site {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.72), rgba(242, 238, 232, 0) 28rem),
    var(--hn-bg);
}

.hn-demo-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(207, 195, 181, 0.8);
  background: rgba(255, 253, 250, 0.92);
  backdrop-filter: blur(18px);
}

.hn-demo-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2rem, var(--hn-max));
  min-height: 64px;
  margin: 0 auto;
  gap: 1rem;
}

.hn-demo-brand,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: 96px;
  min-width: 96px;
}

.hn-demo-brand img,
.custom-logo-link img {
  width: 96px;
  max-height: 50px;
  object-fit: contain;
}

.hn-demo-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  min-width: 0;
}

.hn-demo-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hn-demo-menu a,
.hn-demo-header-action,
.hn-demo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: var(--hn-radius);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

.hn-demo-menu a {
  padding: 0.72rem 0.78rem;
  color: var(--hn-muted);
}

.hn-demo-menu a:hover,
.hn-demo-menu .current-menu-item > a {
  background: var(--hn-surface-2);
  color: var(--hn-ink);
}

.hn-demo-header-action,
.hn-demo-button {
  border: 1px solid var(--hn-accent);
  background: var(--hn-accent);
  color: #ffffff;
  padding: 0.76rem 1rem;
}

.hn-demo-header-action:hover,
.hn-demo-button:hover {
  border-color: var(--hn-ink);
  background: var(--hn-ink);
  color: #ffffff;
}

.hn-demo-button.is-secondary {
  border-color: var(--hn-line-strong);
  background: var(--hn-surface);
  color: var(--hn-ink);
}

.hn-demo-button.is-secondary:hover {
  border-color: var(--hn-accent);
  background: var(--hn-accent-soft);
  color: var(--hn-ink);
}

.hn-demo-main {
  width: min(100% - 2rem, var(--hn-max));
  margin: 0 auto;
  padding: 4rem 0 5rem;
}

.hn-demo-front {
  padding-top: 3rem;
}

.hn-demo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: stretch;
  gap: 1rem;
  padding: 2.5rem 0 1.5rem;
}

.hn-demo-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 420px;
  padding: 3.5rem 0;
}

.hn-demo-eyebrow {
  margin: 0 0 1rem;
  color: var(--hn-accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hn-demo-hero h1,
.hn-demo-title {
  max-width: 10ch;
  margin: 0;
  color: var(--hn-ink);
  font-size: 4.25rem;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 0.98;
}

.hn-demo-lede {
  max-width: 42rem;
  margin: 1.25rem 0 0;
  color: var(--hn-muted);
  font-size: 1.18rem;
  line-height: 1.7;
}

.hn-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hn-demo-status {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
  border: 1px solid var(--hn-line);
  border-radius: var(--hn-radius);
  background:
    linear-gradient(180deg, rgba(232, 246, 244, 0.8), rgba(255, 253, 250, 0.96)),
    var(--hn-surface);
  padding: 1rem;
}

.hn-demo-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hn-line);
}

.hn-demo-status-header span {
  color: var(--hn-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.hn-demo-pulse {
  display: inline-flex;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: var(--hn-good);
  box-shadow: 0 0 0 5px rgba(38, 123, 88, 0.12);
}

.hn-demo-status-list {
  display: grid;
  gap: 0.65rem;
  margin: auto 0 0;
  padding: 1rem 0 0;
}

.hn-demo-status-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid rgba(207, 195, 181, 0.74);
  border-radius: var(--hn-radius);
  background: rgba(255, 253, 250, 0.76);
  padding: 0.9rem;
}

.hn-demo-status-row strong {
  color: var(--hn-ink);
  font-size: 0.98rem;
}

.hn-demo-status-row span {
  color: var(--hn-muted);
  font-size: 0.85rem;
}

.hn-demo-status-row em {
  color: var(--hn-accent);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 800;
}

.hn-demo-section {
  padding: 2.5rem 0 0;
}

.hn-demo-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hn-demo-section h2,
.hn-demo-content h1,
.hn-demo-entry-title {
  margin: 0;
  color: var(--hn-ink);
  font-size: 2rem;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.12;
}

.hn-demo-section-header p {
  max-width: 34rem;
  margin: 0;
  color: var(--hn-muted);
}

.hn-demo-card-grid,
.hn-demo-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.hn-demo-card,
.hn-demo-post-card {
  min-height: 178px;
  border: 1px solid var(--hn-line);
  border-radius: var(--hn-radius);
  background: var(--hn-surface);
  padding: 1.15rem;
}

.hn-demo-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--hn-ink);
  text-decoration: none;
}

.hn-demo-card:hover,
.hn-demo-post-card:hover {
  border-color: var(--hn-line-strong);
  background: #ffffff;
}

.hn-demo-card span,
.hn-demo-post-meta,
.hn-demo-entry-meta {
  color: var(--hn-faint);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hn-demo-card strong {
  display: block;
  max-width: 14rem;
  color: var(--hn-ink);
  font-size: 1.24rem;
  line-height: 1.24;
}

.hn-demo-card p,
.hn-demo-post-card p {
  margin: 0.75rem 0 0;
  color: var(--hn-muted);
}

.hn-demo-content,
.hn-demo-post-card {
  width: min(100%, 820px);
}

.hn-demo-content {
  margin: 0 auto;
  border: 1px solid var(--hn-line);
  border-radius: var(--hn-radius);
  background: var(--hn-surface);
  padding: 2rem;
}

.hn-demo-content-header {
  margin-bottom: 1.5rem;
}

.hn-demo-entry-title a {
  color: inherit;
  text-decoration: none;
}

.hn-demo-entry-title a:hover {
  color: var(--hn-accent);
}

.hn-demo-post-grid .hn-demo-post-card {
  width: auto;
}

.hn-demo-post-card {
  min-height: 220px;
}

.hn-demo-post-card .hn-demo-entry-title {
  margin-top: 0.45rem;
  font-size: 1.32rem;
}

.entry-content > *:first-child,
.hn-demo-post-card > *:first-child {
  margin-top: 0;
}

.entry-content > *:last-child,
.hn-demo-post-card > *:last-child {
  margin-bottom: 0;
}

.entry-content {
  color: var(--hn-ink);
}

.entry-content h2,
.entry-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0;
  line-height: 1.15;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
  color: var(--hn-muted);
}

.entry-content .wp-block-button__link {
  border-radius: var(--hn-radius);
  background: var(--hn-accent);
  color: #ffffff;
  font-weight: 800;
}

.entry-content .alignwide {
  max-width: var(--hn-max);
}

.hn-demo-pagination,
.hn-demo-post-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, 820px);
  margin: 2rem auto 0;
}

.hn-demo-empty {
  width: min(100%, 680px);
  margin: 0 auto;
  border: 1px solid var(--hn-line);
  border-radius: var(--hn-radius);
  background: var(--hn-surface);
  padding: 2rem;
  text-align: center;
}

.heynorah-inventory-archive {
  width: min(100% - 2rem, var(--hn-max));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.heynorah-inventory-archive > h1 {
  margin: 0 0 1rem;
  color: var(--hn-ink);
  font-size: 2.5rem;
  line-height: 1.05;
}

.hn-demo-footer {
  border-top: 1px solid var(--hn-line);
  background: var(--hn-surface);
}

.hn-demo-footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  width: min(100% - 2rem, var(--hn-max));
  margin: 0 auto;
  padding: 1.35rem 0;
  color: var(--hn-muted);
  font-size: 0.92rem;
}

.hn-demo-footer strong {
  display: block;
  color: var(--hn-ink);
}

.hn-demo-footer a {
  font-weight: 700;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.45);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .hn-demo-section-header {
    align-items: flex-start;
  }

  .hn-demo-section-header {
    flex-direction: column;
  }

  .hn-demo-hero {
    grid-template-columns: 1fr;
    padding: 1.5rem 0 1rem;
  }

  .hn-demo-hero-copy,
  .hn-demo-status {
    min-height: auto;
  }

  .hn-demo-hero h1,
  .hn-demo-title {
    font-size: 3.1rem;
  }

  .hn-demo-card-grid,
  .hn-demo-post-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hn-demo-main {
    width: min(100% - 1.25rem, var(--hn-max));
    padding: 1.5rem 0 3rem;
  }

  .hn-demo-front {
    padding-top: 1rem;
  }

  .hn-demo-header-inner {
    flex-direction: row;
    align-items: center;
    width: min(100% - 1.25rem, var(--hn-max));
    min-height: 60px;
    gap: 0.5rem;
  }

  .hn-demo-brand,
  .custom-logo-link,
  .hn-demo-brand img,
  .custom-logo-link img {
    width: 92px;
  }

  .hn-demo-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    gap: 0.35rem;
    min-width: 0;
  }

  .hn-demo-menu {
    flex: 0 1 auto;
    gap: 0;
  }

  .hn-demo-menu a,
  .hn-demo-header-action {
    min-height: 38px;
    padding: 0.6rem 0.68rem;
    font-size: 0.88rem;
  }

  .hn-demo-button {
    width: 100%;
  }

  .hn-demo-hero {
    padding-top: 1rem;
  }

  .hn-demo-hero-copy {
    padding: 1rem 0;
  }

  .hn-demo-hero h1,
  .hn-demo-title {
    max-width: 12ch;
    font-size: 2.25rem;
    line-height: 1.04;
  }

  .hn-demo-lede {
    font-size: 1rem;
    line-height: 1.6;
  }

  .hn-demo-actions {
    margin-top: 1.25rem;
  }

  .hn-demo-status,
  .hn-demo-card,
  .hn-demo-post-card {
    min-height: auto;
  }

  .hn-demo-status-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .hn-demo-section {
    padding-top: 1.5rem;
  }

  .hn-demo-section h2,
  .hn-demo-content h1,
  .hn-demo-entry-title {
    font-size: 1.65rem;
    line-height: 1.12;
  }

  .hn-demo-post-card .hn-demo-entry-title {
    font-size: 1.45rem;
  }

  .hn-demo-post-card p,
  .entry-content p,
  .entry-content ul,
  .entry-content ol {
    font-size: 1rem;
    line-height: 1.6;
  }

  .hn-demo-content,
  .hn-demo-post-card,
  .hn-demo-empty {
    padding: 1.25rem;
  }

  .hn-demo-footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .hn-demo-brand,
  .custom-logo-link,
  .hn-demo-brand img,
  .custom-logo-link img {
    width: 82px;
  }

  .hn-demo-menu a,
  .hn-demo-header-action {
    padding: 0.55rem 0.52rem;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}
