/*
 * Hilford v2 layout system (2026-10-09).
 * One shared content grid: every section aligns to .hf-wrap, so all text,
 * images and cards start on the same left edge. Loaded after site.css;
 * site.css still styles the header, hero, forms and Site Core blocks.
 */

:root {
  --hf-max: 1180px;
  --hf-gutter: clamp(20px, 4vw, 40px);
  --hf-edge: max(var(--hf-gutter), calc((100vw - var(--hf-max)) / 2));
  --hf-ink: var(--wp--preset--color--ink);
  --hf-lime: var(--wp--preset--color--lime);
  --hf-paper: var(--wp--preset--color--paper);
  --hf-text-soft: #46555b;
  --hf-line: rgba(11, 27, 34, 0.12);
  --hf-olive: #5d7410;
  --hf-radius: 14px;
}

/* ---------- page frame: no root padding, no stray gaps between header/main/footer ---------- */
body {
  padding: 0 !important;
}

.wp-site-blocks {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.wp-site-blocks > * {
  margin-block: 0 !important;
}

.hf-wrap {
  width: 100%;
  max-width: calc(var(--hf-max) + 2 * var(--hf-gutter)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--hf-gutter) !important;
  padding-right: var(--hf-gutter) !important;
}

.hf-wrap > * {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.hf-content > * {
  margin-block: 0 !important;
}

/* header + hero line up with the content grid */
.site-header .hilford-header-bar {
  padding-left: var(--hf-edge) !important;
  padding-right: var(--hf-edge) !important;
}

.hilford-hero__copy {
  padding-left: var(--hf-edge) !important;
}

/* ---------- typography ---------- */
.hf-main {
  line-height: 1.7;
}

.hf-main h2,
.hf-main h3 {
  text-wrap: balance;
}

.hf-main .hilford-eyebrow {
  color: var(--hf-olive);
}

.hf-main .hilford-eyebrow::before {
  background: var(--hf-lime);
  box-shadow: 0 0 0 4px rgba(217, 242, 100, 0.35);
}

.hf-section--ink .hilford-eyebrow,
.hf-cta .hilford-eyebrow {
  color: var(--hf-lime);
}

.hf-h2 {
  max-width: 24ch;
  margin: 14px 0 0;
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.hf-lead {
  max-width: 66ch;
  margin: 16px 0 0;
  color: var(--hf-text-soft);
  font-size: clamp(1.02rem, 0.4vw + 0.95rem, 1.14rem);
  line-height: 1.75;
}

.hf-head {
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

body.hilford-lang-zh .hf-h2 {
  max-width: 22em;
  font-size: clamp(1.75rem, 2.6vw, 2.4rem);
}

body.hilford-lang-zh .hf-lead,
body.hilford-lang-zh .hf-card p,
body.hilford-lang-zh .hf-card li {
  line-height: 1.85;
}

/* ---------- page head (breadcrumbs + h1) ---------- */
.hf-page-head {
  padding-top: clamp(36px, 5vw, 64px);
  padding-bottom: clamp(8px, 1.5vw, 16px);
}

.hf-page-head .hilford-breadcrumbs {
  margin: 0;
}

.hf-page-title,
.hf-page-head .wp-block-post-title,
.hf-page-head .wp-block-query-title {
  max-width: 20ch;
  margin: 18px 0 0 !important;
  font-size: clamp(2.4rem, 4.4vw, 3.8rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.hf-format-eyebrow {
  margin: 22px 0 0 !important;
}

.hf-format-eyebrow + .wp-block-post-title {
  margin-top: 10px !important;
}

body.hilford-lang-zh .hf-page-head .wp-block-post-title,
body.hilford-lang-zh .hf-page-title {
  font-size: clamp(2.1rem, 3.6vw, 3.1rem);
}

.hf-page-head .hf-lead {
  margin-top: 18px;
}

/* ---------- sections ---------- */
.hf-section {
  padding-top: clamp(52px, 6.5vw, 92px);
  padding-bottom: clamp(52px, 6.5vw, 92px);
}

.hf-section--first {
  padding-top: clamp(20px, 3vw, 36px);
}

.hf-section--white {
  background: #fff;
}

.hf-section--ink {
  color: #fff;
  background: var(--hf-ink);
}

.hf-section--ink .hf-h2 {
  color: #fff;
}

.hf-section--ink .hf-lead {
  color: rgba(255, 255, 255, 0.74);
}

/* ---------- grids + cards ---------- */
.hf-grid {
  display: grid;
  gap: clamp(14px, 1.6vw, 22px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hf-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hf-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hf-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.hf-card {
  height: 100%;
  margin: 0 !important;
  padding: clamp(22px, 2.4vw, 30px);
  border: 1px solid var(--hf-line);
  border-radius: var(--hf-radius);
  background: #fff;
}

.hf-section--white .hf-card {
  background: var(--hf-paper);
}

.hf-card h3,
.hf-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 1.2vw, 1.3rem);
  line-height: 1.3;
}

.hf-card p {
  margin: 0;
  color: var(--hf-text-soft);
}

.hf-card p + p {
  margin-top: 10px;
}

.hf-card ul,
.hf-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hf-card li,
.hf-list li {
  position: relative;
  padding-left: 20px;
  color: var(--hf-text-soft);
}

.hf-card li + li,
.hf-list li + li {
  margin-top: 8px;
}

.hf-card li::before,
.hf-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hf-ink);
  opacity: 0.55;
}

a.hf-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

a.hf-card:hover {
  border-color: rgba(11, 27, 34, 0.28);
  box-shadow: 0 18px 40px rgba(11, 27, 34, 0.1);
  transform: translateY(-3px);
}

.hf-card__more {
  margin-top: auto !important;
  padding-top: 16px;
  color: var(--hf-ink) !important;
  font-size: 0.9rem;
  font-weight: 700;
}

.hf-card__icon {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  object-fit: contain;
}

.hf-card__num {
  display: block;
  margin-bottom: 8px;
  color: var(--hf-olive);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

/* query-loop cards (format archive) */
.hf-card--link .wp-block-post-title {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.hf-card--link .wp-block-post-title a {
  text-decoration: none;
}

.hf-card--link .wp-block-post-excerpt__excerpt {
  margin: 0;
  color: var(--hf-text-soft);
}

/* ---------- steps ---------- */
.hf-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hf-step {
  padding-top: 18px;
  border-top: 2px solid var(--hf-ink);
}

.hf-section--ink .hf-step {
  border-top-color: var(--hf-lime);
}

.hf-step h3 {
  margin: 8px 0 8px;
  font-size: 1.2rem;
  line-height: 1.3;
}

.hf-step p {
  margin: 0;
  color: var(--hf-text-soft);
}

.hf-section--ink .hf-step p {
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- images ---------- */
.hf-figure {
  margin: 0;
}

.hf-figure img {
  display: block;
  width: 100%;
  height: auto !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.hf-figure figcaption {
  margin-top: 10px;
  color: var(--hf-text-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ---------- two-column split ---------- */
.hf-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.hf-split--narrow-left {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

/* ---------- call to action ---------- */
.hf-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  padding: clamp(28px, 4.5vw, 56px);
  border-radius: 18px;
  color: #fff;
  background: var(--hf-ink);
}

.hf-cta .hf-h2 {
  color: #fff;
}

.hf-cta .hf-lead {
  color: rgba(255, 255, 255, 0.74);
}

.hf-cta .hf-btns {
  margin-top: 0;
}

/* ---------- buttons ---------- */
.hf-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 1.5px solid var(--hf-lime);
  border-radius: 999px;
  color: var(--hf-ink) !important;
  background: var(--hf-lime);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.hf-btn:hover {
  transform: translateY(-2px);
}

.hf-btn--ghost {
  border-color: var(--hf-ink);
  background: transparent;
}

.hf-section--ink .hf-btn--ghost,
.hf-cta .hf-btn--ghost {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff !important;
}

/* ---------- Site Core blocks inside the grid ---------- */
.hf-related-wrap {
  padding-top: clamp(40px, 5vw, 72px);
  padding-bottom: clamp(52px, 6vw, 88px);
}

.hf-wrap .hilford-related,
.hf-wrap .hilford-faq {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.hf-main--home .hf-section--white {
  padding-top: clamp(48px, 6vw, 84px);
  padding-bottom: clamp(48px, 6vw, 84px);
}

.hilford-contact-links--prominent .hilford-contact-links__inner {
  max-width: calc(var(--hf-max) + 2 * var(--hf-gutter));
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--hf-gutter);
  padding-right: var(--hf-gutter);
}

/* ---------- footer ---------- */
.hf-footer {
  padding-top: clamp(48px, 6vw, 72px);
  padding-bottom: 28px;
  border-top: 0;
}

.hf-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

.hf-footer__grid > * {
  margin: 0 !important;
}

.hf-footer .wp-block-site-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 750;
}

.hf-footer .wp-block-site-title a {
  text-decoration: none;
}

.hf-footer__about {
  max-width: 34ch;
  margin: 12px 0 0 !important;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.95rem;
}

.hf-footer__mail {
  margin: 10px 0 0 !important;
  font-size: 0.95rem;
}

.hf-footer__mail a {
  color: var(--hf-lime) !important;
}

.hf-footer .wp-block-navigation {
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
}

.hf-footer .wp-block-navigation a {
  text-decoration: none;
}

.hf-footer .wp-block-navigation a:hover {
  color: var(--hf-lime);
}

.hf-footer__side .hilford-language-switcher {
  width: max-content;
  margin: 0;
}

.hf-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
  font-size: 0.92rem;
}

.hf-social a {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none;
}

.hf-social a:hover {
  color: var(--hf-lime) !important;
}

.hf-footer__bottom {
  margin-top: clamp(36px, 4vw, 56px) !important;
}

.hf-footer__bottom p {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hf-grid--3,
  .hf-grid--4,
  .hf-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hf-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hf-grid--2,
  .hf-grid--3,
  .hf-grid--4,
  .hf-steps,
  .hf-split,
  .hf-split--narrow-left,
  .hf-cta {
    grid-template-columns: minmax(0, 1fr);
  }

  .hf-footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hf-btn {
    white-space: normal;
  }
}

/* facts list (About "at a glance") */
.hf-card--facts ul.hf-facts li {
  padding-left: 0;
}

.hf-card--facts ul.hf-facts li::before {
  display: none;
}

.hf-card--facts ul.hf-facts li + li {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hf-line);
}

.hf-card--facts strong {
  color: var(--hf-ink);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hf-head-inline .hf-lead {
  max-width: 60ch;
}

/* related links: separate cards that fill the row, no grey filler cell */
.hf-wrap .hilford-related-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
  border: 0;
  background: none;
}

.hf-wrap .hilford-related-card {
  min-height: 0;
  border: 1px solid var(--hf-line);
  border-radius: var(--hf-radius);
  background: #fff;
}

.hf-wrap .hilford-related-card:hover {
  border-color: rgba(11, 27, 34, 0.28);
  box-shadow: 0 18px 40px rgba(11, 27, 34, 0.1);
}

/* sub-headings, prose, numbered guide cards, 5-step rows, form wrapper */
.hf-subhead {
  margin: clamp(32px, 4vw, 48px) 0 16px;
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  line-height: 1.3;
}

.hf-head + .hf-subhead {
  margin-top: 0;
}

.hf-prose {
  max-width: 760px;
}

.hf-prose p {
  margin: 0 0 14px;
  color: var(--hf-text-soft);
}

.hf-prose .hf-subhead {
  margin-top: 36px;
  margin-bottom: 10px;
}

.hf-muted {
  color: var(--hf-text-soft);
  font-size: 0.92rem;
}

ol.hf-numbered {
  list-style: none;
}

ol.hf-numbered > li.hf-card {
  padding-left: clamp(22px, 2.4vw, 30px);
}

ol.hf-numbered > li.hf-card::before {
  display: none;
}

.hf-steps--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.hf-card strong {
  color: var(--hf-ink);
}

.hf-form-wrap {
  padding-top: clamp(8px, 2vw, 24px);
  padding-bottom: clamp(48px, 6vw, 80px);
}

.hf-form-wrap .hilford-inquiry-panel {
  max-width: none;
  margin: 0;
  border-radius: 18px;
}

@media (max-width: 1000px) {
  .hf-steps--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hf-steps--5 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 2026-10-12 hide internal "studio visual" notes on the home hero */
.hilford-hero__note,
.hilford-carousel__slide figcaption {
  display: none;
}
