/* Saxum homepage hero (HX01 Field Archive). Loaded by the Saxum Hero Photos plugin. */
/* ---- Saxum HX01 hero: everything is scoped under .sx-hero ---- */

  .sx-hero {
    --sx-bone: #F7F5F2;
    --sx-ink: #0B0B0B;
    --sx-muted: #6b665c;
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    background: var(--sx-bone);
    color: var(--sx-ink);
    cursor: grab;
    touch-action: pan-y; /* vertical swipes still scroll the page on touch */
    user-select: none;
    -webkit-user-select: none;
  }
  .sx-hero.is-dragging { cursor: grabbing; }

  /* Photo field */
  .sx-item {
    position: absolute;
    left: 0;
    top: 0;
    will-change: transform;
  }
  .sx-photo {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
  }
  .sx-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-drag: none;
  }

  /* Staggered arrival: each tile appears in its own turn (is-shown),
     as a soft stone placeholder that "develops" into the photo once it has loaded (is-loaded) */
  .sx-item .sx-photo {
    opacity: 0;
    transform: scale(.94) translateY(14px);
    background: #E6E1D7;
    transition: opacity .9s ease, transform 1.2s cubic-bezier(.2,.7,.2,1);
  }
  .sx-item.is-shown .sx-photo { opacity: 1; transform: none; }
  .sx-item.is-shown:not(.is-loaded) .sx-photo { animation: sx-develop 1.4s ease-in-out infinite alternate; }
  @keyframes sx-develop { from { background-color: #ECE8E0; } to { background-color: #DCD6CA; } }
  .sx-item .sx-photo img { opacity: 0; transition: opacity 1s ease; }
  .sx-item.is-loaded .sx-photo img { opacity: 1; }

  /* Fine film grain: a faint still layer + a live layer that flickers through
     8 grain positions ~11x a second (small tile = fine grain, so it fizzes rather than jumps) */
  .sx-grain, .sx-grain-2 {
    position: absolute;
    inset: 0;
    background-image: var(--sx-grain);
    background-size: 128px;
    mix-blend-mode: overlay;
    pointer-events: none;
  }
  .sx-grain { opacity: .08; }
  .sx-grain-2 {
    opacity: .2;
    animation: sx-grain-live .7s steps(1) infinite;
  }
  @keyframes sx-grain-live {
    0%    { background-position: 0 0; }
    12.5% { background-position: -37px 22px; }
    25%   { background-position: 18px -41px; }
    37.5% { background-position: -61px 9px; }
    50%   { background-position: 43px 57px; }
    62.5% { background-position: -12px -29px; }
    75%   { background-position: 71px 13px; }
    87.5% { background-position: -49px -66px; }
    100%  { background-position: 0 0; }
  }

  /* Hover label */
  .sx-cap {
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
  }
  .sx-cap span.sx-tag {
    display: inline-block;
    background: var(--sx-bone);
    border-radius: 10px;
    padding: 7px 10px;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    line-height: 1.35;
    color: var(--sx-ink);
  }
  .sx-cap b { font-weight: 500; }
  .sx-cap i { font-style: normal; color: var(--sx-muted); }
  .sx-item:hover .sx-cap { opacity: 1; transform: none; }

  /* Lens blur at the frame edges (two progressive layers) */
  .sx-lens {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  .sx-lens-1 {
    z-index: 24;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, transparent 42%, #000 78%);
    mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, transparent 42%, #000 78%);
  }
  .sx-lens-2 {
    z-index: 25;
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, transparent 62%, #000 100%);
    mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, transparent 62%, #000 100%);
  }

  /* Copy: inverts over the photos */
  #sx-hero .sx-copy {
    position: absolute;
    inset: 0 5%;   /* matches the site header's 5% side margin, so the type lines up with the logo */
    z-index: 30;
    display: flex;
    flex-direction: column;
    justify-content: center;
    pointer-events: none;
    mix-blend-mode: difference !important;
    color: #fff;
  }
  /* IDs + !important so the theme / Elementor kit heading styles can't override these */
  #sx-hero .sx-eyebrow {
    font-family: Inter, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    letter-spacing: .1em !important;
    text-transform: uppercase !important;
    color: #fff !important;
    margin: 0 0 28px !important;
  }
  #sx-hero .sx-copy h1,
  #sx-hero .sx-copy h1 em {
    color: #fff !important;
    font-family: "PP Editorial Regular", "PP Editorial New", "Instrument Serif", Georgia, serif !important;
    font-weight: 400 !important;
    text-transform: none !important;
    -webkit-text-fill-color: #fff !important;
    background: none !important;
  }
  #sx-hero .sx-copy h1 {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 1340px;
    font-size: clamp(44px, 7.2vw, 104px) !important;
    line-height: .95 !important;
    letter-spacing: -0.03em !important;
  }
  #sx-hero .sx-copy h1 em { font-style: italic !important; }

  @media (max-width: 700px) {
    #sx-hero .sx-copy { inset: 0 5%; }
    #sx-hero .sx-eyebrow { font-size: 11px !important; margin-bottom: 18px !important; }
  }
  @media (prefers-reduced-motion: reduce) {
    .sx-grain-2 { animation: none; }
    .sx-item .sx-photo { transform: none; transition: opacity .3s ease; }
    .sx-item.is-shown:not(.is-loaded) .sx-photo { animation: none; }
  }
