/* HerCare "Vườn Yên 2.0" — custom tokens (phần theme.json không sinh). */
:root {
  --hc-radius-s: 8px;
  --hc-radius-m: 14px;
  --hc-radius-l: 20px;
  --hc-radius-arch: 999px 999px 14px 14px;
  --hc-shadow-1: 0 1px 2px rgba(37, 51, 43, .05), 0 8px 24px -12px rgba(37, 51, 43, .12);
  --hc-shadow-2: 0 2px 6px rgba(37, 51, 43, .06), 0 24px 48px -16px rgba(37, 51, 43, .18);
  --hc-ease: cubic-bezier(.22, 1, .36, 1);
  --hc-grain: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='140'%20height='140'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.85'%20numOctaves='2'%20stitchTiles='stitch'/%3E%3CfeColorMatrix%20type='saturate'%20values='0'/%3E%3C/filter%3E%3Crect%20width='140'%20height='140'%20filter='url(%23n)'%20opacity='0.07'/%3E%3C/svg%3E");
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--wp--preset--color--ink);
  background:
    radial-gradient(circle at top left, rgba(220, 231, 216, .34), transparent 36%),
    radial-gradient(circle at top right, rgba(240, 231, 215, .46), transparent 30%),
    linear-gradient(180deg, #f8f3e9 0%, #fbf7ef 42%, #f8f3e9 100%);
}

/* Chữ ký khung vòm cho ảnh. */
.hc-arch { border-radius: var(--hc-radius-arch); overflow: hidden; }

/* Film grain (chỉ hero/quote/stat/social) — đặt lên phần tử có position:relative. */
.hc-grain { position: relative; }
.hc-grain::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--hc-grain); z-index: 0;
}
.hc-grain > * { position: relative; z-index: 1; }

/* Khung brass kép (testimonial / quote). */
.hc-brass-frame { position: relative; border: 1px solid rgba(176, 141, 87, .4); border-radius: 12px; }
.hc-brass-frame::after {
  content: ""; position: absolute; inset: 9px; pointer-events: none;
  border: 1px solid rgba(176, 141, 87, .4); border-radius: 10px;
}

/* Hairline kim cương (divider trang trí). */
.hc-hairline {
  height: 1px; border: 0; position: relative;
  background: linear-gradient(90deg, transparent, var(--wp--preset--color--brass) 25%, var(--wp--preset--color--brass) 75%, transparent);
}
.hc-hairline::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px;
  background: var(--wp--preset--color--brass); transform: translate(-50%, -50%) rotate(45deg);
}

/* Eyebrow label (12px uppercase, tracking rộng). */
.hc-eyebrow {
  font-size: .75rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; font-family: var(--wp--preset--font-family--body);
}

/* Số mục editorial "— 01 —". */
.hc-enum { font-family: var(--wp--preset--font-family--display); font-style: italic; font-weight: 300; color: var(--wp--preset--color--brass); letter-spacing: .06em; }

/* Card + shadow. */
.hc-card { background: #fff; border: 1px solid rgba(37, 51, 43, .08); border-radius: var(--hc-radius-m); overflow: hidden; transition: transform .3s var(--hc-ease), box-shadow .3s var(--hc-ease); will-change: transform; }
.hc-card:hover { transform: translateY(-6px); box-shadow: var(--hc-shadow-2); }
.hc-shadow-1 { box-shadow: var(--hc-shadow-1); }
.hc-shadow-2 { box-shadow: var(--hc-shadow-2); }

/* Buttons: polish layer. */
.wp-block-button__link {
  transition: transform .25s var(--hc-ease), box-shadow .25s var(--hc-ease),
    background-color .25s var(--hc-ease), color .25s var(--hc-ease),
    border-color .25s var(--hc-ease);
}
.wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: var(--hc-shadow-1);
}
.wp-block-button__link:active {
  transform: translateY(0);
}
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border: 1.5px solid var(--wp--preset--color--primary);
  color: var(--wp--preset--color--primary);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
}

/* Chip / badge / meta. */
.hc-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  background: var(--wp--preset--color--tint);
  color: var(--wp--preset--color--primary);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  font-family: var(--wp--preset--font-family--body);
  text-transform: uppercase;
}
.hc-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--wp--preset--color--base);
  color: var(--wp--preset--color--primary);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  box-shadow: var(--hc-shadow-1);
  text-transform: uppercase;
}
.hc-badge--accent {
  background: var(--wp--preset--color--accent-strong);
  color: var(--wp--preset--color--base);
}
.hc-meta {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .05em;
  color: var(--wp--preset--color--primary);
  font-family: var(--wp--preset--font-family--body);
}

/* Navigation polish. */
.wp-block-navigation a {
  position: relative;
  text-decoration: none;
  transition: color .2s var(--hc-ease);
}
.wp-block-navigation a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1.5px;
  background: var(--wp--preset--color--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--hc-ease);
}
.wp-block-navigation a:hover::after,
.wp-block-navigation .current-menu-item > a::after,
.wp-block-navigation .current-menu-ancestor > a::after {
  transform: scaleX(1);
}

.hc-header-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--wp--preset--font-family--body);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hc-header-nav a {
  color: var(--wp--preset--color--primary);
  text-decoration: none;
  position: relative;
}

.hc-header-nav a::after {
  bottom: -5px;
}

.hc-header-nav .hc-header-cta {
  border: 1px solid rgba(58, 79, 65, .18);
  padding: .8rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
}

.hc-footer-links {
  display: grid;
  gap: .55rem;
  font-family: var(--wp--preset--font-family--body);
  font-size: .84rem;
}

.hc-footer-links a {
  color: inherit;
  text-decoration: none;
  opacity: .9;
}

.hc-footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
  text-decoration-color: var(--wp--preset--color--brass);
  text-underline-offset: .2em;
}

/* Section rhythm. */
.hc-section {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

/* Social icons. */
.hc-social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hc-social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(248, 243, 233, .35);
  color: var(--wp--preset--color--base);
  transition: border-color .2s var(--hc-ease), background-color .2s var(--hc-ease), transform .2s var(--hc-ease);
}
.hc-social-icons a:hover {
  border-color: var(--wp--preset--color--brass);
  background: rgba(176, 141, 87, .15);
  transform: translateY(-1px);
}
.hc-social-icons svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Sticky header. */
.hc-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow .25s var(--hc-ease), background-color .25s var(--hc-ease), backdrop-filter .25s var(--hc-ease);
}
.hc-header.is-scrolled {
  background-color: rgba(248, 243, 233, .85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--hc-shadow-1);
}

/* Hero media accent. */
.hc-hero-media {
  position: relative;
  isolation: isolate;
}
.hc-hero-media::before {
  content: "";
  position: absolute;
  inset: -24px -24px auto auto;
  width: 60%;
  height: 60%;
  z-index: -1;
  background: var(--wp--preset--color--tint);
  border-radius: var(--hc-radius-arch);
}

.hc-hero-overlay-card {
  position: absolute;
  bottom: 2rem;
  left: -2rem;
  background: var(--wp--preset--color--base);
  border-radius: var(--hc-radius-m);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--hc-shadow-2);
  z-index: 10;
  border: 1px solid rgba(58, 79, 65, .08);
}
.hc-hero-overlay-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--wp--preset--color--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wp--preset--color--primary);
}
.hc-hero-overlay-text p {
  margin: 0;
}
.hc-overlay-title {
  font-family: var(--wp--preset--font-family--display);
  font-size: 1.1rem;
  color: var(--wp--preset--color--ink);
}

.hc-trust-strip {
  opacity: 0.6;
  gap: 3rem;
  transition: opacity 0.3s var(--hc-ease);
}
.hc-trust-strip:hover {
  opacity: 1;
}

.hc-verified-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: var(--wp--preset--color--primary);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--hc-shadow-1);
}

.hc-editorial-card .hc-ratio-1-1 img {
  aspect-ratio: 16/11;
}

/* Motion reveal nhẹ, tôn trọng reduced-motion. */
.hc-reveal { animation: hc-fade-up .35s var(--hc-ease) both; }
.hc-reveal-io {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .35s var(--hc-ease), transform .35s var(--hc-ease);
}
.hc-reveal-io.is-visible {
  opacity: 1;
  transform: none;
}
@keyframes hc-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .hc-reveal,
  .hc-reveal-io,
  .hc-card,
  .wp-block-button__link,
  .wp-block-navigation a,
  .hc-social-icons a,
  .hc-header {
    animation: none;
    transition: none;
  }
  .hc-reveal-io {
    opacity: 1;
    transform: none;
  }
}

/* Focus ring brass (a11y). */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--wp--preset--color--brass); outline-offset: 2px;
}

/* Workspace overrides: dùng chung tokens nhưng tắt decorative. */
.hc-workspace .hc-grain::before { display: none; }
.hc-workspace .hc-arch { border-radius: var(--hc-radius-m); }

/* Aspect ratio crop utilities for CPT cards. */
.hc-ratio-4-5 img,
.wp-block-post-featured-image.hc-ratio-4-5 img {
  aspect-ratio: 4/5;
  object-fit: cover;
  width: 100%;
}
.hc-ratio-1-1 img,
.wp-block-post-featured-image.hc-ratio-1-1 img {
  aspect-ratio: 1/1;
  object-fit: cover;
  width: 100%;
}

/* Topic Gateway custom card styling. */
.hc-topic-card {
  border-radius: var(--hc-radius-l);
  background: var(--wp--preset--color--base);
  padding: var(--wp--preset--spacing--30);
  border: 1px solid rgba(58, 79, 65, .06);
  box-shadow: var(--hc-shadow-1);
  transition: transform 0.25s var(--hc-ease), box-shadow 0.25s var(--hc-ease);
  text-decoration: none;
}
.hc-topic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hc-shadow-2);
}
.hc-topic-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: var(--wp--preset--color--tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wp--preset--color--primary);
  margin-bottom: 0.5rem;
}

.hc-empty-state {
  display: grid;
  gap: .85rem;
  text-align: center;
  align-items: center;
  justify-items: center;
  min-height: 18rem;
}

.hc-empty-state .wp-block-button__link {
  min-width: 11rem;
}

@media (max-width: 768px) {
  .hc-card:hover,
  .hc-topic-card:hover,
  .wp-block-button__link:hover {
    transform: none;
    box-shadow: var(--hc-shadow-1);
  }

  .hc-hero-overlay-card {
    display: none;
  }

  .hc-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .wp-block-columns {
    gap: var(--wp--preset--spacing--40);
  }
}

@media (max-width: 480px) {
  .hc-badge {
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    font-size: .68rem;
  }

  .hc-chip {
    padding: 3px 10px;
    font-size: .7rem;
  }
}

/* Dashboard compact utilities. */
.hc-dashboard-card {
  padding: var(--wp--preset--spacing--30);
  background-color: #ffffff;
  border: 1px solid rgba(37, 51, 43, .08);
  border-radius: var(--hc-radius-m);
}

/* Reusable UI Components */
.hc-filter-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.75rem 1.25rem;
	border: 1px solid rgba(37, 51, 43, 0.12);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.72);
	transition: background-color 0.2s var(--hc-ease), border-color 0.2s var(--hc-ease);
}
.hc-filter-chip:hover {
	background: var(--wp--preset--color--tint);
	border-color: var(--wp--preset--color--primary);
	cursor: pointer;
}

.hc-timeline-item {
	display: grid;
	grid-template-columns: 3rem 1fr;
	gap: 1rem;
	position: relative;
	padding-bottom: 2rem;
}
.hc-timeline-item::before {
	content: "";
	position: absolute;
	left: 1.5rem;
	top: 2rem;
	bottom: 0;
	width: 1px;
	background: rgba(37, 51, 43, 0.12);
}
.hc-timeline-item:last-child::before {
	display: none;
}
.hc-timeline-dot {
	width: 3rem;
	height: 3rem;
	border-radius: 999px;
	background: var(--wp--preset--color--tint);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--wp--preset--font-family--display);
	font-weight: italic;
	color: var(--wp--preset--color--primary);
	z-index: 2;
}

.hc-faq-item {
	border-bottom: 1px solid rgba(37, 51, 43, 0.12);
	padding: 1.5rem 0;
}
.hc-faq-question {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.3rem;
	font-weight: 500;
	color: var(--wp--preset--color--ink);
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
}
.hc-faq-answer {
	margin-top: 1rem;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--wp--preset--color--ink);
	opacity: 0.85;
}

.hc-chat-shell {
	display: grid;
	grid-template-columns: 18rem 1fr;
	min-height: 100vh;
	background: var(--wp--preset--color--base);
}
@media (max-width: 768px) {
	.hc-chat-shell {
		grid-template-columns: 1fr;
	}
}

/* Mobile Nav Toggle and Overlay */
.hc-mobile-nav-toggle {
	display: none;
	background: none;
	border: none;
	color: var(--wp--preset--color--primary);
	cursor: pointer;
	padding: 0.5rem;
	z-index: 110;
}
@media (max-width: 768px) {
	.hc-mobile-nav-toggle {
		display: block;
	}
	.hc-header-nav {
		display: none;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: var(--wp--preset--color--base);
		flex-direction: column;
		justify-content: center;
		align-items: center;
		z-index: 105;
		gap: 2rem;
		padding: 2rem;
	}
	.has-hc-mobile-nav .hc-header-nav {
		display: flex;
	}
	.has-hc-mobile-nav {
		overflow: hidden;
	}
}
