/* Hero — Alinassab luxury mosaic, original product photos */
#nof-toon-hero.nof-hero,
.nof-hero {
    --nof-hero-red: #8B1A24;
    --nof-hero-gold: #d4af37;
    --nof-hero-ivory: #f6f1e8;
    --hero-a: #6b1520;
    --hero-b: #3a0c12;
    --hero-accent: #d4af37;
    --nof-hero-ease: cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: block;
    width: 100%;
    max-width: none;
    overflow: hidden;
    margin: 0;
    padding: 0;
    gap: 0;
    grid-template-columns: none;
    direction: rtl;
    font-family: var(--font-fa) !important;
    color: #fff;
    background-color: var(--hero-a);
    background-image:
        radial-gradient(ellipse 55% 80% at 0% 50%, rgba(212, 175, 55, 0.16), transparent 58%),
        radial-gradient(ellipse 45% 50% at 92% 8%, rgba(255, 255, 255, 0.1), transparent 52%),
        linear-gradient(158deg, var(--hero-a) 0%, var(--hero-b) 100%);
    transition: background-color 550ms var(--nof-hero-ease);
}
#nof-toon-hero[data-theme="eco"] { --hero-a: #7a1b28; --hero-b: #3d0d14; --hero-accent: #e0b84a; }
#nof-toon-hero[data-theme="simin"] { --hero-a: #2c3a48; --hero-b: #151c24; --hero-accent: #c5d0dc; }
#nof-toon-hero[data-theme="electric"] { --hero-a: #1a4540; --hero-b: #0c2724; --hero-accent: #7ec8b8; }
#nof-toon-hero[data-theme="kettle"] { --hero-a: #4a3318; --hero-b: #24160a; --hero-accent: #d4a84b; }
#nof-toon-hero[data-theme="gold"] { --hero-a: #5c3d12; --hero-b: #2a1c08; --hero-accent: #f0d078; }

.nof-hero-stage {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 66px);
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.nof-hero-logo {
    position: absolute;
    top: 18px;
    right: 24px;
    z-index: 8;
    margin: 0;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(255, 252, 247, 0.92);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.nof-hero-logo img {
    height: 44px;
    width: auto;
    object-fit: contain;
    filter: none !important;
    display: block;
}
.nof-hero-slide {
    position: relative;
    z-index: 4;
    display: none;
    grid-template-columns: minmax(320px, 1fr) minmax(40%, 50%);
    gap: 0;
    align-items: stretch;
    min-height: calc(100vh - 66px);
}
.nof-hero-slide.is-on {
    display: grid;
    animation: nofHeroIn 0.55s var(--nof-hero-ease) both;
}
.nof-hero-main {
    min-width: 0;
    padding: 76px 32px 108px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
}
.nof-hero-show {
    position: relative;
    display: grid;
    place-items: center;
    min-height: calc(100vh - 66px);
    height: 100%;
    background:
        radial-gradient(ellipse 70% 55% at 50% 58%, #fff 0%, #f4efe8 55%, #e8dfd2 100%);
    box-shadow: inset 18px 0 40px rgba(0, 0, 0, 0.08);
}
.nof-hero-poster {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center center;
    filter: none !important;
    mix-blend-mode: normal !important;
    background: transparent;
    animation: nofHeroFloat 4.8s ease-in-out infinite;
    padding: 4% 3%;
    box-sizing: border-box;
    translate: var(--px, 0) var(--py, 0);
    transition: translate 420ms var(--nof-hero-ease);
}
.nof-hero-frame {
    position: absolute;
    inset: 18px;
    z-index: 3;
    pointer-events: none;
    border: 1px solid rgba(212, 175, 55, 0.42);
    border-radius: 4px;
    mask-image: linear-gradient(90deg, transparent 0 6%, #000 16% 84%, transparent 94% 100%);
}
.nof-hero-frame::before,
.nof-hero-frame::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border: 2px solid var(--hero-accent);
}
.nof-hero-frame::before {
    top: -1px;
    right: -1px;
    border-left: 0;
    border-bottom: 0;
}
.nof-hero-frame::after {
    bottom: -1px;
    left: -1px;
    border-right: 0;
    border-top: 0;
}
.nof-hero-index {
    position: absolute;
    z-index: 3;
    bottom: 26px;
    right: 34px;
    font-size: clamp(48px, 6vw, 86px);
    font-weight: 900;
    line-height: 1;
    color: rgba(58, 34, 24, 0.09);
    pointer-events: none;
    user-select: none;
}
.nof-hero-grain {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 48%;
    right: 0;
    pointer-events: none;
    opacity: 0.16;
    z-index: 1;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.35'/></svg>");
}
.nof-hero-ghost {
    position: absolute;
    inset-inline: 0;
    top: 10%;
    z-index: 2;
    margin: 0;
    text-align: center;
    font-family: var(--font-brand), var(--font-fa) !important;
    font-size: clamp(64px, 14vw, 180px);
    font-weight: 400;
    color: var(--hero-accent);
    opacity: 0.07;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}
@keyframes nofHeroIn {
    from { opacity: 0; transform: translateX(var(--slide-from, 32px)); }
    to { opacity: 1; transform: none; }
}
#nof-toon-hero[data-dir="prev"] { --slide-from: -32px; }
@keyframes nofHeroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes nofHeroGlow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.75; transform: scale(1.05); }
}
.nof-hero-show-glow {
    position: absolute;
    width: 68%;
    height: 48%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.22), transparent 70%);
    filter: blur(12px);
    animation: nofHeroGlow 4.5s ease-in-out infinite;
    pointer-events: none;
}

.nof-hero-copy { color: #fff; text-align: right; }
.nof-hero-slide.is-on .nof-hero-title { animation: nofHeroUp 0.6s var(--nof-hero-ease) both 0.05s; }
.nof-hero-slide.is-on .nof-hero-blurb { animation: nofHeroUp 0.6s var(--nof-hero-ease) both 0.14s; }
.nof-hero-slide.is-on .nof-hero-cta { animation: nofHeroUp 0.6s var(--nof-hero-ease) both 0.22s; }
@keyframes nofHeroUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
.nof-hero-kicker { display: none; }
.nof-hero-title {
    margin: 0 0 10px;
    font-size: clamp(1.55rem, 3vw, 2.55rem);
    font-weight: 900;
    line-height: 1.3;
    color: #fff !important;
    font-family: var(--font-fa) !important;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}
.nof-hero-blurb {
    margin: 0 0 18px;
    max-width: 44ch;
    font-size: 0.92rem;
    line-height: 1.9;
    color: rgba(255, 248, 238, 0.9);
}
.nof-hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #9a2030, #6b1520);
    color: #fff !important;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid rgba(240, 208, 120, 0.45);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: transform 180ms ease, filter 180ms ease;
}
.nof-hero-cta svg { transition: transform 220ms var(--nof-hero-ease); }
.nof-hero-cta:hover {
    filter: brightness(1.08);
    color: #fff !important;
    transform: translateY(-1px);
}
.nof-hero-cta:hover svg { transform: translateX(-4px); }
.nof-hero-cta:focus-visible {
    outline: 2px solid var(--hero-accent);
    outline-offset: 3px;
}

.nof-hero-mosaic {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: min(560px, 100%);
    aspect-ratio: 3 / 2;
    height: auto;
    min-height: 0;
}
.nof-hero-mosaic[data-count="4"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    aspect-ratio: 1;
    width: min(420px, 100%);
}
.nof-hero-mosaic[data-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
    aspect-ratio: 2 / 1;
    width: min(420px, 100%);
}

.nof-hero-tile {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 22px;
    text-decoration: none;
    color: #3a2218;
    background:
        radial-gradient(ellipse 90% 70% at 50% 18%, #fff 0%, var(--nof-hero-ivory) 68%, #e9e0d4 100%);
    border: 1px solid rgba(212, 175, 55, 0.38);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.75) inset,
        0 10px 24px rgba(0, 0, 0, 0.2);
    aspect-ratio: 1;
    min-height: 0;
    isolation: isolate;
    animation: nofHeroTileIn 0.65s var(--nof-hero-ease) both;
    animation-delay: var(--d, 0s);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.nof-hero-tile--0,
.nof-hero-tile--1,
.nof-hero-tile--2,
.nof-hero-tile--3 { grid-column: auto; grid-row: auto; }
.nof-hero-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.6) 50%, transparent 62%);
    transform: translateX(-120%);
    transition: transform 620ms var(--nof-hero-ease);
}
.nof-hero-tile:hover::after { transform: translateX(120%); }
.nof-hero-tile:hover {
    transform: translateY(-5px);
    border-color: var(--hero-accent);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 18px 36px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(212, 175, 55, 0.35);
    z-index: 3;
}
.nof-hero-tile:focus-visible {
    outline: 2px solid var(--hero-accent);
    outline-offset: 3px;
}
.nof-hero-tile-num {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 800;
    font-style: normal;
    color: #2a1c08;
    background: linear-gradient(160deg, #f4e3a8, var(--hero-accent));
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
}
.nof-hero-tile-media {
    position: absolute;
    inset: 8px 8px 38px;
    display: grid;
    place-items: center;
    padding: 6px;
}
.nof-hero-tile-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    filter: none !important;
    background: transparent;
    animation: nofHeroTileFloat 5.2s ease-in-out infinite;
    animation-delay: var(--d, 0s);
    transition: transform 0.35s ease;
}
.nof-hero-tile:hover .nof-hero-tile-media img {
    transform: translateY(-6px) scale(1.05);
    animation-play-state: paused;
}
.nof-hero-tile-meta {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 11px;
    background: linear-gradient(180deg, rgba(246, 241, 232, 0), rgba(246, 241, 232, 0.96) 36%);
    color: #3a2218;
}
.nof-hero-tile-meta em {
    font-style: normal;
    font-size: 0.8rem;
    font-weight: 800;
    color: #3a1a1c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nof-hero-tile-meta strong {
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    color: #f8e7a8;
    background: #8B1A24;
}
.nof-hero-tile-meta strong.is-ask {
    color: #3a2218;
    background: rgba(58, 34, 24, 0.08);
    border: 1px solid rgba(58, 34, 24, 0.12);
}
@keyframes nofHeroTileIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: none; }
}
@keyframes nofHeroTileFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.nof-hero-bar {
    position: absolute;
    z-index: 9;
    bottom: 26px;
    right: 32px;
    left: 52%;
    display: flex;
    align-items: center;
    gap: 18px;
    direction: rtl;
}
.nof-hero-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.nof-hero-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(240, 208, 120, 0.5);
    background: rgba(255, 252, 247, 0.1);
    backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
.nof-hero-btn:hover {
    transform: scale(1.06);
    border-color: var(--hero-accent);
    background: rgba(255, 252, 247, 0.2);
}
.nof-hero-btn:focus-visible {
    outline: 2px solid var(--hero-accent);
    outline-offset: 3px;
}
.nof-hero-count {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    margin-inline-start: 6px;
    font-weight: 800;
    font-size: 0.8rem;
    color: rgba(255, 248, 238, 0.6);
}
.nof-hero-count b { font-size: 1.05rem; color: var(--hero-accent); }
.nof-hero-count i { font-style: normal; opacity: 0.5; }

.nof-hero-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.nof-hero-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    min-height: 44px;
    padding: 8px 12px 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 248, 238, 0.62);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: color 200ms ease, background-color 200ms ease;
}
.nof-hero-tab em {
    font-style: normal;
    font-size: 0.72rem;
    opacity: 0.75;
}
.nof-hero-tab-label {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transition: max-width 380ms var(--nof-hero-ease), opacity 260ms ease;
}
.nof-hero-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.nof-hero-tab.is-on { color: #fff; }
.nof-hero-tab.is-on .nof-hero-tab-label { max-width: 15ch; opacity: 1; }
.nof-hero-tab:focus-visible {
    outline: 2px solid var(--hero-accent);
    outline-offset: 2px;
}
.nof-hero-tab-bar {
    position: absolute;
    right: 12px;
    left: 12px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
}
.nof-hero-tab-bar::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: scaleX(0);
    transform-origin: right center;
    background: var(--hero-accent);
}
.nof-hero-tab.is-on .nof-hero-tab-bar::after { transform: scaleX(1); }
.nof-hero.is-playing .nof-hero-tab.is-on .nof-hero-tab-bar::after {
    animation: nofHeroTab 7s linear forwards;
}
@keyframes nofHeroTab {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (max-width: 900px) {
    .nof-hero-slide.is-on { grid-template-columns: 1fr; }
    .nof-hero-show { min-height: 38vh; order: 2; box-shadow: none; }
    .nof-hero-poster { height: 38vh; padding: 2%; }
    .nof-hero-main { padding: 64px 16px 104px; gap: 16px; }
    .nof-hero-mosaic { width: 100%; max-width: 420px; height: auto; gap: 8px; }
    .nof-hero-grain { left: 0; }
    .nof-hero-blurb { max-width: none; }
    .nof-hero-logo { right: 12px; top: 10px; padding: 6px 10px; }
    .nof-hero-logo img { height: 34px; }
    .nof-hero-tile { border-radius: 16px; }
    .nof-hero-frame { inset: 10px; }
    .nof-hero-index { display: none; }
    .nof-hero-bar { left: 16px; right: 16px; bottom: 16px; gap: 10px; }
    .nof-hero-tabs { overflow-x: auto; scrollbar-width: none; }
    .nof-hero-tabs::-webkit-scrollbar { display: none; }
    .nof-hero-tab.is-on .nof-hero-tab-label { max-width: 10ch; }
}
@media (prefers-reduced-motion: reduce) {
    .nof-hero, .nof-hero-slide.is-on, .nof-hero-poster, .nof-hero-show-glow,
    .nof-hero-tile, .nof-hero-tile-media img, .nof-hero-tab-bar::after { transition: none; animation: none; }
}
