@charset "UTF-8";

@layer effects {
  /* Highest layer: overrides base/home/folio/dialogs cleanly without !important */

  /* State-level routing & intro overrides */
  body.is-routing #scene { opacity: 1; }
  body.route-fullscreen #scene { z-index: 200; opacity: 1; visibility: visible; }
  body.route-fullscreen #site-header { visibility: hidden; pointer-events: none; }
  body.route-fullscreen #view { animation: none; }
  body.route-dom-fallback #view,
  body.route-dom-fallback #site-header,
  body.route-dom-fallback #motion-route-still {
    opacity: var(--route-opacity, 1);
    will-change: opacity;
  }
  body.route-dom-fallback #scene { visibility: hidden; }
  body.is-intro .hero-copy,
  body.is-intro #hero-controls { opacity: 0; }

  /* Decorative legacy arrows remain retired */
  .ui-arrow,
  .line-arrow,
  .corner-arrow,
  .row-arrow { display: none; }
  .line-arrow::before,
  .line-arrow::after,
  .ui-arrow::before,
  .ui-arrow::after { content: none; display: none; }

  /* Interactive text grain accessibility label */
  .interactive-text-label {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .interactive-text-visual { display: inline; }
  .text-grain { display: inline-block; transform-origin: 50% 70%; }

  /* Rolling dual-layer typography & liquid bottom string */
  .type-roll {
    position: relative;
    display: inline-grid;
    grid-template-areas: "text";
    overflow: hidden;
    align-items: start;
    min-width: 0;
  }
  .type-roll > span {
    grid-area: text;
    transition: transform .52s cubic-bezier(.23, 1, .32, 1), opacity .42s;
  }
  .type-roll > span:last-child { transform: translateY(110%); opacity: 0; }
  @media (any-hover: hover) and (prefers-reduced-motion: no-preference) {
    .roll-host:not([data-roll-bound]):hover .type-roll > span:first-child { transform: translateY(-110%); opacity: 0; }
    .roll-host:not([data-roll-bound]):hover .type-roll > span:last-child { transform: translateY(0); opacity: 1; }
    .chapter-gate:not([data-roll-bound]):hover { background-color: rgba(223, 180, 133, .035); }
  }
  @media (prefers-reduced-motion: no-preference) {
    .roll-host:is(.is-hover, :focus-visible) .type-roll > span:first-child { transform: translateY(-110%); opacity: 0; }
    .roll-host:is(.is-hover, :focus-visible) .type-roll > span:last-child { transform: translateY(0); opacity: 1; }
    .chapter-gate.is-hover { background-color: rgba(223, 180, 133, .035); }
  }

  [data-liquid] { position: relative; }
  [data-liquid]::before {
    position: absolute;
    content: "";
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    pointer-events: none;
    background: rgba(213, 170, 117, .44);
  }
  [data-liquid="vermilion"]::before {
    background: linear-gradient(90deg, #c63c35b3, #dfb4856b);
  }
  .liquid-string {
    position: absolute;
    left: 0;
    bottom: -11px;
    display: block;
    width: 100%;
    height: 23px;
    pointer-events: none;
  }
  [data-liquid]:has(.liquid-string[data-painted])::before { opacity: 0; }
  #view :is(.folio-news-row, .folio-journal-feature) {
    position: relative;
    isolation: isolate;
    transition: background-color .28s ease;
  }
  #view :is(.folio-news-row, .folio-journal-feature).is-wind-active {
    background-color: rgba(223, 180, 133, .04);
  }
  #view .row-wind {
    position: absolute;
    inset: 0;
    z-index: -1;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }

  /* Unified brass-seal gold action button */
  #view .brass-seal,
  .service-dialog .brass-seal {
    --px: 50%;
    --py: 50%;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 55px;
    padding: 10px clamp(15px, 1.45vw, 22px);
    cursor: pointer;
    border: 1px solid #fff1d66b;
    border-bottom-color: #896338;
    border-radius: 1px;
    background: linear-gradient(180deg, #e5c18f 0%, #d3a36b 52%, #b9874f 100%);
    color: #191611;
    box-shadow: inset 0 1px #fffcf4a6, 0 8px 20px #0004;
    font: 600 17px/1.5 var(--editorial-serif);
    letter-spacing: .035em;
    text-decoration: none;
  }
  #view .about-strip .about-seal {
    width: auto;
    min-width: 248px;
    padding-inline: 34px;
    flex: none;
  }
  :is(#view, .service-dialog) .brass-seal::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background:
      radial-gradient(110px 3px at var(--px) 0, #fffdf2 10%, transparent 98%) top / 100% 1px no-repeat,
      radial-gradient(180px 90px at var(--px) var(--py), rgba(255, 253, 246, .82) 0%, rgba(255, 249, 224, .66) 12%, rgba(255, 233, 183, .32) 43%, transparent 86%);
    transition: opacity .25s ease;
  }
  :is(#view, .service-dialog) .brass-seal::after {
    content: "";
    position: absolute;
    inset: -40% -20%;
    pointer-events: none;
    background: linear-gradient(112deg, transparent 32%, rgba(255, 253, 245, .68) 49%, rgba(255, 244, 214, .28) 57%, transparent 68%);
    transform: translateX(-125%);
  }
  .brass-seal > :is(.type-roll, small) { position: relative; z-index: 1; }
  :is(#view, .service-dialog) .brass-seal:focus-visible { outline: 2px solid #f6d7ad; outline-offset: 3px; }
  :is(#view, .service-dialog) a.brass-seal:is(:hover, :focus-visible) { text-decoration: none; }
  .brass-seal .press-blade {
    pointer-events: none;
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #fffcf2;
    box-shadow: 0 0 28px 10px rgba(255, 250, 235, .72);
    animation: press-light .52s cubic-bezier(.18, .68, .23, 1) forwards;
  }
  @keyframes press-light {
    from { transform: scaleX(1); opacity: .95; }
    to { transform: scaleX(160); opacity: 0; }
  }
  :is(#view, .service-dialog) .brass-seal[aria-busy="true"] { opacity: 1; cursor: progress; }
  .service-dialog .brass-seal[aria-busy="true"] * { cursor: progress; }
  .brass-seal > .seal-scan { display: none; }
  .brass-seal[aria-busy="true"] > .seal-scan {
    display: block;
    position: absolute;
    inset: auto 0 0;
    height: 2px;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, #ffe8af 40%, #fff9df 50%, #efc372 65%, transparent) 0 0 / 40% 100% no-repeat, #7c542b;
    animation: seal-scan 1s ease-in-out infinite alternate paused;
  }
  .brass-seal[data-seal-visible][aria-busy="true"] > .seal-scan { animation-play-state: running; }
  @keyframes seal-scan {
    from { background-position: 0 0; }
    to { background-position: 100% 0; }
  }
  @media (prefers-reduced-motion: no-preference) {
    :is(#view, .service-dialog) .brass-seal {
      transition: letter-spacing .32s ease, filter .22s ease, border-color .22s ease, box-shadow .32s ease, transform .14s ease-out;
    }
    :is(#view, .service-dialog) .brass-seal:is(.is-hover, :focus-visible, :hover:not([data-roll-bound])):not(:disabled) {
      letter-spacing: .085em;
      filter: brightness(1.04);
      border-color: rgba(255, 248, 232, .75);
      box-shadow: inset 0 1px 0 rgba(255, 253, 246, .88), 0 12px 28px rgba(0, 0, 0, .48), 0 0 22px rgba(223, 180, 133, .22);
    }
    :is(#view, .service-dialog) .brass-seal:is(.is-hover, :focus-visible, :hover:not([data-roll-bound])):not(:disabled)::before { opacity: 1; }
    :is(#view, .service-dialog) .brass-seal:is(.is-hover, :focus-visible, :hover:not([data-roll-bound])):not(:disabled)::after {
      transform: translateX(125%);
      transition: transform .76s cubic-bezier(.16, 1, .3, 1);
    }
    :is(#view, .service-dialog) .brass-seal:active:not(:disabled) { transform: scale(.988); }
  }
  @media (max-width: 700px) {
    :is(#view, .service-dialog) .brass-seal { min-height: 51px; }
    #view .about-strip .about-seal { margin-top: 26px; width: 100%; max-width: 320px; }
  }

  /* Senior mode size promotion over .brass-seal / report controls */
  .service-overlay[data-senior="true"][data-kind="cert"] .service-dialog :is(
    .brass-seal,
    .report-entry,
    .report-back,
    .report-upload,
    .report-upload-count
  ) {
    font-size: var(--senior-body);
  }

  /* Native motion & 8-banner gallery chevron icons */
  #site-header .search-button {
    background: transparent;
    border: 0;
    box-shadow: none;
    animation: none;
  }
  #main-nav .nav-contact { background: transparent; }
  #hero-controls .motion-controls {
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }
  :is(#motion-toggle, .opening-motion-toggle, .science-play-toggle, #gallery-pause, [data-gallery-step]) {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #f1ece3;
    font-size: 0;
    backdrop-filter: none;
  }
  :is(#motion-toggle, .opening-motion-toggle, .science-play-toggle) span { display: none; }
  :where(#motion-toggle, .opening-motion-toggle, .science-play-toggle, #gallery-pause, [data-gallery-step])::before {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background: currentColor;
    mask: var(--control-icon) center / contain no-repeat;
    --control-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='3' width='5' height='18' rx='2'/%3E%3Crect x='14' y='3' width='5' height='18' rx='2'/%3E%3C/svg%3E");
    transition: transform .18s ease;
  }
  :is(#motion-toggle, .opening-motion-toggle, .science-play-toggle, #gallery-pause)[aria-pressed="true"]::before {
    --control-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 4Q6 2 8 3L21 11Q23 12 21 13L8 21Q6 22 6 20Z'/%3E%3C/svg%3E");
  }
  button[data-gallery-step]::before {
    --control-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 5 7 7-7 7' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  [data-gallery-step="-1"]::before { rotate: 180deg; }
  button[data-gallery-step]::before,
  button[data-gallery-step] .gallery-chevron { grid-area: 1 / 1; }
  .gallery-arrows button::before,
  .gallery-arrows button .gallery-chevron { position: absolute; inset: 0; margin: auto; }
  button[data-gallery-step] .gallery-chevron {
    visibility: hidden;
    display: block;
    width: 38px;
    height: 26px;
    fill: currentColor;
    pointer-events: none;
  }
  [data-gallery-step="-1"] .gallery-chevron { transform: scaleX(-1); }
  .gallery-chevron path { transition: transform .4s ease; --lag: .6s; }
  .gallery-chevron path:first-child { transform: translateX(12px); }
  .gallery-chevron path:nth-child(2) { --lag: .4s; }
  .gallery-chevron path:last-child { transform: translateX(-12px); --lag: .2s; }
  button[data-gallery-step]:active::before { visibility: hidden; }
  button[data-gallery-step]:active .gallery-chevron { visibility: visible; }
  button[data-gallery-step]:active .gallery-chevron path { transform: translateX(0); }
  :is(#motion-toggle, .opening-motion-toggle, .science-play-toggle, #gallery-pause):active::before { transform: scale(.94); }
  :is(#motion-toggle, .opening-motion-toggle, .science-play-toggle, #gallery-pause).control-hover::before { transform: scale(1.5); }
  .gallery-arrows button[data-gallery-step].control-hover::before { visibility: hidden; }
  .gallery-arrows button[data-gallery-step].control-hover .gallery-chevron { visibility: visible; }
  .gallery-arrows button[data-gallery-step].control-hover path { transform: translateX(0); }
  @keyframes gallery-chevron-light { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
  @keyframes play-triangle-nudge {
    0%, 100% { transform: translateX(-3px) scale(1.15); }
    50% { transform: translateX(5px) scale(1.65); }
  }
  @media (any-hover: hover) {
    button[data-gallery-step]:hover::before { visibility: hidden; }
    button[data-gallery-step]:hover .gallery-chevron { visibility: visible; }
    button[data-gallery-step]:hover .gallery-chevron path {
      transform: translateX(0);
      animation: gallery-chevron-light 1s infinite var(--lag);
    }
    :is(#motion-toggle, .opening-motion-toggle, .science-play-toggle, #gallery-pause):hover::before { transform: scale(1.5); }
  }
  @media (any-hover: hover) and (prefers-reduced-motion: no-preference) {
    :is(#motion-toggle, .opening-motion-toggle, .science-play-toggle, #gallery-pause):hover:not(:active)::before {
      animation: play-triangle-nudge .85s ease-in-out infinite;
    }
  }
  @media (prefers-reduced-motion: no-preference) {
    :is(#motion-toggle, .opening-motion-toggle, .science-play-toggle, #gallery-pause).control-hover:not(:active)::before {
      animation: play-triangle-nudge .85s ease-in-out infinite;
    }
    .gallery-arrows button[data-gallery-step].control-hover path {
      animation: gallery-chevron-light 1s infinite var(--lag);
    }
  }

  /* Prism input border lighting */
  :root {
    --cert-prism-border: #657080;
    --cert-prism-focus: #b3c5e0;
  }
  :root:is([data-theme="paper"], [data-theme="light"]) {
    --cert-prism-border: #687589;
    --cert-prism-focus: #344f80;
  }
  .cert-input-accent-frame { min-width: 0; }
  :root .cert-prism-control { border-color: var(--cert-prism-border); box-shadow: none; }
  :root .cert-prism-control:focus { outline: 2px solid var(--cert-prism-focus); outline-offset: 3px; }
  :root .cert-prism-control[aria-invalid="true"] { border-color: #d86869; outline-color: #d86869; }
  @media (forced-colors: none) and (prefers-reduced-motion: no-preference) {
    :root .cert-prism-control:is([data-prism-tracking], [data-prism-pointer-focus]):focus { outline-color: transparent; }
  }
  .cert-input-accent-frame:is(.service-field, .service-search-field, [data-prism-layout="labeled"]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }
  .cert-input-accent-frame:is(.service-field, [data-prism-layout="labeled"]) > :is(label, span:first-child) { grid-area: 1 / 1; }
  .cert-input-accent-frame:is(.service-field, [data-prism-layout="labeled"]) > :is(.cert-prism-control, .cert-input-accent-decoration) { grid-area: 2 / 1; }
  .cert-input-accent-frame.service-search-field > :is(.cert-prism-control, .cert-input-accent-decoration) { grid-area: 1 / 1; }
  .folio-search,
  .cert-input-accent-frame[data-prism-field]:not([data-prism-layout="labeled"]) { position: relative; }
  .folio-search > .cert-input-accent-decoration,
  .cert-input-accent-frame:is(.catalog-search, [data-prism-field]:not([data-prism-layout="labeled"])) > .cert-input-accent-decoration {
    position: absolute;
    inset: 0;
  }
  .folio-search > .cert-input-accent-decoration { height: calc(100% + 1px); }
  .cert-input-accent-fallback { z-index: 7; pointer-events: none; }
  .cert-input-accent-fallback > .cert-input-accent-decoration { position: absolute; inset: 0; }
  .cert-input-accent-decoration {
    position: relative;
    z-index: 7;
    pointer-events: none;
    opacity: 0;
    transition-property: none;
  }
  .cert-input-accent-frame[data-input-accent="pointer"] .cert-input-accent-decoration { opacity: 1; }
  .cert-input-accent-light {
    position: absolute;
    inset: -1px;
    display: block;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
  }
  @media (any-hover: none), (any-pointer: coarse) and (not (any-pointer: fine)) {
    .cert-input-accent-decoration { display: none; }
    .cert-input-accent-frame[data-input-accent="pointer"] .cert-input-accent-decoration { display: block; }
  }
  @media (forced-colors: active) {
    .cert-input-accent-decoration,
    .cert-input-accent-frame[data-input-accent="pointer"] .cert-input-accent-decoration { display: none; }
    :root .cert-prism-control { border-color: ButtonText !important; }
    :root .cert-prism-control:focus { outline-color: Highlight !important; }
  }

  /* Cursor, spinner & disabled cursor */
  .interaction-cursor { position: fixed; inset: 0; pointer-events: none; z-index: 150; opacity: 1; }
  .interaction-cursor canvas { width: 100%; height: 100%; }
  .glow-cursor { position: relative; width: 100%; height: 100%; overflow: hidden; }
  .glow-cursor__canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; }
  .glow-cursor__content { position: relative; z-index: 1; width: 100%; height: 100%; }
  .interaction-loader {
    display: inline-block;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    box-sizing: border-box;
    border: 2px solid #eccb8c33;
    border-top-color: #eccb8c;
    border-radius: 50%;
    animation: interaction-loader-spin .75s linear infinite;
    filter: drop-shadow(0 0 4px #eccb8c33);
  }
  @keyframes interaction-loader-spin { to { transform: rotate(360deg); } }
  .service-dialog .service-submit:disabled,
  .service-dialog .service-submit:disabled * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath stroke='white' stroke-width='5' d='M24 14a10 10 0 1 1-20 0 10 10 0 1 1 20 0ZM7 7l14 14'/%3E%3Cpath stroke='%23ed2939' stroke-width='3' d='M24 14a10 10 0 1 1-20 0 10 10 0 1 1 20 0ZM7 7l14 14'/%3E%3C/g%3E%3C/svg%3E") 14 14, not-allowed;
  }

  @media (prefers-reduced-motion: reduce) {
    .text-grain { transform: none !important; }
    .brass-seal[aria-busy="true"] > .seal-scan { background-position: 50% 0; }
    .brass-seal .press-blade { display: none; }
  }
}
