/* Shared layouts for the FARSHINEH catalogue, stock tools and editorial pages. */
html[data-atlas]{
  --at-ink:#123437;--at-deep:#0b262b;--at-paper:#f7f1e7;--at-card:#fffaf1;--at-brass:#a67c44;--at-gold:#e7c58a;--at-line:#d4c3a8;--at-red:#812f37;
  --fx-page:var(--at-paper);--fx-card:var(--at-card);--fx-text:#172e2d;--fx-muted:#605e52;--fx-rule:#d9c8b1;
  scroll-padding-top:86px;background:var(--at-paper);
}
html[data-atlas] body{margin:0;background:var(--at-paper)!important;color:var(--fx-text)!important}
html[data-atlas] .at-icon{width:1.45em;height:1.45em;display:inline-block;vertical-align:middle;flex:none}
html[data-atlas] [dir=rtl] .at-arrow,html[data-atlas][dir=rtl] .at-arrow{transform:scaleX(-1)}
html[data-atlas] body>.container:has(>.site-header),html[data-atlas] body>header:has(>.bar),
html[data-atlas=stock] .wrap>.hero .top,html[data-atlas=stock] .wrap>.hero .language-flags,html[data-atlas=stock] .wrap>.hero .premium-nav{display:none!important}
html[data-atlas] .at-mast{position:sticky;inset-block-start:0;z-index:85;background:var(--at-deep);color:#fff4df;border-bottom:1px solid #90784e;box-sizing:border-box}
.at-mast-inner{width:min(1460px,93%);min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:clamp(16px,3vw,58px);margin:auto}
html[data-atlas] .at-mast .brand-home{display:inline-flex;align-items:center;color:#fff3d9!important;line-height:1.1;text-decoration:none}
html[data-atlas] .at-mast .wordmark{color:#fff3d9!important}.at-mast .wordmark small{color:#d8c7a6!important}
.at-primary,.at-tools{display:flex;align-items:center;gap:clamp(12px,2.6vw,40px)}
.at-primary a,.at-tools a,.at-lang summary{color:#f3e9d6!important;text-decoration:none;font:inherit;font-size:.97rem}
.at-primary a{position:relative;padding:20px 0}.at-primary a:hover,.at-primary a[aria-current]{color:#f3cc87!important}
.at-primary a[aria-current]::after{content:"";position:absolute;inset-inline:0;bottom:11px;height:1px;background:var(--at-gold)}
.at-tools{gap:12px}.at-guide-trigger,.at-lang summary{display:inline-flex;align-items:center;min-height:44px;box-sizing:border-box;cursor:pointer;gap:8px}
.at-guide-trigger{padding:2px 14px;border:1px solid #ad945e!important;border-radius:24px}.at-guide-trigger .at-icon{color:var(--at-gold);width:28px!important;height:28px!important}
.at-lang{position:relative}.at-lang summary{list-style:none;font-size:.82rem;padding:0 5px}.at-lang summary::-webkit-details-marker{display:none}
.at-lang>div{display:none;position:absolute;inset-inline-end:0;top:100%;background:var(--at-card);padding:5px;border:1px solid var(--at-line);box-shadow:0 8px 26px #122a2633;min-width:130px;max-height:65vh;overflow:auto}
.at-lang[open]>div{display:grid}.at-lang a{color:var(--at-ink)!important;padding:8px 12px}.at-lang a:hover,.at-lang a[aria-current]{background:#eadcc3}
html[data-atlas] :is(button,a,summary,input,select):focus-visible{outline:3px solid #b8791f!important;outline-offset:3px}
html.at-reading-guide{overflow:hidden}
html[data-atlas] .at-dialog:not([open]){display:none!important}
html[data-atlas] .at-dialog[open]{position:fixed;inset:0;display:block;width:min(820px,calc(100% - 32px));height:fit-content;max-height:calc(100dvh - 40px);margin:auto;padding:0;overflow:auto;border:1px solid #bb9e6d;border-radius:4px;background:var(--at-paper);color:var(--at-ink);box-shadow:0 35px 130px #081e23a6;z-index:999}
.at-dialog::backdrop{background:rgba(7,28,30,.75);backdrop-filter:blur(5px)}
.at-dialog-inner{position:relative;display:grid;grid-template-columns:29% 71%;direction:ltr}
.at-lamp-art{background:linear-gradient(0deg,#152b3210,#152b3226),url('/assets/story/workshop.webp') 21% center/cover}
.at-dialog-copy{padding:clamp(28px,4vw,52px);text-align:start}
html[data-atlas-lang=fa] .at-dialog-copy,html[data-atlas-lang=ar] .at-dialog-copy{direction:rtl}
html[data-atlas] .at-dialog h2{font:inherit;font-size:clamp(1.6rem,3.1vw,2.55rem);font-weight:650;line-height:1.28;color:var(--at-ink)!important;margin:.6rem 0 1.1rem}
.at-dialog-lamp{width:39px!important;height:39px!important;color:var(--at-brass)}
html[data-atlas] .at-close{position:absolute;top:10px;right:10px;display:grid;place-items:center;width:38px;height:38px;min-height:38px;border-radius:50%;background:var(--at-paper);border:1px solid var(--at-line);color:var(--at-ink);cursor:pointer}
.at-path-choice{display:grid;grid-template-columns:42px 1fr 22px;align-items:center;gap:12px;padding:13px 0;border-block-start:1px solid var(--at-line);text-decoration:none;color:var(--at-ink)!important}
.at-path-choice>i{display:grid;place-items:center;color:var(--at-brass)}.at-path-choice>i .at-icon{width:33px!important;height:33px!important}.at-path-choice strong,.at-path-choice small{display:block}.at-path-choice strong{font-size:1.1rem}.at-path-choice small{color:#605b4f;line-height:1.5}.at-path-choice:hover strong{text-decoration:underline}.at-dialog-contact,.at-inline-link{display:inline-flex;gap:.5em;align-items:center;color:var(--at-red)!important;text-underline-offset:.24em;font-weight:650;min-height:42px}
html[data-atlas=home] main.container{width:100%!important;max-width:none!important;padding:0!important;margin:0!important}
html[data-atlas=home] main.container>:not(.flight-hero){box-sizing:border-box;width:min(1320px,89%);margin-inline:auto!important}
html[data-atlas=home] main .flight-hero{border-radius:0;margin:0!important;border:0;border-block-end:3px solid #bb9e6e;color:#fff0d6}
html[data-atlas=home] .flight-scene{width:min(1560px,100%);min-height:clamp(525px,73svh,780px);grid-template-columns:55% 45%;padding:clamp(25px,3vw,55px) 5.4% clamp(46px,5vw,78px);margin:auto}
html[data-atlas=home] .flight-hero::after{background:linear-gradient(90deg,transparent 12%,#112c3025 43%,#0d2229d9 100%)}
html[data-atlas=home] .flight-sky img{object-position:center 88%}
html[data-atlas=home] .flight-rider{max-width:760px;width:95%;margin:auto}
html[data-atlas=home] .flight-copy{padding:0 3%;margin:0}
html[data-atlas=home] .flight-copy h1{font-size:clamp(3.4rem,5.9vw,6.3rem)!important;line-height:1.04;font-weight:550;letter-spacing:-.045em}
html[data-atlas=home] .flight-copy[dir=rtl] h1{line-height:1.34;letter-spacing:normal}
html[data-atlas=home] .flight-copy h1 span+span{color:#f1d09c}
html[data-atlas=home] .flight-copy p{font-size:clamp(1rem,1.35vw,1.28rem);margin-block:1.2rem 1.65rem;line-height:1.7}
html[data-atlas=home] .flight-browse{background:#f4ddb6;color:#302819!important;border:1px solid #e8c58d;font-weight:650;padding:.65em 1.3em;border-radius:2px}
.at-hero-lamp{display:inline-flex;align-items:center;gap:.5em;padding:8px 0;border-block-end:1px solid #d1af76;color:#fff2d9!important;text-decoration:none;font-weight:630}
.at-hero-lamp .at-icon{width:30px!important;height:30px!important;color:#e8c68a}
html[data-atlas=home] .flight-motion{right:3%;bottom:16px}
html[data-atlas=home] .home-latest{grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr);margin-block:0!important;padding-block:clamp(42px,6vw,90px);border-block-start:none;gap:clamp(22px,5.5vw,88px)}
html[data-atlas=home] .latest-rug{background:linear-gradient(130deg,#fffdf7,#f2e7d1);border:1px solid var(--at-line);border-radius:2px;grid-template-columns:minmax(0,1.13fr) minmax(100px,.85fr);padding:clamp(16px,2.1vw,33px)}
html[data-atlas=home] .latest-frame{height:clamp(190px,22vw,320px)}html[data-atlas=home] .latest-caption strong{color:var(--at-ink)}
html[data-atlas=home] .latest-reading li{border-color:var(--at-line)}html[data-atlas=home] .latest-reading time{color:#846039}
html[data-atlas=home] main h2{color:var(--at-ink);font-size:clamp(1.7rem,3.1vw,3.2rem);line-height:1.32}
html[data-atlas=home] .at-workshop{display:grid;grid-template-columns:1.1fr 1fr;gap:clamp(24px,4vw,70px);align-items:stretch;padding:clamp(35px,5vw,84px) 0}
.at-work-copy h2,.at-buy-heading h2{margin:0 0 .7rem}.at-work-copy>p{color:var(--fx-muted);max-width:65ch;line-height:1.65;margin:0 0 1.5rem}
.at-stage-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));list-style:none;padding:0;margin:0 0 .85rem;gap:0}
.at-stage-list li{margin:0;padding:0}.at-stage-list button{width:100%;height:100%;border:0;border-block-end:1px solid var(--at-line);display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:7px;padding:15px 3px;background:transparent;color:var(--at-ink);cursor:pointer;font:inherit;font-size:.88rem;line-height:1.4;text-align:center}
.at-stage-list button .at-icon{width:34px!important;height:34px!important;color:#8a683b}.at-stage-list button[aria-pressed=true]{color:#fff3d8;background:var(--at-ink);border-radius:2px}.at-stage-list button[aria-pressed=true] .at-icon{color:var(--at-gold)}
.at-work-art{position:relative;align-self:stretch;min-height:260px;overflow:hidden;isolation:isolate;border-radius:2px;background:var(--at-ink)}
.at-work-art>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.at-work-current{position:absolute;inset:auto 0 0;display:flex;align-items:center;gap:14px;padding:clamp(14px,2vw,30px);padding-block-start:45px;background:linear-gradient(0deg,#102829f5,#102829b3 60%,transparent);color:#fff3da}
.at-work-seal{display:grid;place-items:center;width:52px;height:52px;border-radius:50%;border:1px solid #dbbe83;color:var(--at-gold)}.at-work-seal .at-icon{width:33px!important;height:33px!important}
.at-work-current strong,.at-work-current small{display:block}.at-work-current small{color:#ebc88e}.at-work-current strong{font-size:1.25rem}
html[data-atlas=home] .at-purchase{display:grid;grid-template-columns:.85fr 1.15fr;gap:clamp(22px,6vw,96px);margin-block:clamp(38px,7vw,105px);padding:clamp(22px,4vw,62px);background:var(--at-ink);color:var(--at-card);border:1px solid #ac9260;position:relative}
html[data-atlas=home] .at-buy-heading h2{color:#fff1d4!important;max-width:13ch}.at-buy-heading>.at-icon{width:54px!important;height:54px!important;color:var(--at-gold);margin-block-end:12px}
.at-buy-stop{border-block-start:1px solid #a78c5f88}.at-buy-stop:last-child{border-block-end:1px solid #a78c5f88}
.at-buy-stop summary{list-style:none;display:grid;grid-template-columns:52px 1fr 20px;gap:12px;align-items:center;padding:12px 0;cursor:pointer}.at-buy-stop summary::-webkit-details-marker{display:none}
.at-buy-icon{width:48px;height:48px;border:1px solid #aa905c;border-radius:50%;display:grid;place-items:center;color:#f2d293}.at-buy-icon .at-icon{width:30px!important;height:30px!important}
.at-buy-stop summary small,.at-buy-stop summary strong{display:block}.at-buy-stop summary small{color:#dfc197;font-size:.77rem}.at-buy-stop summary strong{font-size:1.2rem}
.at-buy-stop summary i{font:normal 1.35rem/1 sans-serif;color:var(--at-gold)}.at-buy-stop[open] summary i{transform:rotate(45deg)}.at-buy-stop>div{padding-inline-start:64px;padding-block-end:8px}.at-buy-stop p{color:#f1e8d6!important;margin:0}.at-buy-stop .at-inline-link{color:#f5ce8d!important}
html[data-atlas=home] :is(.material-grid,.stock-grid,.articles-grid,.portal-grid){gap:clamp(12px,2vw,28px)}
html[data-atlas=home] :is(.material-card,.stock-card,.portal-card,.article-card){border:1px solid var(--at-line)!important;background:var(--at-card)!important;border-radius:2px!important;box-shadow:none!important}
html[data-atlas=home] .material-copy{border-block-start:2px solid var(--at-brass)}
html[data-atlas=home] :is(.section,.stock-summary){border-color:var(--at-line)!important}
html[data-atlas] .site-footer{background:var(--at-deep)!important;border-block-start:3px solid #b08c57!important;color:#eee3cd!important}
html[data-atlas] .site-footer :is(h2,h3,strong,.wordmark,a){color:#ffefd4!important}.site-footer a:hover{text-underline-offset:.25em}
html[data-atlas] .site-footer :is(p,small,.legal,.plus-code,.qom-location){color:#ddd0b7!important}

/* FARSHINEH mobile lamp */
@media screen and (max-width: 820px) {
  html[data-atlas] .at-mast-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: .625rem;
  }

  html[data-atlas] .at-mast .at-primary {
    min-inline-size: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: .2rem .65rem;
  }

  html[data-atlas] .at-mast .at-tools {
    gap: .5rem;
    flex-wrap: nowrap;
  }

  html[data-atlas] .at-mast .at-guide-trigger {
    display: grid;
    position: relative;
    place-items: center;
    flex: 0 0 44px;
    inline-size: 44px;
    block-size: 44px;
    padding: 0;
    gap: 0;
    border: 0 !important;
    border-radius: 50%;
  }

  html[data-atlas] .at-mast .at-guide-trigger::before {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid #bd9b61;
    border-radius: inherit;
    pointer-events: none;
  }

  html[data-atlas] .at-mast .at-guide-trigger .at-icon {
    width: 26px !important;
    height: 26px !important;
    color: #f0cd85;
  }

  html[data-atlas] .at-mast .at-guide-trigger span {
    display: none;
  }

  html[data-atlas] .at-mast .at-lang summary {
    justify-content: center;
    min-inline-size: 44px;
    min-block-size: 44px;
    padding-inline: 4px;
    gap: 4px;
    white-space: nowrap;
  }
}

@media screen and (max-width: 700px) {
  html[data-atlas] .at-mast-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  html[data-atlas] .at-mast .wordmark {
    font-size: clamp(1.1rem, 5vw, 1.38rem) !important;
  }
}

/* FARSHINEH unframed lamp */
@media screen {
  html[data-atlas] :is(.at-mast .at-guide-trigger[data-brand-lamp], .at-hero-lamp[data-open-lamp]) {
    --lamp-size: 28px;
    --smoke-x: calc(50% - var(--lamp-size) * .40625);
    --smoke-y: calc(50% + var(--lamp-size) * .09);
    display: grid;
    place-items: center;
    position: relative;
    flex: 0 0 44px;
    inline-size: 44px;
    block-size: 44px;
    padding: 0;
    gap: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
  }

  html[data-atlas] .at-mast .at-guide-trigger[data-brand-lamp] span {
    display: none;
  }

  html[data-atlas] :is(.at-mast .at-guide-trigger[data-brand-lamp], .at-hero-lamp[data-open-lamp]) .at-icon {
    width: var(--lamp-size) !important;
    height: var(--lamp-size) !important;
    color: #f0cd85;
  }

  html[data-atlas] :is(.at-mast .at-guide-trigger[data-brand-lamp], .at-hero-lamp[data-open-lamp]) .at-icon path:nth-of-type(2) {
    opacity: 0;
  }

  html[data-atlas] :is(.at-mast .at-guide-trigger[data-brand-lamp], .at-hero-lamp[data-open-lamp])::before,
  html[data-atlas] :is(.at-mast .at-guide-trigger[data-brand-lamp], .at-hero-lamp[data-open-lamp])::after {
    content: "";
    position: absolute;
    inset: auto;
    pointer-events: none;
    border: 0;
    border-radius: 0;
    opacity: 0;
    background: #e8be71;
  }

  html[data-atlas] .at-hero-lamp .lamp-readable {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
  }

  /* The fixed SVG viewBox puts the spout on the left in both writing directions. */
  html[data-atlas] :is(.at-mast .at-guide-trigger[data-brand-lamp], .at-hero-lamp[data-open-lamp])::before {
    left: calc(var(--smoke-x) - 3px);
    bottom: var(--smoke-y);
    width: 9px;
    height: 13px;
    transform-origin: 3px bottom;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 13'%3E%3Cpath d='M3 12c-3-3 4-3 2-6C3 4 3 3 6 1' fill='none' stroke='black' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  html[data-atlas] :is(.at-mast .at-guide-trigger[data-brand-lamp], .at-hero-lamp[data-open-lamp])::after {
    left: calc(var(--smoke-x) + 1px);
    bottom: calc(var(--smoke-y) + 11px);
    width: 7px;
    height: 7px;
    clip-path: polygon(50% 0, 62% 36%, 100% 50%, 62% 62%, 50% 100%, 37% 62%, 0 50%, 37% 37%);
  }

  html[data-atlas] :is(.at-mast .at-guide-trigger[data-brand-lamp], .at-hero-lamp[data-open-lamp]):focus-visible {
    outline: none !important;
    background: linear-gradient(#f3d49a, #f3d49a) center calc(100% - 4px) / 20px 2px no-repeat !important;
  }
}

@media screen and (max-width: 820px) {
  html[data-atlas] :is(.at-mast .at-guide-trigger[data-brand-lamp], .at-hero-lamp[data-open-lamp]) {
    --lamp-size: 21px;
  }
}

@media screen and (prefers-reduced-motion: no-preference) {
  html[data-atlas] :is(.at-mast .at-guide-trigger[data-brand-lamp], .at-hero-lamp[data-open-lamp])::before {
    animation: farshineh-spout-smoke 8s ease-in-out infinite;
  }

  html[data-atlas] :is(.at-mast .at-guide-trigger[data-brand-lamp], .at-hero-lamp[data-open-lamp])::after {
    animation: farshineh-spout-star 8s ease-in-out infinite;
  }
}

@keyframes farshineh-spout-smoke {
  0%, 5% { opacity: 0; transform: translateY(0) scale(.65); }
  13% { opacity: .9; transform: translateY(-1px) scale(.94); }
  21% { opacity: .65; transform: translateY(-2.5px) scale(1); }
  29%, 100% { opacity: 0; transform: translateY(-4px) scale(1.04); }
}

@keyframes farshineh-spout-star {
  0%, 19% { opacity: 0; transform: scale(.68); }
  29% { opacity: .95; transform: scale(1); }
  40%, 100% { opacity: 0; transform: scale(.76); }
}

@media (forced-colors: active) {
  html[data-atlas] :is(.at-mast .at-guide-trigger[data-brand-lamp], .at-hero-lamp[data-open-lamp]):focus-visible {
    outline: 2px solid Highlight !important;
    outline-offset: -4px;
  }
}
