/*
 * Production additions to the approved Ember & Paper stylesheet (css/main.css is the handoff file, unchanged).
 * Only what the real implementation needs: hidden-state handling, icon swaps, the live Ask Abhinaba
 * search field, a fixed mobile menu, and a reveal fallback for browsers without scroll-driven animations.
 */

/* [hidden] must win over display rules in main.css */
.pf [hidden], .sheet[hidden] { display: none !important; }

/* Mobile menu sheet: fixed so it opens in view wherever the page is scrolled */
.sheet { position: fixed; animation: sheet-in .35s var(--ease) both; }

/* While account details are open, lift the Accounts sheet above the following sheets so a tall
   panel (phones, Freestyle/List views) is never covered by the next section. */
.sheet-s.dt-open { z-index: 20; }

/* Hero name: in the two-column hero just above the 1100px breakpoint the handoff size (13.4cqi)
   is wider than its column and "ABHINABA"/"BANERJEE" break mid-word (also in the handoff preview).
   Cap the size there only; at 1440px and wider the approved size is unchanged. */
@container (min-width: 1101px) {
  .name { font-size: clamp(76px, min(13.4cqi, 16.3cqi - 40px), 206px); }
}

/* ---- Category 5 QA fixes (no design change at the approved 1440px and 390px references) ---- */

/* Tablet header: between 761px and 1000px the nav pill + breadcrumb + controls are wider than the
   viewport (theme switch cut off, "Case studies" wraps). Use the approved phone header (Menu) there. */
@container (max-width: 1000px) {
  .nav-links, .crumb { display: none; }
  .menu-btn { display: inline-flex; }
}
/* Tablet hero: between 761px and 1100px the floating Ask card covers the portrait's face (the
   portrait is only 420px tall there). Place it below the portrait, exactly as on phones. */
@container (max-width: 1100px) {
  .chat { position: relative; left: auto; right: auto; bottom: auto; margin: 12px 0 0; animation: none; }
}
/* Ask header labels stay on one line at 360px */
.chat-head .who, .chat-head .demo-tag { white-space: nowrap; }

/* Outcome cards: at tablet widths the attribution pill is wider than the card. Stack it as phones do. */
@container (max-width: 900px) {
  .ach-top { flex-direction: column; }
}
/* Dark theme: the active Skills tab is cream, so its numbers keep the light-theme red (was orange, 2.2:1). */
.pf.dark .tab.on .tn, .pf.dark .tab.on .tc { color: #A3120E; }
/* Form fields: strengthen the focus underline so keyboard focus is clearly visible (was a colour change only). */
.fld input:focus-visible, .fld textarea:focus-visible { box-shadow: 0 1.5px 0 var(--blood); }
/* Footer "Back to top": minimum 24px target height. */
.foot-row a { display: inline-block; padding: 4px 0; }

/* Icon swaps (the preview runtime re-rendered these; here CSS follows the state classes) */
.pf:not(.paused) .icon-btn .i-play, .pf.paused .icon-btn .i-pause { display: none; }
.pf:not(.dark) .knob .i-moon, .pf.dark .knob .i-sun { display: none; }

/* Ask Abhinaba: live search field (replaces the disabled demo input) */
.chat-out { display: flex; flex-direction: column; gap: 10px; max-height: 13.5em; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.chat .a a { color: var(--ember); }
.chat .src { margin: 0; font-size: 11px; color: var(--ash); }
.chat-form { display: flex; gap: 6px; margin: 0; }
.chat-form .chat-in { flex: 1 1 auto; min-width: 0; color: var(--bone); }
.chat-form .chat-in::placeholder { color: var(--ash); opacity: 1; }
.chat-form .chat-in:focus-visible { border-color: var(--ember); }
.chat-go { flex: 0 0 44px; min-height: 44px; border-radius: 12px; border: 1px solid var(--lined); background: var(--ember); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.chat-go:hover { filter: brightness(1.08); }

/* Demo form note link */
.form .demo a { color: inherit; font-weight: 600; }

/* Reveal fallback where CSS scroll-driven animations are unsupported (Safari, Firefox) */
@supports not (animation-timeline: view()) {
  .js-reveal .rv { opacity: 0; transform: translateY(56px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .js-reveal .rv.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal .rv { opacity: 1 !important; transform: none !important; }
}
.no-motion.js-reveal .rv { opacity: 1; transform: none; }
