/* ============================================================
   YZTD · Base: reset, type scale, layout primitives, buttons,
   reveal motion + keyframes. Maps 1:1 to globals.css in Next.js.
   ============================================================ */

/* ---- reset ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--azur); color: #fff; }
:focus-visible { outline: 2px solid var(--azur); outline-offset: 3px; border-radius: 3px; }
main:focus { outline: none; } /* skip-link target gets tabindex=-1; suppress the programmatic-focus ring */

/* skip link (keyboard bypass) + screen-reader-only utility */
.yz-skip-link {
  position: absolute; left: 12px; top: -56px; z-index: var(--z-skip);
  background: var(--royal); color: #fff; padding: 11px 18px; border-radius: var(--r-sm);
  font-family: var(--f-body); font-size: 14px; font-weight: 600; transition: top .2s ease;
}
.yz-skip-link:focus-visible { top: 12px; }
.yz-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---- layout primitives ---- */
.yz-shell { max-width: var(--shell); margin: 0 auto; padding-inline: var(--gutter); }
.yz-shell--inner { max-width: var(--inner); }

.yz-section { position: relative; }
.yz-section--ink   { background: var(--ink);  color: var(--on-dark); }
.yz-section--paper { background: var(--paper); }
.yz-section--white { background: var(--white); border-top: 1px solid var(--mist); }
.yz-section[id] { scroll-margin-top: calc(var(--header-h) + 12px); } /* clear fixed/sticky header on anchor jumps */

/* default section inner rhythm (home) */
.yz-section__inner { max-width: var(--shell); margin: 0 auto; padding: clamp(72px, 9vw, 128px) var(--gutter); }
.yz-section__inner--tight { padding-block: clamp(56px, 7vw, 84px); }
.yz-section__inner--wall  { padding-block: clamp(72px, 8vw, 108px); }
.yz-section__inner--cta   { padding-block: clamp(88px, 11vw, 140px); }

/* dark-section radial glow (the single allowed gradient · README art direction) */
.yz-glow { position: absolute; inset: 0; pointer-events: none; }
.yz-glow--hero { background: radial-gradient(120% 90% at 78% 18%, rgba(47,75,160,.30) 0%, rgba(11,18,48,0) 55%); }
.yz-glow--cta  { background: radial-gradient(90% 120% at 50% 0%,  rgba(47,75,160,.32) 0%, rgba(11,18,48,0) 60%); }

/* ---- type helpers ---- */
.yz-eyebrow {
  font-family: var(--f-label);
  font-size: var(--fs-label); letter-spacing: var(--track-eyebrow); text-transform: uppercase;
  color: var(--royal); margin: 0 0 18px;
}
.yz-eyebrow--sky { color: var(--sky); }

.yz-h2 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 2.7rem); line-height: 1.1; letter-spacing: -0.02em;
  margin: 0; color: var(--ink); text-wrap: balance;
}
/* dark-section sibling of .yz-h2 (shares the type scale; color + line-height override in sections.css) */
.yz-roles-head__title h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(2rem, 3.6vw, 2.7rem); letter-spacing: -0.02em; margin: 0; }
.yz-lead { font-size: 1.0625rem; line-height: 1.62; color: var(--text-mute); margin: 0; }

/* ---- buttons ---- */
.yz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--f-body); font-size: 15px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--r-sm); padding: 15px 28px;
  transition: background .25s ease, transform .25s ease, border-color .25s ease, color .25s ease;
}
.yz-btn--primary { background: var(--royal); color: #fff; }
.yz-btn--primary:hover { background: var(--azur); }
.yz-btn--lift:hover { transform: translateY(-2px); }
.yz-btn--ghost { background: transparent; color: var(--on-dark); border-color: var(--on-dark-line); }
.yz-btn--ghost:hover { border-color: var(--sky); background: rgba(107,164,218,.08); }
.yz-btn--ghost-light { background: transparent; color: var(--royal); border-color: var(--royal); }
.yz-btn--ghost-light:hover { border-color: var(--azur); background: var(--azur-wash); color: var(--azur); }
.yz-btn--sm { padding: 10px 20px; font-size: 14px; }
.yz-btn--block { width: 100%; }

/* comfortable touch targets on small screens (min 44px tap height) */
@media (max-width: 768px) {
  .yz-btn--sm { min-height: 44px; }
}

/* ---- scroll-reveal (content rests visible if JS/animation absent) ---- */
.yz-reveal.yz-pre { opacity: 0; transform: translateY(18px); }
.yz-reveal.yz-in  { animation: yzFadeUp .7s var(--ease-out) forwards; }

/* ---- keyframes ---- */
@keyframes yzFadeUp  { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes yzMegaIn  { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes yzNodeIn  { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes yzLineDraw{ from { stroke-dashoffset: var(--len); opacity: 0; } 40% { opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes yzCorePulse { 0%,100% { r: 9; opacity: 1; } 50% { r: 11; opacity: .85; } }
@keyframes yzHalo    { 0% { transform: scale(.7); opacity: .5; } 70% { opacity: 0; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes yzNetFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes yzSpin    { to { transform: rotate(360deg); } }

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .yz-reveal.yz-pre { opacity: 1 !important; transform: none !important; }
}
