/* Hofai theme — custom polish on top of theme.json */

:root {
  --hofai-radius: 6px;
  --hofai-shadow: 0 20px 50px -24px rgba(18, 22, 28, 0.35);
  --hofai-ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Eyebrow label ---------- */
.hofai-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem !important;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wp--preset--color--accent);
}
.hofai-eyebrow::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  background: var(--wp--preset--color--accent);
}
.hofai-eyebrow-light { color: var(--wp--preset--color--accent-soft); }
.hofai-eyebrow-light::before { background: var(--wp--preset--color--accent-soft); }

/* ---------- Header ---------- */
.hofai-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(18, 22, 28, 0.94);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.hofai-header a { text-decoration: none; }
.hofai-header > .wp-block-group {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}
.hofai-header .wp-block-navigation a,
.hofai-header .wp-block-navigation .wp-block-navigation-item__content,
.hofai-header .wp-block-navigation-item__label {
  color: #eef1f5 !important;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.hofai-header .wp-block-navigation a:hover,
.hofai-header .wp-block-navigation a:hover .wp-block-navigation-item__label {
  color: var(--wp--preset--color--accent-soft) !important;
}
.hofai-header .hofai-logo-text a { color: #ffffff !important; }
.hofai-logo-text {
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 1.3rem;
  line-height: 1;
}
.hofai-footer .hofai-logo-text { color: #ffffff; }
.hofai-logo-text em {
  font-style: normal;
  color: var(--wp--preset--color--accent);
}
.hofai-logo-sub {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #8b94a1;
  margin-top: 0.28rem;
}

/* ---------- Hero ---------- */
.hofai-hero {
  position: relative;
  isolation: isolate;
}
.hofai-hero h1 {
  max-width: 15em;
  text-wrap: balance;
}
.hofai-hero .wp-block-cover__background {
  background: linear-gradient(
    100deg,
    rgba(10, 12, 16, 0.92) 0%,
    rgba(10, 12, 16, 0.62) 45%,
    rgba(10, 12, 16, 0.25) 100%
  ) !important;
  opacity: 1 !important;
}
.hofai-hero-kpis {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

/* ---------- Buttons ---------- */
.wp-block-button__link {
  transition: transform 0.25s var(--hofai-ease), background-color 0.25s var(--hofai-ease),
    color 0.25s var(--hofai-ease), border-color 0.25s var(--hofai-ease);
}
.wp-block-button__link:hover { transform: translateY(-2px); }
.is-style-outline .wp-block-button__link,
.is-style-outline > .wp-block-button__link {
  border: 1px solid currentColor;
  background: transparent;
}

/* ---------- Cards ---------- */
.hofai-card {
  background: var(--wp--preset--color--base);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--hofai-radius);
  overflow: hidden;
  transition: transform 0.3s var(--hofai-ease), box-shadow 0.3s var(--hofai-ease),
    border-color 0.3s var(--hofai-ease);
}
.hofai-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--hofai-shadow);
  border-color: transparent;
}
.hofai-card img {
  transition: transform 0.6s var(--hofai-ease);
}
.hofai-card:hover img { transform: scale(1.05); }
.hofai-card-link a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--wp--preset--color--accent);
}
.hofai-card-link a::after {
  content: " \2192";
  transition: margin-left 0.25s var(--hofai-ease);
}
.hofai-card:hover .hofai-card-link a::after { margin-left: 0.35rem; }

/* Dark application tiles */
.hofai-tile {
  position: relative;
  border-radius: var(--hofai-radius);
  overflow: hidden;
  border: 1px solid var(--wp--preset--color--line-dark);
  background: linear-gradient(160deg, #1c232d 0%, #12161c 100%);
  transition: border-color 0.3s var(--hofai-ease), transform 0.3s var(--hofai-ease);
}
.hofai-tile:hover {
  border-color: var(--wp--preset--color--accent);
  transform: translateY(-4px);
}
.hofai-tile-num {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.78rem;
  color: var(--wp--preset--color--accent-soft);
  letter-spacing: 0.1em;
}

/* ---------- Stats ---------- */
.hofai-stat-value {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem) !important;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1 !important;
  color: var(--wp--preset--color--contrast);
}
.hofai-stat-value em {
  font-style: normal;
  color: var(--wp--preset--color--accent);
}
.hofai-stat-label {
  font-size: 0.85rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
}

/* ---------- Section rhythm: tighter vertical spacing ---------- */
main > .wp-block-group.alignfull {
  padding-top: 4.25rem !important;
  padding-bottom: 4.25rem !important;
}
main > .wp-block-group.alignfull > .wp-block-group[style*="margin-bottom:3rem"] {
  margin-bottom: 2rem !important;
}

/* ---------- Misc ---------- */
.hofai-divider {
  border: none;
  border-top: 1px solid var(--wp--preset--color--line);
  margin: 0;
}
.hofai-check li {
  list-style: none;
  padding-left: 1.7rem;
  position: relative;
  margin-bottom: 0.65rem;
}
.hofai-check { padding-left: 0 !important; }
.hofai-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.95rem;
  height: 0.55rem;
  border-left: 2.5px solid var(--wp--preset--color--accent);
  border-bottom: 2.5px solid var(--wp--preset--color--accent);
  transform: rotate(-45deg);
}
/* Spec tables */
.hofai-spec-table { overflow-x: auto; }
.hofai-spec-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}
.hofai-spec-table th {
  background: var(--wp--preset--color--contrast);
  color: #ffffff;
  text-align: left;
  font-weight: 600;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--wp--preset--color--line-dark);
  white-space: nowrap;
}
.hofai-spec-table td {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--wp--preset--color--line);
}
.hofai-spec-table tbody tr:nth-child(even) {
  background: var(--wp--preset--color--surface);
}
.hofai-spec-table td:first-child { font-weight: 600; }

.hofai-footer a { text-decoration: none; }
.hofai-footer a:hover { color: var(--wp--preset--color--accent-soft) !important; }

.hofai-gallery-caption {
  font-size: 0.85rem;
  color: var(--wp--preset--color--muted);
}

/* ---------- Facilities carousel ---------- */
.hofai-carousel { position: relative; }
.hofai-car-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.hofai-car-track::-webkit-scrollbar { display: none; }
.hofai-car-item {
  flex: 0 0 auto;
  width: calc((100% - 60px) / 4);
  margin: 0;
  scroll-snap-align: start;
}
.hofai-car-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--hofai-radius);
  display: block;
}
@media (max-width: 1024px) {
  .hofai-car-item { width: calc((100% - 40px) / 3); }
}
@media (max-width: 781px) {
  .hofai-car-item { width: calc((100% - 20px) / 1.6); }
}
.hofai-car-item figcaption {
  margin-top: 0.7rem;
  font-size: 0.88rem;
  color: var(--wp--preset--color--muted);
}
.hofai-car-nav { display: flex; gap: 0.6rem; }
.hofai-car-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--wp--preset--color--line);
  background: var(--wp--preset--color--base);
  color: var(--wp--preset--color--contrast);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.2s var(--hofai-ease), color 0.2s var(--hofai-ease),
    border-color 0.2s var(--hofai-ease);
}
.hofai-car-btn:hover {
  background: var(--wp--preset--color--accent);
  border-color: var(--wp--preset--color--accent);
  color: #ffffff;
}
@media (max-width: 781px) {
  .hofai-car-item img { height: 180px; }
}

/* ---------- Interactive lab gallery ---------- */
.hofai-gallery { width: 100%; }
.hofai-gal-main {
  margin: 0;
  border-radius: var(--hofai-radius);
  overflow: hidden;
  background: var(--wp--preset--color--contrast);
}
.hofai-gal-main img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s var(--hofai-ease);
}
.hofai-gal-caption {
  margin: 0.7rem 0 0.9rem;
  font-size: 0.88rem;
  color: var(--wp--preset--color--muted);
  min-height: 1.4em;
}
.hofai-gal-thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}
.hofai-gal-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: none;
  line-height: 0;
  opacity: 0.65;
  transition: opacity 0.2s var(--hofai-ease), border-color 0.2s var(--hofai-ease);
}
.hofai-gal-thumb img {
  width: 100%;
  height: 52px;
  object-fit: cover;
  display: block;
}
.hofai-gal-thumb:hover { opacity: 1; }
.hofai-gal-thumb.is-active {
  opacity: 1;
  border-color: var(--wp--preset--color--accent);
}
@media (max-width: 781px) {
  .hofai-gal-main img { height: 260px; }
  .hofai-gal-thumbs { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 781px) {
  .hofai-hero h1 { font-size: clamp(2rem, 8vw, 2.6rem) !important; }
}
