/* SOO About Us – responsive square hero / award tiles.
   Original About Us reveal and member animation rules remain in aboutus.php.
   All hero images are supplied only by the CMS, never by this stylesheet. */
.soo-about-page {
    --soo-about-orange: #ef7911;
    --soo-about-grid-gap: 4px;
}
.soo-about-hero.soo-about-hero--grid {
    width: calc(100vw - 2 * clamp(18px, 4.8vw, 80px));
    max-width: none;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    overflow: visible;
    background: transparent;
    margin: 0 0 35px;
    padding: 0;
    border: 0;
    transition: none !important;
    will-change: auto !important;
    direction: ltr;
}
.soo-about-hero.soo-about-hero--grid::after { content: none !important; display: none !important; }
.soo-about-hero-grid {
    display: grid;
    grid-template-columns: repeat(var(--soo-grid-columns, 5), minmax(0, 1fr));
    grid-auto-flow: row;
    /* A parent aspect-ratio/height from an older theme must not stretch rows. */
    grid-auto-rows: auto;
    grid-template-rows: none;
    align-items: start;
    align-content: start;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    gap: var(--soo-about-grid-gap);
    width: 100%;
    direction: ltr;
    opacity: 0;
    transform: translate3d(0, 8px, 0);
    transition: opacity .65s ease, transform .75s cubic-bezier(.2, .9, .2, 1);
}
.soo-about-hero--grid.is-ready .soo-about-hero-grid {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}
.soo-hero-tile {
    position: relative;
    display: block;
    /* Critical: square tracks, not three stretched rows. */
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0;
    min-height: 0;
    align-self: start !important;
    overflow: hidden;
    isolation: isolate;
    background: #737373;
    cursor: inherit;
}
.soo-hero-tile.is-dark { background: #000; }
.soo-hero-tile.is-light { background: #6a6a6a; }
/* SVG reference, exact colors: hover-only = #6A6A6A -> #EF7911.
   Dedicated hover cells never contain images, text, or a rotating cube. */
.soo-hero-tile.soo-hero-tile--hover {
    background-color: #6a6a6a;
    transition: background-color .36s cubic-bezier(.2,.8,.2,1);
}
.soo-hero-tile.soo-hero-tile--empty { background-color: #000; }
/* Three-dimensional media occupies only image-enabled CMS slots. */
.soo-hero-tile.is-dark { perspective: 1400px; }
.soo-hero-cube-face { background:#000; }
.soo-hero-placeholder { position:absolute;inset:0;display:grid;place-items:center; color:#fff; font:300 clamp(12px,1.2vw,19px)/1.2 'OnMedium',sans-serif; text-align:center; }
@media(max-width:700px){.soo-hero-placeholder{font-size:clamp(11px,2.9vw,15px)}}
.soo-hero-cube {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transform: rotateY(0deg);
    transition: transform .88s cubic-bezier(.23,.75,.27,1);
}
.soo-hero-cube-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
}
.soo-hero-cube-front { transform: translateZ(calc(var(--soo-tile-size, 0px) / 2)); }
.soo-hero-cube-side { transform: rotateY(90deg) translateZ(calc(var(--soo-tile-size, 0px) / 2)); }
.soo-hero-tile.is-cube-rotating .soo-hero-cube { transform: rotateY(-90deg); }
.soo-hero-tile.is-cube-reset .soo-hero-cube { transition: none !important; }
.soo-about-hero--grid .soo-hero-cube img {
    position: absolute !important;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
}
/* The former universal orange overlay colored photos too.
   Only the intentionally empty, hover-only squares change color. */
.soo-hero-tile::after { content: none !important; }
.soo-hero-tile-label {
    position: absolute;
    bottom: 12px;
    inset-inline-start: 12px;
    max-width: calc(100% - 24px);
    color: #fff;
    font: 300 clamp(12px,1.1vw,18px)/1.15 'OnMedium', sans-serif;
    opacity: 0;
    transform: translateY(8px);
    z-index: 2;
    pointer-events: none;
    overflow-wrap: anywhere;
    transition: opacity .35s ease, transform .45s ease;
}
@media (hover: hover) and (pointer: fine) {
    .soo-hero-tile.soo-hero-tile--hover:hover { background-color: #ef7911; }
    .soo-hero-tile.has-photo:hover .soo-hero-tile-label { opacity: 1; transform: translateY(0); }
    /* Only hover-designated squares change color; photos keep cube animation. */
}
/* The page's existing two-second hero-loader stage stays unchanged. */
.soo-about-hero--grid .soo-about-hero-loader {
    z-index: 5;
    pointer-events: none;
    background: transparent;
}
.soo-about-hero-grid:not([data-enhanced='1']) > .soo-hero-tile:nth-child(n+16) { display: none; }

/* Awards: images are square, with caption below. Do not manufacture content. */
.soo-about-awards-section .soo-about-awards-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px 4px;
    align-items: start;
    margin-top: 22px;
}
.soo-about-awards-section .soo-about-awards-item {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
}
.soo-about-award-visual {
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    background: #737373;
}
.soo-about-award-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter .38s ease;
}
@media (hover: hover) and (pointer: fine) {
    .soo-about-award-visual:hover img { filter: grayscale(0); }
}
.soo-about-awards-section .soo-about-awards-copy { padding: 9px 2px 0; }
.soo-about-awards-section .soo-about-awards-year { display: block; font-size: 14px; margin-bottom: 4px; }
.soo-about-awards-section .soo-about-awards-copy h3 { font-size: 17px; line-height: 1.3; }
.soo-about-awards-section .soo-about-awards-copy p { font-size: 15px; line-height: 1.4; }
.soo-about-awards-section .soo-about-extra-intro { margin-top: 24px; }
.soo-past-section { margin-top: 82px; }

@media (max-width: 960px) and (min-width: 701px) {
    .soo-about-awards-section .soo-about-awards-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 700px) {
    .soo-about-hero.soo-about-hero--grid {
        width: calc(100vw - 34px);
        margin-bottom: 32px;
        aspect-ratio: auto !important;
    }
    .soo-about-hero-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .soo-about-hero-grid:not([data-enhanced='1']) > .soo-hero-tile:nth-child(n+10) { display: none; }
    .soo-hero-tile-label { font-size: 11px; bottom: 7px; inset-inline-start: 7px; }
    .soo-about-awards-section .soo-about-awards-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px 4px; }
    .soo-about-awards-section .soo-about-awards-copy h3 { font-size: 13px; }
    .soo-about-awards-section .soo-about-awards-copy p { font-size: 12px; }
    .soo-about-awards-section .soo-about-awards-year { font-size: 12px; }
    .soo-past-section { margin-top: 68px; }
}
@media (max-width: 390px) {
    .soo-about-hero.soo-about-hero--grid { width: calc(100vw - 28px); }
}
@media (prefers-reduced-motion: reduce) {
    .soo-about-hero-grid,
    .soo-hero-tile.soo-hero-tile--hover,
    .soo-hero-tile-label,
    .soo-about-hero--grid .soo-hero-cube,
    .soo-about-hero--grid .soo-hero-cube img,
    .soo-about-award-visual img { transition: none !important; }
    .soo-about-hero-grid { transform: none !important; }
}

/* Applied only after the responsive controller has measured the available area.
   Explicit dimensions prevent legacy height/row stretch and guarantee 1:1 tiles. */
.soo-about-hero-grid[data-enhanced="1"] {
    grid-template-rows: repeat(3, var(--soo-tile-size)) !important;
    grid-auto-rows: var(--soo-tile-size) !important;
}
.soo-about-hero-grid[data-enhanced="1"] > .soo-hero-tile {
    width: 100% !important;
    height: var(--soo-tile-size) !important;
    aspect-ratio: 1 / 1 !important;
}

/* Hide inactive slot links in the CMS via [hidden] (the CMS also enforces this). */

/* Project click destination travels with each rotating image; team and logo stay inert. */
.soo-hero-tile--project { color:inherit; text-decoration:none; cursor:default; }
.soo-hero-tile--project[href] { cursor:pointer; }
.soo-hero-tile--project[href]:focus-visible { outline:3px solid #ef7911; outline-offset:-3px; }
.soo-hero-tile--team .soo-hero-tile-label { display:none !important; }
.soo-hero-tile--project .soo-hero-tile-label,
.soo-hero-tile--logo .soo-hero-tile-label {
  bottom:0;left:0;right:0;inset-inline-start:0;max-width:none;
  padding:32px 10px 12px; background:linear-gradient(to top,rgba(0,0,0,.78),transparent);
  text-align:start;white-space:normal;pointer-events:none;
}
.soo-hero-tile-label:empty { display:none!important; }
@media (hover:hover) and (pointer:fine) {
  .soo-hero-tile--project.has-photo:hover .soo-hero-tile-label,
  .soo-hero-tile--logo.has-photo:hover .soo-hero-tile-label {opacity:1;transform:translateY(0)}
}
.soo-hero-tile--project:focus-visible .soo-hero-tile-label {opacity:1;transform:translateY(0)}
