/*
Theme Name: Elementa HaminoX
Theme URI: https://elementabiotech.com
Author: Elementa Biotech
Description: Brochure and bulk-enquiry theme for Elementa Biotech and the HaminoX amino acid plant nutrient. Minimal direction, oversized type, palette derived from the Elementa Biotech mark.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elementa-haminox
Tags: business, one-column, custom-logo, custom-menu
*/

/* ---------------------------------------------------------------
   TOKENS
   Navy, teal and mint come from the Elementa Biotech mark. The
   bright mint is that mint pushed to full saturation: one loud
   accent, used sparingly.
   --------------------------------------------------------------- */

:root {
  --bg:        #F1F4F0;
  --surface:   #FFFFFF;
  --surface-2: #E7EDE6;
  --navy:      #052661;
  --navy-deep: #041B45;
  --ink:       #0B1B2E;
  --mute:      #66756F;
  --pop:       #35E3A8;
  --teal:      #2EB29D;
  --mint:      #9BD9BA;
  --hair:      rgba(11,27,46,.10);
  --hair-lt:   rgba(255,255,255,.16);

  --display: "Bricolage Grotesque", "Archivo", Helvetica, Arial, sans-serif;
  --body:    "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:    "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1200px;
  --gut: clamp(20px, 5vw, 56px);
  --r-lg: 26px;
  --r-md: 18px;
  --r-pill: 999px;
}

/* ---------------------------------------------------------------
   RESET
   --------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--teal); }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.hx-skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 12px 18px; z-index: 999; border-radius: var(--r-pill); }
.hx-skip:focus { left: 10px; top: 10px; }

/* ---------------------------------------------------------------
   TYPE — oversized, tight, low leading. The type is the design.
   --------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--navy);
  margin: 0 0 .4em;
  font-weight: 600;
}

h1 { font-size: clamp(3rem, 8.5vw, 6.5rem); line-height: .92; letter-spacing: -0.045em; }
h2 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: .98; letter-spacing: -0.038em; }
h3 { font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.15; letter-spacing: -0.02em; }
h4 { font-size: 1rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.hx-lede {
  font-size: clamp(1.1rem, 1.9vw, 1.4rem);
  line-height: 1.45;
  letter-spacing: -0.018em;
  color: var(--mute);
  max-width: 46ch;
}

/* Eyebrow as a pill chip. Carries the amino-acid codes on the
   product page, so it is set in the data face. */
.hx-eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--surface);
  border-radius: var(--r-pill);
  padding: 7px 15px;
  margin: 0 0 1.5rem;
}
.hx-on-navy .hx-eyebrow,
.hx-band--navy .hx-eyebrow { background: rgba(255,255,255,.1); color: var(--pop); }

/* Marker highlight behind one hero word. */
.hx-mark {
  background: var(--pop);
  border-radius: 8px;
  padding: 0 .12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---------------------------------------------------------------
   LAYOUT
   --------------------------------------------------------------- */

.hx-wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

.hx-narrow { max-width: 760px; }
.hx-wrap.hx-narrow { max-width: var(--wrap); }
.hx-wrap.hx-narrow > * { max-width: 760px; }

.hx-band { padding-block: clamp(64px, 10vw, 128px); }
.hx-band--tight { padding-block: clamp(48px, 7vw, 84px); }
.hx-band--wash { background: var(--surface-2); }

.hx-band--navy { background: var(--navy); color: rgba(255,255,255,.8); }
.hx-band--navy h2, .hx-band--navy h3 { color: #fff; }
.hx-band--navy a { color: var(--pop); }
.hx-band--navy .hx-lede { color: rgba(255,255,255,.72); }

.hx-grid { display: grid; gap: clamp(14px, 1.6vw, 20px); }
.hx-grid--3 { grid-template-columns: repeat(3, 1fr); }
.hx-grid--2 { grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 56px); }

@media (max-width: 900px) {
  .hx-grid--3, .hx-grid--2 { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   BUTTONS — full pill
   --------------------------------------------------------------- */

.hx-btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: .97rem;
  letter-spacing: -0.01em;
  padding: 16px 32px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--navy);
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}
.hx-btn:hover { background: var(--pop); border-color: var(--pop); color: var(--navy); transform: translateY(-1px); }

.hx-btn--ghost { background: transparent; color: var(--navy); border-color: var(--hair); }
.hx-btn--ghost:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.hx-on-navy .hx-btn,
.hx-band--navy .hx-btn { background: var(--pop); border-color: var(--pop); color: var(--navy); }
.hx-on-navy .hx-btn:hover,
.hx-band--navy .hx-btn:hover { background: #fff; border-color: #fff; color: var(--navy); }

.hx-on-navy .hx-btn--ghost,
.hx-band--navy .hx-btn--ghost { background: transparent; color: #fff; border-color: var(--hair-lt); }
.hx-on-navy .hx-btn--ghost:hover,
.hx-band--navy .hx-btn--ghost:hover { background: rgba(255,255,255,.1); border-color: transparent; color: #fff; }

.hx-btnrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------------------------------------------------------------
   HEADER — floating pill bar
   --------------------------------------------------------------- */

.hx-header {
  position: sticky; top: 0; z-index: 60;
  padding-top: 14px;
  background: linear-gradient(var(--bg) 62%, rgba(241,244,240,0));
}

.hx-header__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  background: var(--surface);
  border-radius: var(--r-pill);
  padding: 10px 12px 10px 26px;
  min-height: 64px;
}

.hx-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.hx-logo img { max-height: 42px; width: auto; }

/* Footer keeps a text wordmark: the logo's navy type disappears on navy. */
.hx-logo__text {
  font-family: var(--display); font-weight: 600; font-size: 1.02rem;
  letter-spacing: -0.03em; color: var(--navy);
}

.hx-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.hx-nav a {
  display: block;
  font-size: .93rem; font-weight: 500; letter-spacing: -0.012em;
  color: var(--ink); text-decoration: none;
  padding: 9px 15px; border-radius: var(--r-pill);
  transition: background .15s ease;
}
.hx-nav a:hover { background: var(--surface-2); color: var(--navy); }
.hx-nav .current-menu-item > a { background: var(--surface-2); color: var(--navy); }

.hx-header .hx-btn { padding: 12px 24px; font-size: .9rem; }

.hx-burger {
  display: none; background: var(--surface-2); border: 0; padding: 11px;
  color: var(--navy); cursor: pointer; border-radius: var(--r-pill);
}
.hx-burger svg { display: block; }

@media (max-width: 1000px) {
  .hx-burger { display: block; }
  .hx-header__in { position: relative; }
  .hx-nav {
    display: none; position: absolute; left: 0; right: 0; top: calc(100% + 10px);
    background: var(--surface); border-radius: var(--r-lg); padding: 14px;
  }
  .hx-nav.is-open { display: block; }
  .hx-nav ul { flex-direction: column; gap: 2px; }
  .hx-nav a { padding: 13px 16px; }
  .hx-header__cta { display: none; }
}

/* ---------------------------------------------------------------
   HERO — light ground, oversized type, no ornament.
   --------------------------------------------------------------- */

.hx-hero { padding-block: clamp(52px, 8vw, 104px) clamp(38px, 5vw, 68px); }
.hx-hero h1 { margin-bottom: .32em; max-width: 15ch; }
.hx-hero .hx-lede { max-width: 44ch; margin-bottom: 2.2rem; }

/* ---------------------------------------------------------------
   MARQUEE — the one moving element. Carries facts, not decoration.
   --------------------------------------------------------------- */

.hx-marquee {
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  padding-block: 18px;
  border-radius: var(--r-lg);
  margin-inline: var(--gut);
}
.hx-marquee__track { display: flex; width: max-content; animation: hx-scroll 36s linear infinite; }
.hx-marquee__group { display: flex; flex-shrink: 0; }
.hx-marquee span {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .06em;
  text-transform: uppercase; white-space: nowrap;
  padding-inline: 24px;
  display: inline-flex; align-items: center; gap: 24px;
}
.hx-marquee span::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--pop); display: inline-block;
}
@keyframes hx-scroll {
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(-50%,0,0); }
}
@media (prefers-reduced-motion: reduce) { .hx-marquee__track { animation: none; } }

/* ---------------------------------------------------------------
   CARDS — soft blocks, no borders, no shadows.
   --------------------------------------------------------------- */

.hx-card { background: var(--surface); border-radius: var(--r-lg); padding: clamp(26px, 3vw, 38px); }
.hx-card h3 { margin-bottom: .5em; }
.hx-card p { color: var(--mute); margin-bottom: 0; }
.hx-band--navy .hx-card { background: rgba(255,255,255,.07); }
.hx-band--navy .hx-card p { color: rgba(255,255,255,.72); }

/* ---------------------------------------------------------------
   LAB BLOCK — the specification, in test-report vernacular.
   --------------------------------------------------------------- */

.hx-lab { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.hx-lab__head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap;
  padding: 20px clamp(22px, 3vw, 34px);
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mute);
}
.hx-lab dl { margin: 0; }
.hx-lab__row {
  display: grid; grid-template-columns: 230px 1fr; gap: 20px;
  padding: 17px clamp(22px, 3vw, 34px);
  border-top: 1px solid var(--hair);
}
.hx-lab dt {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--mute); margin: 0;
}
.hx-lab dd { margin: 0; color: var(--ink); }

@media (max-width: 700px) { .hx-lab__row { grid-template-columns: 1fr; gap: 5px; } }

/* ---------------------------------------------------------------
   TABLE
   --------------------------------------------------------------- */

.hx-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.hx-table th, .hx-table td { text-align: left; padding: 18px 20px; vertical-align: top; }
.hx-table th {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mute); font-weight: 400;
}
.hx-table tbody tr { border-top: 1px solid var(--hair); }
.hx-table td:first-child { font-family: var(--display); font-weight: 600; color: var(--navy); letter-spacing: -0.02em; }
.hx-table--scroll { overflow-x: auto; }

/* ---------------------------------------------------------------
   PROCESS — a real sequence, so it is numbered.
   --------------------------------------------------------------- */

.hx-steps { counter-reset: hxstep; display: grid; gap: 14px; }
.hx-step {
  display: grid; grid-template-columns: 90px 1fr; gap: 20px;
  background: var(--surface); border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 34px);
}
.hx-step::before {
  counter-increment: hxstep;
  content: counter(hxstep, decimal-leading-zero);
  font-family: var(--display); font-weight: 600; font-size: 2.6rem;
  color: var(--pop); line-height: .82; letter-spacing: -0.05em;
}
.hx-step h3 { margin-bottom: .4em; }
.hx-step p { color: var(--mute); margin-bottom: 0; }

@media (max-width: 640px) { .hx-step { grid-template-columns: 1fr; gap: 10px; } }

/* ---------------------------------------------------------------
   FAQ
   --------------------------------------------------------------- */

.hx-faq { display: grid; gap: 10px; }
.hx-faq details { background: var(--surface); border-radius: var(--r-md); }
.hx-faq summary {
  cursor: pointer; list-style: none;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem); letter-spacing: -0.025em;
  color: var(--navy); padding: 24px 60px 24px 26px; position: relative;
}
.hx-faq summary::-webkit-details-marker { display: none; }
.hx-faq summary::after {
  content: "+"; position: absolute; right: 24px; top: 50%;
  transform: translateY(-50%); font-family: var(--mono);
  font-size: 1.4rem; color: var(--teal); line-height: 1;
}
.hx-faq details[open] summary::after { content: "\2013"; }
.hx-faq__body { padding: 0 26px 26px; color: var(--mute); max-width: 66ch; }

/* ---------------------------------------------------------------
   FIGURES
   --------------------------------------------------------------- */

.hx-figure { margin: 0; }
.hx-figure img { width: 100%; border-radius: var(--r-lg); }
.hx-figure figcaption { font-size: .95rem; color: var(--mute); padding: 14px 4px 0; }
.hx-figure figcaption strong { color: var(--navy); font-family: var(--display); letter-spacing: -0.02em; }

.hx-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  background: var(--surface);
  display: grid; place-items: center; align-content: center; gap: 10px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mute); text-align: center;
  padding: 24px;
}
.hx-placeholder small {
  display: block; font-size: .6rem; letter-spacing: .06em;
  color: var(--teal); text-transform: none;
}

/* An uploaded image slot. */
.hx-slot { margin: 0; }
.hx-slot img,
img.hx-slot-img { width: 100%; border-radius: var(--r-lg); display: block; }
.hx-figure .hx-slot img { border-radius: var(--r-lg); }

/* ---------------------------------------------------------------
   NOTE
   --------------------------------------------------------------- */

.hx-note { background: var(--surface); border-radius: var(--r-lg); padding: clamp(22px, 3vw, 32px); color: var(--mute); }
.hx-band--navy .hx-note { background: rgba(255,255,255,.07); color: rgba(255,255,255,.78); }

/* ---------------------------------------------------------------
   FORM
   --------------------------------------------------------------- */

.hx-form { display: grid; gap: 18px; }
.hx-field { display: grid; gap: 8px; }
.hx-field label {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--mute);
}
.hx-field label .req { color: var(--teal); }

.hx-field input[type="text"],
.hx-field input[type="email"],
.hx-field input[type="tel"],
.hx-field select,
.hx-field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  padding: 15px 18px;
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  background: var(--surface);
  width: 100%;
}
.hx-field textarea { min-height: 130px; resize: vertical; }
.hx-field input:focus, .hx-field select:focus, .hx-field textarea:focus { border-color: var(--teal); outline: none; }

.hx-form__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .hx-form__pair { grid-template-columns: 1fr; } }

.hx-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.hx-checks label {
  font-family: var(--body); font-size: .93rem; letter-spacing: -0.01em;
  text-transform: none; color: var(--ink);
  background: var(--surface); border-radius: var(--r-pill);
  padding: 11px 18px; cursor: pointer; display: inline-flex; gap: 9px; align-items: center;
}
.hx-checks input { accent-color: var(--teal); }

.hx-consent { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--mute); }
.hx-consent input { margin-top: 5px; accent-color: var(--teal); }

.hx-hp { position: absolute; left: -9999px; }

.hx-alert { border-radius: var(--r-md); padding: 18px 22px; margin-bottom: 28px; font-size: .98rem; font-weight: 500; }
.hx-alert--ok  { background: var(--pop); color: #033727; }
.hx-alert--err { background: #FFE0DE; color: #7A211E; }

/* ---------------------------------------------------------------
   CONTACT CARD
   --------------------------------------------------------------- */

.hx-contactcard { background: var(--surface); border-radius: var(--r-lg); padding: clamp(26px, 3vw, 38px); }
.hx-contactcard dt {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mute); margin-top: 22px;
}
.hx-contactcard dt:first-of-type { margin-top: 0; }
.hx-contactcard dd { margin: 5px 0 0; }
.hx-contactcard a { color: var(--navy); }

.hx-wa {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 26px; padding: 14px 26px;
  background: var(--navy); color: #fff; text-decoration: none;
  border-radius: var(--r-pill); font-weight: 600; font-size: .95rem;
}
.hx-wa:hover { background: var(--pop); color: var(--navy); }

/* ---------------------------------------------------------------
   CTA
   --------------------------------------------------------------- */

.hx-cta h2 { max-width: 15ch; }
.hx-cta p { max-width: 46ch; color: rgba(255,255,255,.72); }
.hx-cta .hx-btnrow { margin-top: 30px; }

/* ---------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------- */

.hx-footer {
  background: var(--navy-deep); color: rgba(255,255,255,.66);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  margin-inline: var(--gut);
  padding: clamp(64px, 8vw, 96px) 0 40px;
  font-size: .95rem;
  line-height: 1.65;
}
.hx-footer .hx-wrap { padding-inline: clamp(24px, 4vw, 56px); }
.hx-footer h4 {
  color: rgba(255,255,255,.45); font-family: var(--mono); font-size: .64rem;
  letter-spacing: .12em; text-transform: uppercase; font-weight: 400;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair-lt);
}
.hx-footer a { color: rgba(255,255,255,.8); text-decoration: none; }
.hx-footer a:hover { color: var(--pop); }
.hx-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.hx-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.4fr;
  gap: clamp(36px, 5vw, 72px);
}
@media (max-width: 900px) {
  .hx-footer__grid { grid-template-columns: 1fr; gap: 48px; }
}

.hx-footer__mark {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.04em;
  color: #fff; margin-bottom: 14px; display: block; line-height: 1;
}
.hx-footer__tag { color: var(--pop); font-size: .9rem; max-width: 30ch; margin: 0; }

.hx-footer__base {
  margin-top: clamp(48px, 6vw, 72px); padding-top: 28px;
  border-top: 1px solid var(--hair-lt);
  display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap;
  font-size: .82rem; color: rgba(255,255,255,.45); line-height: 1.5;
}

/* ---------------------------------------------------------------
   PAGE HEAD
   --------------------------------------------------------------- */

.hx-pagehead { padding-block: clamp(38px, 5vw, 72px) clamp(30px, 4vw, 52px); }
.hx-pagehead h1 { max-width: 16ch; }
.hx-pagehead .hx-lede { max-width: 50ch; }

/* ---------------------------------------------------------------
   EDITOR CONTENT (fallback page.php)
   --------------------------------------------------------------- */

.hx-entry h2 { margin-top: 1.5em; }
.hx-entry ul, .hx-entry ol { padding-left: 1.2em; }
.hx-entry li { margin-bottom: .55em; }
.hx-entry table { width: 100%; border-collapse: collapse; }
.hx-entry th, .hx-entry td { border-bottom: 1px solid var(--hair); padding: 14px; text-align: left; }
.hx-entry img { border-radius: var(--r-lg); }
