/*
Theme Name: Hivve
Theme URI: https://hivveimpact.com
Author: Hivve
Author URI: https://hivve.tech
Description: First-party Hivve theme implementing the Hivve Brand Guidelines.
Version: 1.0.1
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 8.3
License: Proprietary
Text Domain: hivve
*/

/* ----------------------------------------------------------------------------
 * Design tokens — see DESIGN.md
 * -------------------------------------------------------------------------- */
:root {
  /* Azure Blue family */
  --hivve-clear-water: #f5f8fe;
  --hivve-azure: #0073e6;
  --hivve-cobalt: #0047ab;
  --hivve-navy: #013175;
  --hivve-midnight: #011e48;

  /* Accent */
  --hivve-yellow: #f1c611;

  /* Neutrals */
  --hivve-dark-grey: #333333;
  --hivve-slate: #8c8c8c;
  --hivve-white: #ffffff;

  /* Roles */
  --hivve-bg: var(--hivve-white);
  --hivve-text: var(--hivve-dark-grey);
  --hivve-text-muted: var(--hivve-slate);
  --hivve-link: var(--hivve-azure);
  --hivve-link-hover: var(--hivve-cobalt);
  --hivve-border: rgba(51, 51, 51, 0.12);

  /* Typography */
  --hivve-font-display: "Funnel Display", Arial, sans-serif;
  --hivve-font-body: "Geist", Arial, sans-serif;

  /* Layout */
  --hivve-container-max: 72rem;
  --hivve-content-max: 42rem;
  --hivve-space-xs: 0.5rem;
  --hivve-space-sm: 1rem;
  --hivve-space-md: 1.5rem;
  --hivve-space-lg: 2.5rem;
  --hivve-space-xl: 4rem;

  --hivve-shadow: 0 12px 32px -16px rgba(1, 30, 72, 0.18);
}

/* ----------------------------------------------------------------------------
 * Reset / base
 * -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--hivve-bg);
  color: var(--hivve-text);
  font-family: var(--hivve-font-body);
  font-weight: 400;
  font-style: normal;  /* No italics anywhere — see DESIGN.md */
  line-height: 1.6;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ----------------------------------------------------------------------------
 * Typography
 * -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--hivve-space-md);
  line-height: 1.2;
  font-weight: 400;
  text-align: left;
}

h1 {
  font-family: var(--hivve-font-display);
  font-size: clamp(2rem, 5vw, 2.75rem); /* Headline — Funnel Display, 30pt+ */
}

.hivve-lede,
h2 {
  font-family: var(--hivve-font-display);
  font-size: clamp(1.5rem, 3vw, 1.75rem); /* Subheader 1 — Funnel Display, 20pt+ */
}

h3 {
  font-family: var(--hivve-font-body);
  font-size: 1.125rem;
  font-weight: 600;
}

h4 {
  font-family: var(--hivve-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;  /* Subheader 4 is the only ALL CAPS heading */
  letter-spacing: 0.05em;
}

.hivve-eyebrow {
  font-family: var(--hivve-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hivve-azure);
}

p {
  margin: 0 0 var(--hivve-space-md);
}

a {
  color: var(--hivve-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 0.15s ease;
}

a:hover,
a:focus {
  color: var(--hivve-link-hover);
}

strong,
b {
  font-weight: 600;
}

em,
i {
  font-style: normal;          /* No italics — fall back to weight */
  font-weight: 600;
}

blockquote {
  margin: var(--hivve-space-lg) 0;
  padding: var(--hivve-space-md) var(--hivve-space-lg);
  border-left: 4px solid var(--hivve-yellow);
  background: var(--hivve-clear-water);
  font-family: var(--hivve-font-display);
  font-size: 1.25rem;
}

blockquote p:last-child {
  margin-bottom: 0;
}

code,
pre,
kbd {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95em;
}

pre {
  padding: var(--hivve-space-md);
  background: var(--hivve-clear-water);
  overflow-x: auto;
}

hr {
  border: 0;
  height: 1px;
  background: var(--hivve-border);
  margin: var(--hivve-space-lg) 0;
}

ul,
ol {
  margin: 0 0 var(--hivve-space-md);
  padding-left: 1.5rem;
}

li + li {
  margin-top: 0.25rem;
}

/* ----------------------------------------------------------------------------
 * Layout primitives
 * -------------------------------------------------------------------------- */
.hivve-container {
  width: 100%;
  max-width: var(--hivve-container-max);
  margin-inline: auto;
  padding-inline: var(--hivve-space-md);
}

.hivve-prose {
  max-width: var(--hivve-content-max);
  margin-inline: auto;
}

.hivve-skip-link {
  position: absolute;
  top: -3rem;
  left: var(--hivve-space-sm);
  padding: 0.5rem 1rem;
  background: var(--hivve-midnight);
  color: var(--hivve-white);
  text-decoration: none;
  z-index: 100;
}

.hivve-skip-link:focus {
  top: var(--hivve-space-sm);
  color: var(--hivve-white);
}

/* ----------------------------------------------------------------------------
 * Header
 * -------------------------------------------------------------------------- */
.hivve-header {
  border-bottom: 1px solid var(--hivve-border);
  background: var(--hivve-bg);
}

.hivve-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hivve-space-md);
  padding-block: var(--hivve-space-md);
}

.hivve-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15em;
  text-decoration: none;
  color: var(--hivve-midnight);
  font-family: var(--hivve-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hivve-brand:hover,
.hivve-brand:focus {
  color: var(--hivve-azure);
}

.hivve-brand__dot {
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  background: var(--hivve-yellow);
  margin-left: 0.1em;
  transform: translateY(-0.05em);
}

.hivve-nav {
  display: flex;
  align-items: center;
  gap: var(--hivve-space-md);
}

.hivve-nav__list {
  display: flex;
  gap: var(--hivve-space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.hivve-nav__list a {
  color: var(--hivve-text);
  text-decoration: none;
  font-weight: 500;
}

.hivve-nav__list a:hover,
.hivve-nav__list .current-menu-item > a {
  color: var(--hivve-azure);
}

/* ----------------------------------------------------------------------------
 * Main content
 * -------------------------------------------------------------------------- */
.hivve-main {
  padding-block: var(--hivve-space-xl);
}

.hivve-page__header {
  margin-bottom: var(--hivve-space-lg);
}

.hivve-meta {
  color: var(--hivve-text-muted);
  font-size: 0.875rem;
  margin-bottom: var(--hivve-space-md);
}

.hivve-meta a {
  color: inherit;
}

.hivve-card {
  background: var(--hivve-bg);
  border: 1px solid var(--hivve-border);
  padding: var(--hivve-space-lg);
  margin-bottom: var(--hivve-space-md);
}

.hivve-card--shadow {
  box-shadow: var(--hivve-shadow);
  border: none;
}

.hivve-card__title {
  margin-top: 0;
}

/* Post list */
.hivve-post-list {
  display: grid;
  gap: var(--hivve-space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}

.hivve-post-list__item {
  border-bottom: 1px solid var(--hivve-border);
  padding-bottom: var(--hivve-space-lg);
}

.hivve-post-list__item:last-child {
  border-bottom: 0;
}

.hivve-post-list__title {
  margin-bottom: var(--hivve-space-xs);
}

.hivve-post-list__title a {
  color: var(--hivve-midnight);
  text-decoration: none;
}

.hivve-post-list__title a:hover {
  color: var(--hivve-azure);
}

/* ----------------------------------------------------------------------------
 * Forms
 * -------------------------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--hivve-text);
  background: var(--hivve-white);
  border: 1px solid var(--hivve-border);
  border-radius: 4px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--hivve-azure);
  outline-offset: 1px;
  border-color: var(--hivve-azure);
}

button,
.hivve-button,
input[type="submit"] {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--hivve-white);
  background: var(--hivve-azure);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

button:hover,
button:focus,
.hivve-button:hover,
.hivve-button:focus,
input[type="submit"]:hover,
input[type="submit"]:focus {
  background: var(--hivve-cobalt);
  color: var(--hivve-white);
}

.hivve-button--ghost {
  background: transparent;
  color: var(--hivve-azure);
  border: 1px solid var(--hivve-azure);
}

.hivve-button--ghost:hover,
.hivve-button--ghost:focus {
  background: var(--hivve-azure);
  color: var(--hivve-white);
}

.hivve-search-form {
  display: flex;
  gap: var(--hivve-space-xs);
}

/* ----------------------------------------------------------------------------
 * Footer
 * -------------------------------------------------------------------------- */
.hivve-footer {
  background: var(--hivve-midnight);
  color: var(--hivve-white);
  padding-block: var(--hivve-space-xl);
  margin-top: var(--hivve-space-xl);
}

.hivve-footer a {
  color: var(--hivve-clear-water);
}

.hivve-footer a:hover {
  color: var(--hivve-yellow);
}

.hivve-footer__cols {
  display: grid;
  gap: var(--hivve-space-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .hivve-footer__cols {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.hivve-footer__brand {
  font-family: var(--hivve-font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.hivve-footer__legal {
  margin-top: var(--hivve-space-lg);
  padding-top: var(--hivve-space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.72);
}

/* ----------------------------------------------------------------------------
 * Block editor alignment helpers (Gutenberg)
 * -------------------------------------------------------------------------- */
.alignwide {
  margin-inline: calc(var(--hivve-space-md) * -1);
}

.alignfull {
  margin-inline: calc(50% - 50vw);
  max-width: 100vw;
  width: 100vw;
}

.aligncenter {
  margin-inline: auto;
  text-align: center;
}

/* WP gallery / caption */
.wp-caption,
figure {
  margin: var(--hivve-space-md) 0;
}

.wp-caption-text,
figcaption {
  font-size: 0.875rem;
  color: var(--hivve-text-muted);
  text-align: left;
  margin-top: var(--hivve-space-xs);
}
