/* Urban Human Resources 1.0.9: motion system, frames, flow pattern, marks.
   Everything here is progressive: content is fully visible without JavaScript,
   and all motion turns off for visitors whose devices ask for reduced motion. */

/* ---------- Frames: three shapes, no stretching, space reserved ---------- */
main img { max-width: 100%; }
main figure img, main .blueprint img { height: auto; object-fit: cover; }
.uhr-frame-people { aspect-ratio: 4 / 5; }
.uhr-frame-scene { aspect-ratio: 3 / 2; }
.uhr-frame-banner { aspect-ratio: 16 / 9; }
.uhr-frame-square { aspect-ratio: 1 / 1; }

/* ---------- Brand color band (replaces stock banners on service pages) ---------- */
.uhr-band {
  height: clamp(28px, 4vw, 44px); margin: 0 0 36px;
  background:
    linear-gradient(90deg, var(--color-accent) 0 72%, #9F4C1A 72% 100%);
  position: relative; overflow: hidden;
}
.uhr-band::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 2px, transparent 2px 14px);
}
.uhr-band-full { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }

/* ---------- Headline marks ---------- */
.uhr-mark-underline {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9 C 60 3, 140 12, 200 6 S 280 5, 297 8' fill='none' stroke='%239F4C1A' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 0 100%; background-size: 100% .28em;
  padding-bottom: .12em;
}
.uhr-mark-hl { background: linear-gradient(transparent 12%, color-mix(in srgb, var(--color-accent) 22%, transparent) 12% 92%, transparent 92%); padding: 0 .12em; }

/* ---------- Flow pattern: one grid, equal heights, steady spacing ---------- */
main section + section { scroll-margin-top: 96px; }
main [style*="display: grid"] > * { min-width: 0; }
main [style*="display: grid"] > .blueprint,
main [style*="display: grid"] > figure { height: 100%; box-sizing: border-box; }
.uhr-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(24px, 4vw, 56px); align-items: start; }
.uhr-split.uhr-flip > :first-child { order: 2; }
@media (max-width: 700px) { .uhr-split.uhr-flip > :first-child { order: 0; } }

/* ---------- Motion: reveal, hover lift, smart header ---------- */
.uhr-motion .uhr-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.19,1,.22,1), transform .7s cubic-bezier(.19,1,.22,1); }
.uhr-motion .uhr-reveal.uhr-in { opacity: 1; transform: none; }
.blueprint, .btn { transition: transform .25s ease, box-shadow .25s ease; }
@media (hover: hover) {
  a.blueprint:hover, main [style*="display: grid"] > .blueprint:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(26,66,75,.14); }
  .btn:hover { transform: translateY(-2px); }
}
nav.nav { transition: transform .35s ease; will-change: transform; }
nav.nav.uhr-nav-hidden { transform: translateY(-110%); }
main a:not(.btn) { text-decoration-thickness: 1px; transition: text-decoration-color .2s ease; }

/* ---------- Count-up numbers ---------- */
[data-uhr-count] { font-variant-numeric: tabular-nums; }

/* ---------- Accordions (FAQ, glossary, AI page) ---------- */
details.uhr-acc { border-bottom: 1px solid var(--color-divider); padding: 0; }
details.uhr-acc > summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font-weight: 600; font-size: 18px; line-height: 1.4; }
details.uhr-acc > summary::-webkit-details-marker { display: none; }
details.uhr-acc > summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 24px; color: var(--color-accent-700); transition: transform .25s ease; }
details.uhr-acc[open] > summary::after { transform: rotate(45deg); }
details.uhr-acc > div { padding: 0 0 20px; font-size: 16px; line-height: 27px; }

/* ---------- AI page ---------- */
.uhr-ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(16px, 2.5vw, 28px); align-items: stretch; }
.uhr-ai-col { padding: 26px 28px; min-height: 180px; }
.uhr-ai-col h3 { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: .04em; font-size: 15px; margin: 0 0 14px; }
.uhr-ai-std { background: color-mix(in srgb, var(--color-text) 5%, transparent); border-left: 3px solid color-mix(in srgb, var(--color-text) 35%, transparent); }
.uhr-ai-real { background: color-mix(in srgb, var(--color-accent) 9%, transparent); border-left: 3px solid #9F4C1A; }
.uhr-ai-text { font-size: 17px; line-height: 28px; margin: 0; white-space: pre-line; }
.uhr-caret::after { content: "\258D"; animation: uhr-blink 1s steps(1) infinite; color: var(--color-accent-700); }
@keyframes uhr-blink { 50% { opacity: 0; } }
.uhr-input { width: 100%; box-sizing: border-box; font: inherit; font-size: 17px; padding: 14px 16px; border: 1px solid var(--color-divider); background: var(--color-bg); color: var(--color-text); }
.uhr-chip { display: inline-block; margin: 0 8px 8px 0; padding: 8px 12px; font-size: 14px; border: 1px solid var(--color-divider); background: transparent; color: var(--color-text); cursor: pointer; font-family: inherit; text-align: left; }
.uhr-chip:hover { border-color: var(--color-accent-700); }

/* ---------- Glossary ---------- */
.uhr-gl-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.uhr-gl-term { padding: 22px 0; border-bottom: 1px solid var(--color-divider); scroll-margin-top: 100px; }
.uhr-gl-term dt { font-family: var(--font-heading); font-weight: 600; font-size: 21px; text-transform: uppercase; letter-spacing: .02em; margin: 0 0 8px; }
.uhr-gl-term dd { margin: 0; font-size: 16px; line-height: 27px; }
.uhr-gl-why { margin-top: 8px !important; font-style: italic; color: color-mix(in srgb, var(--color-text) 78%, transparent); }
.uhr-gl-coined dt::after { content: "Urban term"; margin-left: 10px; font-family: var(--font-body); font-size: 11px; letter-spacing: .08em; padding: 3px 7px; color: #fff; background: #9F4C1A; vertical-align: middle; }

/* ---------- Image captions for AI-generated or AI-altered images ---------- */
.uhr-ai-caption { font-size: 12px; line-height: 18px; letter-spacing: .04em; text-transform: uppercase; margin: 8px 0 0; color: color-mix(in srgb, var(--color-text) 70%, transparent); }

/* ---------- Testimonials placed on service pages ---------- */
.uhr-quote { margin: 0; padding: 26px 28px; border-left: 3px solid var(--color-accent); }
.uhr-quote blockquote { margin: 0 0 14px; font-size: 18px; line-height: 30px; }
.uhr-quote figcaption { font-size: 14px; line-height: 22px; color: color-mix(in srgb, var(--color-text) 72%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .uhr-motion .uhr-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  nav.nav, .blueprint, .btn { transition: none !important; }
  .uhr-caret::after { animation: none; }
}

/* 1.0.9 additions: AI page labels, glossary filter states */
.uhr-ai-label { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: .06em; font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.uhr-ai-real .uhr-ai-label { color: #9F4C1A; }
.uhr-ai-item .uhr-ai-s, .uhr-ai-item .uhr-ai-r { margin: 0; font-size: 16px; line-height: 27px; }
.uhr-gl-section[hidden], .uhr-gl-term[hidden] { display: none; }
.uhr-gl-why { margin-top: 8px !important; font-size: 15px !important; color: color-mix(in srgb, var(--color-text) 80%, transparent); }
#uhr-ai-out, #uhr-ai-none { display: none; }
html[data-uhr-ai="match"] #uhr-ai-out, html[data-uhr-ai="none"] #uhr-ai-none { display: block; }

/* ---------- 1.0.10: AI page exchange (turns with margin notes) ---------- */
.uhr-x { display: grid; gap: 14px; margin: 8px 0 12px; counter-reset: none; }
.uhr-x-row { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(14px, 3vw, 40px); align-items: start; }
.uhr-x-turn { padding: 20px 24px; }
.uhr-x-text { margin: 0; font-size: 17px; line-height: 28px; }
.uhr-x-note { padding: 12px 0 0; border-top: 2px solid #9F4C1A; }
.uhr-x-note .uhr-ai-label { color: #9F4C1A; font-size: 13px; margin: 0 0 6px; }
.uhr-x-note p:last-child { margin: 0; font-size: 15px; line-height: 25px; }
.uhr-x-source { font-size: 13px; line-height: 20px; margin: 4px 0 24px; color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.uhr-x-steps, .uhr-x-proof { max-width: 64ch; margin: 0 0 16px; padding-left: 1.3em; font-size: 17px; line-height: 28px; }
.uhr-x-steps li, .uhr-x-proof li { margin: 0 0 10px; padding-left: 4px; }
@media (max-width: 760px) {
  .uhr-x-row { grid-template-columns: 1fr; gap: 10px; }
  .uhr-x-note { margin: 0 0 8px; }
}

/* ---------- 1.0.11: AI page identity line, facts, practices ---------- */
.uhr-x-id { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: .04em; font-size: 15px; line-height: 24px; font-weight: 600; margin: 0 0 18px; color: #9F4C1A; }
.uhr-x-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px clamp(20px, 4vw, 48px); margin: 8px 0 0; max-width: 820px; }
.uhr-x-facts p { margin: 0; padding: 14px 0 0; border-top: 1px solid var(--color-divider); }
.uhr-x-facts strong { display: block; font-family: var(--font-heading); font-size: clamp(34px, 4vw, 46px); line-height: 1; font-weight: 600; margin: 0 0 8px; }
.uhr-x-facts span { display: block; font-size: 15px; line-height: 24px; }
.uhr-x-facts a { font-size: 13px; display: inline-block; margin-top: 4px; }
.uhr-x-practice { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(20px, 3vw, 40px); margin: 12px 0 0; }
.uhr-x-practice > div { border-top: 2px solid var(--color-accent-700); padding-top: 16px; }
.uhr-x-practice .uhr-x-steps { font-size: 16px; line-height: 26px; }
.uhr-x-small { font-size: 16px; line-height: 26px; margin: 0 0 12px; }
